* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dmidecode/, sys-apps/dmidecode/files/
@ 2018-03-13 15:18 Lars Wendler
0 siblings, 0 replies; 2+ messages in thread
From: Lars Wendler @ 2018-03-13 15:18 UTC (permalink / raw
To: gentoo-commits
commit: 903377ade6e5a8af8f51413457a8f8327aa11002
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 13 15:17:58 2018 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Mar 13 15:18:12 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=903377ad
sys-apps/dmidecode: Removed old.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/dmidecode/Manifest | 1 -
sys-apps/dmidecode/dmidecode-2.12-r1.ebuild | 43 -----------------
.../files/2.12-supported-smbios-version.patch | 55 ----------------------
3 files changed, 99 deletions(-)
diff --git a/sys-apps/dmidecode/Manifest b/sys-apps/dmidecode/Manifest
index 73149901d34..55c8d215754 100644
--- a/sys-apps/dmidecode/Manifest
+++ b/sys-apps/dmidecode/Manifest
@@ -1,3 +1,2 @@
-DIST dmidecode-2.12.tar.bz2 55191 BLAKE2B b04ecd5d53a17a5bab60754651ddc90030f3d99c851a747983c92adf0faeec7f92ac9864d6c54cf70893aaf90db8567f60b8d0c6d9f8d4330b6981fe7f26d278 SHA512 15d5a6dca04de48267f969f6866079915964a8a3abad083b1720a4425723f9c100770d05c0d475df9609c5b54741f231a587761d1beb1ae6de4b2836d60724c4
DIST dmidecode-3.0.tar.xz 58704 BLAKE2B d3e22cfeb8f537f461523d0927cc5eb5fa6214638b8a9360b2159abff1b9f60c8a8753f24a233a77f7c413b074f9a910f000a0c49ca166ebf3297ad673e9fb93 SHA512 fa31190e43ae7a0b61f6313b45f5eba3ab66390accd587129419e48fca931b631cbb331d6893cf0c1bfca94c86ff8c557215166e0881dee93b3af10a86878eb1
DIST dmidecode-3.1.tar.xz 61204 BLAKE2B 439e265dd3f7b225d61b5d4228c0a77b25dd44b5d3672fdd9bbe432f5ae59ac23d2abd80e40621cda934643c9819b05f34d4f5befc8a75b93ae1840caf717cea SHA512 226557ad5747a2a2eb54a938543373b9ddcff032d330ca3b9a066cc81c0e137028f606ffedc042e0220b523346e2f2f7abb0e4b8b34a8bd173719aa858519de9
diff --git a/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild b/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild
deleted file mode 100644
index 03c53646f8f..00000000000
--- a/sys-apps/dmidecode/dmidecode-2.12-r1.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit flag-o-matic toolchain-funcs eutils
-
-DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
-HOMEPAGE="http://www.nongnu.org/dmidecode/"
-SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="-* amd64 arm ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-solaris"
-IUSE="selinux"
-
-RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
-DEPEND=""
-
-src_prepare() {
- epatch "${FILESDIR}/${PV}-supported-smbios-version.patch"
- sed -i \
- -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
- -e "/^docdir/s:dmidecode:${PF}:" \
- -e '/^PROGRAMS !=/d' \
- Makefile || die
-}
-
-src_compile() {
- emake \
- CFLAGS="${CFLAGS} ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- CC="$(tc-getCC)"
-}
-
-pkg_postinst() {
- if [[ ${CHOST} == *-solaris* ]] ; then
- einfo "dmidecode needs root privileges to read /dev/xsvc"
- einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
- einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
- einfo "information without requiring root privileges."
- fi
-}
diff --git a/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch b/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch
deleted file mode 100644
index 84feaca79ef..00000000000
--- a/sys-apps/dmidecode/files/2.12-supported-smbios-version.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -uNr dmidecode-2.12.ORIG/dmidecode.c dmidecode-2.12/dmidecode.c
---- dmidecode-2.12.ORIG/dmidecode.c 2014-05-06 14:24:27.703057950 +0100
-+++ dmidecode-2.12/dmidecode.c 2014-05-06 14:24:43.136058719 +0100
-@@ -69,7 +69,7 @@
- #define out_of_spec "<OUT OF SPEC>"
- static const char *bad_index = "<BAD INDEX>";
-
--#define SUPPORTED_SMBIOS_VER 0x0207
-+#define SUPPORTED_SMBIOS_VER 0x0208
-
- /*
- * Type-independant Stuff
-@@ -712,7 +712,6 @@
- { 0x3D, "Opteron 6200" },
- { 0x3E, "Opteron 4200" },
- { 0x3F, "FX" },
--
- { 0x40, "MIPS" },
- { 0x41, "MIPS R4000" },
- { 0x42, "MIPS R4200" },
-@@ -729,7 +728,6 @@
- { 0x4D, "Opteron 6300" },
- { 0x4E, "Opteron 3300" },
- { 0x4F, "FirePro" },
--
- { 0x50, "SPARC" },
- { 0x51, "SuperSPARC" },
- { 0x52, "MicroSPARC II" },
-@@ -1176,7 +1174,7 @@
- "Socket LGA1356-3" /* 0x2C */
- };
-
-- if (code >= 0x01 && code <= 0x2A)
-+ if (code >= 0x01 && code <= 0x2C)
- return upgrade[code - 0x01];
- return out_of_spec;
- }
-@@ -2236,7 +2234,7 @@
- if (code == 0)
- printf(" Unknown");
- else
-- printf(" %.3f V", (float)(i16)code / 1000);
-+ printf(" %.3f V", (float)code / 1000);
- }
-
- static const char *dmi_memory_device_form_factor(u8 code)
-@@ -2338,7 +2336,7 @@
- {
- int i;
-
-- for (i = 1; i <= 14; i++)
-+ for (i = 1; i <= 15; i++)
- if (code & (1 << i))
- printf(" %s", detail[i - 1]);
- }
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dmidecode/, sys-apps/dmidecode/files/
@ 2023-04-08 22:43 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-04-08 22:43 UTC (permalink / raw
To: gentoo-commits
commit: 5510459bdacd6cdc1d2a1239cf212609a4e38921
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 8 22:26:31 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 8 22:26:31 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5510459b
sys-apps/dmidecode: backport HPE OEM record 137 fix
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-apps/dmidecode/dmidecode-3.5-r2.ebuild | 51 ++++++++++++++++++++++
...ecode-3.5-backport-HPE-OEM-record-137-fix.patch | 39 +++++++++++++++++
2 files changed, 90 insertions(+)
diff --git a/sys-apps/dmidecode/dmidecode-3.5-r2.ebuild b/sys-apps/dmidecode/dmidecode-3.5-r2.ebuild
new file mode 100644
index 000000000000..b9fa80eb0516
--- /dev/null
+++ b/sys-apps/dmidecode/dmidecode-3.5-r2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Upstream often give "recommended patches" at https://www.nongnu.org/dmidecode/
+# Check regularly after releases!
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE="https://www.nongnu.org/dmidecode/"
+SRC_URI="https://savannah.nongnu.org/download/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~alpha ~amd64 ~arm ~arm64 ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~x86 ~x86-solaris"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-dmidecode )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-backport-HPE-OEM-record-137-fix.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "/^prefix/s:/usr/local:${EPREFIX}/usr:" \
+ -e "/^docdir/s:dmidecode:${PF}:" \
+ -e '/^PROGRAMS !=/d' \
+ Makefile || die
+}
+
+src_compile() {
+ append-lfs-flags
+
+ emake \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CC="$(tc-getCC)"
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ einfo "dmidecode needs root privileges to read /dev/xsvc"
+ einfo "To make dmidecode useful, either run as root, or chown and setuid the binary."
+ einfo "Note that /usr/sbin/ptrconf and /usr/sbin/ptrdiag give similar"
+ einfo "information without requiring root privileges."
+ fi
+}
diff --git a/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch b/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch
new file mode 100644
index 000000000000..b1c0270c4762
--- /dev/null
+++ b/sys-apps/dmidecode/files/dmidecode-3.5-backport-HPE-OEM-record-137-fix.patch
@@ -0,0 +1,39 @@
+As recommended by upstream on their website.
+
+From 80de376231e903d2cbea95e51ffea31860502159 Mon Sep 17 00:00:00 2001
+From: Jerry Hoemann <jerry.hoemann@hpe.com>
+Date: Mon, 3 Apr 2023 10:15:12 +0200
+Subject: dmioem: HPE OEM Record 237 Firmware change
+
+HPE OEM record type 237 offset 0x09 field was changed from a single
+byte STRING to a two byte WORD representing date.
+
+Fixes: cdab638dabb7 ("dmioem: Decode HPE OEM Record 237")
+Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
+Signed-off-by: Jean Delvare <jdelvare@suse.de>
+--- a/dmioem.c
++++ b/dmioem.c
+@@ -1094,7 +1094,8 @@ static int dmi_decode_hp(const struct dmi_header *h)
+ * 0x06 | Manufacture|STRING | DIMM Manufacturer
+ * 0x07 | Part Number|STRING | DIMM Manufacturer's Part Number
+ * 0x08 | Serial Num |STRING | DIMM Vendor Serial Number
+- * 0x09 | Spare Part |STRING | DIMM Spare Part Number
++ * 0x09 | Man Date | BYTE | DIMM Manufacture Date (YEAR) in BCD
++ * 0x0A | Man Date | BYTE | DIMM Manufacture Date (WEEK) in BCD
+ */
+ if (gen < G9) return 0;
+ pr_handle_name("%s DIMM Vendor Information", company);
+@@ -1105,8 +1106,9 @@ static int dmi_decode_hp(const struct dmi_header *h)
+ pr_attr("DIMM Manufacturer Part Number", "%s", dmi_string(h, data[0x07]));
+ if (h->length < 0x09) break;
+ pr_attr("DIMM Vendor Serial Number", "%s", dmi_string(h, data[0x08]));
+- if (h->length < 0x0A) break;
+- pr_attr("DIMM Spare Part Number", "%s", dmi_string(h, data[0x09]));
++ if (h->length < 0x0B) break;
++ if (WORD(data + 0x09))
++ pr_attr("DIMM Manufacture Date", "20%02x-W%02x", data[0x09], data[0x0A]);
+ break;
+
+ case 238:
+--
+cgit v1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-08 22:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13 15:18 [gentoo-commits] repo/gentoo:master commit in: sys-apps/dmidecode/, sys-apps/dmidecode/files/ Lars Wendler
-- strict thread matches above, loose matches on Subject: below --
2023-04-08 22:43 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox