From 1b94c3100d9aa5a206557798b25af4b040b15c6b Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 10 Nov 2025 07:11:27 +0000 Subject: [PATCH] import OL ledmon-1.1.0-1.el10_0.1 --- .gitignore | 2 +- ...1.1.0-utils-fix-string2ibpi-function.patch | 32 ++ SPECS/ledmon.spec | 201 ------------ ledmon.spec | 288 ++++++++++++++++++ sources | 1 + 5 files changed, 322 insertions(+), 202 deletions(-) create mode 100644 0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch delete mode 100644 SPECS/ledmon.spec create mode 100644 ledmon.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index f41dfbf..24d6f30 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/ledmon-0.97.tar.gz +ledmon-1.1.0.tar.gz diff --git a/0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch b/0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch new file mode 100644 index 0000000..a398c8f --- /dev/null +++ b/0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch @@ -0,0 +1,32 @@ +From 740a352626e2ed5d26389200f38323fde9bd84f1 Mon Sep 17 00:00:00 2001 +From: Blazej Kucman +Date: Wed, 16 Apr 2025 12:26:38 +0200 +Subject: [PATCH] utils: Fix string2ibpi function + +string2ibpi does not compare strings correctly, the function uses strncmp, +which in case strings of different lengths, may return incorrect value +if substrings of given max length are identical. In this function whole +strings must be identical. + +Fix is to change strncmp to strcmp. + +Fixes intel/ledmon#259 +Fixes: 94818457f615 ("Add struct for mapping ibpi statuses to strings. (#211)") +Signed-off-by: Blazej Kucman +--- + src/lib/utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/utils.c b/src/lib/utils.c +index bad35eb4..2fe0f764 100644 +--- a/src/lib/utils.c ++++ b/src/lib/utils.c +@@ -765,7 +765,7 @@ enum led_ibpi_pattern string2ibpi(const char *name) + if (!input_name) + continue; + +- if (strncmp(input_name, name, strlen(input_name)) == 0) ++ if (strcmp(input_name, name) == 0) + return ipbi_names[i].ibpi; + } + diff --git a/SPECS/ledmon.spec b/SPECS/ledmon.spec deleted file mode 100644 index ebf1440..0000000 --- a/SPECS/ledmon.spec +++ /dev/null @@ -1,201 +0,0 @@ -Summary: Enclosure LED Utilities -Name: ledmon -Version: 0.97 -Release: 1%{?dist} -License: GPLv2+ -Group: Applications/System -URL: https://github.com/intel/ledmon -Source0: https://github.com/intel/ledmon/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz - -BuildRequires: perl-interpreter perl-podlators -BuildRequires: sg3_utils-devel -BuildRequires: pciutils-devel -BuildRequires: autoconf, automake -# Needed for the udev dependency. -BuildRequires: systemd-devel -BuildRequires: systemd-rpm-macros - -Obsoletes: ledctl = 0.1-1 -Provides: ledctl = %{version}-%{release} -Requires: sg3_utils-libs - -%description -The ledmon and ledctl are user space applications design to control LED -associated with each slot in an enclosure or a drive bay. There are two -types of system: 2-LED system (Activity LED, Status LED) and 3-LED system -(Activity LED, Locate LED, Fail LED). User must have root privileges to -use this application. - -%prep -%setup -q - -%build -# can't use smp_flags because -j4 makes the build fail -#make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" -sh autogen.sh -%configure --enable-systemd=yes -make - -%install -make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} - -%post -%systemd_post ledmon.service - -%preun -%systemd_preun ledmon.service - -%postun -%systemd_postun_with_restart ledmon.service - -%files -%doc README.md COPYING -%{_sbindir}/ledctl -%{_sbindir}/ledmon -%{_mandir}/*/* -%{_unitdir}/ledmon.service - -%changelog -* Wed May 17 2023 Jan Macku - 0.97-1 -- update to 0.97 (#2159588) -- drop downstream patch - ipmi: avoid error messages on non-dell platforms - -* Tue Nov 29 2022 Jan Macku - 0.96-3 -- Decrease log level of IPMI messages (#2148944) - -* Mon Jun 27 2022 Jan Macku - 0.96-2 -- Use systemd-rpm-macros to handle ledmon.service (#2073331) - -* Wed Jun 01 2022 Jan Macku - 0.96-1 -- update to 0.96 (#2041713) - -* Mon Jan 18 2021 Jan Macku - 0.95-1 -- update to 0.95 (#1841501) - -* Thu Jan 14 2021 Jan Macku - 0.94-2 -- tests: fix test to run on reverse depedency pipeline (#1912591) - -* Mon Feb 17 2020 Jan Synáček - 0.94-1 -- update to 0.94 (#1780521) - -* Tue Dec 10 2019 Jan Synáček - 0.93-1 -- update to 0.93 (#1721928) - -* Tue Jun 4 2019 Jan Synáček - 0.92-7 -- tests: fix tests (#1681030) - -* Tue Jun 4 2019 Jan Synáček - 0.92-6 -- tests: fix tests (#1681030) - -* Mon Jun 3 2019 Jan Synáček - 0.92-5 -- tests: skip tests on unsupported devices (#1681030) - -* Mon May 27 2019 Jan Synáček - 0.92-4 -- fix the _ledmon_status() function (#1681030) - -* Mon May 20 2019 Jan Synáček - 0.92-3 -- tests: fix segfault when a value is missing from ibpi_str[] (#1681030) - -* Mon May 6 2019 Jan Synáček - 0.92-2 -- tests: add PURPOSE target (#1681030) - -* Mon Apr 15 2019 Jan Synáček - 0.92-1 -- update to 0.92 (#1661204) - -* Fri Feb 15 2019 Jan Synáček - 0.90-3 -- LEDs do not work properly during migration (#1669232) - -* Tue Aug 7 2018 Jan Synáček - 0.90-2 -- fix manpage generation (#1612711) - -* Wed Mar 14 2018 Jan Synáček - 0.90-1 -- update to 0.90 (#1555099) - -* Mon Feb 26 2018 Jan Synáček - 0.80-6 -- use distribution LDFLAGS during build (#1548551) - -* Wed Feb 07 2018 Fedora Release Engineering - 0.80-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 0.80-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 0.80-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 0.80-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Dec 6 2016 Jan Synáček - 0.80-1 -- Update to 0.80 (#1401924) - -* Thu Feb 04 2016 Fedora Release Engineering - 0.79-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Jun 17 2015 Fedora Release Engineering - 0.79-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sun Aug 17 2014 Fedora Release Engineering - 0.79-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 0.79-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Nov 28 2013 Michal Sekletar - 0.79-1 -- update to 0.79 - -* Sat Aug 03 2013 Fedora Release Engineering - 0.78-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 03 2013 Michal Sekletar - 0.78-1 -- Update to 0.78 - -* Fri Apr 19 2013 Jan Synáček - 0.77-1 -- Update to 0.77 -- Documentation enhancements - -* Thu Feb 14 2013 Fedora Release Engineering - 0.75-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 07 2013 Jan Synáček - 0.75-1 -- Update to 0.75 and drop upstreamed patch - -* Thu Nov 15 2012 Jan Synáček - 0.74-3 -- Some coverity fixes - -* Fri Oct 19 2012 Jan Synáček - 0.74-2 -- Require sg3_utils-libs - -* Mon Aug 13 2012 Jan Synáček - 0.74-1 -- Update to 0.74 -- Resolves: #847072 - -* Tue Aug 07 2012 Jan Synáček - 0.72-1 -- Update to 0.72 and update patch -- Resolves: #846018 - -* Wed Jul 25 2012 Jan Synáček - 0.40-1 -- Update to 0.40 -- Resolves: #838086 -- Make spec fedora-review friendly - -* Thu Jul 19 2012 Fedora Release Engineering - 0.32-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Mar 05 2012 Jan Synáček - 0.32-1 -- Update to 0.32 - -* Fri Feb 10 2012 Jan Synáček - 0.31-1 -- Update to 0.31 - -* Fri Jan 13 2012 Fedora Release Engineering - 0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Jan 14 2011 Jiri Moskovcak 0.1-2 -- renamed to ledmon, because ledctl is taken - -* Fri Jan 07 2011 Jiri Moskovcak 0.1-1 -- initial release diff --git a/ledmon.spec b/ledmon.spec new file mode 100644 index 0000000..583c015 --- /dev/null +++ b/ledmon.spec @@ -0,0 +1,288 @@ +Summary: Enclosure LED Utilities +Name: ledmon +Version: 1.1.0 +Release: 1%{?dist}.1 +License: GPL-2.0-only AND LGPL-2.1-only +URL: https://github.com/intel/ledmon +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +Patch: 0001-ledmon-1.1.0-utils-fix-string2ibpi-function.patch + +BuildRequires: autoconf automake +BuildRequires: autoconf-archive +BuildRequires: gcc make +BuildRequires: libconfig-devel +BuildRequires: libtool +BuildRequires: pciutils-devel +BuildRequires: sg3_utils-devel +# Needed for pkgconfig usage. +BuildRequires: pkgconfig(systemd) +# Needed for the udev dependency. +BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros + +Obsoletes: ledctl = 0.1-1 +Provides: ledctl = %{version}-%{release} + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +%description +The ledmon and ledctl are user space applications design to control LED +associated with each slot in an enclosure or a drive bay. There are two +types of system: 2-LED system (Activity LED, Status LED) and 3-LED system +(Activity LED, Locate LED, Fail LED). User must have root privileges to +use this application. + +%package libs +Summary: Runtime library files for %{name} +Requires: pciutils-libs +Requires: sg3_utils-libs + +%description libs +The %{name}-libs package contains runtime libraries for applications +that use %{name}. + +%package devel +Summary: Development files for %{name} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: pciutils-devel +Requires: sg3_utils-devel + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + +%prep +%autosetup -p1 +autoreconf -fiv + +%build +%configure --enable-systemd=yes --enable-library --disable-static +%make_build + +%install +%make_install + +%post +%systemd_post ledmon.service + +%preun +%systemd_preun ledmon.service + +%postun +%systemd_postun_with_restart ledmon.service + +%files +%doc README.md COPYING +%{_sbindir}/ledctl +%{_sbindir}/ledmon +%{_mandir}/*/* +%{_unitdir}/ledmon.service + +%files libs +%{_libdir}/*.so.* + +%files devel +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +* Tue Jun 10 2025 Jan Macku - 1.1.0-1.1 +- Fix string2ibpi function (RHEL-95784) + +* Tue Nov 12 2024 Jan Macku - 1.1.0-1 +- update to 1.1.0 + +* Tue Oct 29 2024 Troy Dawson - 1.0.0-4 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Mon Jun 24 2024 Troy Dawson - 1.0.0-3 +- Bump release for June 2024 mass rebuild + +* Wed Mar 27 2024 Jan Macku - 1.0.0-1 +- update to 1.0.0 +- package shared ledmon library by Tony Asleson + +* Wed Feb 14 2024 Lukáš Zaoral - 0.97-6 +- fix incorrect License field syntax + +* Fri Feb 09 2024 Dan Horák - 0.97-5 +- rebuilt for sg3_utils 1.48 + +* Sun Jan 21 2024 Fedora Release Engineering - 0.97-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 0.97-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue May 16 2023 Jan Macku - 0.97-2 +- use correct SPDX license + +* Tue May 16 2023 Jan Macku - 0.97-1 +- update to 0.97 + +* Tue Apr 11 2023 Lukáš Zaoral - 0.96-7 +- migrate to SPDX license format + +* Thu Jan 19 2023 Fedora Release Engineering - 0.96-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Jan 10 2023 Lukáš Zaoral - 0.96-5 +- Fix build on Rawhide +- Remove explicit library runtime dependency as suggested by rpmlint +- Modernise used macros + +* Thu Jul 21 2022 Fedora Release Engineering - 0.96-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 27 2022 Jan Macku - 0.96-3 +- Rebuild + +* Mon Jun 27 2022 Jan Macku - 0.96-2 +- Use systemd-rpm-macros to handle ledmon.service (#2101300) + +* Wed Jun 01 2022 Jan Macku - 0.96-1 +- update to 0.96 (#2092134) + +* Thu Jan 20 2022 Fedora Release Engineering - 0.95-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 0.95-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Apr 06 2021 Tomas Bzatek - 0.95-4 +- rebuilt for sg3_utils 1.46 + +* Mon Feb 22 2021 Jan Macku - 0.95-3 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Feb 02 2021 Jan Macku - 0.95-2 +- drop perl dependency + +* Tue Feb 02 2021 Jan Macku - 0.95-1 +- clean up spec based on RHEL 8.4.0 spec +- remove -Werror=format-truncation=1 from configure +- update to 0.95 (#1880599) + +* Tue Jan 26 2021 Fedora Release Engineering - 0.92-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.92-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Dan Horák - 0.92-4 +- rebuilt for sg3_utils 1.45 (#1809392) + +* Wed Jan 29 2020 Fedora Release Engineering - 0.92-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.92-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Apr 15 2019 Jan Synáček - 0.92-1 +- update to 0.92 (#1699783) + +* Fri Feb 01 2019 Fedora Release Engineering - 0.90-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Aug 7 2018 Jan Synáček - 0.90-3 +- fix manpage generation (#1611428) + +* Fri Jul 13 2018 Fedora Release Engineering - 0.90-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Mar 14 2018 Jan Synáček - 0.90-1 +- update to 0.90 (#1555099) + +* Mon Feb 26 2018 Jan Synáček - 0.80-6 +- use distribution LDFLAGS during build (#1548551) + +* Wed Feb 07 2018 Fedora Release Engineering - 0.80-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 0.80-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.80-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.80-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Dec 6 2016 Jan Synáček - 0.80-1 +- Update to 0.80 (#1401924) + +* Thu Feb 04 2016 Fedora Release Engineering - 0.79-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.79-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 0.79-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.79-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Nov 28 2013 Michal Sekletar - 0.79-1 +- update to 0.79 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.78-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 03 2013 Michal Sekletar - 0.78-1 +- Update to 0.78 + +* Fri Apr 19 2013 Jan Synáček - 0.77-1 +- Update to 0.77 +- Documentation enhancements + +* Thu Feb 14 2013 Fedora Release Engineering - 0.75-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jan 07 2013 Jan Synáček - 0.75-1 +- Update to 0.75 and drop upstreamed patch + +* Thu Nov 15 2012 Jan Synáček - 0.74-3 +- Some coverity fixes + +* Fri Oct 19 2012 Jan Synáček - 0.74-2 +- Require sg3_utils-libs + +* Mon Aug 13 2012 Jan Synáček - 0.74-1 +- Update to 0.74 +- Resolves: #847072 + +* Tue Aug 07 2012 Jan Synáček - 0.72-1 +- Update to 0.72 and update patch +- Resolves: #846018 + +* Wed Jul 25 2012 Jan Synáček - 0.40-1 +- Update to 0.40 +- Resolves: #838086 +- Make spec fedora-review friendly + +* Thu Jul 19 2012 Fedora Release Engineering - 0.32-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Mar 05 2012 Jan Synáček - 0.32-1 +- Update to 0.32 + +* Fri Feb 10 2012 Jan Synáček - 0.31-1 +- Update to 0.31 + +* Fri Jan 13 2012 Fedora Release Engineering - 0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 14 2011 Jiri Moskovcak 0.1-2 +- renamed to ledmon, because ledctl is taken + +* Fri Jan 07 2011 Jiri Moskovcak 0.1-1 +- initial release diff --git a/sources b/sources new file mode 100644 index 0000000..634125b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ledmon-1.1.0.tar.gz) = d207e392d15e51cf347bcb038d9a3b70d430321201fcba6d4ce449545bed0f45e6d856777872119e4e786db075ed1a3c836c02a2bb038f04291b05ba2556238f