[apcupsd/el5/master] update apcupsd to 3.14.8 (fixes #696722)
Michal Hlavinka
mhlavink at fedoraproject.org
Fri Apr 15 12:59:34 UTC 2011
commit 3a893e6ce3e61ae44d2991a0cec1bbd6d5999d2d
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Fri Apr 15 14:59:37 2011 +0200
update apcupsd to 3.14.8 (fixes #696722)
.gitignore | 1 +
apcupsd-3.14.0-init.patch | 32 +++-----------------------------
apcupsd-3.14.8-cxxld.patch | 16 ++++++++++++++++
apcupsd.spec | 16 +++++++++++-----
sources | 2 +-
5 files changed, 32 insertions(+), 35 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 70f8e67..d9ea4c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
apcupsd-3.14.0.tar.gz
+/apcupsd-3.14.8.tar.gz
diff --git a/apcupsd-3.14.0-init.patch b/apcupsd-3.14.0-init.patch
index 86062d9..4ef246d 100644
--- a/apcupsd-3.14.0-init.patch
+++ b/apcupsd-3.14.0-init.patch
@@ -1,5 +1,6 @@
---- apcupsd-3.14.0/platforms/redhat/apcupsd.in.init 2005-01-09 15:55:41.000000000 -0700
-+++ apcupsd-3.14.0/platforms/redhat/apcupsd.in 2007-04-23 12:13:35.000000000 -0600
+diff -up apcupsd-3.14.8/platforms/redhat/apcupsd.in.init apcupsd-3.14.8/platforms/redhat/apcupsd.in
+--- apcupsd-3.14.8/platforms/redhat/apcupsd.in.init 2008-11-01 16:03:26.000000000 +0100
++++ apcupsd-3.14.8/platforms/redhat/apcupsd.in 2011-04-15 12:10:17.352352927 +0200
@@ -3,7 +3,7 @@
# apcupsd This shell script takes care of starting and stopping
# the apcupsd UPS monitoring daemon.
@@ -9,30 +10,3 @@
# description: apcupsd monitors power and takes action if necessary
#
APCPID=@PIDDIR@/apcupsd.pid
-@@ -42,13 +42,24 @@
- rm -f $APCPID
- rm -f @LOCKDIR@/subsys/apcupsd
- ;;
-- restart)
-+ restart|force-reload)
- $0 stop
- sleep 15
- $0 start
- ;;
-+ reload)
-+ echo "$0: reload not implemented"
-+ exit 3
-+ ;;
- status)
-- @sbindir@/apcaccess status
-+ status apcupsd
-+ RETVAL=$?
-+ if [ $RETVAL -eq 0 ]
-+ then
-+ @sbindir@/apcaccess status
-+ else
-+ exit $RETVAL
-+ fi
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|status}"
diff --git a/apcupsd-3.14.8-cxxld.patch b/apcupsd-3.14.8-cxxld.patch
new file mode 100644
index 0000000..ba13d62
--- /dev/null
+++ b/apcupsd-3.14.8-cxxld.patch
@@ -0,0 +1,16 @@
+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)
diff --git a/apcupsd.spec b/apcupsd.spec
index f569032..61e5b47 100644
--- a/apcupsd.spec
+++ b/apcupsd.spec
@@ -1,6 +1,6 @@
Name: apcupsd
-Version: 3.14.0
-Release: 5%{?dist}
+Version: 3.14.8
+Release: 1%{?dist}
Summary: APC UPS Power Control Daemon for Linux
Group: System Environment/Daemons
@@ -11,6 +11,7 @@ Source1: apcupsd.logrotate
Source2: apcupsd-httpd.conf
Source3: README.Red_Hat
Patch0: apcupsd-3.14.0-init.patch
+Patch1: apcupsd-3.14.8-cxxld.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0
@@ -54,14 +55,15 @@ A GUI interface to the APC UPS monitoring daemon.
%prep
%setup -q
%patch0 -p1 -b .init
+%patch1 -p1 -b .cxxld
# Don't strip binaries
-sed -i -e 's/^\(.*INSTALL_PROGRAM.*\) -s /\1 /' src{,/cgi}/Makefile.in
install -p -m 0666 %{SOURCE3} .
#we will handle fedora/redhat part ourselfs
-printf '@VARIABLES@\ntopdir = @topdir@\ntop_builddir = $(topdir)\n at TARGETS@\n\ninstall:\n\techo skipped\n' >platforms/redhat/Makefile.in
+sed -i 's|^.*init.d/halt,.*$|\nignore-following:\n\ttrue|' platforms/redhat/Makefile
%build
+export CPPFLAGS="$RPM_OPT_FLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS"
%configure \
--sysconfdir="%{_sysconfdir}/apcupsd" \
--with-cgi-bin="%{_localstatedir}/www/apcupsd" \
@@ -109,7 +111,7 @@ desktop-file-install --vendor="fedora" \
${RPM_BUILD_ROOT}%{_datadir}/applications/gapcmon.desktop
# Cleanup for later %doc processing
-chmod -x examples/*.conf examples/*.c
+chmod -x examples/*.c
rm examples/*.in
@@ -132,6 +134,7 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %{_sysconfdir}/apcupsd/offbattery
%config(noreplace) %{_sysconfdir}/apcupsd/onbattery
%config(noreplace) %{_sysconfdir}/logrotate.d/apcupsd
+%{_datadir}/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi
%attr(0755,root,root) %{_sbindir}/*
%{_mandir}/*/*
@@ -168,6 +171,9 @@ fi
%changelog
+* Fri Apr 15 2011 Michal Hlavinka <mhlavink at redhat.com> - 3.14.8-1
+- update apcupsd to 3.14.8 (fixes #696722)
+
* Wed Feb 09 2011 Michal Hlavinka <mhlavink at redhat.com> - 3.14.0-5
- add readme file to doc explaining needed configuration of halt script
diff --git a/sources b/sources
index 774c582..67ae4c0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-334fe3413c08f14acec0226e71e98e0a apcupsd-3.14.0.tar.gz
+cd17f0a903dc2220e55ed54e242359d2 apcupsd-3.14.8.tar.gz
More information about the scm-commits
mailing list