Compare commits
No commits in common. "c8s" and "c9" have entirely different histories.
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
SOURCES/libsmbios-2.4.1.tar.gz
|
||||
/libsmbios-2.4.1.tar.gz
|
||||
SOURCES/libsmbios-2.4.3.tar.gz
|
||||
|
1
.libsmbios.metadata
Normal file
1
.libsmbios.metadata
Normal file
@ -0,0 +1 @@
|
||||
60f44f8938a73efeb571a47de00b18b3aeaf543a SOURCES/libsmbios-2.4.3.tar.gz
|
@ -1,51 +0,0 @@
|
||||
From 22728f16eb611411258146045030292e1170bfef Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 14 Feb 2018 16:15:28 -0500
|
||||
Subject: [PATCH] libsmbios: fix more places with loop iterators with bad types
|
||||
|
||||
In these cases we get:
|
||||
|
||||
../src/libsmbios_c/smbios/smbios_obj.c: In function 'smbios_verify_smbios':
|
||||
../src/libsmbios_c/smbios/smbios_obj.c:415:31: error: comparison of integer expressions of different signedness: 'unsigned int' and 'long int' [-Werror=sign-compare]
|
||||
for(unsigned int i = 0; i < length ; ++i )
|
||||
^
|
||||
../src/libsmbios_c/smbios/smbios_obj.c: In function 'smbios_verify_smbios3':
|
||||
../src/libsmbios_c/smbios/smbios_obj.c:436:31: error: comparison of integer expressions of different signedness: 'unsigned int' and 'long int' [-Werror=sign-compare]
|
||||
for(unsigned int i = 0; i < length ; ++i )
|
||||
^
|
||||
|
||||
I really don't understand why gcc will complain about it being signed vs
|
||||
unsigned, but not about the fact that the int can obviously overflow
|
||||
before the condition being checked against length, a larger type, is
|
||||
satisfied.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/libsmbios_c/smbios/smbios_obj.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libsmbios_c/smbios/smbios_obj.c b/src/libsmbios_c/smbios/smbios_obj.c
|
||||
index a6f2e1e3525..c932ba59535 100644
|
||||
--- a/src/libsmbios_c/smbios/smbios_obj.c
|
||||
+++ b/src/libsmbios_c/smbios/smbios_obj.c
|
||||
@@ -412,7 +412,7 @@ bool __hidden smbios_verify_smbios(const char *buf, long length, long *dmi_lengt
|
||||
bool retval = true;
|
||||
|
||||
u8 checksum = 0;
|
||||
- for(unsigned int i = 0; i < length ; ++i )
|
||||
+ for(long i = 0; i < length ; ++i )
|
||||
checksum = (checksum + buf[i]) & 0xFF;
|
||||
|
||||
fnprintf("SMBIOS TEP csum %d.\n", (int)checksum);
|
||||
@@ -433,7 +433,7 @@ bool __hidden smbios_verify_smbios3(const char *buf, long length, long *dmi_leng
|
||||
{
|
||||
struct smbios_table_entry_point_64 *ep;
|
||||
u8 checksum = 0;
|
||||
- for(unsigned int i = 0; i < length ; ++i )
|
||||
+ for(long i = 0; i < length ; ++i )
|
||||
checksum = (checksum + buf[i]) & 0xFF;
|
||||
|
||||
fnprintf("SMBIOS TEP csum %d.\n", (int)checksum);
|
||||
--
|
||||
2.14.3
|
||||
|
@ -3,23 +3,34 @@
|
||||
%define lang_dom libsmbios-2.4
|
||||
|
||||
Name: libsmbios
|
||||
Version: 2.4.1
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+ or OSL 2.1
|
||||
Version: 2.4.3
|
||||
Release: 4%{?dist}
|
||||
Summary: Libsmbios C/C++ shared libraries
|
||||
Group: System Environment/Libraries
|
||||
|
||||
License: GPLv2+ or OSL 2.1
|
||||
URL: https://github.com/dell/libsmbios
|
||||
BuildRequires: strace libxml2-devel gcc-c++ gettext git doxygen
|
||||
BuildRequires: valgrind cppunit-devel hardlink pkgconfig python3-devel
|
||||
BuildRequires: autoconf gettext-devel automake libtool help2man
|
||||
Source0: https://github.com/dell/libsmbios/archive/v%{version}/libsmbios-%{version}.tar.gz
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cppunit-devel
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: help2man
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: strace
|
||||
BuildRequires: valgrind
|
||||
|
||||
# libsmbios only ever makes sense on intel compatible arches
|
||||
# no DMI tables on ppc, s390, etc.
|
||||
ExclusiveArch: x86_64 %{ix86}
|
||||
|
||||
Source0: https://github.com/dell/libsmbios/archive/v%{version}/libsmbios-%{version}.tar.gz
|
||||
Patch0001: 0001-libsmbios-fix-more-places-with-loop-iterators-with-b.patch
|
||||
|
||||
%description
|
||||
Libsmbios is a library and utilities that can be used by client programs to get
|
||||
information from standard BIOS tables, such as the SMBIOS table.
|
||||
@ -28,7 +39,6 @@ This package provides the C-based libsmbios library, with a C interface.
|
||||
|
||||
%package -n python3-smbios
|
||||
Summary: Python interface to Libsmbios C library
|
||||
Group: System Environment/Libraries
|
||||
Requires: libsmbios = %{version}-%{release}
|
||||
Requires: python3
|
||||
Obsoletes: python-smbios < 2.4.1
|
||||
@ -38,7 +48,6 @@ This package provides a Python interface to libsmbios
|
||||
|
||||
%package -n smbios-utils
|
||||
Summary: Meta-package that pulls in all smbios binaries and python scripts
|
||||
Group: Applications/System
|
||||
Requires: smbios-utils-bin
|
||||
Requires: smbios-utils-python
|
||||
|
||||
@ -48,7 +57,6 @@ as the python executables.
|
||||
|
||||
%package -n smbios-utils-bin
|
||||
Summary: Binary utilities that use libsmbios
|
||||
Group: Applications/System
|
||||
Requires: libsmbios = %{version}-%{release}
|
||||
|
||||
%description -n smbios-utils-bin
|
||||
@ -57,7 +65,6 @@ asset tag.
|
||||
|
||||
%package -n smbios-utils-python
|
||||
Summary: Python executables that use libsmbios
|
||||
Group: Applications/System
|
||||
Requires: python3-smbios = %{version}-%{release}
|
||||
|
||||
%description -n smbios-utils-python
|
||||
@ -69,7 +76,6 @@ Update BIOS on select Dell systems. Set LCD brightness on select Dell laptops.
|
||||
# name the devel package libsmbios-devel regardless of package name, per suse/fedora convention
|
||||
%package -n libsmbios-devel
|
||||
Summary: Development headers and archives
|
||||
Group: Development/Libraries
|
||||
Requires: libsmbios = %{version}-%{release}
|
||||
|
||||
%description -n libsmbios-devel
|
||||
@ -80,19 +86,11 @@ This package contains the headers and .a files necessary to compile new client
|
||||
programs against libsmbios.
|
||||
|
||||
%prep
|
||||
%setup -q -n libsmbios-%{version}
|
||||
%autosetup -p1
|
||||
|
||||
find . -type d -exec chmod -f 755 {} \;
|
||||
find doc src -type f -exec chmod -f 644 {} \;
|
||||
chmod 755 src/cppunit/*.sh
|
||||
git init
|
||||
git config user.email "%{name}-owner@fedoraproject.org"
|
||||
git config user.name "Fedora Ninjas"
|
||||
git config gc.auto 0
|
||||
git add .
|
||||
git commit -a -q -m "%{version} baseline."
|
||||
git am %{patches} </dev/null
|
||||
git config --unset user.email
|
||||
git config --unset user.name
|
||||
|
||||
%build
|
||||
# this line lets us build an RPM directly from a git tarball
|
||||
@ -107,30 +105,10 @@ chmod +x ./configure
|
||||
%configure
|
||||
|
||||
mkdir -p out/libsmbios_c
|
||||
mkdir -p out/libsmbios_c++
|
||||
make CFLAGS+="%{optflags} -Werror" %{?_smp_mflags} 2>&1 | tee build-%{_arch}.log
|
||||
|
||||
echo \%doc _build/build-%{_arch}.log > buildlogs.txt
|
||||
|
||||
TOPDIR=$(pwd)/../
|
||||
pushd ../src/bin
|
||||
for x in smbios-battery-ctl smbios-keyboard-ctl smbios-lcd-brightness \
|
||||
smbios-passwd smbios-sys-info smbios-thermal-ctl smbios-token-ctl \
|
||||
smbios-wakeup-ctl smbios-wireless-ctl ;
|
||||
do
|
||||
chmod +x ${x}
|
||||
LD_LIBRARY_PATH=$TOPDIR/_build/out/.libs/ help2man -o ${x}.8 -s 8 -n ${x} -N -l ./${x}
|
||||
done
|
||||
popd
|
||||
pushd out
|
||||
for x in smbios-get-ut-data smbios-state-byte-ctl smbios-sys-info-lite \
|
||||
smbios-upflag-ctl ;
|
||||
do
|
||||
LD_LIBRARY_PATH=$TOPDIR/_build/out/.libs/ help2man -o ${x}.8 -s 8 -n ${x} -N -l ./${x}
|
||||
done
|
||||
popd
|
||||
|
||||
|
||||
%check
|
||||
runtest() {
|
||||
mkdir _$1$2
|
||||
@ -143,75 +121,43 @@ runtest() {
|
||||
echo \%doc _$1$2/$1$2-%{_arch}.log >> _build/buildlogs.txt
|
||||
}
|
||||
|
||||
if [ -d /usr/include/cppunit ]; then
|
||||
# run this first since it is slightly faster than valgrind
|
||||
VALGRIND="strace -f" runtest check strace > /dev/null || echo FAILED strace check
|
||||
fi
|
||||
|
||||
if [ -e /usr/bin/valgrind -a -d /usr/include/cppunit ]; then
|
||||
runtest valgrind > /dev/null || echo FAILED valgrind check
|
||||
fi
|
||||
|
||||
if [ -d /usr/include/cppunit ]; then
|
||||
runtest check > /dev/null || echo FAILED check
|
||||
fi
|
||||
|
||||
if [ ! -d /usr/include/cppunit ]; then
|
||||
echo "Unit tests skipped due to missing cppunit."
|
||||
fi
|
||||
VALGRIND="strace -f" runtest check strace > /dev/null || echo FAILED strace check
|
||||
runtest valgrind > /dev/null || echo FAILED valgrind check
|
||||
runtest check > /dev/null || echo FAILED check
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
mkdir %{buildroot}
|
||||
|
||||
cd _build
|
||||
TOPDIR=..
|
||||
make install DESTDIR=%{buildroot} INSTALL="%{__install} -p"
|
||||
mkdir -p %{buildroot}/%{_includedir}
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mkdir -p %{buildroot}/%{_mandir}/man8/
|
||||
cp -v $TOPDIR/src/bin/*.8 %{buildroot}/%{_mandir}/man8/
|
||||
cp -v $TOPDIR/_build/out/*.8 %{buildroot}/%{_mandir}/man8/
|
||||
cp -a $TOPDIR/src/include/* %{buildroot}/%{_includedir}/
|
||||
cp -a out/public-include/* %{buildroot}/%{_includedir}/
|
||||
%make_install
|
||||
rm -f %{buildroot}/%{_libdir}/lib*.{la,a}
|
||||
find %{buildroot}/%{_includedir} out/libsmbios_c++ out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
|
||||
find %{buildroot}/%{_includedir} out/libsmbios_c -exec touch -r $TOPDIR/configure.ac {} \;
|
||||
|
||||
mv out/libsmbios_c++ out/libsmbios_c++-%{_arch}
|
||||
mv out/libsmbios_c out/libsmbios_c-%{_arch}
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_3
|
||||
%py_byte_compile %{python3} %{buildroot}%{python3_sitearch}/
|
||||
|
||||
rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot_file}.mo)
|
||||
%find_lang %{lang_dom}
|
||||
|
||||
# hardlink files to save some space.
|
||||
/usr/sbin/hardlink -c -v $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files -f _build/%{lang_dom}.lang
|
||||
%defattr(-,root,root,-)
|
||||
# Only need to include license once here
|
||||
%license COPYING-GPL COPYING-OSL
|
||||
%{_libdir}/libsmbios_c.so.*
|
||||
|
||||
%files -n libsmbios-devel -f _build/buildlogs.txt
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING-GPL COPYING-OSL README.md src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%{_includedir}/smbios
|
||||
%license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%doc README.md _build/out/libsmbios_c-%{_arch}
|
||||
%{_includedir}/smbios_c
|
||||
%{_libdir}/libsmbios_c.so
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%doc _build/out/libsmbios_c-%{_arch}
|
||||
|
||||
%files -n smbios-utils
|
||||
# opensuse 11.1 enforces non-empty file list :(
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING-GPL COPYING-OSL README.md
|
||||
# no other files.
|
||||
|
||||
%files -n smbios-utils-bin
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING-GPL COPYING-OSL README.md
|
||||
%doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%{_sbindir}/smbios-state-byte-ctl
|
||||
%{_mandir}/man?/smbios-state-byte-ctl.*
|
||||
%{_sbindir}/smbios-get-ut-data
|
||||
@ -222,14 +168,10 @@ rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot
|
||||
%{_mandir}/man?/smbios-sys-info-lite.*
|
||||
|
||||
%files -n python3-smbios
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING-GPL COPYING-OSL README.md
|
||||
%{python3_sitearch}/*
|
||||
|
||||
%files -n smbios-utils-python
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING-GPL COPYING-OSL README.md
|
||||
%doc src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%license src/bin/getopts_LICENSE.txt src/include/smbios_c/config/boost_LICENSE_1_0_txt
|
||||
%dir %{_sysconfdir}/libsmbios
|
||||
%config(noreplace) %{_sysconfdir}/libsmbios/*
|
||||
|
||||
@ -257,6 +199,53 @@ rename %{pot_file}.mo %{lang_dom}.mo $(find %{buildroot}/%{_datadir} -name %{pot
|
||||
%{_datadir}/smbios-utils
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.3-4
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.4.3-3
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sun Jan 17 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2.4.3-1
|
||||
- Update to 2.4.3
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-10
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-8
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-6
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2-5
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jul 10 2018 Pete Walter <pwalter@fedoraproject.org> - 2.4.2-1
|
||||
- Update to 2.4.2
|
||||
|
||||
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.4.1-3
|
||||
- Rebuilt for Python 3.7
|
||||
|
||||
* Wed Apr 18 2018 Karsten Hopp <karsten@redhat.com> - 2.4.1-2
|
||||
- rebuild with latest rpm build flags (rhbz#1540264)
|
||||
|
Loading…
Reference in New Issue
Block a user