diff --git a/.gitignore b/.gitignore index 7297178..23c3869 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ libvpd-2.1.1.tar.gz /libvpd-2.2.7.tar.gz /libvpd-2.2.8.tar.gz /libvpd-2.2.9.tar.gz +/libvpd-2.2.11.tar.gz diff --git a/99-libvpd.conf b/99-libvpd.conf new file mode 100644 index 0000000..8a25d7c --- /dev/null +++ b/99-libvpd.conf @@ -0,0 +1 @@ +install_items+=" /usr/bin/touch " diff --git a/gating.yaml b/gating.yaml index c190bde..648918d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,4 +3,4 @@ product_versions: - rhel-9 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/libvpd-install-rules-in-system-wide-dir.patch b/libvpd-install-rules-in-system-wide-dir.patch new file mode 100644 index 0000000..fa1e12d --- /dev/null +++ b/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/libvpd-prevent-adding-duplicate-entries.patch b/libvpd-prevent-adding-duplicate-entries.patch deleted file mode 100644 index 5595d29..0000000 --- a/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/libvpd.spec b/libvpd.spec index efb1d4a..ff99251 100644 --- a/libvpd.spec +++ b/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 diff --git a/sources b/sources index 2f21ded..91abb74 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libvpd-2.2.9.tar.gz) = e32a80e0f3aaedbaaac64dbdedfee7eeb2e7a7b6d2d737bca4678d26caadab77032a7c26211a5fc3caed3724488bc8fa99620ceac05f8d156ca90f4452cfaf0a +SHA512 (libvpd-2.2.11.tar.gz) = c9b14f7275f6ba113cb1c598ea754bfa0a429ca4a9407518689aaa263c307937f1ccd79d9b23c198f6e6c1fa0b1c85a9929937382bcf898e3fe19ae22552494b