Compare commits

..

No commits in common. 'i8c-beta' and 'c9' have entirely different histories.
i8c-beta ... c9

@ -1 +1 @@
80898f5e95d905080426fdff7899d81eb4f888c2 SOURCES/dmidecode-3.5.tar.xz c74291da874589334483adac4c30a5c0a13bc91b SOURCES/dmidecode-3.6.tar.xz

2
.gitignore vendored

@ -1 +1 @@
SOURCES/dmidecode-3.5.tar.xz SOURCES/dmidecode-3.6.tar.xz

@ -1,64 +0,0 @@
From c76ddda0ba0aa99a55945e3290095c2ec493c892 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Wed, 26 Apr 2023 15:44:27 +0200
Subject: [PATCH] Consistently use read_file() when reading from a dump file
Use read_file() instead of mem_chunk() to read the entry point from a
dump file. This is faster, and consistent with how we then read the
actual DMI table from that dump file.
This made no functional difference so far, which is why it went
unnoticed for years. But now that a file type check was added to the
mem_chunk() function, we must stop using it to read from regular
files.
This will again allow root to use the --from-dump option.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
dmidecode.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dmidecode.c b/dmidecode.c
index 54f59c1..52ddbf1 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -6025,17 +6025,25 @@ int main(int argc, char * const argv[])
pr_comment("dmidecode %s", VERSION);
/* Read from dump if so instructed */
+ size = 0x20;
if (opt.flags & FLAG_FROM_DUMP)
{
if (!(opt.flags & FLAG_QUIET))
pr_info("Reading SMBIOS/DMI data from file %s.",
opt.dumpfile);
- if ((buf = mem_chunk(0, 0x20, opt.dumpfile)) == NULL)
+ if ((buf = read_file(0, &size, opt.dumpfile)) == NULL)
{
ret = 1;
goto exit_free;
}
+ /* Truncated entry point can't be processed */
+ if (size < 0x20)
+ {
+ ret = 1;
+ goto done;
+ }
+
if (memcmp(buf, "_SM3_", 5) == 0)
{
if (smbios3_decode(buf, opt.dumpfile, 0))
@@ -6059,7 +6067,6 @@ int main(int argc, char * const argv[])
* contain one of several types of entry points, so read enough for
* the largest one, then determine what type it contains.
*/
- size = 0x20;
if (!(opt.flags & FLAG_NO_SYSFS)
&& (buf = read_file(0, &size, SYS_ENTRY_FILE)) != NULL)
{
--
2.43.0

@ -1,15 +1,13 @@
Summary: Tool to analyse BIOS DMI data Summary: Tool to analyse BIOS DMI data
Name: dmidecode Name: dmidecode
Version: 3.5 Version: 3.6
Release: 1%{?dist} Release: 1%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2+ License: GPLv2+
Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz Source0: https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz
URL: http://www.nongnu.org/dmidecode/ URL: https://www.nongnu.org/dmidecode/
Patch0: 0001-Consistently-use-read_file-when-reading-from-a-dump-.patch
BuildRequires: gcc make BuildRequires: gcc make
BuildRequires: pkgconfig(bash-completion)
ExclusiveArch: %{ix86} x86_64 ia64 aarch64 ExclusiveArch: %{ix86} x86_64 ia64 aarch64
%description %description
@ -24,85 +22,98 @@ slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of
I/O ports (e.g. serial, parallel, USB). I/O ports (e.g. serial, parallel, USB).
%prep %prep
%autosetup %setup -q
%build %build
make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
%install %install
make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install-man %make_install %{?_smp_mflags} prefix=%{_prefix} install-bin install-man
%files %files
%doc AUTHORS NEWS README %doc AUTHORS NEWS README
%{!?_licensedir:%global license %%doc}
%license LICENSE %license LICENSE
%{_sbindir}/dmidecode %{_sbindir}/dmidecode
%ifnarch ia64 aarch64 %ifnarch ia64 aarch64
%{_sbindir}/vpddecode %{_sbindir}/vpddecode
%{_sbindir}/ownership %{_sbindir}/ownership
%{_sbindir}/biosdecode %{_sbindir}/biosdecode
%{_datadir}/bash-completion/completions/vpddecode
%{_datadir}/bash-completion/completions/ownership
%{_datadir}/bash-completion/completions/biosdecode
%endif %endif
%{_mandir}/man8/* %{_mandir}/man8/*
%{_datadir}/bash-completion/completions/%{name}
%changelog %changelog
* Fri Mar 29 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:3.5-1 * Mon Aug 05 2024 Lichen Liu <lichliu@redhat.com> - 1:3.6-1
- Rebuilt for MSVSphere 8.10 beta - updated to upstream v3.6
* Tue Jan 09 2024 Lichen Liu <lichliu@redhat.com> - 1:3.5-3
- Expanding the list of CPU sockets to match the list specified in SMBIOS 3.7.0
* Fri Dec 22 2023 Lichen Liu <lichliu@redhat.com> - 1:3.5-2
- Add processor support from SMBIOS-3.6.0
- Consistently use read_file when reading from a dump file
* Fri May 05 2023 Lichen Liuu <lichliu@redhat.com> - 1:3.5-1
- updated to upstream v3.5
- Resolves: rhbz#2186858
* Wed Jan 05 2022 Coiby Xu <coxu@redhat.com> - 1:3.3-7
- Resolves: rhbz#2029784
* Mon Dec 06 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-6
- Resolves: rhbz#2024078
* Wed Dec 20 2023 Lichen Liu <lichliu@redhat.com> - 1:3.5-1 * Thu Nov 04 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-4
- Rebase to upstream 3.5 - Resolves: rhbz#1996988
* Thu Jun 08 2023 Lichen Liu <lichliu@redhat.com> - 1:3.3-5 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.3-2
- Resolves: rhbz#2186860 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Jan 26 2022 Coiby Xu <coxu@redhat.com> - 1:3.3-4 * Wed May 19 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-1
- Resolves: rhbz#2042224 - updated to upstream v3.3
- Supported SMBIOS spec up to v3.3.0
* Wed Jan 05 2022 Coiby Xu <coxu@redhat.com> - 1:3.3-3 * Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1:3.2-10
- Resolves: rhbz#2027665 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Nov 10 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-2 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2-9
- Resolves: rhbz#1996651 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Nov 9 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-1 * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2-8
- Rebase to upsteam 3.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
- Resolves: rhbz#1998772
* Fri Apr 9 2021 Coiby Xu <coxu@redhat.com> - 1:3.2-10 * Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 1:3.2-7
- Fix crash with -u option - Use make macros
- Resolves: rhbz#1885823 - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Thu Dec 10 2020 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-8 * Mon Feb 03 2020 Tom Stellard <tstellar@redhat.com> - 1:3.2-6
- CI found an error in the commit <c54348130a2a>, need to fix it. - Use make_build macro instead of plain make
- Resolves: rhbz#1858350
* Tue Dec 08 2020 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-7 * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2-5
- Fix the "OUT OF SPEC" error for empty NVMe and DIMM slots - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
- Resolves: rhbz#1858350
* Wed May 20 2020 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-6 * Mon Nov 18 2019 Anton Arapov <aarapov@redhat.com> - 1:3.2-4
- Updated to the latest upstream(5b3c8e995026 ("Allow overriding - v3.2 patched up to upstream commit 62bce59f
build settings from the environment"))
- Resolves: rhbz#1796581
* Sun Oct 27 2019 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-5 * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2-3
- Fix the "OUT OF SPEC" for type 9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
- Resolves: rhbz#1763678
* Mon Oct 21 2019 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-4 * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.2-2
- Updated to the latest upstream(a808e6ef4ebc ("Typo")) - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
- Resolves: rhbz#1725435
* Mon Apr 22 2019 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-3 * Tue Sep 18 2018 Anton Arapov <aarapov@redhat.com> - 1:3.2-1
- Add "Logical non-volatile device" to the memory device types - updated to upstream v3.2
- Resolves: rhbz#1664573 - Supported SMBIOS spec up to v3.2.0
* Mon Apr 15 2019 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-2 * Thu Aug 02 2018 Anton Arapov <aarapov@redhat.com> - 1:3.1-7
- add CI gating test. - patched up to upstream commit bd78a5dfd4
- Resolves: rhbz#1680617
* Wed Sep 19 2018 Lianbo Jiang <lijiang@redhat.com> - 1:3.2-1 * Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-6
- update to upstream dmidecode-3.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
- Resolves: rhbz#1628211
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-5 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save