Compare commits
71 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d71ed2aa54 | ||
|
|
f2445acf01 | ||
|
|
c2ac98a585 | ||
|
|
583cb0b03b | ||
|
|
8a2cf41162 | ||
|
|
89ca1eea99 | ||
|
|
cb33d36eae | ||
|
|
cb14d73ce6 | ||
|
|
289b8ada59 | ||
|
|
063db992f5 | ||
|
|
42e9efbb5f | ||
|
|
c5aa870a6e | ||
|
|
8aca3335ef | ||
|
|
325ee1c78c | ||
|
|
5d22797bc1 | ||
|
|
e5f8421257 | ||
|
|
8e55767a3a | ||
|
|
dd4047ce0a | ||
|
|
76adc1d87c | ||
|
|
e9ceaea260 | ||
|
|
d02bbffc60 | ||
|
|
1cbb103fdb | ||
|
|
779e741458 | ||
|
|
8f5ac90905 | ||
|
|
3d82f65c42 | ||
|
|
fdc6fd1f93 | ||
|
|
513fee665f | ||
|
|
a8a7b6eef1 | ||
|
|
ebecec4c08 | ||
|
|
d31057054d | ||
|
|
7e824badda | ||
|
|
ce3cc5f24b | ||
|
|
28128d0891 | ||
|
|
48c9ebfc91 | ||
|
|
5341db8d9b | ||
|
|
8d58df5acf | ||
|
|
efba3a0409 | ||
|
|
c8d8f42edd | ||
|
|
f50b2a99ce | ||
|
|
aff642fa4a | ||
|
|
0adf8f9b0c | ||
|
|
b0a2a6ad1b | ||
|
|
d7aef11c95 | ||
|
|
cc86b85207 | ||
|
|
520be58fed | ||
|
|
69851f97db | ||
|
|
e3b9a26c79 | ||
|
|
1416bd9d7f | ||
|
|
5c009e8166 | ||
|
|
fa6182881f | ||
|
|
a1637ce422 | ||
|
|
e647d79174 | ||
|
|
f4021704e9 | ||
|
|
2cd7508e7c | ||
|
|
8068c0a883 | ||
|
|
0210417761 | ||
|
|
cdb9d39552 | ||
|
|
22f78654d1 | ||
|
|
2a688e3443 | ||
|
|
45b813e5dd | ||
|
|
9be2c29057 | ||
|
|
c36afd656a | ||
|
|
2ff2000d2a | ||
|
|
819a904ea0 | ||
|
|
a42b8eabea | ||
|
|
0047aee7f1 | ||
|
|
9d899e2f9e | ||
|
|
f4fd99b61c | ||
|
|
d04b96f4ff | ||
|
|
3a6416c3ad | ||
|
|
d25990de40 |
14 changed files with 390 additions and 183 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -1,5 +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-*.tar.gz
|
||||
/apcupsd-*.src.rpm
|
||||
/apcupsd-*/
|
||||
/results_*/
|
||||
|
|
|
|||
61
99-apcupsd-xfer-glitch.patch
Normal file
61
99-apcupsd-xfer-glitch.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
diff -aruN apcupsd-3.14.14.orig/src/drivers/usb/usb.c apcupsd-3.14.14/src/drivers/usb/usb.c
|
||||
--- apcupsd-3.14.14.orig/src/drivers/usb/usb.c 2024-02-24 20:22:42.007641242 +0100
|
||||
+++ apcupsd-3.14.14/src/drivers/usb/usb.c 2024-02-24 20:23:03.824987965 +0100
|
||||
@@ -42,7 +42,9 @@
|
||||
UpsDriver(ups),
|
||||
_quirk_old_backups_pro(false),
|
||||
_prev_time((struct timeval){0}),
|
||||
- _bpcnt(0)
|
||||
+ _bpcnt(0),
|
||||
+ _bacnt(0),
|
||||
+ _brcnt(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -410,8 +412,13 @@
|
||||
break;
|
||||
|
||||
case CI_NeedReplacement:
|
||||
- if (uval->iValue)
|
||||
- _ups->set_replacebatt(uval->iValue);
|
||||
+ if (uval->iValue) {
|
||||
+ if (_brcnt++) {
|
||||
+ _ups->set_replacebatt(uval->iValue);
|
||||
+ }
|
||||
+ } else {
|
||||
+ _brcnt = 0;
|
||||
+ }
|
||||
Dmsg(200, "ReplaceBatt=%d\n", uval->iValue);
|
||||
break;
|
||||
|
||||
@@ -569,11 +576,15 @@
|
||||
* delayed. C'est la vie.
|
||||
*/
|
||||
if (uval->iValue) {
|
||||
- if (_bpcnt++)
|
||||
+ if (_bpcnt++) {
|
||||
+ _bacnt = 0;
|
||||
_ups->set_battpresent();
|
||||
+ }
|
||||
} else {
|
||||
- _bpcnt = 0;
|
||||
- _ups->clear_battpresent();
|
||||
+ if (_bacnt++) {
|
||||
+ _bpcnt = 0;
|
||||
+ _ups->clear_battpresent();
|
||||
+ }
|
||||
}
|
||||
Dmsg(200, "BatteryPresent=%d\n", uval->iValue);
|
||||
break;
|
||||
diff -aruN apcupsd-3.14.14.orig/src/drivers/usb/usb.h apcupsd-3.14.14/src/drivers/usb/usb.h
|
||||
--- apcupsd-3.14.14.orig/src/drivers/usb/usb.h 2024-02-24 20:22:42.007641242 +0100
|
||||
+++ apcupsd-3.14.14/src/drivers/usb/usb.h 2024-02-24 20:23:01.754956355 +0100
|
||||
@@ -86,6 +86,8 @@
|
||||
bool _quirk_old_backups_pro;
|
||||
struct timeval _prev_time;
|
||||
int _bpcnt;
|
||||
+ int _bacnt;
|
||||
+ int _brcnt;
|
||||
};
|
||||
|
||||
/* Max rate to update volatile data */
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
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 <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
+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;
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
This is needed to properly halt the machine without powering it down.
|
||||
|
||||
See:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=348701
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1442577
|
||||
|
||||
|
||||
diff -up apcupsd-3.14.4/platforms/apccontrol.in.shutdown apcupsd-3.14.4/platforms/apccontrol.in
|
||||
--- apcupsd-3.14.4/platforms/apccontrol.in.shutdown 2008-05-28 09:15:47.000000000 +0200
|
||||
+++ apcupsd-3.14.4/platforms/apccontrol.in 2008-05-28 09:16:04.000000000 +0200
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
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)
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
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
|
||||
12
apcupsd.service
Normal file
12
apcupsd.service
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=APC UPS Power Control Daemon for Linux
|
||||
After=syslog.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=-/bin/rm -f /etc/apcupsd/powerfail
|
||||
ExecStart=/usr/bin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
|
||||
KillMode=process
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
369
apcupsd.spec
369
apcupsd.spec
|
|
@ -1,36 +1,52 @@
|
|||
Name: apcupsd
|
||||
Version: 3.14.12
|
||||
Release: 1%{?dist}
|
||||
Summary: APC UPS Power Control Daemon for Linux
|
||||
# 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_verbose %nil
|
||||
|
||||
Group: System Environment/Daemons
|
||||
License: GPLv2
|
||||
URL: http://www.apcupsd.com
|
||||
Source0: http://downloads.sourceforge.net/apcupsd/%{name}-%{version}.tar.gz
|
||||
Source1: apcupsd.logrotate
|
||||
Source2: apcupsd-httpd.conf
|
||||
Patch0: apcupsd-3.14.3-init.patch
|
||||
Patch1: apcupsd-3.14.4-shutdown.patch
|
||||
Name: apcupsd
|
||||
Version: 3.14.14
|
||||
Release: 40%{?dist}
|
||||
Summary: APC UPS Power Control Daemon
|
||||
|
||||
#fix FTBFS, c++ linking needs -lstdc++ explicitly
|
||||
Patch2: apcupsd-3.14.8-cxxld.patch
|
||||
|
||||
# systemd support
|
||||
Patch3: apcupsd-3.14.8-systemd.patch
|
||||
License: GPL-2.0-only
|
||||
URL: http://www.apcupsd.com
|
||||
Source0: https://downloads.sourceforge.net/apcupsd/apcupsd-%version.tar.gz
|
||||
Source1: apcupsd.service
|
||||
Source2: apcupsd_shutdown
|
||||
Source3: apcupsd-httpd.conf
|
||||
Source4: apcupsd.logrotate
|
||||
Source5: apcupsd64x64.png
|
||||
|
||||
# fix crash in gui, rhbz#578276
|
||||
Patch4: apcupsd-3.14.9-fixgui.patch
|
||||
Patch5: apcupsd-3.14.10-nodbg.patch
|
||||
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
|
||||
Patch3: disable_nologin.patch
|
||||
# fixes "increasing NUMXFERS" bug:
|
||||
# https://sourceforge.net/p/apcupsd/mailman/apcupsd-users/thread/ad9afb27-30f9-443f-a9fb-982c41ad1325%40okazoo.eu/
|
||||
# https://www.reddit.com/r/homelab/comments/1c3eo9n/apcupsd_and_proxmox_frequent_battery_disconnected/
|
||||
# patch source: https://sourceforge.net/p/apcupsd/mailman/message/58741334/
|
||||
Patch4: 99-apcupsd-xfer-glitch.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
|
||||
Requires: /bin/mail
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: glibc-devel, gd-devel
|
||||
%if %{defined fedora} || (%{defined rhel} && 0%{?rhel} > 9)
|
||||
BuildRequires: libusb-compat-0.1-devel
|
||||
%endif
|
||||
%if (%{defined rhel} && 0%{?rhel} <= 9)
|
||||
BuildRequires: libusb-devel
|
||||
%endif
|
||||
BuildRequires: net-snmp-devel,
|
||||
BuildRequires: gtk2-devel, GConf2-devel, desktop-file-utils
|
||||
# /sbin/shutdown is required to be present when building
|
||||
# Somehow in F36 systemd is installed in mock but not in koji
|
||||
BuildRequires: systemd
|
||||
# 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}
|
||||
|
||||
%description
|
||||
Apcupsd can be used for controlling most APC UPSes. During a
|
||||
|
|
@ -46,8 +62,7 @@ Some features depend on what UPS model you have (simple or smart).
|
|||
|
||||
%package cgi
|
||||
Summary: Web interface for apcupsd
|
||||
Group: Applications/Internet
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: apcupsd = %version-%release
|
||||
Requires: httpd
|
||||
|
||||
%description cgi
|
||||
|
|
@ -56,33 +71,23 @@ A CGI interface to the APC UPS monitoring daemon.
|
|||
|
||||
%package gui
|
||||
Summary: GUI interface for apcupsd
|
||||
Group: Applications/System
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: apcupsd = %version-%release
|
||||
|
||||
%description gui
|
||||
A GUI interface to the APC UPS monitoring daemon.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .init
|
||||
%patch1 -p1 -b .shutdown
|
||||
%patch2 -p1 -b .cxxld
|
||||
%patch3 -p1 -b .systemd
|
||||
%patch4 -p1 -b .fixgui
|
||||
%patch5 -p1 -b .nodbg
|
||||
%autosetup -p1
|
||||
|
||||
#we will handle fedora/redhat part ourselfs
|
||||
printf 'install:\n\techo skipped\n' >platforms/redhat/Makefile
|
||||
# Override the provided platform makefile
|
||||
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 \
|
||||
--sysconfdir="%{_sysconfdir}/apcupsd" \
|
||||
--with-cgi-bin="%{_localstatedir}/www/apcupsd" \
|
||||
--sbindir=/sbin \
|
||||
--sysconfdir="/etc/apcupsd" \
|
||||
--with-cgi-bin="/var/www/apcupsd" \
|
||||
--sbindir=%{_bindir} \
|
||||
--enable-cgi \
|
||||
--enable-pthreads \
|
||||
--enable-net \
|
||||
|
|
@ -91,91 +96,78 @@ export CPPFLAGS="$CPPFLAGS -DNETSNMP_NO_LEGACY_DEFINITIONS"
|
|||
--enable-net-snmp \
|
||||
--enable-snmp \
|
||||
--enable-usb \
|
||||
--enable-powerflute \
|
||||
--enable-nls \
|
||||
--enable-modbus-usb \
|
||||
--enable-gapcmon \
|
||||
--enable-pcnet \
|
||||
--with-libwrap=%{_libdir} \
|
||||
--with-serial-dev= \
|
||||
--with-upstype=usb \
|
||||
--with-upscable=usb \
|
||||
--with-lock-dir=/var/lock \
|
||||
APCUPSD_MAIL=/bin/mail
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/apcupsd
|
||||
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
mkdir -p %buildroot/var/www/apcupsd
|
||||
%make_install
|
||||
install -m744 platforms/apccontrol \
|
||||
$RPM_BUILD_ROOT%{_sysconfdir}/apcupsd/apccontrol
|
||||
%buildroot/etc/apcupsd/apccontrol
|
||||
|
||||
# systemd support
|
||||
install -p -D -m644 apcupsd.service $RPM_BUILD_ROOT/lib/systemd/system/apcupsd.service
|
||||
install -p -D -m755 apcupsd_shutdown $RPM_BUILD_ROOT/lib/systemd/system-shutdown/apcupsd_shutdown
|
||||
|
||||
install -d %{buildroot}%{_sysconfdir}/logrotate.d
|
||||
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d
|
||||
install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
|
||||
install -p -D -m0644 %SOURCE1 %buildroot/lib/systemd/system/apcupsd.service
|
||||
install -p -D -m0755 %SOURCE2 %buildroot/lib/systemd/system-shutdown/apcupsd_shutdown
|
||||
install -p -D -m0644 %SOURCE3 %buildroot/etc/httpd/conf.d/apcupsd.conf
|
||||
install -p -D -m0644 %SOURCE4 %buildroot/etc/logrotate.d/apcupsd
|
||||
install -p -D -m0644 %SOURCE5 %buildroot/usr/share/pixmaps/apcupsd64x64.png
|
||||
|
||||
desktop-file-install \
|
||||
%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
|
||||
--vendor="fedora" \
|
||||
%endif
|
||||
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--dir=%buildroot/usr/share/applications \
|
||||
--set-icon=apcupsd64x64 \
|
||||
--delete-original \
|
||||
${RPM_BUILD_ROOT}%{_datadir}/applications/gapcmon.desktop
|
||||
%buildroot/usr/share/applications/gapcmon.desktop
|
||||
|
||||
# Cleanup for later %doc processing
|
||||
# Cleanup for later %%doc processing
|
||||
chmod -x examples/*.c
|
||||
rm examples/*.in
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING ChangeLog examples ReleaseNotes
|
||||
%dir %{_sysconfdir}/apcupsd
|
||||
/lib/systemd/system/%{name}.service
|
||||
%license COPYING
|
||||
%doc ChangeLog examples ReleaseNotes
|
||||
%dir /etc/apcupsd
|
||||
/lib/systemd/system/apcupsd.service
|
||||
/lib/systemd/system-shutdown/apcupsd_shutdown
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.conf
|
||||
%attr(0755,root,root) %{_sysconfdir}/apcupsd/apccontrol
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/changeme
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/commfailure
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/commok
|
||||
%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) /sbin/*
|
||||
%config(noreplace) /etc/apcupsd/apcupsd.conf
|
||||
%attr(0755,root,root) /etc/apcupsd/apccontrol
|
||||
%config(noreplace) /etc/apcupsd/changeme
|
||||
%config(noreplace) /etc/apcupsd/commfailure
|
||||
%config(noreplace) /etc/apcupsd/commok
|
||||
%config(noreplace) /etc/apcupsd/offbattery
|
||||
%config(noreplace) /etc/apcupsd/onbattery
|
||||
%config(noreplace) /etc/logrotate.d/apcupsd
|
||||
/usr/share/hal/fdi/policy/20thirdparty/80-apcupsd-ups-policy.fdi
|
||||
%{_bindir}/apcaccess
|
||||
%{_bindir}/apctest
|
||||
%{_bindir}/apcupsd
|
||||
%exclude %{_bindir}/smtp
|
||||
|
||||
%{_mandir}/*/*
|
||||
|
||||
%files cgi
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.css
|
||||
%config(noreplace) %{_sysconfdir}/httpd/conf.d/apcupsd.conf
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/hosts.conf
|
||||
%config(noreplace) %{_sysconfdir}/apcupsd/multimon.conf
|
||||
%{_localstatedir}/www/apcupsd/
|
||||
%config(noreplace) /etc/apcupsd/apcupsd.css
|
||||
%config(noreplace) /etc/httpd/conf.d/apcupsd.conf
|
||||
%config(noreplace) /etc/apcupsd/hosts.conf
|
||||
%config(noreplace) /etc/apcupsd/multimon.conf
|
||||
/var/www/apcupsd/
|
||||
|
||||
%files gui
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/gapcmon
|
||||
%{_datadir}/applications/*gapcmon.desktop
|
||||
%{_datadir}/pixmaps/apcupsd.png
|
||||
%{_datadir}/pixmaps/charging.png
|
||||
%{_datadir}/pixmaps/gapc_prefs.png
|
||||
%{_datadir}/pixmaps/onbatt.png
|
||||
%{_datadir}/pixmaps/online.png
|
||||
%{_datadir}/pixmaps/unplugged.png
|
||||
/usr/bin/gapcmon
|
||||
/usr/share/applications/*gapcmon.desktop
|
||||
/usr/share/pixmaps/apcupsd.png
|
||||
/usr/share/pixmaps/apcupsd64x64.png
|
||||
/usr/share/pixmaps/charging.png
|
||||
/usr/share/pixmaps/gapc_prefs.png
|
||||
/usr/share/pixmaps/onbatt.png
|
||||
/usr/share/pixmaps/online.png
|
||||
/usr/share/pixmaps/unplugged.png
|
||||
|
||||
|
||||
%post
|
||||
|
|
@ -189,6 +181,160 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-40
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-39
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu May 22 2025 Gwyn Ciesla <gwync@protonmail.com> - 3.14.14-38
|
||||
- Don't ship /usr/bin/smtp, not used, conflicts with opensmtpd.
|
||||
|
||||
* Fri May 09 2025 Gwyn Ciesla <gwync@protonmail.com> - 3.14.14-37
|
||||
- Move binaries from sbin to bin, 2365293.
|
||||
|
||||
* Wed Apr 23 2025 Davide Cavalca <dcavalca@fedoraproject.org> - 3.14.14-36
|
||||
- Fix libusb conditional to make it build on EPEL 10
|
||||
Fixes: RHBZ#2337139
|
||||
|
||||
* Wed Apr 09 2025 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-35
|
||||
- Adds 99-apcupsd-xfer-glitch.patch
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-34
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Fri Nov 08 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-33
|
||||
- Adds distinction between Fedora and EL <= 9 for BuildRequires: libusb
|
||||
|
||||
* Fri Nov 08 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-32
|
||||
- release bump
|
||||
|
||||
* Fri Nov 08 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-31
|
||||
- Adds disable_nologin.patch
|
||||
|
||||
* Sun Jan 07 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-30
|
||||
- disables apcupsd-3.14.4-shutdown.patch
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-28
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Tue Aug 02 2022 Jason L Tibbitts III <j@tib.bs> - 3.14.14-27
|
||||
- Depend on libusb-compat-0.1-devel to avoid build breakage.
|
||||
|
||||
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-26
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2022 Jason L Tibbitts III <j@tib.bs> - 3.14.14-25
|
||||
- Explicitly require systemd at build time to ensure that /sbin/shutdown is
|
||||
present.
|
||||
|
||||
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-24
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sat Jan 30 2021 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-22
|
||||
- Fix build on F33+.
|
||||
- Allow build with format-security checking enabled.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-20
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jun 08 2020 Germano Massullo <germano.massullo@gmail.com> - 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
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-16
|
||||
- Workaround change in RPM 4.15 which breaks the build.
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Mon Dec 03 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-13
|
||||
- Fix broken zero-size icon.
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu May 17 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-11
|
||||
- Add KillMode=process to the systemd unit.
|
||||
|
||||
* Mon Mar 26 2018 Till Maas <opensource@till.name> - 3.14.14-10
|
||||
- rebuilt to drop tcp_wrappers dependency
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1518751
|
||||
- remove tcp_wrappers support
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jan 25 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-8
|
||||
- Use proper systemd dependencies.
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Mon Apr 17 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-5
|
||||
- Reinstate patch to call shutdown with -H to halt instead of powering down.
|
||||
|
||||
* Fri Mar 24 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-4
|
||||
- Depend on /usr/bin/wall to accommodate EL7.
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Jun 22 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.14.14-2
|
||||
- Clean up the spec a bit.
|
||||
- Stop adding the unit file and shutdown script in a patch and just included
|
||||
them as sources instead.
|
||||
- Have the unit go after network-online.target instead of network.target.
|
||||
- Remove apcupsd-3.14.4-shutdown.patch. Both the old and the new commands to
|
||||
exactly the same thing for me (halt but not power down) on my test machines.
|
||||
|
||||
* Thu Jun 02 2016 Michal Hlavinka <mhlavink@redhat.com> - 3.14.14-1
|
||||
- updated to 3.14.14
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.13-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Mon Nov 23 2015 Michal Hlavinka <mhlavink@redhat.com> - 3.14.13-4
|
||||
- fix apcaccess crash if apcupsd is not running (#1236367,#1197383)
|
||||
- enabled modbus-usb (#1195071)
|
||||
- add bigger icon (#1157532)
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.13-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.14.13-2
|
||||
- Rebuilt for GCC 5 C++11 ABI change
|
||||
|
||||
* Tue Feb 03 2015 Michal Hlavinka <mhlavink@redhat.com> - 3.14.13-1
|
||||
- apcupsd updated to 3.14.13
|
||||
|
||||
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.12-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.12-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon Mar 31 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.12-1
|
||||
- apcupsd updated to 3.14.12
|
||||
- force lock dir to /var/lock (#1064099)
|
||||
|
|
@ -196,9 +342,18 @@ rm -rf $RPM_BUILD_ROOT
|
|||
* Mon Feb 17 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.11-1
|
||||
- apcupsd updated to 3.14.11
|
||||
|
||||
* Thu Jan 23 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-11
|
||||
* Tue Jan 21 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-14
|
||||
- reduce amount of debug messages (#1053324)
|
||||
|
||||
* Wed Aug 14 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-13
|
||||
- fix aarch64 support (#925007)
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Tue Jun 11 2013 Remi Collet <rcollet@redhat.com> - 3.14.10-11
|
||||
- rebuild for new GD 2.1.0
|
||||
|
||||
* Fri May 17 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-10
|
||||
- make executables hardened (#955341)
|
||||
|
||||
|
|
|
|||
BIN
apcupsd64x64.png
Normal file
BIN
apcupsd64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
9
apcupsd_shutdown
Normal file
9
apcupsd_shutdown
Normal file
|
|
@ -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
|
||||
18
disable_nologin.patch
Normal file
18
disable_nologin.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff -urNr apcupsd-3.14.14-orig/src/action.c apcupsd-3.14.14/src/action.c
|
||||
--- apcupsd-3.14.14-orig/src/action.c 2015-03-20 04:59:41.000000000 +0100
|
||||
+++ apcupsd-3.14.14/src/action.c 2024-11-08 16:48:46.095910557 +0100
|
||||
@@ -189,13 +189,7 @@
|
||||
|
||||
static void prohibit_logins(UPSINFO *ups)
|
||||
{
|
||||
- if (ups->nologin_file)
|
||||
- return; /* already done */
|
||||
-
|
||||
- logonfail(ups, 0);
|
||||
- ups->nologin_file = true;
|
||||
-
|
||||
- log_event(ups, LOG_ALERT, "User logins prohibited");
|
||||
+ return;
|
||||
}
|
||||
|
||||
static void do_shutdown(UPSINFO *ups, int cmdtype)
|
||||
13
patch-format-security
Normal file
13
patch-format-security
Normal file
|
|
@ -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);
|
||||
|
||||
3
rpmlint.cf
Normal file
3
rpmlint.cf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
setOption('NetworkEnabled', False)
|
||||
addFilter('hardcoded-library-path in %buildroot/lib/systemd')
|
||||
addFilter('hardcoded-library-path in /lib/systemd')
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
08bf201acea6b4dd69cf2fb0eecfd55e apcupsd-3.14.12.tar.gz
|
||||
cc8f5ced77f38906a274787acb9bc980 apcupsd-3.14.14.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue