From 9cd23e92fe0f9893c947feae172055baade303ad Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Fri, 17 May 2013 13:45:58 +0200 Subject: [PATCH 1/4] make executables hardened (#955341) --- apcupsd.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apcupsd.spec b/apcupsd.spec index 7b109c4..9eab0ad 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,6 +1,6 @@ Name: apcupsd Version: 3.14.10 -Release: 9%{?dist} +Release: 10%{?dist} Summary: APC UPS Power Control Daemon for Linux Group: System Environment/Daemons @@ -74,6 +74,7 @@ A GUI interface to the APC UPS monitoring daemon. 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="$CPPFLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS" %configure \ @@ -185,6 +186,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri May 17 2013 Michal Hlavinka - 3.14.10-10 +- make executables hardened (#955341) + * Thu Feb 14 2013 Toshio Kuratomi - 3.14.10-9 - Remove --vendor flag to desktop-file-install on F19+ From 8bd6b3587d8881951dfa0186af1473f44d357ec2 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Thu, 23 Jan 2014 11:17:30 +0100 Subject: [PATCH 2/4] reduce amount of debug messages (#1053324) --- apcupsd-3.14.10-nodbg.patch | 26 ++++++++++++++++++++++++++ apcupsd.spec | 13 +++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 apcupsd-3.14.10-nodbg.patch diff --git a/apcupsd-3.14.10-nodbg.patch b/apcupsd-3.14.10-nodbg.patch new file mode 100644 index 0000000..d3f9f56 --- /dev/null +++ b/apcupsd-3.14.10-nodbg.patch @@ -0,0 +1,26 @@ +diff -up apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg apcupsd-3.14.10/src/drivers/snmplite/asn.cpp +--- apcupsd-3.14.10/src/drivers/snmplite/asn.cpp.nodbg 2010-09-07 17:35:13.000000000 +0200 ++++ apcupsd-3.14.10/src/drivers/snmplite/asn.cpp 2014-01-21 17:07:27.603049214 +0100 +@@ -26,10 +26,13 @@ + #include + #include + ++extern int debug_level; ++ + using namespace Asn; + + void debug(const char *foo, int indent) + { ++ if (!debug_level) return; + while (indent--) + printf(" "); + printf("%s\n", foo); +@@ -86,7 +89,7 @@ Object *Object::Demarshal(unsigned char + obj = new Sequence(type); + break; + default: +- printf("UNKNOWN ASN type=0x%02x\n", type); ++ if (debug_level) printf("UNKNOWN ASN type=0x%02x\n", type); + debug("UNKNOWN", indent); + obj = NULL; + break; diff --git a/apcupsd.spec b/apcupsd.spec index 9eab0ad..9b35da6 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,6 +1,6 @@ Name: apcupsd Version: 3.14.10 -Release: 10%{?dist} +Release: 11%{?dist} Summary: APC UPS Power Control Daemon for Linux Group: System Environment/Daemons @@ -20,12 +20,13 @@ Patch3: apcupsd-3.14.8-systemd.patch # fix crash in gui, rhbz#578276 Patch4: apcupsd-3.14.9-fixgui.patch +Patch5: apcupsd-3.14.10-nodbg.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0 BuildRequires: net-snmp-devel, tcp_wrappers-devel -BuildRequires: gtk2-devel, gnome-vfs2-devel, desktop-file-utils, sysvinit-tools +BuildRequires: gtk2-devel, gnome-vfs2-devel, desktop-file-utils Requires: /bin/mail Requires(post): systemd-units Requires(preun): systemd-units @@ -69,6 +70,7 @@ A GUI interface to the APC UPS monitoring daemon. %patch2 -p1 -b .cxxld %patch3 -p1 -b .systemd %patch4 -p1 -b .fixgui +%patch5 -p1 -b .nodbg #we will handle fedora/redhat part ourselfs printf 'install:\n\techo skipped\n' >platforms/redhat/Makefile @@ -186,6 +188,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jan 23 2014 Michal Hlavinka - 3.14.10-11 +- reduce amount of debug messages (#1053324) + * Fri May 17 2013 Michal Hlavinka - 3.14.10-10 - make executables hardened (#955341) @@ -266,7 +271,7 @@ rm -rf $RPM_BUILD_ROOT * Mon May 18 2009 Michal Hlavinka - 3.14.6-1 - update to 3.14.6 -* Thu Feb 24 2009 Michal Hlavinka - 3.14.5-3 +* Tue Feb 24 2009 Michal Hlavinka - 3.14.5-3 - fix build with gcc 4.4 * Mon Feb 23 2009 Fedora Release Engineering - 3.14.5-2 @@ -302,7 +307,7 @@ rm -rf $RPM_BUILD_ROOT - Add patch to close open file descriptors (bug #247162) - Stop/restart service as needed on removal/upgrade -* Mon Jun 02 2007 - Orion Poplawski - 3.14.1-2 +* Mon Jun 04 2007 - Orion Poplawski - 3.14.1-2 - Add patch for linux USB UPS detection (bug #245864) * Tue May 29 2007 - Orion Poplawski - 3.14.1-1 From 01e37562202ed41bb3e8b650466011ca087ae44a Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 17 Feb 2014 17:01:57 +0100 Subject: [PATCH 3/4] apcupsd updated to 3.14.11 --- .gitignore | 1 + apcupsd.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 276058d..7b1c465 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +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 diff --git a/apcupsd.spec b/apcupsd.spec index 9b35da6..5ab8285 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,6 +1,6 @@ Name: apcupsd -Version: 3.14.10 -Release: 11%{?dist} +Version: 3.14.11 +Release: 1%{?dist} Summary: APC UPS Power Control Daemon for Linux Group: System Environment/Daemons @@ -188,6 +188,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Feb 17 2014 Michal Hlavinka - 3.14.11-1 +- apcupsd updated to 3.14.11 + * Thu Jan 23 2014 Michal Hlavinka - 3.14.10-11 - reduce amount of debug messages (#1053324) diff --git a/sources b/sources index b86e1ab..7d38a22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5928822d855c5cf7ac29655e3e0b8c23 apcupsd-3.14.10.tar.gz +036d6b75bf9bf5eb20a98e14db4415dd apcupsd-3.14.11.tar.gz From 5da2aa9ef592d1f773c4b3fcceba3b49484b386e Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 31 Mar 2014 16:31:13 +0200 Subject: [PATCH 4/4] apcupsd updated to 3.14.12 - force lock dir to /var/lock (#1064099) --- .gitignore | 1 + apcupsd.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7b1c465..47a5c70 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,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 diff --git a/apcupsd.spec b/apcupsd.spec index 5ab8285..04bde43 100644 --- a/apcupsd.spec +++ b/apcupsd.spec @@ -1,5 +1,5 @@ Name: apcupsd -Version: 3.14.11 +Version: 3.14.12 Release: 1%{?dist} Summary: APC UPS Power Control Daemon for Linux @@ -99,6 +99,7 @@ export CPPFLAGS="$CPPFLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS" --with-serial-dev= \ --with-upstype=usb \ --with-upscable=usb \ + --with-lock-dir=/var/lock \ APCUPSD_MAIL=/bin/mail make %{?_smp_mflags} @@ -188,6 +189,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Mar 31 2014 Michal Hlavinka - 3.14.12-1 +- apcupsd updated to 3.14.12 +- force lock dir to /var/lock (#1064099) + * Mon Feb 17 2014 Michal Hlavinka - 3.14.11-1 - apcupsd updated to 3.14.11 diff --git a/sources b/sources index 7d38a22..5523e69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -036d6b75bf9bf5eb20a98e14db4415dd apcupsd-3.14.11.tar.gz +08bf201acea6b4dd69cf2fb0eecfd55e apcupsd-3.14.12.tar.gz