Hello community,

here is the log from the commit of package apcupsd for openSUSE:Factory checked 
in at 2015-04-18 10:39:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apcupsd (Old)
 and      /work/SRC/openSUSE:Factory/.apcupsd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apcupsd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/apcupsd/apcupsd.changes  2014-12-03 
22:50:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.apcupsd.new/apcupsd.changes     2015-04-18 
10:39:17.000000000 +0200
@@ -1,0 +2,49 @@
+Thu Apr  2 07:26:12 UTC 2015 - tchva...@suse.com
+
+- Version bumpt o 3.13.13:
+  * apcaccess and apcupsd status format updates to ease parsing by scripts
+  * UPS name is included in subject line of emails in default scripts
+  * Default event scripts pull SYSADMIN and APCUPSD_MAIL definitions from a
+    common config file so they can easily be configured in one place
+  * MODBUS USB support
+    Previous releases supported MODBUS serial (RS232). This release adds
+    support for MODBUS over USB. This protocol is preferable to the normal
+    USB HID driver because it offers access to more UPS data readouts and
+    controls. The only configuration file change needed versus MODBUS serial
+    is to change UPSCABLE to usb and use an empty DEVICE setting. See the 
+    MODBUS section of the apcupsd manual for more details.
+  * Support for Apple Notification Center on Mac OS X (replaces Growl)
+  * Apple install packages and binaries are signed with an Apple Developer
+    key for compatibility with Gate Keeper
+  * Windows USB driver has been updated with additional USB identifiers to
+    support future APC products.
+  * Fix issue with certain Back-UPS USB models repeatedly cycling power on/off 
+    after killpower is issued
+  * Fix display of battery level during MODBUS calibration
+  * Fix apctest EEPROM setting on various models
+  * Close and reopen serial port during extended COMMLOST in apcsmart driver
+    (helps recover connection when USB serial port dongles are reconnected)
+  * Avoid probing non-APC USB devices as it can cause lockups
+  * Fix issue with service failing to start on Windows during boot with USB UPS
+  * Fix bogus lock file error when config file error forces early termination
+  * Fix MODBUS NOMOUTV reading for voltages other than 120VAC
+  * Fix LOADPCT (CI_LOAD) on MODBUS driver
+  * Fix issue with net driver not reporting MODEL value
+  * Fix several potential issues identified by Coverity static analysis
+  * Numerous other fixes and improvements all over the code, many of them
+    submitted by users...Thank you!
+- Refreshed patches:
+  * apcupsd-3.14.1-cloexec.patch
+  * apcupsd-3.14.8-cxxld.patch
+  * apcupsd-gpp.patch
+- Removed patch:
+  * apcupsd-3.14.10-nodbg.patch
+
+-------------------------------------------------------------------
+Thu Apr  2 07:23:30 UTC 2015 - tchva...@suse.com
+
+- Cleanup with spec-cleaner
+- Remove patch that is never applied today:
+  * apcupsd-powersave.patch
+
+------------------------------------------------------------------

Old:
----
  apcupsd-3.14.10-nodbg.patch
  apcupsd-3.14.11.tar.gz
  apcupsd-3.14.11.tar.gz.sig
  apcupsd-powersave.patch

New:
----
  apcupsd-3.14.13.tar.gz
  apcupsd-3.14.13.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apcupsd.spec ++++++
--- /var/tmp/diff_new_pack.rrTs5t/_old  2015-04-18 10:39:18.000000000 +0200
+++ /var/tmp/diff_new_pack.rrTs5t/_new  2015-04-18 10:39:18.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package apcupsd
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,45 +16,13 @@
 #
 
 
+%define apache_serverroot %(%{_sbindir}/apxs2 -q datadir 2>/dev/null || 
%{_sbindir}/apxs -q PREFIX)
 Name:           apcupsd
-BuildRequires:  apache2-devel
-BuildRequires:  automake
-BuildRequires:  distribution-release
-BuildRequires:  dos2unix
-BuildRequires:  fdupes
-BuildRequires:  gcc-c++
-BuildRequires:  gconf2-devel
-BuildRequires:  gd-devel
-BuildRequires:  gnome-vfs2-devel
-BuildRequires:  gtk2-devel
-BuildRequires:  mailx
-BuildRequires:  ncurses-devel
-BuildRequires:  net-snmp-devel
-BuildRequires:  tcpd-devel
-BuildRequires:  update-desktop-files
-BuildRequires:  xorg-x11-devel
-%if 0%{?suse_version} > 1220
-BuildRequires:  gpg-offline
-%endif
-%if 0%{?suse_version} > 1220
-BuildRequires:  systemd-sysvinit
-%else
-%if 0%{?suse_version} < 1210
-BuildRequires:  sysvinit
-%else
-BuildRequires:  sysvinit-init
-%endif
-%endif
-%if %suse_version >= 1310
-BuildRequires:  systemd
-%else
-BuildRequires:  pm-utils
-%endif
+Version:        3.14.13
+Release:        0
 Summary:        APC UPS Daemon (Powerful Daemon for APC UPSs)
 License:        GPL-2.0
 Group:          Hardware/UPS
-Version:        3.14.11
-Release:        0
 Url:            http://www.apcupsd.com/
 Source:         
http://downloads.sourceforge.net/project/apcupsd/apcupsd%20-%20Stable/%{version}/apcupsd-%{version}.tar.gz
 Source1:        apcupsd.init
@@ -67,13 +35,11 @@
 Source9:        %{name}.keyring
 Source10:       %{name}.firewall
 # PATCH-FIX-OPENSUSE apcupsd-suse.patch sbra...@suse.cz -- Do not perform halt 
script alternation on install.
-Patch:          apcupsd-suse.patch
+Patch0:         apcupsd-suse.patch
 # PATCH-FIX-OPENSUSE apcupsd-gpp.patch sbra...@suse.cz -- Build against C++ 
unfriendly system tcpd.h. See below.
 Patch1:         apcupsd-gpp.patch
 # PATCH-FEATURE-OPENSUSE apcupsd-hibernate.patch sbra...@suse.cz -- Support 
for hibernation on powerfail.
 Patch2:         apcupsd-hibernate.patch
-# PATCH-FEATURE-OPENSUSE apcupsd-powersave.patch sbra...@suse.cz -- Call 
powersave-notify in distros where it is available.
-Patch3:         apcupsd-powersave.patch
 # PATCH-FIX-OPENSUSE apcupsd-3.14.6-undef-MIB-for-new-net-snmp.diff 
se...@opensuse.org -- Fix build with newer net-snmp by undefining MIB.
 Patch9:         apcupsd-3.14.6-undef-MIB-for-new-net-snmp.diff
 # PATCH-FIX-OPENSUSE apcupsd-3.14.1-cloexec.patch 
cristian.rodrig...@opensuse.org -- Close the socket on exec - avoid leaked file 
descriptors, patch from Fedora.
@@ -88,20 +54,45 @@
 Patch14:        fix-fsf-adress.patch
 # PATCH-FEATURE-OPENSUSE apcupsd-pm-utils.patch sbra...@suse.cz -- Use 
pm-utils in openSUSE < 13.1 and SLE < 12
 Patch15:        apcupsd-pm-utils.patch
-# PATCH-FIX-OPENSUSE apcupsd-3.14.10-nodbg.patch rhbz#1053324 
matwey.korni...@gmail.com -- reduce amount of debug messages
-Patch16:        apcupsd-3.14.10-nodbg.patch
-Requires:       /usr/bin/mail
-Requires(post):  %fillup_prereq
+BuildRequires:  apache2-devel
+BuildRequires:  automake
+BuildRequires:  distribution-release
+BuildRequires:  dos2unix
+BuildRequires:  fdupes
+BuildRequires:  gcc-c++
+BuildRequires:  gconf2-devel
+BuildRequires:  gd-devel
+BuildRequires:  gnome-vfs2-devel
+BuildRequires:  gtk2-devel
+BuildRequires:  libusb-devel
+BuildRequires:  mailx
+BuildRequires:  ncurses-devel
+BuildRequires:  net-snmp-devel
+BuildRequires:  tcpd-devel
+BuildRequires:  update-desktop-files
+BuildRequires:  xorg-x11-devel
+Requires:       %{_bindir}/mail
 # sed and grep are still prerequred to finish upgrade from sysvinit scripts:
-PreReq:         /usr/bin/sed /usr/bin/grep
+Requires(post): %{_bindir}/sed %{_bindir}/grep
+Requires(post): %fillup_prereq
+Suggests:       logrotate
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} > 1210
+BuildRequires:  systemd-rpm-macros
+BuildRequires:  systemd-sysvinit
+%else
+BuildRequires:  sysvinit
+%endif
+%if 0%{?suse_version} >= 1310
+BuildRequires:  systemd
+%else
+BuildRequires:  pm-utils
+%endif
 %if 0%{?suse_version} > 1220
 %{?systemd_requires}
 %else
-PreReq:         %insserv_prereq
+Requires(post): %insserv_prereq
 %endif
-Suggests:       logrotate
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%define apache_serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || 
/usr/sbin/apxs -q PREFIX)
 
 %description
 Controls and monitors the status of an APC UPS under Linux. Allows your
@@ -121,7 +112,6 @@
 A CGI interface to the APC UPS monitoring daemon.
 
 %package gui
-
 Summary:        APC UPS Monitor GUI (for APC UPSs)
 Group:          Hardware/UPS
 Requires:       %{name} = %{version}
@@ -136,23 +126,16 @@
 http://www.apc.com/tools/download/.
 
 %prep
-%if 0%{?gpg_verify:1}
-%gpg_verify %{S:8}
-%endif
 %setup -q
 #This is needed as apcupsd doesn't recognize ppc64 correctly
-cp /usr/share/automake*/config.{guess,sub} autoconf/
-cp -a %{S:1} platforms/suse/apcupsd.in
-cp -a %{S:2} %{S:4} %{S:5} .
-%patch
+cp %{_datadir}/automake*/config.{guess,sub} autoconf/
+cp -a %{SOURCE1} platforms/suse/apcupsd.in
+cp -a %{SOURCE2} %{SOURCE4} %{SOURCE5} .
+%patch0
 # To be surely in sync with tcpd API, build against system header. It requires 
a patch.
 rm include/tcpd.h
 %patch1
 %patch2
-%if %suse_version < 1110
-%patch3
-%endif
-chmod -x kernstodo
 %patch9
 %patch10 -p1
 %patch11 -p1
@@ -160,10 +143,9 @@
 %patch13 -p1
 %patch14 -p1
 sed -i '/^#!/d' %{SOURCE1}
-%if %suse_version < 1310
+%if 0%{?suse_version} < 1310
 %patch15
 %endif
-%patch16 -p1
 
 %build
 %configure\
@@ -175,17 +157,17 @@
 make %{?_smp_mflags}
 
 %install
-%makeinstall
+make DESTDIR=%{buildroot} install %{?_smp_mflags}
 install -m744 platforms/apccontrol \
-              $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/apccontrol
+              %{buildroot}%{_sysconfdir}/%{name}/apccontrol
 %if 0%{?suse_version} > 1220
-ln -sf /usr/sbin/service $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
+ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
 %else
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-ln -sf ../../etc/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
+mkdir -p %{buildroot}%{_initddir}
+ln -sf ../..%{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
 %endif
 %suse_update_desktop_file gapcmon
-chmod 644 $RPM_BUILD_ROOT/%{_datadir}/pixmaps/*.png
+chmod 644 %{buildroot}/%{_datadir}/pixmaps/*.png
 # Cleanup for later doc macro processing
 chmod -x examples/*.c
 rm examples/*.in
@@ -196,24 +178,24 @@
 # hid-ups.rpt is duplicate by BackUPS.rpt
 %fdupes -s examples/rpt/
 
-rm -r $RPM_BUILD_ROOT/%{_datadir}/hal
-%if %suse_version >= 1310
-mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep
-sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>$RPM_BUILD_ROOT/usr/lib/systemd/system-sleep/apcupsd.sh
-chmod +x $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep/apcupsd.sh
-%else
-mkdir -p $RPM_BUILD_ROOT/etc/pm/sleep.d
-sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>$RPM_BUILD_ROOT/etc/pm/sleep.d/99apcupsd
-chmod +x $RPM_BUILD_ROOT/etc/pm/sleep.d/99%{name}
+rm -r %{buildroot}/%{_datadir}/hal
+%if 0%{?suse_version} >= 1310
+mkdir -p %{buildroot}%{_libexecdir}/systemd/system-sleep
+sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>%{buildroot}%{_libexecdir}/systemd/system-sleep/apcupsd.sh
+chmod +x %{buildroot}%{_libexecdir}/systemd/system-sleep/apcupsd.sh
+%else
+mkdir -p %{buildroot}%{_sysconfdir}/pm/sleep.d
+sed "s:@PWRFAILDIR@:%{_sysconfdir}/%{name}:g" <%{name}.hibernate 
>%{buildroot}%{_sysconfdir}/pm/sleep.d/99apcupsd
+chmod +x %{buildroot}%{_sysconfdir}/pm/sleep.d/99%{name}
 %endif
-mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
-cp %{name}.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
+mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
+cp %{name}.sysconfig 
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
 
 # systemd support and remove initd support for opensuse 12.2 and higher
-%if 0%{?suse_version} > 1220
-install -p -D -m644 %{name}.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
-install -p -D -m755 %{name}_shutdown 
$RPM_BUILD_ROOT/usr/lib/systemd/system-shutdown/%{name}_shutdown
-rm $RPM_BUILD_ROOT/etc/init.d/%{name}
+%if 0%{?suse_version} > 1210
+install -p -D -m644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service
+install -p -D -m755 %{name}_shutdown 
%{buildroot}%{_libexecdir}/systemd/system-shutdown/%{name}_shutdown
+rm %{buildroot}%{_initddir}/%{name}
 %endif
 
 install -d %{buildroot}%{_sysconfdir}/logrotate.d
@@ -231,17 +213,17 @@
 
 %post
 %if 0%{?suse_version} > 1220
-%{fillup_only}
+%fillup_only
 %service_add_post %{name}.service
 # Remove HALT_POWERDOWN_INSERT, it is not needed with systemd (it was last 
time filled in 13.1).
 # We need to handle only the last form, which was already used in SLE11.
 if test -f etc/sysconfig/shutdown ; then
   if usr/bin/grep -q '^HALT_POWERDOWN_INSERT=' etc/sysconfig/shutdown ; then
     if ! usr/bin/grep -q '^HALT_POWERDOWN_INSERT=""' etc/sysconfig/shutdown ; 
then
-      if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="/etc/init\.d/apcupsd 
try-powerdown"' etc/sysconfig/shutdown ; then
-        usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)/etc/init\.d/apcupsd 
try-powerdown":\1":' etc/sysconfig/shutdown
+      if usr/bin/grep -q 
'^HALT_POWERDOWN_INSERT="%{_sysconfdir}/init\.d/apcupsd try-powerdown"' 
etc/sysconfig/shutdown ; then
+        usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\)%{_sysconfdir}/init\.d/apcupsd 
try-powerdown":\1":' etc/sysconfig/shutdown
       else
-        echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
+        echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
%{_sysconfdir}/sysconfig/shutdown."
         echo >&2 "         Keeping unchanged. If it still exists, it should 
be:"
         echo >&2 "HALT_POWERDOWN_INSERT=\"\""
       fi
@@ -254,12 +236,12 @@
 %{fillup_and_insserv %{name}}
 # HALT_POWERDOWN_INSERT is supported since SuSE Linux 10.1, SLES 10.
 # Install HALT_POWERDOWN_INSERT
-if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(/etc/apcupsd/apccontrol 
killpower\|/etc/init\.d/apcupsd try-powerdown\|\)"' etc/sysconfig/shutdown ; 
then
-  usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1/etc/init.d/apcupsd 
try-powerdown":' etc/sysconfig/shutdown
+if usr/bin/grep -q 
'^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/apcupsd/apccontrol 
killpower\|%{_sysconfdir}/init\.d/apcupsd try-powerdown\|\)"' 
etc/sysconfig/shutdown ; then
+  usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1%{_initddir}/apcupsd 
try-powerdown":' etc/sysconfig/shutdown
 else
-  echo >&2 "%{name}: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
+  echo >&2 "%{name}: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
%{_sysconfdir}/sysconfig/shutdown."
   echo >&2 "         Keeping unchanged. Should be:"
-  echo >&2 "HALT_POWERDOWN_INSERT=\"/etc/init.d/apcupsd try-powerdown\""
+  echo >&2 "HALT_POWERDOWN_INSERT=\"%{_initddir}/apcupsd try-powerdown\""
 fi
 %endif
 
@@ -275,20 +257,20 @@
 %service_del_postun %{name}.service
 %else
 # Remove HALT_POWERDOWN_INSERT
-if test $1 -eq 0 -a ! -f /etc/init.d/%{name} ; then
-  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(/etc/init\.d/apcupsd 
try-powerdown\)"' etc/sysconfig/shutdown ; then
-    usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(/etc/init\.d/apcupsd 
try-powerdown\)":\1":' etc/sysconfig/shutdown
+if test $1 -eq 0 -a ! -f %{_initddir}/%{name} ; then
+  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(%{_sysconfdir}/init\.d/apcupsd 
try-powerdown\)"' etc/sysconfig/shutdown ; then
+    usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\)\(%{_sysconfdir}/init\.d/apcupsd 
try-powerdown\)":\1":' etc/sysconfig/shutdown
   else
-    echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
+    echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
%{_sysconfdir}/sysconfig/shutdown."
     echo >&2 "         Keeping unchanged. Should be:"
     echo >&2 "HALT_POWERDOWN_INSERT=\"\""
   fi
   if test -f etc/init.d/apcupsd-early-powerdown ; then
-    echo >&2 "%{name}: WARNING: You may want to remove your 
/etc/init.d/apcupsd-early-powerdown."
+    echo >&2 "%{name}: WARNING: You may want to remove your 
%{_initddir}/apcupsd-early-powerdown."
   fi
 fi
 %{restart_on_update apcupsd}
-%{insserv_cleanup}
+%insserv_cleanup
 %endif
 
 %files
@@ -300,15 +282,15 @@
 %{_sbindir}/smtp
 %{_sbindir}/rc%{name}
 %if 0%{?suse_version} <= 1220
-%{_initrddir}/%{name}
+%{_initddir}/%{name}
 %else
 %{_unitdir}/%{name}.service
-/usr/lib/systemd/system-shutdown/%{name}_shutdown
+%{_libexecdir}/systemd/system-shutdown/%{name}_shutdown
 %endif
-%if %suse_version >= 1310
-/usr/lib/systemd/system-sleep/%{name}.sh
+%if 0%{?suse_version} >= 1310
+%{_libexecdir}/systemd/system-sleep/%{name}.sh
 %else
-/etc/pm/sleep.d/99%{name}
+%{_sysconfdir}/pm/sleep.d/99%{name}
 %endif
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/changeme
@@ -325,7 +307,7 @@
 %{apache_serverroot}/cgi-bin/upsstats.cgi
 %{apache_serverroot}/cgi-bin/upsimage.cgi
 %doc %{_mandir}/man?/*.*
-/var/adm/fillup-templates/sysconfig.*
+%{_localstatedir}/adm/fillup-templates/sysconfig.*
 
 %files gui
 %defattr(-,root,root)

++++++ apcupsd-3.14.1-cloexec.patch ++++++
--- /var/tmp/diff_new_pack.rrTs5t/_old  2015-04-18 10:39:18.000000000 +0200
+++ /var/tmp/diff_new_pack.rrTs5t/_new  2015-04-18 10:39:18.000000000 +0200
@@ -1,6 +1,8 @@
---- apcupsd-3.14.11.orig/src/apcnis.c
-+++ apcupsd-3.14.11/src/apcnis.c
-@@ -155,6 +155,9 @@ void do_server(UPSINFO *ups)
+Index: apcupsd-3.14.13/src/apcnis.c
+===================================================================
+--- apcupsd-3.14.13.orig/src/apcnis.c
++++ apcupsd-3.14.13/src/apcnis.c
+@@ -157,6 +157,9 @@ void do_server(UPSINFO *ups)
        sleep(5 * 60);
     }
  
@@ -10,9 +12,11 @@
     /* Reuse old sockets */
  #ifndef HAVE_MINGW
     if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&turnon, 
sizeof(turnon)) < 0) {
---- apcupsd-3.14.11.orig/src/apcupsd.c
-+++ apcupsd-3.14.11/src/apcupsd.c
-@@ -272,6 +272,9 @@ int main(int argc, char *argv[])
+Index: apcupsd-3.14.13/src/apcupsd.c
+===================================================================
+--- apcupsd-3.14.13.orig/src/apcupsd.c
++++ apcupsd-3.14.13/src/apcupsd.c
+@@ -212,6 +212,9 @@ int main(int argc, char *argv[])
        if (ups->event_fd < 0) {
           log_event(ups, LOG_WARNING, "Could not open events file %s: %s\n",
              ups->eventfile, strerror(errno));
@@ -22,9 +26,11 @@
        }
     }
  
---- apcupsd-3.14.11.orig/src/drivers/usb/linux/linux-usb.c
-+++ apcupsd-3.14.11/src/drivers/usb/linux/linux-usb.c
-@@ -164,8 +164,11 @@ int LinuxUsbUpsDriver::open_usb_device()
+Index: apcupsd-3.14.13/src/drivers/usb/linux/linux-usb.c
+===================================================================
+--- apcupsd-3.14.13.orig/src/drivers/usb/linux/linux-usb.c
++++ apcupsd-3.14.13/src/drivers/usb/linux/linux-usb.c
+@@ -243,8 +243,11 @@ bool LinuxUsbUpsDriver::open_usb_device(
     /* Retry 10 times */
     for (i = 0; i < 10; i++) {
        _fd = open_device(_ups->device);
@@ -32,17 +38,17 @@
 +      if (_fd != -1) {
 +         /* Close the device on exec - avoid leaked file descriptors */
 +         fcntl(_fd, F_SETFD, FD_CLOEXEC);
-          return 1;
+          return true;
 +      }
        sleep(1);
     }
  
-@@ -188,6 +191,8 @@ auto_detect:
+@@ -267,6 +270,8 @@ auto_detect:
              asnprintf(devname, sizeof(devname), "%s%d", hiddev[j], k);
              _fd = open_device(devname);
              if (_fd != -1) {
 +               /* Close the device on exec - avoid leaked file descriptors */
 +               fcntl(_fd, F_SETFD, FD_CLOEXEC);
                 /* Successful open, save device name and return */
-                astrncpy(_ups->device, devname, sizeof(_ups->device));
-                return 1;
+                strlcpy(_ups->device, devname, sizeof(_ups->device));
+                return true;

++++++ apcupsd-3.14.11.tar.gz -> apcupsd-3.14.13.tar.gz ++++++
++++ 70457 lines of diff (skipped)

++++++ apcupsd-3.14.8-cxxld.patch ++++++
--- /var/tmp/diff_new_pack.rrTs5t/_old  2015-04-18 10:39:18.000000000 +0200
+++ /var/tmp/diff_new_pack.rrTs5t/_new  2015-04-18 10:39:18.000000000 +0200
@@ -1,16 +1,17 @@
-diff -up apcupsd-3.14.8/src/Makefile.cxxld apcupsd-3.14.8/src/Makefile
---- apcupsd-3.14.8/src/Makefile.cxxld  2009-09-30 01:20:45.000000000 +0200
-+++ apcupsd-3.14.8/src/Makefile        2010-09-22 11:18:03.550601657 +0200
-@@ -26,10 +26,10 @@ SRCS = $(common_srcs) $(apcupsd_srcs) $(
- all-targets: apcupsd apcaccess apctest smtp 
+Index: apcupsd-3.14.13/src/Makefile
+===================================================================
+--- apcupsd-3.14.13.orig/src/Makefile
++++ apcupsd-3.14.13/src/Makefile
+@@ -30,10 +30,10 @@ SRCS = $(common_srcs) $(apcupsd_srcs) $(
+ all-targets: apcupsd$(EXE) apcaccess$(EXE) apctest$(EXE) smtp$(EXE) 
  
- apcupsd: $(common_obj) $(apcupsd_obj) $(APCDRVLIBS) $(APCLIBS)
--      $(LINK) $(DRVLIBS)
-+      $(LINK) -lstdc++ $(DRVLIBS)
+ apcupsd$(EXE): $(common_obj) $(apcupsd_obj) $(APCDRVLIBS) $(APCLIBS)
+-      $(LINK) $(DRVLIBS) $(BG)
++      $(LINK) -lstdc++ $(DRVLIBS) $(BG)
  
- apctest: $(common_obj) $(apctest_obj) $(APCDRVLIBS) $(APCLIBS)
+ apctest$(EXE): $(common_obj) $(apctest_obj) $(APCDRVLIBS) $(APCLIBS)
 -      $(LINK) $(DRVLIBS)
 +      $(LINK) -lstdc++ $(DRVLIBS)
  
- apcaccess: $(apcaccess_obj) $(APCLIBS)
+ apcaccess$(EXE): $(apcaccess_obj) $(APCLIBS)
        $(LINK)

++++++ apcupsd-gpp.patch ++++++
--- /var/tmp/diff_new_pack.rrTs5t/_old  2015-04-18 10:39:18.000000000 +0200
+++ /var/tmp/diff_new_pack.rrTs5t/_new  2015-04-18 10:39:18.000000000 +0200
@@ -5,7 +5,7 @@
 ===================================================================
 --- include/apc.h.orig
 +++ include/apc.h
-@@ -154,7 +154,9 @@
+@@ -149,7 +149,9 @@
  
  /* Pull in our local copy because the library does not have correct protos */
  #ifdef HAVE_LIBWRAP
@@ -14,4 +14,4 @@
 +}
  #endif
  
- /* Solaris doesn't define this */
+ #endif


Reply via email to