Compare commits

...
Sign in to create a new pull request.

138 commits

Author SHA1 Message Date
Fedora Release Engineering
d71ed2aa54 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:48:55 +00:00
Fedora Release Engineering
f2445acf01 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 17:07:44 +00:00
Gwyn Ciesla
c2ac98a585 Don't ship /usr/bin/smtp 2025-05-22 14:25:42 -05:00
Gwyn Ciesla
583cb0b03b Move binaries to bin 2025-05-09 15:00:02 -05:00
Davide Cavalca
8a2cf41162 Fix libusb conditional to make it build on EPEL 10 2025-04-23 14:15:16 -07:00
Germano Massullo
89ca1eea99 Adds 99-apcupsd-xfer-glitch.patch 2025-04-09 12:38:58 +02:00
Fedora Release Engineering
cb33d36eae Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 11:19:42 +00:00
Germano Massullo
cb14d73ce6 fixed license format 2024-11-11 12:50:14 +01:00
Germano Massullo
289b8ada59 Adds distinction between Fedora and EL <= 9 for BuildRequires: libusb 2024-11-08 19:41:45 +01:00
Germano Massullo
063db992f5 release bump 2024-11-08 17:39:36 +01:00
Germano Massullo
42e9efbb5f Adds disable_nologin.patch 2024-11-08 16:57:51 +01:00
Miroslav Suchý
c5aa870a6e convert GPLv2 license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-07-29 10:11:30 +02:00
Fedora Release Engineering
8aca3335ef Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 17:14:30 +00:00
Fedora Release Engineering
325ee1c78c Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 23:16:48 +00:00
Fedora Release Engineering
5d22797bc1 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 13:19:45 +00:00
Fedora Release Engineering
e5f8421257 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:32:21 +00:00
Fedora Release Engineering
8e55767a3a Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:57:06 +00:00
Jason Tibbitts
dd4047ce0a Depend on libusb-compat-0.1-devel. 2022-08-02 17:19:53 -05:00
Fedora Release Engineering
76adc1d87c Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 21:02:37 +00:00
Jason Tibbitts
e9ceaea260 Require systemd at build time
systemd used to be in the buildroot but it seems that it no longer is.
apcupsd requires /sbin/shutdown to be present at build time, so depend
on it manually.
need to make sure it's installed.
2022-01-25 11:55:46 -06:00
Fedora Release Engineering
d02bbffc60 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:27:24 +00:00
Fedora Release Engineering
1cbb103fdb - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 17:45:25 +00:00
Fedora Release Engineering
779e741458 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 12:49:22 +00:00
Jason Tibbitts
8f5ac90905 Clean up .gitignore. 2021-02-05 16:05:38 -06:00
Jason Tibbitts
3d82f65c42 Fix format-security error.
Add a patch to fix the one line of code which triggered a
format-security error instead of disabling format security checks for
the entire package.
2021-01-30 14:56:53 -06:00
Jason Tibbitts
fdc6fd1f93 Use _make_verbose instead of hacks
This is the single package which won't build with make V=1.  Now that
RPM has %_make_verbose to override this, use it instead of redefinining
%make_build.
2021-01-30 14:53:51 -06:00
Jason Tibbitts
513fee665f Fix build on F33+
Previous to F33, the files /usr/lib/rpm/config.{guess,sub} existed, and
this package copied them into the autoconf directory.  This was added in
2008 with no explanatory comment other than "new upstream version".  RPM
no longer includes those files, though copies do still exist in
/usr/lib/rpm/redhat.  The package appears fine without them.
2021-01-30 13:31:24 -06:00
Fedora Release Engineering
a8a7b6eef1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 00:17:16 +00:00
Tom Stellard
ebecec4c08 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-16 23:31:34 +00:00
Fedora Release Engineering
d31057054d - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 00:01:39 +00:00
Fedora Release Engineering
7e824badda - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 12:13:58 +00:00
Germano Massullo
ce3cc5f24b Replaced BuildRequires: gnome-vfs2 with BuildRequires: GConf2-devel 2020-06-08 16:39:57 +02:00
Fedora Release Engineering
28128d0891 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 11:49:25 +00:00
Jason Tibbitts
48c9ebfc91 Work around RPM 4.15 change that broke the build 2019-07-24 20:28:36 -05:00
Fedora Release Engineering
5341db8d9b - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 18:11:28 +00:00
Fedora Release Engineering
8d58df5acf - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 13:34:10 +00:00
Jason Tibbitts
efba3a0409 Remove Group: tags. 2019-01-24 12:37:57 -06:00
Jason Tibbitts
c8d8f42edd Fix broken zero-size icon. 2018-12-03 13:39:19 -06:00
Fedora Release Engineering
f50b2a99ce - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 20:23:23 +00:00
Igor Gnatenko
aff642fa4a add BuildRequires: gcc-c++
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-10 16:20:50 +02:00
Jason Tibbitts
0adf8f9b0c Add KillMode=process to the systemd unit. 2018-05-17 18:14:48 -05:00
Till Maas
b0a2a6ad1b Remove tpc_wrappers support 2018-03-27 00:30:59 +02:00
Till Maas
d7aef11c95 rebuilt to drop tcp_wrappers dependency
https://bugzilla.redhat.com/show_bug.cgi?id=1518751
2018-03-26 22:07:37 +02:00
Fedora Release Engineering
cc86b85207 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 02:35:42 +00:00
Jason Tibbitts
520be58fed Use proper systemd dependencies. 2018-01-25 16:37:58 -06:00
Fedora Release Engineering
69851f97db - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 17:37:43 +00:00
Fedora Release Engineering
e3b9a26c79 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 03:04:34 +00:00
Jason Tibbitts
1416bd9d7f Reinstate shutdown patch. 2017-04-17 15:38:12 -05:00
Jason Tibbitts
5c009e8166 Depend on /usr/bin/wall directly. 2017-03-24 14:18:58 -05:00
Fedora Release Engineering
fa6182881f - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 06:07:49 +00:00
Jason Tibbitts
a1637ce422 Even more spec cleanups. 2016-06-22 20:20:39 -05:00
Jason Tibbitts
e647d79174 More spec cleanups. 2016-06-22 19:14:41 -05:00
Jason Tibbitts
f4021704e9 Spec cleanup. Add rpmlint.cf. 2016-06-22 15:03:17 -05:00
Michal Hlavinka
2cd7508e7c updated to 3.14.14 2016-06-02 13:39:19 +02:00
Dennis Gilmore
8068c0a883 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 16:21:29 +00:00
Michal Hlavinka
0210417761 fix apcaccess crash if apcupsd is not running (#1236367,#1197383)
- enabled modbus-usb (#1195071)
- add bigger icon (#1157532)
2015-11-23 14:16:59 +01:00
Adam Jackson
cdb9d39552 Remove a pointless mkdir from %install 2015-10-28 15:05:16 -04:00
Dennis Gilmore
22f78654d1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 00:08:26 +00:00
Kalev Lember
2a688e3443 Rebuilt for GCC 5 C++11 ABI change 2015-05-02 12:32:54 +02:00
Michal Hlavinka
45b813e5dd apcupsd updated to 3.14.13 2015-02-03 16:10:39 +01:00
Peter Robinson
9be2c29057 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-15 20:42:24 +00:00
Dennis Gilmore
c36afd656a - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 20:07:40 -05:00
Michal Hlavinka
2ff2000d2a apcupsd updated to 3.14.12
- force lock dir to /var/lock (#1064099)
2014-03-31 14:34:48 +02:00
Michal Hlavinka
819a904ea0 upload new tarball 2014-02-17 15:56:16 +01:00
Michal Hlavinka
a42b8eabea apcupsd updated to 3.14.11 2014-02-17 15:52:51 +01:00
Michal Hlavinka
0047aee7f1 drop sysvinit-tools BR 2014-01-23 10:24:31 +01:00
Michal Hlavinka
9d899e2f9e reduce amount of debug messages (#1053324) 2014-01-23 09:52:27 +01:00
Michal Hlavinka
f4fd99b61c fix aarch64 support (#925007) 2013-08-14 17:04:05 +02:00
Dennis Gilmore
d04b96f4ff - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 20:29:24 -05:00
Remi Collet
3a6416c3ad rebuild for new GD 2.1.0 2013-06-11 08:31:31 +02:00
Michal Hlavinka
d25990de40 make executables hardened (#955341) 2013-05-17 13:33:03 +02:00
Toshio Kuratomi
c96b4bc2c8 Remove --vendor flag to desktop-file-install on F19+ 2013-02-14 13:01:14 -08:00
Michal Hlavinka
2cc086d867 remove obsolete documentation 2013-02-05 16:59:29 +01:00
Michal Hlavinka
0d746dd04b add missing buildrequire 2012-10-30 13:24:20 +01:00
Michal Hlavinka
4827e33d60 add missing buildrequire 2012-10-30 13:08:16 +01:00
Michal Hlavinka
fce6302b20 fix configuration for httpd 2.4 (#871361) 2012-10-30 12:23:58 +01:00
Michal Hlavinka
461ea25809 scriptlets replaced with new systemd macros (#851227) 2012-08-24 13:49:54 +02:00
Dennis Gilmore
6433a61472 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 11:23:58 -05:00
Michal Hlavinka
8724552879 start after network is up (#789191) 2012-02-13 19:01:26 +01:00
Dennis Gilmore
b0541bd1b6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 15:38:57 -06:00
Michal Hlavinka
2bc9f59504 remove powerfail flag on boot (#768684) 2011-12-19 10:23:56 +01:00
Michal Hlavinka
35decf9efe apcupsd updated to 3.14.10
fix MODEL vs. APCMODEL confusion. Remove APCMODEL and rename old MODEL
aka 'mode' to DRIVER.
2011-12-12 13:38:06 +01:00
Michal Hlavinka
7b66028e59 fix crash in gui (#578276), patch by Michal Sekletar 2011-10-20 14:08:45 +02:00
Michal Hlavinka
aafe39bf8b apcupsd updated to 3.14.9 2011-07-25 08:44:36 +02:00
Michal Hlavinka
1489f2740c rebuilt for net-snmp update 2011-07-08 08:51:14 +02:00
Michal Hlavinka
4105a1e42d move from SysV init script to systemd service file 2011-06-16 11:55:24 +02:00
Michal Hlavinka
34be39d7cc - add readme file to doc explaining needed configuration of halt script 2011-02-09 13:58:22 +01:00
Dennis Gilmore
8e2743b595 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 19:44:59 -06:00
Michal Hlavinka
b3ae5e3acf fix last issue harder 2010-12-02 14:17:09 +01:00
Michal Hlavinka
2cb7a21afe skip platform install section we don't use, it breaks with systemd 2010-12-02 13:57:18 +01:00
Michal Hlavinka
2228e706df - do not attempt to invoke directory as a script (#659219) 2010-12-02 13:35:28 +01:00
Michal Hlavinka
d4dfa2936e - rebuilt for library update 2010-11-05 09:17:47 +01:00
Jesse Keating
a4c05a9764 - Rebuilt for gcc bug 634757 2010-09-29 13:55:22 -07:00
Michal Hlavinka
e55071afaa - fix c++ code linking (FTBFS) (#631288) 2010-09-22 11:22:03 +02:00
Fedora Release Engineering
9b926b2647 dist-git conversion 2010-07-28 10:04:31 +00:00
Michal Hlavinka
65c757a7c2 - updated to 3.14.8 2010-01-18 11:59:19 +00:00
Bill Nottingham
a3a6c542de Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:40:10 +00:00
Michal Hlavinka
307687a8b1 - fix building with new net-snmp version 2009-09-18 15:06:31 +00:00
Tomáš Mráz
28511b080c - rebuilt with new openssl 2009-08-21 12:23:40 +00:00
Michal Hlavinka
63cf6e2349 updated to 3.14.7 2009-08-03 08:21:23 +00:00
Jesse Keating
eabbcd8c83 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 16:57:18 +00:00
Michal Hlavinka
1afe7523d5 updated to 3.14.6 2009-05-18 07:03:54 +00:00
Michal Hlavinka
61d2804722 fix build with gcc 4.4 2009-02-24 10:20:44 +00:00
Jesse Keating
24b4dc2631 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 01:21:08 +00:00
Michal Hlavinka
6fb2da42e8 update to 3.14.5 2009-01-22 10:08:19 +00:00
Tomáš Mráz
a219c35dcb - rebuild with new openssl 2009-01-15 12:37:35 +00:00
Tomas Smetana
e8cf9f4933 update changelog 2008-06-06 09:52:12 +00:00
Tomas Smetana
29cee693af move cgi configuration to cgi package 2008-05-28 12:15:55 +00:00
Tomas Smetana
f85a07e1bd - new upstream version 2008-05-28 08:53:42 +00:00
Tomas Smetana
9539120ff6 - rebuild (gcc-4.3) 2008-02-12 07:29:41 +00:00
Tomas Smetana
c0206750f4 - fix #348701 - apcupsd control script does not invoke shutdown properly 2008-01-30 13:14:19 +00:00
Tomas Smetana
b4949ce626 - Update to 3.14.3 2008-01-23 14:43:28 +00:00
Orion Poplawski
d0774aadbc - Update to 3.14.2, remove upstreamed patches 2007-10-10 22:52:56 +00:00
Orion Poplawski
602b28def5 - Add patch to close open file descriptors (bug #247162)
- Stop/restart service as needed on removal/upgrade
2007-08-02 15:16:23 +00:00
Orion Poplawski
6784ab3dec Add patch for linux USB UPS detection (bug #245864) 2007-07-02 15:20:26 +00:00
Orion Poplawski
248a367108 Remove parts applied upstream 2007-06-05 17:36:40 +00:00
Orion Poplawski
50b40585f8 Update to 3.14.1 2007-06-04 22:55:10 +00:00
Orion Poplawski
7ea1ac0893 Fix init script for LSB compliance (bug #237532) 2007-04-23 20:01:28 +00:00
Orion Poplawski
e393118aa9 Fix release number 2007-04-17 17:32:17 +00:00
Orion Poplawski
758ab1614f Remove old master/slave stuff 2007-02-12 17:12:55 +00:00
Orion Poplawski
d813a0394b Update to 3.14.0 2007-02-12 16:58:12 +00:00
Orion Poplawski
a4b039cb24 - Mark everything in /etc/apcupsd noreplace
- Change BR to tcp_wrappers-devel
2007-01-05 18:31:20 +00:00
Orion Poplawski
bb7a609653 Update to 3.13.9, add gui package 2006-11-30 17:26:26 +00:00
Orion Poplawski
29cc87160f - Fix /etc/httpd/conf.d/apcupsd.conf so DirectoryIndex works (bug #209952).
Patch from Clive Messer (clive@vacuumtube.org.uk)
2006-10-09 16:47:43 +00:00
Orion Poplawski
8910e0132f Rebuilt for FC6 2006-09-05 20:08:02 +00:00
Orion Poplawski
42129059dc Rebuild for FC6 2006-08-30 02:23:37 +00:00
Ville Skyttä
ca3419284f http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild 2006-08-27 20:15:01 +00:00
Orion Poplawski
a6ddb1b3b5 Update to 3.12.4 2006-08-21 16:43:01 +00:00
Orion Poplawski
d2850135ec -Update to 3.12.2
- Don't strip binaries
2006-02-13 18:31:17 +00:00
Orion Poplawski
70c71f8be5 Update to 3.12.1 2006-01-10 16:56:55 +00:00
Orion Poplawski
1769f5779a Update to 3.12.0 2006-01-05 00:09:56 +00:00
Orion Poplawski
0b3ed40a43 Rebuild 2006-01-03 17:53:58 +00:00
Orion Poplawski
eb89ad744d Rebuild 2005-12-21 17:02:50 +00:00
Orion Poplawski
61de78e74e Bump for new openssl 2005-11-16 21:37:25 +00:00
Orion Poplawski
390086c4e7 - Add logrotate script for /var/log/apcupsd.events
- Add apache configuration script and change cgi directory to
    /var/www/apcupsd
- Compile in snmp, net-snmp, powerflute, nls, add tcp_wrappers support
2005-11-04 23:43:44 +00:00
Orion Poplawski
94364209eb logrotate script for /var/log/apcupsd.events 2005-11-04 23:43:25 +00:00
Orion Poplawski
0bdd316b69 Apache configuration script for apcupsd CGI scripts 2005-11-04 23:42:56 +00:00
Orion Poplawski
1eb450c460 auto-import apcupsd-3.10.18-3 on branch devel from
apcupsd-3.10.18-3.src.rpm
2005-11-01 02:59:11 +00:00
18 changed files with 966 additions and 21 deletions

View file

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/apcupsd-*.tar.gz
/apcupsd-*.src.rpm
/apcupsd-*/
/results_*/

View 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 */

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: apcupsd
# $Id$
NAME := apcupsd
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -0,0 +1,48 @@
--- apcupsd-3.14.1/src/apcnis.c.cloexec 2006-08-13 11:00:15.000000000 -0600
+++ apcupsd-3.14.1/src/apcnis.c 2007-08-01 16:26:35.000000000 -0600
@@ -155,6 +155,9 @@
sleep(5 * 60);
}
+ /* Close the socket on exec - avoid leaked file descriptors */
+ fcntl(sockfd, F_SETFD, FD_CLOEXEC);
+
/* Reuse old sockets */
#ifndef HAVE_MINGW
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&turnon, sizeof(turnon)) < 0) {
--- apcupsd-3.14.1/src/apcupsd.c.cloexec 2006-09-23 11:42:47.000000000 -0600
+++ apcupsd-3.14.1/src/apcupsd.c 2007-08-01 16:27:14.000000000 -0600
@@ -280,6 +280,9 @@
if (ups->event_fd < 0) {
log_event(ups, LOG_WARNING, "Could not open events file %s: %s\n",
ups->eventfile, strerror(errno));
+ } else {
+ /* Close the file on exec - avoid leaked file descriptors */
+ fcntl(ups->event_fd, F_SETFD, FD_CLOEXEC);
}
}
--- apcupsd-3.14.1/src/drivers/usb/linux/linux-usb.c.cloexec 2007-08-01 16:30:28.000000000 -0600
+++ apcupsd-3.14.1/src/drivers/usb/linux/linux-usb.c 2007-08-01 16:42:55.000000000 -0600
@@ -182,8 +182,11 @@
/* Retry 10 times */
for (i = 0; i < 10; i++) {
my_data->fd = open_device(ups->device, ups);
- if (my_data->fd != -1)
+ if (my_data->fd != -1) {
+ /* Close the device on exec - avoid leaked file descriptors */
+ fcntl(my_data->fd, F_SETFD, FD_CLOEXEC);
return 1;
+ }
sleep(1);
}
@@ -206,6 +209,8 @@
asnprintf(devname, sizeof(devname), "%s%d", hiddev[j], k);
my_data->fd = open_device(devname, ups);
if (my_data->fd != -1) {
+ /* Close the device on exec - avoid leaked file descriptors */
+ fcntl(my_data->fd, F_SETFD, FD_CLOEXEC);
/* Successful open, save device name and return */
astrncpy(ups->device, devname, sizeof(ups->device));
return 1;

46
apcupsd-3.14.3-init.patch Normal file
View file

@ -0,0 +1,46 @@
diff -up apcupsd-3.14.5/platforms/redhat/apcupsd.in.init apcupsd-3.14.5/platforms/redhat/apcupsd.in
--- apcupsd-3.14.5/platforms/redhat/apcupsd.in.init 2008-11-01 16:03:26.000000000 +0100
+++ apcupsd-3.14.5/platforms/redhat/apcupsd.in 2009-01-22 10:58:00.429886991 +0100
@@ -3,9 +3,19 @@
# apcupsd This shell script takes care of starting and stopping
# the apcupsd UPS monitoring daemon.
#
-# chkconfig: 2345 60 99
+# chkconfig: - 60 99
# description: apcupsd monitors power and takes action if necessary
#
+### BEGIN INIT INFO
+# Provides: apcupsd
+# Required-Start: $syslog $local_fs
+# Required-Stop: $syslog $local_fs
+# Default-Start:
+# Default-Stop: 0 1 6
+# Short-Description: apcupsd daemon
+# Description: APC UPS Power Control Daemon for Linux
+### END INIT INFO
+
APCPID=@PIDDIR@/apcupsd.pid
# Source function libarary
@@ -30,9 +40,11 @@ case "$1" in
;;
restart|force-reload)
$0 stop
- sleep 15
$0 start
;;
+ condrestart)
+ [ -f @LOCKDIR@/subsys/apcupsd ] && $0 restart || :
+ ;;
reload)
echo "$0: reload not implemented"
exit 3
@@ -48,7 +60,7 @@ case "$1" in
fi
;;
*)
- echo "Usage: $0 {start|stop|restart|status}"
+ echo "Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
;;
esac

View file

@ -0,0 +1,19 @@
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
@@ -104,7 +104,7 @@ case "$1" in
;;
doshutdown)
echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}
- ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"
+ ${SHUTDOWN} -h -H now "apcupsd UPS ${2} initiated shutdown"
;;
annoyme)
echo "Power problems with UPS ${2}. Please logoff." | ${WALL}

158
apcupsd-3.14.9-fixgui.patch Normal file
View file

@ -0,0 +1,158 @@
--- 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 \

32
apcupsd-httpd.conf Normal file
View file

@ -0,0 +1,32 @@
#
# 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
<IfModule mod_authz_core.c>
# Apache 2.4
Require local
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>

5
apcupsd.logrotate Normal file
View file

@ -0,0 +1,5 @@
/var/log/apcupsd.events {
missingok
copytruncate
notifempty
}

12
apcupsd.service Normal file
View 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

537
apcupsd.spec Normal file
View file

@ -0,0 +1,537 @@
# 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
Name: apcupsd
Version: 3.14.14
Release: 40%{?dist}
Summary: APC UPS Power Control Daemon
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
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
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
power failure, apcupsd will inform the users about the power
failure and that a shutdown may occur. If power is not restored,
a system shutdown will follow when the battery is exausted, a
timeout (seconds) expires, or the battery runtime expires based
on internal APC calculations determined by power consumption
rates. If the power is restored before one of the above shutdown
conditions is met, apcupsd will inform users about this fact.
Some features depend on what UPS model you have (simple or smart).
%package cgi
Summary: Web interface for apcupsd
Requires: apcupsd = %version-%release
Requires: httpd
%description cgi
A CGI interface to the APC UPS monitoring daemon.
%package gui
Summary: GUI interface for apcupsd
Requires: apcupsd = %version-%release
%description gui
A GUI interface to the APC UPS monitoring daemon.
%prep
%autosetup -p1
# Override the provided platform makefile
printf 'install:\n\techo skipped\n' > platforms/redhat/Makefile
%build
%configure \
--sysconfdir="/etc/apcupsd" \
--with-cgi-bin="/var/www/apcupsd" \
--sbindir=%{_bindir} \
--enable-cgi \
--enable-pthreads \
--enable-net \
--enable-apcsmart \
--enable-dumb \
--enable-net-snmp \
--enable-snmp \
--enable-usb \
--enable-modbus-usb \
--enable-gapcmon \
--enable-pcnet \
--with-serial-dev= \
--with-upstype=usb \
--with-upscable=usb \
--with-lock-dir=/var/lock \
APCUPSD_MAIL=/bin/mail
%make_build
%install
mkdir -p %buildroot/var/www/apcupsd
%make_install
install -m744 platforms/apccontrol \
%buildroot/etc/apcupsd/apccontrol
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 \
--vendor="fedora" \
--dir=%buildroot/usr/share/applications \
--set-icon=apcupsd64x64 \
--delete-original \
%buildroot/usr/share/applications/gapcmon.desktop
# Cleanup for later %%doc processing
chmod -x examples/*.c
rm examples/*.in
%files
%license COPYING
%doc ChangeLog examples ReleaseNotes
%dir /etc/apcupsd
/lib/systemd/system/apcupsd.service
/lib/systemd/system-shutdown/apcupsd_shutdown
%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
%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
/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
%systemd_post apcupsd.service
%preun
%systemd_preun apcupsd.service
%postun
%systemd_postun_with_restart apcupsd.service
%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)
* Mon Feb 17 2014 Michal Hlavinka <mhlavink@redhat.com> - 3.14.11-1
- apcupsd updated to 3.14.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)
* Thu Feb 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 3.14.10-9
- Remove --vendor flag to desktop-file-install on F19+
* Tue Feb 05 2013 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-8
- remove obsolete documentation
* Tue Oct 30 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-7
- fix configuration for httpd 2.4 (#871361)
* Fri Aug 24 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-6
- scriptlets replaced with new systemd macros (#851227)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Feb 13 2012 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-4
- start after network is up (#789191)
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Dec 19 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-2
- remove powerfail flag on boot (#768684)
* Mon Dec 12 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.10-1
- apcupsd updated to 3.14.10
- fix MODEL vs. APCMODEL confusion. Remove APCMODEL and rename old MODEL
aka 'mode' to DRIVER.
* Thu Oct 20 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-2
- fix crash in gui (#578276), patch by Michal Sekletar
* Mon Jul 25 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-1
- apcupsd updated to 3.14.9
* Fri Jul 08 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-9
- rebuilt for net-snmp update
* Thu Jun 16 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-8
- move from SysV init script to systemd service file
* Wed Feb 09 2011 Michal Hlavinka <mhlavink@redhat.com> - 3.14.9-7
- add readme file to doc explaining needed configuration of halt script
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.8-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 02 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-5
- do not attempt to invoke directory as a script (#659219)
* Fri Nov 05 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-4
- rebuilt for library update
* Wed Sep 29 2010 jkeating - 3.14.8-3
- Rebuilt for gcc bug 634757
* Wed Sep 22 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-2
- fix c++ code linking (FTBFS) (#631288)
* Mon Jan 18 2010 Michal Hlavinka <mhlavink@redhat.com> - 3.14.8-1
- updated to 3.14.8
* Fri Sep 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.7-3
- fix building with new net-snmp version
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 3.14.7-2
- rebuilt with new openssl
* Mon Aug 03 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.7-1
- updated to 3.14.7
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon May 18 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.6-1
- update to 3.14.6
* Tue Feb 24 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.5-3
- fix build with gcc 4.4
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.14.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Jan 22 2009 Michal Hlavinka <mhlavink@redhat.com> - 3.14.5-1
- update to 3.14.5
* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 3.14.4-3
- rebuild with new openssl
* Fri Jun 06 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.4-2
- drop useless build requirements
- fix #448637 - hosts.conf and multimon.conf should be in apcupsd-cgi
- move binaries to /sbin (related #346271)
* Wed May 28 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.4-1
- new upstream version
* Tue Feb 12 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-2.1
- rebuild (gcc-4.3)
* Wed Jan 30 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-2
- fix #348701 - apcupsd control script does not invoke shutdown properly
* Wed Jan 23 2008 Tomas Smetana <tsmetana@redhat.com> - 3.14.3-1
- Update to 3.14.3
* Wed Oct 10 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.2-1
- Update to 3.14.2, remove upstreamed patches
* Wed Aug 1 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-3
- Add patch to close open file descriptors (bug #247162)
- Stop/restart service as needed on removal/upgrade
* Mon Jun 04 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-2
- Add patch for linux USB UPS detection (bug #245864)
* Tue May 29 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.1-1
- Update to 3.14.1
* Mon Apr 23 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.0-2
- Fix init script for LSB compliance (bug #237532)
* Mon Feb 12 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.14.0-1
- Update to 3.14.0
* Fri Jan 5 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.13.9-2
- Mark everything in /etc/apcupsd noreplace
- Change BR to tcp_wrappers-devel
* Thu Nov 30 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.13.9-1
- Update to 3.13.9, add gui package
* Mon Oct 9 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-3
- Fix /etc/httpd/conf.d/apcupsd.conf so DirectoryIndex works (bug #209952).
Patch from Clive Messer (clive@vacuumtube.org.uk)
* Tue Aug 29 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-2
- Rebuild for FC6
* Mon Aug 21 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.4-1
- Update to 3.12.4
* Tue Jan 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.2-1
- Update to 3.12.2
- Don't strip binaries
* Tue Jan 10 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.1-1
- Update to 3.12.1
* Wed Jan 4 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.12.0-1
- Update to 3.12.0
* Tue Jan 3 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-7
- Rebuild
* Wed Dec 21 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-6
- Rebuild
* Wed Nov 16 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-5
- Bump for new openssl
* Fri Nov 4 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-4
- Add logrotate script for /var/log/apcupsd.events
- Add apache configuration script and change cgi directory to
/var/www/apcupsd
- Compile in snmp, net-snmp, powerflute, nls, add tcp_wrappers support
* Mon Oct 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-3
- Removed %%{_smp_mflags} from make, broke builds
- Patch init file to not start automatically and add reload
- Mark css file config
- Require /sbin/chkconfig
* Mon Oct 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-2
- Add %%defattr to -cgi package
* Wed Aug 17 2005 - Orion Poplawski <orion@cora.nwra.com> - 3.10.18-1
- Initial Fedora Version

BIN
apcupsd64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

9
apcupsd_shutdown Normal file
View 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
View 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
View 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
View file

@ -0,0 +1,3 @@
setOption('NetworkEnabled', False)
addFilter('hardcoded-library-path in %buildroot/lib/systemd')
addFilter('hardcoded-library-path in /lib/systemd')

View file

@ -0,0 +1 @@
cc8f5ced77f38906a274787acb9bc980 apcupsd-3.14.14.tar.gz