Created attachment 171194 [details]
3.14.14 -- 31 May 2016
* win32: Fix missing DLLs when installing only apctray
* Fixes for socket error handling. Resolves apcaccess crash when connection fails as well as several other theoretical issues.
* MODBUS/USB error handling (COMMLOST) improvements for faulty USB links
* Fix hiddev binding when usbfs is mounted on /dev/bus/usb instead of /proc/bus/usb. This is necessary for switching between MODBUS/USB and USB/HID on Linux.
* Update GPLv2 text and FSF address to match current versions from FSF.
* Various fixes for potential issues suggested by Coverity Scan
* MacOS X port support for El Capitan System Integrity Protection (SIP) aka "rootless"
* Fix shutdown failure on Windows when UPSNAME includes spaces
* Fix building bsd-usb driver (This was broken when modbus-usb support was added.)
* Add status display for output current as well as apparent power
Created attachment 171238 [details]
Addition patch of configure and autoconf/configure.in.
I am not sure that it needed.
Created attachment 171424 [details]
The configure patch is needed on older versions of FreeBSD. 8.X (not supported anymore) and 9.X.
I've tried like you the approach on apcnis.c and it didn't work. It breaks NIS server and apcaccess.
# /usr/local/etc/rc.d/apcupsd start
# netstat -an | grep 3551
tcp4 0 0 *.3551 *.* LISTEN
# ps ax | grep apcupsd
7042 - Ss 0:00.08 /usr/local/sbin/apcupsd --kill-on-powerfail
Error reading status from apcupsd @ localhost:3551: Connection reset by peer
# netstat -an | grep 3551
# ldd /usr/local/sbin/apcupsd
libwrap.so.6 => /usr/lib/libwrap.so.6 (0x80084d000)
libusb.so.3 => /usr/lib/libusb.so.3 (0x800a56000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x800c69000)
libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x800f28000)
libm.so.5 => /lib/libm.so.5 (0x801145000)
libthr.so.3 => /lib/libthr.so.3 (0x80136e000)
libc.so.7 => /lib/libc.so.7 (0x801593000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x801940000)
This happens because on older versions of apcupsd is used a hacked tcpd.h, and now on 3.14.14 is used the tcpd.h from the system.
Dropping the option TCP_WRAPPERS will bypass this problem. Nowadays it's not even used. If this approach is accepted, deserves an entry on /usr/ports/UPDATING ?
Attached the patch.
Poudriere builds fine on 9.3 (amd64|i386), 10.3 (amd64|i386) and 11 (amd64|i386)
I test my "Update_to_1.3.14 ver2" attachment #171238 [details] on FreeBSD 9.3 and 10.3.
All (apcupsd as server, apcaccess, apcupsd as client, CGI multimon) WORK with option TCP_WRAPPERS!
Of course "older versions of apcupsd is used a hacked tcpd.h, and now on 3.14.14 is used the tcpd.h from the system."
Functions used in older versions of apcupsd from the hacked tcpd.h require parameter, but not functions from system tcpd.d
I patch all calls functions from tcpd.h to disable this parameter.
This is client apcupsd-3.14.14 to server apcupsd-3.14.14 (FreeBSD 10.3) output:
# pkg version -v | grep apcupsd
apcupsd-3.14.14 > succeeds index (index has 3.14.13)
APC : 001,040,0981
DATE : 2016-06-14 23:07:27 +0300
HOSTNAME : ***
VERSION : 3.14.14 (31 May 2016) freebsd
UPSNAME : ***
CABLE : Ethernet Link
DRIVER : NETWORK UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2016-06-14 23:07:26 +0300
MASTERUPD: 2016-06-14 23:07:27 +0300
MASTER : *.*.*.*:3551
MODEL : Smart-UPS 2200 RM
STATUS : ONLINE SLAVE
LINEV : 217.4 Volts
LOADPCT : 24.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 35.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
OUTPUTV : 217.4 Volts
SENSE : High
LOTRANS : 208.0 Volts
HITRANS : 253.0 Volts
RETPCT : 15.0 Percent
ITEMP : 27.9 C
BATTV : 55.1 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000408
SERIALNO : ***
BATTDATE : 2015-12-16
NOMOUTV : 230 Volts
NOMBATTV : 48.0 Volts
FIRMWARE : 665.4.I USB FW:2.3
END APC : 2016-06-14 23:07:31 +0300
Maybe I missed something on my test.
I will try "Update_to_1.3.14 ver2" again on my system.
Trying attachment 171238 [details].
It didn't work on my environment, check this debug log:
The segmentation fault occurs when runs apcaccess command.
Poudriere build log:
Have any idea ?
Maybe because the master apcupsd is still on 3.14.12 ?
I build may version with option TCP_WRAPPERS on amd64 arch and...
It's work on i386 arch. It's work without option TCP_WRAPPERS on amd64 arch.
Created attachment 171458 [details]
I turned back hacked tcpd.h from version 3.14.13.
The apcupsd don't crash with option TCP_WRAPPERS on amd64 architecture.
Nice, with attachment 171458 [details] worked here.
But I think we should propose a patch like attachment 171458 [details]. Without changes on tcpd.h. Dropping TCP_WRAPPERS option because IMHO it is not used anymore... it's just messing around. Do you agree ?
On NetBSD and OpenBSD apcupsd doesn't have support for TCP_WRAPPERS. Only linux RPMs are still building with it.
But it's just a thought... what itetcu@ or other committer think about it ?
Maintainer timeout, back to the pool.
Comment on attachment 171458 [details]
Implicit approval based on timeout, not attachment review.
A commit references this bug:
Date: Sun Dec 4 10:30:48 UTC 2016
New revision: 427764
Update to 3.14.14
Submitted by: email@example.com
Approved by: maintainer-timeout (itetcu)