import CS libvpd-2.2.11-1.el9

This commit is contained in:
AlmaLinux RelEng Bot 2026-04-20 03:41:55 -04:00
parent 4622395268
commit 5024f576dc
6 changed files with 44 additions and 55 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libvpd-2.2.9.tar.gz
SOURCES/libvpd-2.2.11.tar.gz

View File

@ -1 +1 @@
17fcca6874e97490e2b44868b50bb1e2c456dc35 SOURCES/libvpd-2.2.9.tar.gz
ae4c7d64168ee62bd55340e48d5f5f1519048f13 SOURCES/libvpd-2.2.11.tar.gz

1
SOURCES/99-libvpd.conf Normal file
View File

@ -0,0 +1 @@
install_items+=" /usr/bin/touch "

View File

@ -0,0 +1,22 @@
diff -up libvpd-2.2.10/Makefile.am.me libvpd-2.2.10/Makefile.am
--- libvpd-2.2.10/Makefile.am.me 2025-09-23 10:19:07.836805451 +0200
+++ libvpd-2.2.10/Makefile.am 2025-09-23 10:49:26.932917705 +0200
@@ -49,6 +49,8 @@ libvpd_cxx_la_SOURCES = src/vpdretriever
CXX_VERSION=@GENERIC_CXX_LIBRARY_VERSION@
C_VERSION=@GENERIC_C_LIBRARY_VERSION@
+udevrulesdir = $(prefix)/lib/udev/rules.d
+
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvpd-2.pc libvpd_cxx-2.pc
@@ -65,7 +67,7 @@ libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
install-exec-hook:
- mkdir -p $(DESTDIR)/${sysconfdir}/udev/rules.d/
+ mkdir -p $(DESTDIR)/${udevrulesdir}
mkdir -p $(DESTDIR)/${localstatedir}/lib/lsvpd/
install -D --mode=644 90-vpdupdate.rules \
- ${DESTDIR}/${sysconfdir}/udev/rules.d/90-vpdupdate.rules
+ ${DESTDIR}/${udevrulesdir}/90-vpdupdate.rules

View File

@ -1,40 +0,0 @@
commit 34ab92ebc818bc5b356f1d297868512225493eca
Author: Sathvika Vasireddy <sv@linux.ibm.com>
Date: Thu Nov 9 02:37:36 2023 +0530
libvpd: Prevent adding duplicate entries in addDeviceSpecific() function
Currently, addDeviceSpecific() adds new 'DataItem' to the
'mDeviceSpecific' vector without checking for duplicates. This
vector can be further used by the front end tools to list vpd
information. If this vector has duplicate entries, then vpd
information for a specific device is listed more than once.
To fix this, prevent duplicate entries with the same 'ac' value
from being stored in the vector. Check if a 'DataItem' with
the same ac value already exists in the vector, and add the new
object to the vector only if no matching item is found.
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
diff --git a/src/component.cpp b/src/component.cpp
index 44208ac..a945fc1 100644
--- a/src/component.cpp
+++ b/src/component.cpp
@@ -937,7 +937,6 @@ lderr:
d->ac = ac;
d->humanName = humanName;
d->setValue( val, lvl, __FILE__, __LINE__ );
-#if 0
/*
* There can be multiple records with the 'CL' key.
@@ -952,7 +951,6 @@ lderr:
if( (*i)->ac == ac )
return; //Failed to add - already present
}
-#endif
mDeviceSpecific.push_back( d );
}

View File

@ -1,17 +1,20 @@
Name: libvpd
Version: 2.2.9
Release: 2%{?dist}
Version: 2.2.11
Release: 1%{?dist}
Summary: VPD Database access library for lsvpd
License: LGPLv2+
URL: https://github.com/power-ras/%{name}/releases
Source: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
# Prevent adding duplicate entries
Patch0: libvpd-prevent-adding-duplicate-entries.patch
Source0: https://github.com/power-ras/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: 99-libvpd.conf
Patch1: libvpd-install-rules-in-system-wide-dir.patch
BuildRequires: autoconf automake libtool
BuildRequires: gcc-c++
BuildRequires: sqlite-devel zlib-devel libstdc++-devel libtool
BuildRequires: make
BuildRequires: make
BuildRequires: sqlite-devel
BuildRequires: systemd-devel
BuildRequires: zlib-devel
ExclusiveArch: %{power64}
@ -26,29 +29,29 @@ Requires: %{name} = %{version}-%{release} sqlite-devel pkgconfig
Contains header files for building with libvpd.
%prep
%autosetup -p1
%autosetup
%build
export CXXFLAGS="-std=c++14 $RPM_OPT_FLAGS"
./bootstrap.sh
%configure --disable-static
make %{?_smp_mflags}
%make_build
%install
make install DESTDIR=$RPM_BUILD_ROOT
%make_install
find %{buildroot} -type f -name "*.la" -delete
install -D -m644 %{SOURCE1} %{buildroot}%{_prefix}/lib/dracut/dracut.conf.d/99-libvpd.conf
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc README
%{_libdir}/libvpd_cxx-2.2.so.*
%{_libdir}/libvpd-2.2.so.*
%{_sysconfdir}/udev/rules.d/90-vpdupdate.rules
%{_udevrulesdir}/90-vpdupdate.rules
%{_prefix}/lib/dracut/dracut.conf.d/*
%files devel
%{_includedir}/libvpd-2
@ -58,6 +61,9 @@ find %{buildroot} -type f -name "*.la" -delete
%{_libdir}/pkgconfig/libvpd_cxx-2.pc
%changelog
* Fri Jan 16 2026 Than Ngo <than@redhat.com> - 2.2.11-1
- Resolves: RHEL-102475, update to 2.2.11
* Tue Jan 30 2024 Than Ngo <than@redhat.com> - 2.2.9-2
- Resolves: RHEL-23015, prevent adding duplicate entries