From 5024f576dc16c13faded00333ed01af7016d20c7 Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Mon, 20 Apr 2026 03:41:55 -0400 Subject: [PATCH] import CS libvpd-2.2.11-1.el9 --- .gitignore | 2 +- .libvpd.metadata | 2 +- SOURCES/99-libvpd.conf | 1 + ...vpd-install-rules-in-system-wide-dir.patch | 22 ++++++++++ ...vpd-prevent-adding-duplicate-entries.patch | 40 ------------------- SPECS/libvpd.spec | 32 +++++++++------ 6 files changed, 44 insertions(+), 55 deletions(-) create mode 100644 SOURCES/99-libvpd.conf create mode 100644 SOURCES/libvpd-install-rules-in-system-wide-dir.patch delete mode 100644 SOURCES/libvpd-prevent-adding-duplicate-entries.patch diff --git a/.gitignore b/.gitignore index 3e2376b..e6aa24e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libvpd-2.2.9.tar.gz +SOURCES/libvpd-2.2.11.tar.gz diff --git a/.libvpd.metadata b/.libvpd.metadata index f0a10ae..d62c59d 100644 --- a/.libvpd.metadata +++ b/.libvpd.metadata @@ -1 +1 @@ -17fcca6874e97490e2b44868b50bb1e2c456dc35 SOURCES/libvpd-2.2.9.tar.gz +ae4c7d64168ee62bd55340e48d5f5f1519048f13 SOURCES/libvpd-2.2.11.tar.gz diff --git a/SOURCES/99-libvpd.conf b/SOURCES/99-libvpd.conf new file mode 100644 index 0000000..8a25d7c --- /dev/null +++ b/SOURCES/99-libvpd.conf @@ -0,0 +1 @@ +install_items+=" /usr/bin/touch " diff --git a/SOURCES/libvpd-install-rules-in-system-wide-dir.patch b/SOURCES/libvpd-install-rules-in-system-wide-dir.patch new file mode 100644 index 0000000..fa1e12d --- /dev/null +++ b/SOURCES/libvpd-install-rules-in-system-wide-dir.patch @@ -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 diff --git a/SOURCES/libvpd-prevent-adding-duplicate-entries.patch b/SOURCES/libvpd-prevent-adding-duplicate-entries.patch deleted file mode 100644 index 5595d29..0000000 --- a/SOURCES/libvpd-prevent-adding-duplicate-entries.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 34ab92ebc818bc5b356f1d297868512225493eca -Author: Sathvika Vasireddy -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 - Signed-off-by: Mahesh Salgaonkar - -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 ); - } diff --git a/SPECS/libvpd.spec b/SPECS/libvpd.spec index efb1d4a..ff99251 100644 --- a/SPECS/libvpd.spec +++ b/SPECS/libvpd.spec @@ -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 - 2.2.11-1 +- Resolves: RHEL-102475, update to 2.2.11 + * Tue Jan 30 2024 Than Ngo - 2.2.9-2 - Resolves: RHEL-23015, prevent adding duplicate entries