Hello community,

here is the log from the commit of package apcupsd for openSUSE:Factory checked 
in at 2013-01-11 17:10:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apcupsd (Old)
 and      /work/SRC/openSUSE:Factory/.apcupsd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apcupsd", Maintainer is "sbra...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/apcupsd/apcupsd.changes  2012-05-31 
17:02:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.apcupsd.new/apcupsd.changes     2013-01-11 
17:10:32.000000000 +0100
@@ -1,0 +2,34 @@
+Fri Jan 11 09:41:28 UTC 2013 - a...@suse.de
+
+- Remove patch apcupsd-largebuf-overflow.patch, it's upstream now
+
+-------------------------------------------------------------------
+Fri Jan 11 09:12:45 UTC 2013 - co...@suse.com
+
+- fix build on factory - systemd moved to /usr
+
+-------------------------------------------------------------------
+Fri Sep 14 20:17:07 UTC 2012 - p.drou...@gmail.com
+
+- Updated to version 3.14.10:
+  * Fix missing status and spurrious incorrect status on newer BackUPS CS
+    models using USB interface.
+
+  * USB compatibility fixes for Mac OS X Lion
+
+  * USB driver support for newer Microlink models on Mac OS X Lion and Windows
+
+  * Ignore transitions to battery due to calibration (possible if user
+    initiates calibration, then exits apctest and starts apcupsd before 
+    calibration completes.
+
+  * Fix truncation of long UPS model names such as "Smart-UPS RT 5000 XL"
+
+  * Fix MODEL vs. APCMODEL confusion. Remove APCMODEL and rename old MODEL
+    aka 'mode' to DRIVER.
+    
+- Improve Systemd and logrotate support
+- Remove apcupsd-lite support : difference between apcupsd-lite and 
+  apcupsd are minimal or cpu consumption don't justify his presence
+
+-------------------------------------------------------------------

Old:
----
  apcupsd-3.14.8-exit-race.patch
  apcupsd-3.14.8.tar.bz2
  apcupsd-largebuf-overflow.patch

New:
----
  apcupsd-3.14.10.tar.bz2
  apcupsd-3.14.8-cxxld.patch
  apcupsd-3.14.8-systemd.patch
  apcupsd-3.14.9-fixgui.patch
  apcupsd-httpd.conf
  apcupsd.logrotate
  fix-fsf-adress.patch

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

Other differences:
------------------
++++++ apcupsd.spec ++++++
--- /var/tmp/diff_new_pack.JxhxCj/_old  2013-01-11 17:10:34.000000000 +0100
+++ /var/tmp/diff_new_pack.JxhxCj/_new  2013-01-11 17:10:34.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package apcupsd
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,6 +21,7 @@
 BuildRequires:  automake
 BuildRequires:  distribution-release
 BuildRequires:  dos2unix
+BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  gconf2-devel
 BuildRequires:  gd-devel
@@ -33,15 +34,19 @@
 BuildRequires:  tcpd-devel
 BuildRequires:  update-desktop-files
 BuildRequires:  xorg-x11-devel
-%if 0%{?suse_version} < 1210
+%if 0%{?suse_version} <= 1140
 BuildRequires:  sysvinit
 %else
+%if 0%{?suse_version} >= 1220
+BuildRequires:  systemd-sysvinit
+%else
 BuildRequires:  sysvinit-init
 %endif
+%endif
 Summary:        APC UPS Daemon (Powerful Daemon for APC UPSs)
 License:        GPL-2.0+
 Group:          Hardware/UPS
-Version:        3.14.8
+Version:        3.14.10
 Release:        0
 Url:            http://www.apcupsd.com/
 Source:         apcupsd-%{version}.tar.bz2
@@ -50,6 +55,8 @@
 Source3:        apcupsd-early-powerdown.init
 Source4:        apcupsd.hibernate
 Source5:        apcupsd.sysconfig
+Source6:        apcupsd.logrotate 
+Source7:        apcupsd-httpd.conf
 # PATCH-FIX-OPENSUSE apcupsd-suse.patch sbra...@suse.cz -- Do not perform halt 
script alternation on install.
 Patch:          apcupsd-suse.patch
 # PATCH-FIX-OPENSUSE apcupsd-gpp.patch sbra...@suse.cz -- Build against C++ 
unfriendly system tcpd.h. See below.
@@ -58,15 +65,25 @@
 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-largebuf-overflow.patch sbra...@suse.cz -- Fix 
static buffer overflow.
-Patch5:         apcupsd-largebuf-overflow.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
 Patch10:        apcupsd-3.14.1-cloexec.patch
-# PATCH-FIX-UPSTREAM apcupsd-3.14.8-exit-race.patch mkube...@suse.cz -- avoid 
race condition when apcupsd is terminated
-Patch11:        apcupsd-3.14.8-exit-race.patch
+# systemd support
+Patch11:        apcupsd-3.14.8-systemd.patch
+#fix FTBFS, c++ linking needs -lstdc++ explicitly
+Patch12:        apcupsd-3.14.8-cxxld.patch
+# fix crash in gui, rhbz#578276
+Patch13:        apcupsd-3.14.9-fixgui.patch
+# FSF adress is incorrect
+Patch14:        fix-fsf-adress.patch
+%if 0%{?suse_version} < 1220
 PreReq:         %fillup_prereq %insserv_prereq /usr/bin/sed /usr/bin/grep
+%endif
 Requires:       /usr/bin/mail
+%if 0%{?suse_version} >= 1220
+%{?systemd_requires}
+%endif
+Suggests:       logrotate
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %define apache_serverroot %(/usr/sbin/apxs2 -q datadir 2>/dev/null || 
/usr/sbin/apxs -q PREFIX)
 
@@ -79,6 +96,14 @@
 APC also made their PowerChute plus available for download at
 http://www.apc.com/tools/download/.
 
+%package cgi
+Summary:        Web interface for apcupsd
+Group:          Hardware/UPS
+Requires:       %{name} = %{version}
+
+%description cgi
+A CGI interface to the APC UPS monitoring daemon.
+
 %package gui
 
 Summary:        APC UPS Monitor GUI (for APC UPSs)
@@ -107,36 +132,20 @@
 rm include/tcpd.h
 %patch1
 %patch2
-%if %suse_version < 1110
 %patch3
-%endif
 chmod -x kernstodo
-%patch5
 %patch9
 %patch10 -p1
-%patch11
+%patch11 -p1 -b .systemd
+%patch12 -p1 -b .cxxld
+%patch13 -p1 -b .fixgui
+%patch14 -p1
+
+sed -i '/^#!/d' %{SOURCE1}
 
 %build
-# Incomplete:
-#cd autoconf
-#aclocal
-#autoconf
-#cp configure ..
-#cd ..
-%if "%suse_version" == "910"
-export CFLAGS="$RPM_OPT_FLAGS -DHID_MAX_USAGES=1024"
-%endif
-%configure\
-       --sbindir=/sbin\
-       --sysconfdir=%{_sysconfdir}/apcupsd\
-       --enable-usb\
-       --enable-nls\
-       --with-cgi-bin=%{apache_serverroot}/cgi-bin
-make %{?_smp_mflags}
-cp -a src/apcupsd src/apcupsd-lite
-make clean
 %configure\
-       --sysconfdir=%{_sysconfdir}/apcupsd\
+       --sysconfdir=%{_sysconfdir}/%{name}\
        --with-libwrap\
        --enable-all\
        --enable-nls\
@@ -145,32 +154,51 @@
 
 %install
 %makeinstall
-mkdir -p $RPM_BUILD_ROOT/sbin
-install src/apcupsd-lite $RPM_BUILD_ROOT/sbin
-ln -sf ../../etc/init.d/apcupsd $RPM_BUILD_ROOT/usr/sbin/rcapcupsd
+install -m744 platforms/apccontrol \
+              $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/apccontrol
+%if 0%{?suse_version} < 1220
+mkdir -p $RPM_BUILD_ROOT%{_initrddir}
+ln -sf ../../etc/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
+%endif
 %suse_update_desktop_file gapcmon
-chmod 644 $RPM_BUILD_ROOT/usr/share/pixmaps/*.png
-# fix docu permissions
-rm examples/safe.apccontrol.in
+chmod 644 $RPM_BUILD_ROOT/%{_datadir}/pixmaps/*.png
+# Cleanup for later doc macro processing
+chmod -x examples/*.c
+rm examples/*.in
 find examples users_guide -type f | xargs chmod 644
 # fix end-of-line encoding
 dos2unix -o examples/status/SmartUPS-vs-650.status examples/snoopdecode.c 
examples/rpt/Smart-UPS-1500.rpt \
        examples/rpt/Back-UPS-ES-550.rpt examples/rpt/Back-UPS-CS-650.rpt 
examples/rpt/Back-UPS-BR-800.rpt
-%if %suse_version > 1130
-rm -r $RPM_BUILD_ROOT/usr/share/hal
-%endif
+# hid-ups.rpt is duplicate by BackUPS.rpt
+%fdupes -s examples/rpt/
+
+rm -r $RPM_BUILD_ROOT/%{_datadir}/hal
 mkdir -p $RPM_BUILD_ROOT/etc/pm/sleep.d
-sed "s:@PWRFAILDIR@:%{_sysconfdir}/apcupsd:g" <apcupsd.hibernate 
>$RPM_BUILD_ROOT/etc/pm/sleep.d/99apcupsd
-chmod +x $RPM_BUILD_ROOT/etc/pm/sleep.d/99apcupsd
+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}
 mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
-cp apcupsd.sysconfig $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.apcupsd
+cp %{name}.sysconfig $RPM_BUILD_ROOT/var/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}
+%endif
+
+install -d %{buildroot}%{_sysconfdir}/logrotate.d
+install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
+install -d %{buildroot}%{_sysconfdir}/apache2/conf.d/
+install -m0644 %{SOURCE7} 
%{buildroot}%{_sysconfdir}/apache2/conf.d/%{name}.conf
 
 %post
-%{fillup_and_insserv apcupsd}
+%if 0%{?suse_version} >= 1220
+%service_add_post %{name}.service
+%else
 # 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="\(/etc/%{name}/apccontrol 
killpower\|/etc/init\.d/%{name} try-powerdown\|\)"' etc/sysconfig/shutdown ; 
then
+  usr/bin/sed -i 
's:^\(HALT_POWERDOWN_INSERT="\).*"[[:space:]]*:\1/etc/init.d/%{name} 
try-powerdown":' etc/sysconfig/shutdown
 else
   echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
   echo >&2 "         Keeping unchanged. Should be:"
@@ -187,56 +215,60 @@
        usr/bin/sed -i ':1;/XXX APCUPSD - DO NOT EDIT XXX/,+1s/^fi$/& # XXX 
APCUPSD - DO NOT EDIT XXX/;t1;/XXX APCUPSD - DO NOT EDIT XXX/d' 
etc/init.d/halt.local
     fi
 fi
+%endif
 
 %preun
+%if 0%{?suse_version} >= 1220
+%service_del_preun %{name}.service
+%else
 %{stop_on_removal apcupsd}
+%endif
 
 %postun
+%if 0%{?suse_version} >= 1220
+%service_del_postun %{name}.service
+%else
 # Remove HALT_POWERDOWN_INSERT
-if test $1 -eq 0 -a ! -f /etc/init.d/apcupsd ; 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 /etc/init.d/%{name} ; then
+  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(/etc/init\.d/%{name} 
try-powerdown\)"' etc/sysconfig/shutdown ; then
+    usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(/etc/init\.d/%{name} 
try-powerdown\)":\1":' etc/sysconfig/shutdown
   else
-    echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
+    echo >&2 "%{name}: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/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 "apcupsd: WARNING: You may want to remove your 
/etc/init.d/apcupsd-early-powerdown."
+  if test -f etc/init.d/%{name}-early-powerdown ; then
+    echo >&2 "%{name}: WARNING: You may want to remove your 
/etc/init.d/%{name}-early-powerdown."
   fi
 fi
 %{restart_on_update apcupsd}
 %{insserv_cleanup}
+%endif
 
 %files
 %defattr(-,root,root)
-%doc apcupsd-early-powerdown COPYING ChangeLog* DISCLAIMER Developers INSTALL 
README.SUSE ReleaseNotes examples/
-/sbin/apcupsd-lite
-%if %suse_version <= 1130
-%dir %{_datadir}/hal
-%dir %{_datadir}/hal/fdi
-%dir %{_datadir}/hal/fdi/policy
-%dir %{_datadir}/hal/fdi/policy/20thirdparty
-%{_datadir}/hal/fdi/policy/20thirdparty/*.fdi
-%endif
-%{_sbindir}/apcupsd
+%doc COPYING ChangeLog examples ReleaseNotes README.SUSE
+%{_sbindir}/%{name}
 %{_sbindir}/apcaccess
 %{_sbindir}/apctest
-%{_sbindir}/rcapcupsd
 %{_sbindir}/smtp
-/etc/init.d/apcupsd
-/etc/pm/sleep.d/99apcupsd
-%dir %{_sysconfdir}/apcupsd/
-%config(noreplace) %{_sysconfdir}/apcupsd/*
-%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.conf
-%config(noreplace) %{_sysconfdir}/apcupsd/changeme
-%config(noreplace) %{_sysconfdir}/apcupsd/commfailure
-%config(noreplace) %{_sysconfdir}/apcupsd/commok
-%config(noreplace) %{_sysconfdir}/apcupsd/hosts.conf
-%config(noreplace) %{_sysconfdir}/apcupsd/multimon.conf
-%config(noreplace) %{_sysconfdir}/apcupsd/onbattery
-%config(noreplace) %{_sysconfdir}/apcupsd/offbattery
-%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.css
+%if 0%{?suse_version} < 1220
+%{_initrddir}/%{name}
+%{_sbindir}/rc%{name}
+%else
+%{_unitdir}/%{name}.service
+/usr/lib/systemd/system-shutdown/%{name}_shutdown
+%endif
+/etc/pm/sleep.d/99%{name}
+%dir %{_sysconfdir}/%{name}/
+%config(noreplace) %{_sysconfdir}/%{name}/changeme
+%config(noreplace) %{_sysconfdir}/%{name}/commfailure
+%config(noreplace) %{_sysconfdir}/%{name}/commok
+%config(noreplace) %{_sysconfdir}/%{name}/onbattery
+%config(noreplace) %{_sysconfdir}/%{name}/offbattery
+%config(noreplace) %{_sysconfdir}/logrotate.d/apcupsd
+%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+%attr(0755,root,root) %{_sysconfdir}/apcupsd/apccontrol
 %{apache_serverroot}/cgi-bin/multimon.cgi
 %{apache_serverroot}/cgi-bin/upsfstats.cgi
 %{apache_serverroot}/cgi-bin/upsstats.cgi
@@ -250,4 +282,11 @@
 %{_datadir}/applications/gapcmon.desktop
 %{_datadir}/pixmaps/*.png
 
+%files cgi
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/apache2/conf.d/%{name}.conf
+%config(noreplace) %{_sysconfdir}/%{name}/%{name}.css
+%config(noreplace) %{_sysconfdir}/%{name}/hosts.conf
+%config(noreplace) %{_sysconfdir}/%{name}/multimon.conf
+
 %changelog

++++++ apcupsd-3.14.8.tar.bz2 -> apcupsd-3.14.10.tar.bz2 ++++++
++++ 12411 lines of diff (skipped)

++++++ apcupsd-3.14.8-cxxld.patch ++++++
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 
 
 apcupsd: $(common_obj) $(apcupsd_obj) $(APCDRVLIBS) $(APCLIBS)
-       $(LINK) $(DRVLIBS)
+       $(LINK) -lstdc++ $(DRVLIBS)
 
 apctest: $(common_obj) $(apctest_obj) $(APCDRVLIBS) $(APCLIBS)
-       $(LINK) $(DRVLIBS)
+       $(LINK) -lstdc++ $(DRVLIBS)
 
 apcaccess: $(apcaccess_obj) $(APCLIBS)
        $(LINK)
++++++ apcupsd-3.14.8-systemd.patch ++++++
diff -up apcupsd-3.14.8/apcupsd.service.systemd apcupsd-3.14.8/apcupsd.service
--- apcupsd-3.14.8/apcupsd.service.systemd      2011-06-16 10:33:02.335889489 
+0200
+++ apcupsd-3.14.8/apcupsd.service      2011-06-16 09:59:02.616138047 +0200
@@ -0,0 +1,11 @@
+[Unit]
+Description=APC UPS Power Control Daemon for Linux
+After=syslog.target
+After=network.target
+
+[Service]
+ExecStartPre=-/bin/rm -f /etc/apcupsd/powerfail
+ExecStart=/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
+
+[Install]
+WantedBy=multi-user.target
diff -up apcupsd-3.14.8/apcupsd_shutdown.systemd apcupsd-3.14.8/apcupsd_shutdown
--- apcupsd-3.14.8/apcupsd_shutdown.systemd     2011-06-16 10:33:08.831934420 
+0200
+++ apcupsd-3.14.8/apcupsd_shutdown     2011-06-16 10:10:20.948796784 +0200
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# See if this is a powerfail situation.
+if [ -f /etc/apcupsd/powerfail ]; then
+  echo
+  echo "APCUPSD will now power off the UPS"
+  echo
+  /etc/apcupsd/apccontrol killpower
+fi
++++++ apcupsd-3.14.9-fixgui.patch ++++++
--- apcupsd-3.14.9/src/gapcmon/gapcmon.c.timeout        2008-09-16 
06:58:20.000000000 +0200
+++ apcupsd-3.14.9/src/gapcmon/gapcmon.c        2011-10-12 20:10:52.986362156 
+0200
@@ -179,6 +179,54 @@ struct hostent * gethostname_re
 */
 static gboolean lg_graph_debug = FALSE;
 
+static GSList *timeout_list = NULL;
+
+static inline timeout_t * new_timeout(guint id, timeout_type_t type, void 
*data) {
+    timeout_t *timeout = (timeout_t *) malloc(sizeof(timeout_t));
+
+    timeout->id   = id;
+    timeout->type = type;
+    timeout->data = data;
+    return timeout;
+}
+
+/* callback will check if timeout is associated with window
+ * which is about to be destroyed and it will call g_source_remove 
+ * in order to prevent the callback associated with timeout to be executed 
+ */ 
+static void remove_timeout(gpointer tmo, gpointer data) {
+    timeout_t * timeout = (timeout_t *) tmo;
+    PGAPC_MONITOR monitor = (PGAPC_MONITOR) data;
+    int delete_timeout  = 0;
+
+    if (timeout == NULL) {
+        return;
+    }
+
+    switch (timeout->type) {
+    case GRAPH:
+        if (timeout->data == (void *) monitor->phs.plg) {
+            delete_timeout = 1;
+        }
+        break;
+    case MONITOR:
+        if (timeout->data == (void *) monitor) {
+            delete_timeout = 1;
+        }
+        break;
+
+    case HISTORY:
+        if (timeout->data == (void *) &(monitor->phs)) {
+            delete_timeout = 1;
+        }
+        break;
+    }
+    
+    if (delete_timeout) {
+        g_source_remove(timeout->id);
+        timeout_list = g_slist_remove(timeout_list, (gconstpointer) timeout);
+    }
+}
 
 /* ************************************************************************* */
 
@@ -1376,8 +1424,8 @@ static gint lg_graph_configure_event_cb 
     plg->x_range.i_minor_inc = plg->plot_box.width / plg->x_range.i_num_minor;
     plg->x_range.i_major_inc = plg->plot_box.width / plg->x_range.i_num_major;
 
-    g_timeout_add (250, (GSourceFunc) lg_graph_draw, plg);
-
+    guint tid = g_timeout_add (250, (GSourceFunc) lg_graph_draw, plg);
+    timeout_list = g_slist_append(timeout_list, new_timeout(tid, GRAPH, (void 
*) plg));
     return TRUE;
 }
 
@@ -1745,7 +1793,8 @@ static gboolean cb_monitor_automatic_ref
       return FALSE;                /* stop timers */
 
    if (pm->b_timer_control) {
-      g_timeout_add(100, (GSourceFunc) cb_monitor_refresh_control, pm);
+      guint tid = g_timeout_add(100, (GSourceFunc) cb_monitor_refresh_control, 
pm);
+      timeout_list = g_slist_append(timeout_list, new_timeout(tid, MONITOR, 
(void *) pm));
       return FALSE;
    }
 
@@ -4543,9 +4592,9 @@ static void cb_monitor_interface_button_
    }
 
    g_async_queue_push(pm->q_network, pm);
-   g_timeout_add(GAPC_REFRESH_FACTOR_ONE_TIME,
+   guint tid = g_timeout_add(GAPC_REFRESH_FACTOR_ONE_TIME,
       (GSourceFunc) cb_monitor_dedicated_one_time_refresh, pm);
-
+   timeout_list = g_slist_append(timeout_list, new_timeout(tid, MONITOR, (void 
*) pm));
    return;
 }
 
@@ -5174,6 +5223,9 @@ static void cb_monitor_interface_destroy
       g_source_remove(pm->tid_automatic_refresh);
    }
 
+   /* iterate through list of timers and remove all timers associated with 
this monitor */
+   g_slist_foreach(timeout_list, remove_timeout, (gpointer) pm);
+
    if (pm->tid_thread_qwork != NULL) {
       pm->b_thread_stop = TRUE;
       g_async_queue_push(pm->q_network, pm);
@@ -5537,9 +5589,9 @@ static gint gapc_monitor_history_page(PG
 
    /* collect one right away */
    pphs->b_startup = TRUE;
-   g_timeout_add((guint) (pm->d_refresh * GAPC_REFRESH_FACTOR_1K + 75),
+   guint tid = g_timeout_add((guint) (pm->d_refresh * GAPC_REFRESH_FACTOR_1K + 
75),
       (GSourceFunc) cb_util_line_chart_refresh, pphs);
-
+   timeout_list = g_slist_append(timeout_list, new_timeout(tid, HISTORY, (void 
*) pphs));
    return i_page;
 }
 
@@ -5565,7 +5617,8 @@ static gboolean cb_util_line_chart_refre
       return FALSE;
 
    if (pm->b_graph_control) {
-      g_timeout_add(100, (GSourceFunc) cb_util_line_chart_refresh_control, pm);
+      guint tid = g_timeout_add(100, (GSourceFunc) 
cb_util_line_chart_refresh_control, pm);
+      timeout_list = g_slist_append(timeout_list, new_timeout(tid, MONITOR, 
(void *) pm));
       return FALSE;
    }
 
@@ -6392,6 +6445,7 @@ extern int main(int argc, char *argv[])
    PGAPC_CONFIG pcfg = NULL;
    GtkWidget *window = NULL;
 
+   timeout_list = g_slist_alloc();
    /*
     * Initialize GLib thread support, and GTK
     */
@@ -6435,5 +6489,6 @@ extern int main(int argc, char *argv[])
    gdk_flush();
    gdk_threads_leave();
 
+   g_slist_free(timeout_list);
    return (0);
 }
--- apcupsd-3.14.9/src/gapcmon/gapcmon.h        2011-10-12 20:12:54.584317583 
+0200
+++ apcupsd-3.14.9/src/gapcmon/gapcmon.h.timeout        2011-10-12 
20:14:10.965669911 +0200
@@ -403,6 +403,18 @@ typedef struct _System_Control_Data {
 
 } GAPC_CONFIG, *PGAPC_CONFIG;
 
+typedef enum {
+    GRAPH,
+    MONITOR,
+    HISTORY
+} timeout_type_t;
+
+typedef struct {
+    guint id;
+    timeout_type_t type;
+    void *data;
+} timeout_t;
+
 /* ************************************************************************* */
 
 #define GAPC_GLOSSARY  "<span size=\"xx-large\"><b>GAPCMON</b></span>\n \
++++++ apcupsd-httpd.conf ++++++
#
# apcupsd configuration file for Apache Web server
#

# files are off the documentroot of Web server
Alias /apcupsd /var/www/apcupsd
<Directory /var/www/apcupsd>
 AddHandler cgi-script cgi pl
 Options ExecCGI
</Directory>

#
# Allow only local access at default
# Change the ".example.com" to match your domain or modify
# access rights to your needs to enable remote access also.
#
<Directory "/var/www/apcupsd">
    DirectoryIndex upsstats.cgi
    AllowOverride None
    Options ExecCGI Indexes
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Directory>


++++++ apcupsd.init ++++++
--- /var/tmp/diff_new_pack.JxhxCj/_old  2013-01-11 17:10:35.000000000 +0100
+++ /var/tmp/diff_new_pack.JxhxCj/_new  2013-01-11 17:10:35.000000000 +0100
@@ -1,4 +1,3 @@
-#! /bin/sh
 # Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany.  All rights reserved.
 # Copyright (C) 1996-99 Andre M. Hedrick <an...@suse.com>
 # Copyright (C) 1999-02 Riccardo Facchetti <ricca...@inetcosmos.org>

++++++ apcupsd.logrotate ++++++
/var/log/apcupsd.events {
        missingok
        copytruncate
        notifempty
}

++++++ fix-fsf-adress.patch ++++++
--- a/examples/hiddev.h 2012-09-13 18:45:40.265014654 +0200
+++ b/examples/hiddev.h 2002-05-28 15:34:21.000000000 +0200
@@ -22,7 +22,7 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 02110-1301 USA
  * 
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <vojt...@suse.cz>, or by paper mail:

--------------------------------------------------------------------------------------
--- a/examples/hid-set.c        2004-08-04 22:39:27.000000000 +0200
+++ b/examples/hid-set.c        2012-09-13 18:46:46.833011908 +0200
@@ -17,7 +17,7 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 02110-1301 USA
  * 
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <hid...@wetlogic.net>.
--------------------------------------------------------------------------------------
--- a/examples/hid-ups.c        2012-09-13 18:47:26.617010268 +0200
+++ b/examples/hid-ups.c        2007-07-18 00:54:25.000000000 +0200
@@ -23,7 +23,7 @@
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  * 
  * Should you need to contact me, the author, you can do so either by
  * e-mail - mail your message to <vojt...@ucw.cz>, or by paper mail:

--------------------------------------------------------------------------------------
--- a/COPYING   2004-07-09 23:14:29.000000000 +0200
+++ b/COPYING   2012-09-13 18:52:42.488997243 +0200
@@ -2,7 +2,7 @@
                        Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to