~vcs-imports/nut:pull_466_dstate_timeval

Last commit made on 2017-08-24
Get this branch:
git clone -b pull_466_dstate_timeval https://git.launchpad.net/~vcs-imports/nut

Branch merges

Branch information

Name:
pull_466_dstate_timeval
Repository:
lp:~vcs-imports/nut

Recent commits

9dd4fc5... by Jim Klimov <email address hidden>

eaton-marlin : cosmetic whitespace fixes

8de8b8e... by Jim Klimov <email address hidden>

dstate.h : use our timehead.h to have "struct timeval" defined

af0f99b... by Arnaud Quette <email address hidden>

snmp-ups: add support for input.phase.shift (#433)

* snmp-ups: add support for input.phase.shift

ATS can now publish the electrical dephasing between input sources

Signed-off-by: Arnaud Quette <email address hidden>

* Make spellchecker happy about "dephasing"

c71f342... by Christian Ehrhardt 

automake: only pass net-snmp cflags to snmp-ups (#464)

Other than formerly assumed in the makefile cflags can be more than
includes. And some of them need to be in sync in regard to CFLAGS and
LDFLAGS - for example usage of -fPIE.

This conflicts with a current assumption in the makefile "In any case,
CFLAGS are only -I options, so there is no harm".

On a Distribution where PIE is enabled by default, but disabled for
special cases (like net-snmp) the configure detection gets them as:
LIBNETSNMP_CFLAGS = -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2
-fdebug-prefix-map=/build/net-snmp-nlMQSZ/net-snmp-5.7.3+dfsg=.
-specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong
-Wformat -Werror=format-security -DNETSNMP_USE_INLINE -Ulinux
-Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.26/CORE
-Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include
LIBNETSNMP_LIBS = -Wl,-Bsymbolic-functions
-specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now
-L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm

Of importance are:
-specs=/usr/share/dpkg/no-pie-compile.specs
-specs=/usr/share/dpkg/no-pie-link.specs

Now when compiling the non-snmp objects incorrectly get the
"-specs=/usr/share/dpkg/no-pie-compile.specs" due to the assumption
that it is safe to add up all CFLAGS to the global one.

LDFLAGS imported that way are only added to snmp.
snmp_ups_LDADD = $(LDADD_DRIVERS) $(LIBNETSNMP_LIBS)
[...]
snmp-ups$(EXEEXT): $(snmp_ups_OBJECTS) $(snmp_ups_DEPENDENCIES)
$(EXTRA_snmp_ups_DEPENDENCIES)
        @rm -f snmp-ups$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(snmp_ups_OBJECTS) $(snmp_ups_LDADD)
$(LIBS)

That leads to other (all non snmp_ups) objects in drivers failing to build.
They get the no-pie-compile.specs (incorrect) spec but not the
no-pie-link.specs on the link step.

Some other parts like mge_shut and nutdrv_qx already have custom
CFLAGS/LDFLAGS that are not added to the global CFLAGS. So despite the
commend in the makefile this doesn't seem to be new in general to nut.

I don't want to mess too much with your build system for now as I don't
know many of its implications. So I chose not the full drop of that
global CFLAGS merge, but a minimal patch for now which fixes the issue
described.

Thereby closes #463

Signed-off-by: Christian Ehrhardt <email address hidden>

da1b756... by Jim Klimov

Eaton ePDU SNMP MIB file split in four (#465)

* snmp-subdrivers.txt : reference the multitude of eaton subdrivers

* eaton-mib.h renamed into separate constituent headers

* eaton-mib.c renamed into separate constituent sources, earlier history retained in eaton-pdu-genesis2-mib.c

* eaton-pdu-revelation-mib.c eaton-pdu-pulizzi-mib.c eaton-pdu-genesis2-mib.c : no use to include dstate.h here

* eaton-pdu-marlin-mib.c eaton-pdu-revelation-mib.c : port the renamed structure names from original eaton-mib.c evolution

de5ef94... by Arnaud Quette

snmp-ups: fix the rounding / truncation of some values

The multiplier system of the snmp-ups driver resulted in some values being
rounded to the nearby integer value, thus causing a loss of the decimals and
the value precision in general. This was mainly visible on the value of
currents, but also on some voltages

Signed-off-by: Arnaud Quette <email address hidden>

bc6ca11... by Tobby <email address hidden>

apcupsd-ups: interpret "SHUTTING DOWN" as "LB"

Fix issue https://github.com/networkupstools/nut/issues/460 so NUT with
apcupsd-ups driver will correctly initiate a shut down on low battery.

Bump version to 0.5

Closes: https://github.com/networkupstools/nut/issues/460
Closes: https://github.com/networkupstools/nut/issues/461

1684875... by Arnaud Quette

Remove exec bits on SNMP subdrivers

Signed-off-by: Arnaud Quette <email address hidden>

b898bc6... by Charles Lepple <email address hidden>

CPS HID: add input.frequency and output.frequency (0.5)

Suggested by Andy Jan:
http://lists.alioth.debian.org/pipermail/nut-upsuser/2017-August/010856.html

1bc568b... by Arnaud Quette

NUT namespace: fix an extraneous character insertion

A character was wrongly inserted during the previous commit, triggering a
spellcheck error

Signed-off-by: Arnaud Quette <email address hidden>