From 7119e1d04d86d62a0bc952f0badf99f015f13ad3 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 11 Jun 2020 09:22:15 -0500 Subject: [PATCH 1/8] "Adding package.cfg file" --- package.cfg | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 package.cfg diff --git a/package.cfg b/package.cfg new file mode 100644 index 0000000..66ea79d --- /dev/null +++ b/package.cfg @@ -0,0 +1,2 @@ +[koji] +targets = epel8 epel8-playground \ No newline at end of file From 57cb7e82deee4a20d63109b681c658d2e9773bd6 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 24 Sep 2020 16:09:50 +0000 Subject: [PATCH 2/8] remove package.cfg per new epel-playground policy --- package.cfg | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 package.cfg diff --git a/package.cfg b/package.cfg deleted file mode 100644 index 66ea79d..0000000 --- a/package.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[koji] -targets = epel8 epel8-playground \ No newline at end of file From 6b3c0ced396574d05eef7eec048034f8a56c4774 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 16 Dec 2020 23:31:34 +0000 Subject: [PATCH 3/8] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- apcupsd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/apcupsd.spec b/apcupsd.spec index fc71a12..fe7b3f1 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -27,6 +27,7 @@ BuildRequires: net-snmp-devel, libusb-devel BuildRequires: gtk2-devel, GConf2-devel, desktop-file-utils # This is part of util-linux in Fedora, but on EL7 it's in sysvinit-tools. BuildRequires: /usr/bin/wall +BuildRequires: make Requires: /bin/mail /usr/bin/wall %{?systemd_requires} From 49e074b505aae8aab99650c823b090f73085c283 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Sat, 30 Jan 2021 13:31:24 -0600 Subject: [PATCH 4/8] Fix build on F33+ Previous to F33, the files /usr/lib/rpm/config.{guess,sub} existed, and this package copied them into the autoconf directory. This was added in 2008 with no explanatory comment other than "new upstream version". RPM no longer includes those files, though copies do still exist in /usr/lib/rpm/redhat. The package appears fine without them. --- apcupsd.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apcupsd.spec b/apcupsd.spec index fe7b3f1..4099091 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -4,7 +4,7 @@ Name: apcupsd Version: 3.14.14 -Release: 18%{?dist} +Release: 22%{?dist} Summary: APC UPS Power Control Daemon License: GPLv2 @@ -68,7 +68,6 @@ printf 'install:\n\techo skipped\n' > platforms/redhat/Makefile %build %global _hardened_build 1 -cp -p /usr/lib/rpm/config.{guess,sub} autoconf/ export CPPFLAGS="$RPM_OPT_FLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS -Wno-format-security -Wno-error=format-security" export CXXFLAGS="$CPPFLAGS" export CFLAGS="$CPPFLAGS" @@ -165,6 +164,9 @@ rm examples/*.in %changelog +* Sat Jan 30 2021 Jason L Tibbitts III - 3.14.14-22 +- Fix build on F33+. + * Mon Jun 08 2020 Germano Massullo - 3.14.14-18 - Replaced BuildRequires: gnome-vfs2 with BuildRequires: GConf2-devel More infos at https://bugzilla.redhat.com/show_bug.cgi?id=1745727#c5 From 764c73577609610459d905c00a9f6529ddb9c757 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Sat, 30 Jan 2021 14:53:51 -0600 Subject: [PATCH 5/8] Use _make_verbose instead of hacks This is the single package which won't build with make V=1. Now that RPM has %_make_verbose to override this, use it instead of redefinining %make_build. --- apcupsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apcupsd.spec b/apcupsd.spec index 4099091..99ffda6 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,6 +1,6 @@ # A change in RPM 4.15 causes the make_build macro to misbuild this package. # See https://github.com/rpm-software-management/rpm/issues/798 -%global make_build %{__make} %{?_make_output_sync} %{?_smp_mflags} +%global _make_verbose %nil Name: apcupsd Version: 3.14.14 From 59175c64969f1ceab2863300a72591f19f4d7e0e Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Sat, 30 Jan 2021 14:56:53 -0600 Subject: [PATCH 6/8] Fix format-security error. Add a patch to fix the one line of code which triggered a format-security error instead of disabling format security checks for the entire package. --- apcupsd.spec | 8 ++++---- patch-format-security | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 patch-format-security diff --git a/apcupsd.spec b/apcupsd.spec index 99ffda6..91efe56 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -20,6 +20,9 @@ Source5: apcupsd64x64.png Patch0: apcupsd-3.14.9-fixgui.patch # Halt without powering off, rhbz#1442577 Patch1: apcupsd-3.14.4-shutdown.patch +# Fix format-security error so we can enable the checks +Patch2: patch-format-security + BuildRequires: gcc-c++ BuildRequires: glibc-devel, gd-devel @@ -67,10 +70,6 @@ A GUI interface to the APC UPS monitoring daemon. printf 'install:\n\techo skipped\n' > platforms/redhat/Makefile %build -%global _hardened_build 1 -export CPPFLAGS="$RPM_OPT_FLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS -Wno-format-security -Wno-error=format-security" -export CXXFLAGS="$CPPFLAGS" -export CFLAGS="$CPPFLAGS" %configure \ --sysconfdir="/etc/apcupsd" \ --with-cgi-bin="/var/www/apcupsd" \ @@ -166,6 +165,7 @@ rm examples/*.in %changelog * Sat Jan 30 2021 Jason L Tibbitts III - 3.14.14-22 - Fix build on F33+. +- Allow build with format-security checking enabled. * Mon Jun 08 2020 Germano Massullo - 3.14.14-18 - Replaced BuildRequires: gnome-vfs2 with BuildRequires: GConf2-devel More infos at https://bugzilla.redhat.com/show_bug.cgi?id=1745727#c5 diff --git a/patch-format-security b/patch-format-security new file mode 100644 index 0000000..d919a3c --- /dev/null +++ b/patch-format-security @@ -0,0 +1,13 @@ +diff --git a/src/gapcmon/gapcmon.c b/src/gapcmon/gapcmon.c +index 40bf29d..111fe1f 100644 +--- a/src/gapcmon/gapcmon.c ++++ b/src/gapcmon/gapcmon.c +@@ -2938,7 +2938,7 @@ static void gapc_util_log_app_msg(gchar * pch_func, gchar * pch_topic, + + pch = g_strdup_printf("%s(%s) emsg=%s", pch_func, pch_topic, pch_emsg); + +- g_message(pch); ++ g_message("%s", pch); + + g_free(pch); + From 785f07fa78db80edaac8e00ebf3f52f887aa116d Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Fri, 5 Feb 2021 16:05:38 -0600 Subject: [PATCH 7/8] Clean up .gitignore. --- .gitignore | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 830429c..b8c81a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -apcupsd-3.14.8.tar.gz -/apcupsd-3.14.9.tar.gz -/apcupsd-3.14.10.tar.gz -/apcupsd-3.14.11.tar.gz -/apcupsd-3.14.12.tar.gz -/apcupsd-3.14.13.tar.gz -/apcupsd-3.14.14.tar.gz +/apcupsd-*.tar.gz +/apcupsd-*.src.rpm +/apcupsd-*/ +/results_*/ From 4b7020d9397e0dc6c14973b1f82e6ef124949800 Mon Sep 17 00:00:00 2001 From: Carl George Date: Wed, 29 May 2024 18:21:51 -0500 Subject: [PATCH 8/8] Rebuild EPEL 8 Next package in EPEL 8 --- apcupsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apcupsd.spec b/apcupsd.spec index 91efe56..4a72dd9 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -4,7 +4,7 @@ Name: apcupsd Version: 3.14.14 -Release: 22%{?dist} +Release: 23%{?dist} Summary: APC UPS Power Control Daemon License: GPLv2 @@ -163,6 +163,9 @@ rm examples/*.in %changelog +* Wed May 29 2024 Carl George - 3.14.14-23 +- Rebuild EPEL 8 Next package in EPEL 8 + * Sat Jan 30 2021 Jason L Tibbitts III - 3.14.14-22 - Fix build on F33+. - Allow build with format-security checking enabled.