summaryrefslogtreecommitdiff
path: root/sys-apps/ipmitool
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-10 10:42:05 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-10 10:42:05 +0100
commit946859e0e36904cffb3e0ccbccb6b7b1347c1cc8 (patch)
tree0acec77e64f765c013ceda868659a8e125e429df /sys-apps/ipmitool
parentb9baffd9af9383cc886b1583814fe15163017d80 (diff)
gentoo auto-resync : 10:09:2022 - 10:42:05
Diffstat (limited to 'sys-apps/ipmitool')
-rw-r--r--sys-apps/ipmitool/Manifest12
-rw-r--r--sys-apps/ipmitool/files/exchange-bmc-os-info.initd23
-rw-r--r--sys-apps/ipmitool/files/ipmievd.confd27
-rw-r--r--sys-apps/ipmitool/files/ipmievd.initd28
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.19-CVE-2011-4339.patch20
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.19-fix-buffer-overflow.patch21
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.19-manpage-longlines.patch55
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.19-missing-func-decl.patch32
-rw-r--r--sys-apps/ipmitool/files/ipmitool-1.8.19-nvidia-iana.patch23
-rw-r--r--sys-apps/ipmitool/files/log_bmc.initd25
-rw-r--r--sys-apps/ipmitool/ipmitool-1.8.19.ebuild147
11 files changed, 413 insertions, 0 deletions
diff --git a/sys-apps/ipmitool/Manifest b/sys-apps/ipmitool/Manifest
index 38063daeb102..d49d8e231e79 100644
--- a/sys-apps/ipmitool/Manifest
+++ b/sys-apps/ipmitool/Manifest
@@ -1,10 +1,22 @@
AUX exchange-bmc-os-info-1.8.18.initd 512 BLAKE2B 43307b959b3a2df518bc667e696f9e8a3dc113a572beb813c3c560f6c19db813195f26f22638261cf40f7f94599a62497e47edb30f24b9f7d6192be973d80795 SHA512 d9a9a2a984e5289e74af63660ef82b7f45e4cb60f4fefe4e1e3a1b9bac9ddc3adfcb177899b3cb1521f91b461cb807ab9edcbf4def96060287f50c9435ab1d29
+AUX exchange-bmc-os-info.initd 512 BLAKE2B 43307b959b3a2df518bc667e696f9e8a3dc113a572beb813c3c560f6c19db813195f26f22638261cf40f7f94599a62497e47edb30f24b9f7d6192be973d80795 SHA512 d9a9a2a984e5289e74af63660ef82b7f45e4cb60f4fefe4e1e3a1b9bac9ddc3adfcb177899b3cb1521f91b461cb807ab9edcbf4def96060287f50c9435ab1d29
+AUX ipmievd.confd 677 BLAKE2B 7656944c3a9e1f8c9ce2a5923da7dda420386020c14449fb182ce9247122564cf6e5179e97bf5396e81e3c5ded8a6791b2e5804327697149e6be097f82e105d6 SHA512 0e494de95d7a193293005b3d93e0ea0c7ada44e54f48259b197e1eb9846f78d986cefba59ebd70484c26e4ac5d3ae38abfc5a6cd1f74785cb3806c0ba35ee572
+AUX ipmievd.initd 898 BLAKE2B f768c90e913d0036113f39716a04b5c28052cb1be78b27221549f871b392df26e989edea20ff8eeffba38150d2b5687ca189d0e471b43e85ae2e4af3a7abb72c SHA512 2f46f3ad1f3d224a3f12fe1feaf7a2cee84dab6f93f788f4e9e82baf42ccbd3e22aa2b51c76646e1bd2a812bf8c673c780a48dfd2c5ec116f9fda944cb1d48cb
AUX ipmievd.service 158 BLAKE2B 5d02e8647670086bd46160417de32cd199ba1fe731386fce04c2b56183fe6d7885b59199f30a7bfdfc764d7eb021d82554154766fbd23407af950d4e274033ab SHA512 8e1c3ee301bc002d9fe8146d224b9e4d4d054503c118e713c48763eb6352b6e6efe947380d1ab9fa0205ef556683e29ead321360f00bf8e093eb2b48eaa5dfb9
AUX ipmitool-1.8.18-ipmievd.confd 677 BLAKE2B 7656944c3a9e1f8c9ce2a5923da7dda420386020c14449fb182ce9247122564cf6e5179e97bf5396e81e3c5ded8a6791b2e5804327697149e6be097f82e105d6 SHA512 0e494de95d7a193293005b3d93e0ea0c7ada44e54f48259b197e1eb9846f78d986cefba59ebd70484c26e4ac5d3ae38abfc5a6cd1f74785cb3806c0ba35ee572
AUX ipmitool-1.8.18-ipmievd.initd 898 BLAKE2B f768c90e913d0036113f39716a04b5c28052cb1be78b27221549f871b392df26e989edea20ff8eeffba38150d2b5687ca189d0e471b43e85ae2e4af3a7abb72c SHA512 2f46f3ad1f3d224a3f12fe1feaf7a2cee84dab6f93f788f4e9e82baf42ccbd3e22aa2b51c76646e1bd2a812bf8c673c780a48dfd2c5ec116f9fda944cb1d48cb
+AUX ipmitool-1.8.19-CVE-2011-4339.patch 922 BLAKE2B 7b6d03a674a891c672402faf664de5411320f40375ab49403fd7f5de12f19190aeb51f029856329dc1c998100a0e17f5c33a8a69f76ce4e9fd145c42ee952f98 SHA512 e3709eff2f822194b302a2642b9fc21c8a570d2180118b65a686850fdd8286128306b81b455987e133147094f5acf9dc367d38714d77f4ee79d4b39d9537b095
+AUX ipmitool-1.8.19-fix-buffer-overflow.patch 1063 BLAKE2B 3e7f010c830a5a0b98c1412a060e213c489c838f49d7fc0518e95f6ac00f2a86e8e2214219ad6d63d6981d553b76d7d288c96a652ad7e4998d138c87951aacf0 SHA512 1630246f4718203b43ecfbdf0cfd21ea81f4e91a50f96942e08e21f732e637f93453e361e9869b482f7336a72ffe879befb114a201b7c3fbeb9d4a86e8ecd3bd
+AUX ipmitool-1.8.19-manpage-longlines.patch 2564 BLAKE2B 61960109491d051f60b5708a5e04849e43e89c61a7c01c2752b10a8fc06468af0f77e5333e1c469526503a5791a24888198b53c466c12d4327d6b1518e258a17 SHA512 13a78926d96999d4e05c83aae74ede176dc806865c0a7ee5e888b3c93728ebf96214d98beb23b2f53b60441d88774b06ced205ba2f5e4198271ffb30f4470a73
+AUX ipmitool-1.8.19-missing-func-decl.patch 896 BLAKE2B 49b8e6c0029498bd510e94eb061f04a00b5d5f733ccda654c4a74bfb972e0205af587b75931286bd84397829cb7428dab54d6fda1a4b7ca5ee6dfa43ab89f0bb SHA512 ef08e6b4b9d42eafd6535ac1089a862ca774581c9242be7c7710bcb55c6a810c002d63ac1ba11f896a47a01bc162b4d917656d5d9671dca4d71578f245948e79
+AUX ipmitool-1.8.19-nvidia-iana.patch 1243 BLAKE2B 9e97ece902caa6f222fd23d5f1be751c888b77afc1ebd347edb143eedbe3792b317407d7caf94a4eb86ce0149c4ffa62be5f337dacf8a4a142e626d23e369711 SHA512 7ea4c4b1636ac69f5e801873b48c4c8b7c311f55d1adbb7bd08f34d88aaa17e5e13ac84d5a69e7660b2cd0dd737fcb8685fe2253c51b2fca4b432fa374a3dfb2
AUX log_bmc-1.8.18.initd 570 BLAKE2B 7b21b7888f386953c001a635fa4d1fd3b79a1eb9920fc6cefe6770231d67989d47f172e783416d12feb399e882e2fe74b26fdef162fafb85cd686ec83d414d01 SHA512 2d5b62ee5f694629e8f5c4c2d1fcdf7a3d42078f488e43cd1b34193619918ea7429da2bcb236b9216cfabaf94d8c5224b99194023a8db626884c4c766f15136a
+AUX log_bmc.initd 570 BLAKE2B 7b21b7888f386953c001a635fa4d1fd3b79a1eb9920fc6cefe6770231d67989d47f172e783416d12feb399e882e2fe74b26fdef162fafb85cd686ec83d414d01 SHA512 2d5b62ee5f694629e8f5c4c2d1fcdf7a3d42078f488e43cd1b34193619918ea7429da2bcb236b9216cfabaf94d8c5224b99194023a8db626884c4c766f15136a
+DIST enterprise-numbers-1.8.19.xz 1500100 BLAKE2B 15c21792bf46220c5908ecf4f0ddafe2fdf13a1799c054a0cb0cb647e7f489768855c4c25fba8a4408505ff0cf02d1a43408d5c4de557b1b30fe8abb477a7926 SHA512 e88cb459a9c8a3172770bcfefbec0a7ad7d65395063c8c0173fce776ea0beb7ad9f3610e636dfbd71d0af8c952c2b9bc6c25c815daa4ab281bed983cbe2ebcc4
DIST enterprise-numbers.2020-10-21.xz 1426932 BLAKE2B bfe39ceea321ba47cd40eafa67862eb4dfd6dc29b192afb20ad0c908cd93a16b4103c5de64d042df012417c8cadc03000f2b2a00779bcc582a430603cad5f3cf SHA512 4a854a56e8ed51997c320cbfba041d43cb98b14743ef80b67e701942068d3729604abaedb617655a83ca21a7e20ea5a622ede4de317ca492cefd46da784d28f3
DIST ipmitool-1.8.18_p20201004.tar.gz 638493 BLAKE2B 52f4ec8c82336b88640d1b91fc17af8f2fe0948a5c48c16067867dcad0852168d48bb21fdd99bde7ed957b66df888fd369c909079d1f81c861acd8c7f8dfa6f2 SHA512 8d72eef3584f4d2c86bfe43f70b5d687f3b7bbdf75b8979f7132c5c98b01baae22c336e540c197652187749fc9bb221a92e546b56e5cf2eb5650fad5094e9433
+DIST ipmitool-1.8.19.tar.gz 641383 BLAKE2B e1db12bb7301cb4b551f87fbfcd405b3597a1f32c45447b2b239d9d43a2cdbe213ee5408291d50801035cc80e28078fb3a778ab28335665bc3316798c13ea1fc SHA512 2d91706e9feba4b2ce4808eca087b81b842c4292a5840830001919c06ec8babd8f8761b74bb9dcf8fbc7765f028a5b1a192a3c1b643f2adaa157fed6fb0d1ee3
DIST ipmitool_1.8.18-9.debian-ported-gentoo.tar.xz 3208 BLAKE2B b37a127eff361039b3b810e19dd97f0c395462b658803f56f10f2dd1abbbe92743dc409ce6b83560db15621b7fa7a3c0f989100077893993df18108a082e49d2 SHA512 0f7646a2307ac98425e99dece9d3e3b23026136a97524151efdecc910fb537af41a91702782989046e44163da98610fa05792878473e228b45c16351f6015a45
EBUILD ipmitool-1.8.18_p20201004-r3.ebuild 6249 BLAKE2B 3d5060e5488181de705843c4845ac1c1ff50fb9f2096ab2876b111db2312079cb6111682f34faaa9edb3b2e30fb86db1a2d7359c47f7289d70b2087a3827526d SHA512 ebfc290090a08042a469ed30705c0f16f9b6e6ab15d8a0bf18f244037017b76a0d3299a15eb9ea22abf116d31b1bb74f6ec441b2199ea2fd7ee2694bd3ff3037
+EBUILD ipmitool-1.8.19.ebuild 4146 BLAKE2B e0725fcaaeba10ad7651543dad3cebe8497828aa81bdbdf344425405b4672c56b86779b930db67d5beeef17ff7e47347f328e33556f2cdda58c3c953cfb2e471 SHA512 f8f3fd427ffd425414bf9dfa96c94011e57bac32de14cd97ff2a1de6e3c087739304de79c4ce2bd4450560fc13e34f9f142b61cb573899a517bf900bfaed6ceb
MISC metadata.xml 693 BLAKE2B 7a0cab3772eb4ebc0529b22ab7fa21eae882da4b652fe67c3abfc8e25b1f5a6d14a52089ec676a17a0a925436675ec80409cde8d2554c4f6dce50c4afc736b14 SHA512 8a2ace6c302db4437e6903899edf87aa005f47c5e84969e4d846f67e97a027bda05fced0ca2b1a8a09f12ed5be3ce9bdabfc1b75643c2a9435ba706a452eb055
diff --git a/sys-apps/ipmitool/files/exchange-bmc-os-info.initd b/sys-apps/ipmitool/files/exchange-bmc-os-info.initd
new file mode 100644
index 000000000000..9c63983f21f3
--- /dev/null
+++ b/sys-apps/ipmitool/files/exchange-bmc-os-info.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/init.d/exchange-bmc-os-info
+
+name="exchange-bmc-os-info"
+description="Exchange Information between BMC and OS"
+command=/usr/libexec/exchange-bmc-os-info
+command_args=""
+: "${DEVICENUM:=0}" # which BMC
+required_files=/dev/ipmi${DEVICENUM}
+
+depend() {
+ use hostname modules
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+start() {
+ "${command}" start
+}
+stop() {
+ "${command}" stop
+}
diff --git a/sys-apps/ipmitool/files/ipmievd.confd b/sys-apps/ipmitool/files/ipmievd.confd
new file mode 100644
index 000000000000..b860c23c7f89
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmievd.confd
@@ -0,0 +1,27 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/conf.d/ipmievd
+
+# Interfaces:
+# open Linux OpenIPMI Interface
+# imb Intel IMB Interface
+# bmc IPMI v2.0 BMC interface
+# lan IPMI v1.5 LAN Interface
+# lanplus IPMI v2.0 RMCP+ LAN Interface
+
+INTERFACE="open"
+
+# Commands:
+# open Use OpenIPMI for asyncronous notification of events
+# sel Poll SEL for notification of events
+#
+# 'pidfile=...' will be appended!
+COMMAND="open daemon"
+
+# Options.
+
+OPTIONS=""
+
+# Device number:
+# Used to target a specific BMC on a multi-node, multi-BMC system via the open interface
+DEVICENUM=0
diff --git a/sys-apps/ipmitool/files/ipmievd.initd b/sys-apps/ipmitool/files/ipmievd.initd
new file mode 100644
index 000000000000..e8ef2c39d454
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmievd.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# /etc/init.d/ipmievd
+
+depend() {
+ use logger modules
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+# TODO: ipmievd has a mode where it could be used to monitor multiple BMCs via
+# DEVICENUM or remote systems, and it would be valid to run multiple instances.
+# That is not supported by this init script at this time.
+
+description="IPMI event daemon for sending events to syslog LOCAL4"
+
+: "${DEVICENUM:=0}"
+: "${INTERFACE:=open}"
+: "${COMMAND:=open daemon}"
+: "${OPTIONS:=}"
+
+daemon=ipmievd
+
+pidfile=/run/${daemon}.pid${DEVICENUM} # see manpage re suffix
+command=/usr/sbin/${daemon}
+cachefile=/run/${daemon}.${DEVICENUM}.sdr-cache
+command_args="-d ${DEVICENUM} -S ${cachefile} -I ${INTERFACE} ${OPTIONS} ${COMMAND} pidfile=${pidfile}"
+required_files=/dev/ipmi$DEVICENUM
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
new file mode 100644
index 000000000000..4a25280662b5
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-CVE-2011-4339.patch
@@ -0,0 +1,20 @@
+Description: CVE-2011-4339
+ insecure file permission when creating PID files
+ based on 112_fix_CVE-2011-4339
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651917
+Forwarded: https://sourceforge.net/p/ipmitool/patches/99/
+Last-Update: 2020-10-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/helper.c ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/helper.c
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/helper.c 2020-08-07 00:53:06.000000000 -0700
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/helper.c 2020-10-21 13:59:02.335206233 -0700
+@@ -917,7 +917,6 @@
+ lprintf(LOG_ERR, "chdir failed: %s (%d)", strerror(errno), errno);
+ exit(1);
+ }
+- umask(0);
+
+ for (fd=0; fd<64; fd++) {
+ if (fd != intf->fd)
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
new file mode 100644
index 000000000000..ceeffde085a7
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-fix-buffer-overflow.patch
@@ -0,0 +1,21 @@
+Description: fix buffer overflow
+ based on 101_fix_buf_overflow from Leo Iannacone <l3on@ubuntu.com>
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug: TSOL buffer overflow
+Bug-ubuntu: https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug/633054
+Forwarded: https://sourceforge.net/p/ipmitool/patches/100/
+Last-Update: 2020-20-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/ipmi_tsol.c ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/ipmi_tsol.c
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/ipmi_tsol.c 2020-08-07 00:53:06.000000000 -0700
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/ipmi_tsol.c 2020-10-21 13:55:58.571536858 -0700
+@@ -374,7 +374,7 @@
+ char *recvip = NULL;
+ char in_buff[IPMI_BUF_SIZE];
+ char out_buff[IPMI_BUF_SIZE * 8];
+- char buff[IPMI_BUF_SIZE + 4];
++ char buff[IPMI_BUF_SIZE * 8 + 4];
+ int fd_socket, result, i;
+ int out_buff_fill, in_buff_fill;
+ int ip1, ip2, ip3, ip4;
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
new file mode 100644
index 000000000000..6c0e00da3e15
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-manpage-longlines.patch
@@ -0,0 +1,55 @@
+Description: long lines in man-page
+ prevent "can't break line" warnings
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: not-needed
+Last-Update: 2020-10-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/doc/ipmitool.1.in ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/doc/ipmitool.1.in
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/doc/ipmitool.1.in 2020-08-07 00:53:06.000000000 -0700
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/doc/ipmitool.1.in 2020-10-21 14:00:23.383643880 -0700
+@@ -1038,7 +1038,7 @@
+ AMC slot B2 topology:
+ Port 0 =====> On Carrier Device ID 0, Port 3
+ Port 2 =====> AMC slot B1, Port 2
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ From Carrier file: carrierfru
+ On Carrier Device ID 0 topology:
+ Port 0 =====> AMC slot B1, Port 4
+@@ -1094,7 +1094,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
+ Matching Result
+ - From On-Carrier Device ID 0
+@@ -1107,7 +1107,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ On-Carrier Device vs AMC slot A2
+ AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
+ Matching Result
+@@ -1121,7 +1121,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ AMC slot B1 vs AMC slot A2
+ AMC slot A2 port 2 ==> AMC slot B1 port 2
+ Matching Result
+@@ -1135,7 +1135,7 @@
+ \-Link Type: AMC.3 Storage
+ \-Link Type extension: Serial Attached SCSI (SAS/SATA)
+ \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ .TP
+ \fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+ .br
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.19-missing-func-decl.patch b/sys-apps/ipmitool/files/ipmitool-1.8.19-missing-func-decl.patch
new file mode 100644
index 000000000000..5057fcaf0525
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-missing-func-decl.patch
@@ -0,0 +1,32 @@
+https://github.com/ipmitool/ipmitool/pull/360
+
+From a9e262480722f5affd237ee10d0bbc8c55617cb7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 2 Sep 2022 07:30:10 -0700
+Subject: [PATCH] ipmi_fru.c: Provide missing function declarations
+
+Fixes build with clang-15+
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/ipmi_fru.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
+index 3d1d8a1a..5c5661cf 100644
+--- a/lib/ipmi_fru.c
++++ b/lib/ipmi_fru.c
+@@ -60,6 +60,13 @@ static const char *section_id[4] = {
+ "Board Section",
+ "Product Section"
+ };
++/* From lib/ipmi_hpmfwupg.c: */
++uint16_t
++ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf);
++
++/* From src/plugins/ipmi_intf.c: */
++uint16_t
++ipmi_intf_get_max_response_data_size(struct ipmi_intf * intf);
+
+ static const char * combined_voltage_desc[] = {
+ "12 V",
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
new file mode 100644
index 000000000000..31b1a42dcf59
--- /dev/null
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-nvidia-iana.patch
@@ -0,0 +1,23 @@
+Description: Add IANA ID for NVIDIA hardware
+ Add the NVIDIA IANA ID to the hardcoded list used in ipmitool <= 1.8.18.
+ After upstream commit "9d41136 ID:491 - Fetch vendor IDs from IANA", ipmitool
+ generates a list of vendor IDs dynamically at build time, so we can drop this
+ patch in future releases.
+Author: dann frazier <dannf@debian.org>
+Origin: backport
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903616
+Forwarded: not-needed
+Last-Update: 2020-10-21
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff -Nuar --exclude '*.orig' --exclude '*.rej' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/include/ipmitool/ipmi.h ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/include/ipmitool/ipmi.h
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/include/ipmitool/ipmi.h 2020-08-07 00:53:06.000000000 -0700
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/include/ipmitool/ipmi.h 2020-10-21 14:04:11.675128602 -0700
+@@ -281,6 +281,7 @@
+ /* 4769 for [IBM Corporation] */
+ IPMI_OEM_IBM_4769 = 4769,
+ IPMI_OEM_MAGNUM = 5593,
++ IPMI_OEM_NVIDIA = 5703,
+ IPMI_OEM_TYAN = 6653,
+ IPMI_OEM_QUANTA = 7244,
+ IPMI_OEM_VIKING = 9237,
diff --git a/sys-apps/ipmitool/files/log_bmc.initd b/sys-apps/ipmitool/files/log_bmc.initd
new file mode 100644
index 000000000000..4064edf3b84d
--- /dev/null
+++ b/sys-apps/ipmitool/files/log_bmc.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="log_bmc"
+description="Add SEL entries to indicate OS Boot status"
+command=/usr/libexec/log_bmc.sh
+command_args=""
+: "${DEVICENUM:=0}" # which BMC
+required_files=/dev/ipmi${DEVICENUM}
+
+depend() {
+ use modules
+ after ipmievd # to capture our own log event
+ keyword -docker -lxc -prefix -systemd-nspawn
+}
+
+start() {
+ # TODO: should this keep start so it only fires once per boot?
+ "${command}" os_boot
+}
+
+stop() {
+ "${command}" os_shutdown
+}
diff --git a/sys-apps/ipmitool/ipmitool-1.8.19.ebuild b/sys-apps/ipmitool/ipmitool-1.8.19.ebuild
new file mode 100644
index 000000000000..318e661f232d
--- /dev/null
+++ b/sys-apps/ipmitool/ipmitool-1.8.19.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="Utility for controlling IPMI enabled devices"
+HOMEPAGE="https://github.com/ipmitool/ipmitool"
+
+COMMIT_ID=
+if [[ -n "${COMMIT_ID}" ]]; then
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${COMMIT_ID}"
+else
+ MY_P="${PN^^}_${PV//./_}"
+ SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/${MY_P}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${MY_P}"
+fi
+
+# to generate: `make enterprise-numbers` from git checkout of release tag
+SRC_URI+="
+ https://dev.gentoo.org/~ajak/distfiles/${CATEGORY}/${PN}/enterprise-numbers-${PV}.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
+IUSE="openbmc openipmi static"
+
+RDEPEND="dev-libs/openssl:0=
+ sys-libs/readline:0=
+ openbmc? ( sys-apps/systemd:0= )"
+DEPEND="${RDEPEND}
+ >=sys-devel/autoconf-2.69-r5
+ virtual/os-headers
+ openipmi? ( sys-libs/openipmi )"
+ #freeipmi? ( sys-libs/freeipmi )
+# ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi )
+# but it doesn't actually need either.
+
+PATCHES=(
+ "${FILESDIR}/${P}-missing-func-decl.patch"
+ # yoinked out of debian's patchset, previously carried in a SRC_URI
+ # tarball
+ "${FILESDIR}/${P}-fix-buffer-overflow.patch"
+ "${FILESDIR}/${P}-CVE-2011-4339.patch"
+ "${FILESDIR}/${P}-manpage-longlines.patch"
+ "${FILESDIR}/${P}-nvidia-iana.patch"
+)
+
+src_prepare() {
+ default
+
+ # Gentoo chooses to install ipmitool in /usr/sbin
+ # Where RedHat chooses /usr/bin
+ sed -i -e \
+ 's,/usr/bin/ipmitool,/usr/sbin/ipmitool,g' \
+ "${S}"/contrib/* \
+ || die "sed bindir failed"
+
+ eautoreconf
+
+ # If this file is not present, then ipmitool will try to download it during make install!
+ cp -al "${WORKDIR}/enterprise-numbers-${PV}" "${S}/enterprise-numbers" \
+ || die "Could not place IANA enterprise-numbers"
+}
+
+src_configure() {
+ # - LIPMI and BMC are the Solaris libs
+ # - OpenIPMI is unconditionally enabled in the configure as there is compat
+ # code that is used if the library itself is not available
+ # FreeIPMI does build now, but is disabled until the other arches keyword it
+ # `use_enable freeipmi intf-free` \
+ # --enable-ipmievd is now unconditional
+
+ local econfargs=(
+ $(use_enable static) \
+ --enable-ipmishell \
+ --enable-intf-lan \
+ --enable-intf-usb \
+ $(use_enable openbmc intf-dbus) \
+ --enable-intf-lanplus \
+ --enable-intf-open \
+ --enable-intf-serial \
+ --disable-intf-bmc \
+ --disable-intf-dummy \
+ --disable-intf-free \
+ --disable-intf-imb \
+ --disable-intf-lipmi \
+ --disable-internal-md5 \
+ --with-kerneldir=/usr \
+ --bindir=/usr/sbin \
+ --runstatedir=/run \
+ CFLAGS="${CFLAGS}"
+ )
+
+ econf "${econfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" PACKAGE="${PF}" install
+ into /usr
+
+ newinitd "${FILESDIR}/ipmievd.initd" ipmievd
+ newconfd "${FILESDIR}/ipmievd.confd" ipmievd
+
+ # From debian, less configurable than OpenRC
+ systemd_dounit "${FILESDIR}/ipmievd.service"
+
+ dosbin contrib/bmclanconf
+
+ exeinto /usr/libexec
+ doexe contrib/log_bmc.sh
+ newinitd "${FILESDIR}/log_bmc.initd" log_bmc
+
+ # contrib/exchange-bmc-os-info.init.redhat
+ # contrib/exchange-bmc-os-info.service.redhat
+ # contrib/exchange-bmc-os-info.sysconf
+ exeinto /usr/libexec
+ newexe contrib/exchange-bmc-os-info.init.redhat exchange-bmc-os-info
+
+ insinto /etc/sysconfig
+ newins contrib/exchange-bmc-os-info.sysconf exchange-bmc-os-info
+
+ systemd_newunit contrib/exchange-bmc-os-info.service.redhat exchange-bmc-os-info.service
+ newinitd "${FILESDIR}/exchange-bmc-os-info.initd" exchange-bmc-os-info
+
+ # contrib/bmc-snmp-proxy
+ # contrib/bmc-snmp-proxy.service
+ # contrib/bmc-snmp-proxy.sysconf
+ exeinto /usr/libexec
+ doexe contrib/bmc-snmp-proxy
+
+ insinto /etc/sysconfig
+ newins contrib/bmc-snmp-proxy.sysconf bmc-snmp-proxy
+
+ systemd_dounit contrib/bmc-snmp-proxy.service
+ # TODO: initd for bmc-snmp-proxy
+
+ insinto "/usr/share/${PN}"
+ doins contrib/oem_ibm_sel_map
+
+ cd "${S}/contrib"
+
+ docinto contrib
+ dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README
+}