From 3b1e2ded0df272f1bd6b141e608dd25b129ba4a4 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Sat, 6 Feb 2021 01:56:02 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/ledmon.git#42a044eae20ed7551db0b078e1aef4ce0a708cac --- .gitignore | 1 + ledmon.spec | 33 ++++++++++++++++++++--------- ledmon_cflags.patch | 18 ---------------- ledmon_format-truncation-flag.patch | 26 +++++++++++++++++++++++ sources | 2 +- 5 files changed, 51 insertions(+), 29 deletions(-) delete mode 100644 ledmon_cflags.patch create mode 100644 ledmon_format-truncation-flag.patch diff --git a/.gitignore b/.gitignore index fd9610e..5be02d8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /ledmon-0.80.tar.gz /ledmon-0.90.tar.gz /ledmon-0.92.tar.gz +/ledmon-0.95.tar.gz diff --git a/ledmon.spec b/ledmon.spec index 70cd979..3292b78 100644 --- a/ledmon.spec +++ b/ledmon.spec @@ -1,18 +1,19 @@ Summary: Enclosure LED Utilities Name: ledmon -Version: 0.92 -Release: 6%{?dist} +Version: 0.95 +Release: 2%{?dist} License: GPLv2+ 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 -BuildRequires: perl-interpreter perl-podlators +Patch0: ledmon_format-truncation-flag.patch + BuildRequires: sg3_utils-devel -BuildRequires: gcc +BuildRequires: pciutils-devel +BuildRequires: autoconf automake +BuildRequires: gcc make # Needed for the udev dependency. BuildRequires: systemd-devel -BuildRequires: make Obsoletes: ledctl = 0.1-1 Provides: ledctl = %{version}-%{release} Requires: sg3_utils-libs @@ -26,22 +27,34 @@ use this application. %prep %setup -q -%patch0 -p1 -b .cflags +# remove -Werror=format-truncation=1 in order to build package +%patch0 -p1 +autoreconf -fiv %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} %files -%doc README COPYING +%doc README.md COPYING %{_sbindir}/ledctl %{_sbindir}/ledmon %{_mandir}/*/* +%{_unitdir}/ledmon.service %changelog +* 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 diff --git a/ledmon_cflags.patch b/ledmon_cflags.patch deleted file mode 100644 index 084eccc..0000000 --- a/ledmon_cflags.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ledmon-0.92/src/Makefile 2019-04-12 11:49:04.000000000 +0200 -+++ ledmon-0.92-new/src/Makefile 2019-04-15 10:37:25.529206895 +0200 -@@ -64,15 +64,10 @@ TEST_CONFIG_OBJECTS=\ - $(OUTDIR)/list.o \ - $(OUTDIR)/utils.o - --CXFLAGS+=-std=gnu99 --CWFLAGS=-Wall --CFLAGS=$(CXFLAGS) $(CWFLAGS) -- - DEFFLAGS=-D_DEBUG -D_GNU_SOURCE -D_DEFAULT_SOURCE -DDMALLOC_DISABLE -DBUILD_LABEL=\""$(BUILD_LABEL)"\" - CPPFLAGS=$(DEFFLAGS) - ALL_CPPFLAGS=$(CPPFLAGS) -I../config - --LDFLAGS=$(CXFLAGS) - LDLIBS=-lsgutils2 -ludev -lrt - - SOURCES:=$(shell find -name "*.[cC]" -print) diff --git a/ledmon_format-truncation-flag.patch b/ledmon_format-truncation-flag.patch new file mode 100644 index 0000000..5e4b283 --- /dev/null +++ b/ledmon_format-truncation-flag.patch @@ -0,0 +1,26 @@ +From a82b0e4080254e68eb70a338f8f6f7e6a6dbc581 Mon Sep 17 00:00:00 2001 +From: Jan Macku +Date: Tue, 2 Feb 2021 11:08:20 +0100 +Subject: [PATCH] ledmon_format-truncation-flag + +suggested by kdudka +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8fd5e6b..b80e2b0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AM_CPPFLAGS='-D_DEBUG -D_GNU_SOURCE -D_DEFAULT_SOURCE -DDMALLOC_DISABLE -DBUILD_ + AC_DEFUN([AX_AM_CFLAGS_ADD],[AX_CHECK_COMPILE_FLAG($1, AM_CFLAGS="$AM_CFLAGS $1")]) + AX_AM_CFLAGS_ADD([-Wformat -Werror=format-security]) + AX_AM_CFLAGS_ADD([-Werror=format-overflow=2]) +-AX_AM_CFLAGS_ADD([-Werror=format-truncation=1]) ++dnl AX_AM_CFLAGS_ADD([-Werror=format-truncation=1]) + AX_AM_CFLAGS_ADD([-Werror=shift-negative-value]) + AX_AM_CFLAGS_ADD([-Werror=alloca]) + AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers]) +-- +2.29.2 + diff --git a/sources b/sources index 85d9e70..765b39c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ledmon-0.92.tar.gz) = 31105e7c2b796c7707212598b7d57c8bbf8c8798069d9ce2002a92eb2d2eec2dbb61e673045afa65da11294b32548b711f721f2b119f264f4698a887be800461 +SHA512 (ledmon-0.95.tar.gz) = abda96ff401b1a6341e5345fd63a25da4d6c12af139b3b3a63b49009ce3d0d271cc732ca4f1e153ee2e07c2a8e74d0046ee5dd0c68fd7f84a31e96277bd53602