From 2acdb31ca32121a775afb125443e749117dc968d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mon, 6 May 2019 23:46:12 -0400 Subject: [PATCH] import ledmon-0.90-3.el8 --- .gitignore | 1 + .ledmon.metadata | 1 + SOURCES/ledmon-raid-led.patch | 34 ++++++++ SOURCES/ledmon_cflags.patch | 18 +++++ SPECS/ledmon.spec | 142 ++++++++++++++++++++++++++++++++++ 5 files changed, 196 insertions(+) create mode 100644 .gitignore create mode 100644 .ledmon.metadata create mode 100644 SOURCES/ledmon-raid-led.patch create mode 100644 SOURCES/ledmon_cflags.patch create mode 100644 SPECS/ledmon.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63ab9c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ledmon-0.90.tar.gz diff --git a/.ledmon.metadata b/.ledmon.metadata new file mode 100644 index 0000000..e8b897c --- /dev/null +++ b/.ledmon.metadata @@ -0,0 +1 @@ +2db38c084173806d779e6f5556c795b039d47067 SOURCES/ledmon-0.90.tar.gz diff --git a/SOURCES/ledmon-raid-led.patch b/SOURCES/ledmon-raid-led.patch new file mode 100644 index 0000000..3559c40 --- /dev/null +++ b/SOURCES/ledmon-raid-led.patch @@ -0,0 +1,34 @@ +commit c57e7d6d2dabe9e9d17d2e3aa4a2e77f7dc70acd +Author: Michal Zylowski +Date: Tue Mar 27 20:27:19 2018 +0200 + + Recognize RAID volume under reshape as DEVICE_TYPE_VOLUME + + Ledmon detects RAID device type by parsing value of sysfs file + "metadata_version" (/sys/block/mdXXX/md/metadata_version). When IMSM + RAID volume is under reshape, metadata_version file has value + "external:-md127/0". In current ledmon version this md device will be + wrongly recognized as container. + + Recognize volumes under reshape as DEVICE_TYPE_VOLUME not + DEVICE_TYPE_CONTAINER. + + This patch also fixes problem with blinking during reshape on some + environments. + + Signed-off-by: Michal Zylowski + Resolves: #1669232 + +diff --git a/src/sysfs.c b/src/sysfs.c +index 1a18a8b..f42be09 100644 +--- a/src/sysfs.c ++++ b/src/sysfs.c +@@ -125,7 +125,7 @@ static enum device_type _get_device_type(const char *path) + if (p != NULL) { + if (strlen(p) > 0) { + if (strncmp(p, "external:", 9) == 0) { +- if (p[9] == '/') ++ if (p[9] == '/' || p[9] == '-') + result = DEVICE_TYPE_VOLUME; + else + result = DEVICE_TYPE_CONTAINER; diff --git a/SOURCES/ledmon_cflags.patch b/SOURCES/ledmon_cflags.patch new file mode 100644 index 0000000..a049b52 --- /dev/null +++ b/SOURCES/ledmon_cflags.patch @@ -0,0 +1,18 @@ +--- ledmon-0.90/src/Makefile 2018-02-14 12:26:04.000000000 +0100 ++++ ledmon-0.90-new/src/Makefile 2018-03-14 09:45:12.887450849 +0100 +@@ -64,15 +64,10 @@ TEST_CONFIG_OBJECTS=\ + $(OUTDIR)/list.o \ + $(OUTDIR)/utils.o + +-CXFLAGS=-O0 -g -std=gnu99 +-CWFLAGS=-Wall +-CFLAGS=$(CXFLAGS) $(CWFLAGS) +- + DEFFLAGS=-D_DEBUG -D_GNU_SOURCE -D_DEFAULT_SOURCE -DDMALLOC_DISABLE + CPPFLAGS=$(DEFFLAGS) + ALL_CPPFLAGS=$(CPPFLAGS) -I../config + +-LDFLAGS=$(CXFLAGS) + LDLIBS=-lsgutils2 -ludev + + SOURCES:=$(shell find -name "*.[cC]" -print) diff --git a/SPECS/ledmon.spec b/SPECS/ledmon.spec new file mode 100644 index 0000000..78d386f --- /dev/null +++ b/SPECS/ledmon.spec @@ -0,0 +1,142 @@ +Summary: Enclosure LED Utilities +Name: ledmon +Version: 0.90 +Release: 3%{?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 + +Patch0: ledmon_cflags.patch +Patch1: ledmon-raid-led.patch +BuildRequires: perl-interpreter perl-podlators +BuildRequires: sg3_utils-devel +# Needed for the udev dependency. +BuildRequires: systemd-devel +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 +%patch0 -p1 -b .cflags +%patch1 -p1 + +%build +# can't use smp_flags because -j4 makes the build fail +make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" + +%install +make install INSTALL="%{__install} -p" DESTDIR=$RPM_BUILD_ROOT SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} MANDIR=$RPM_BUILD_ROOT%{_mandir} + +%files +%doc README COPYING +%{_sbindir}/ledctl +%{_sbindir}/ledmon +%{_mandir}/*/* + +%changelog +* 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