Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import libconf/nutconf features #2283

Closed
wants to merge 128 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
74b1f41
Initial conf library.
EmilienKia Oct 10, 2012
1360d08
Implement abstract configuration parser.
EmilienKia Oct 15, 2012
b2f95f9
Add stubs for DefaultConfigParser
EmilienKia Oct 15, 2012
0f885b0
Define a typedef type to make function easier to understand.
EmilienKia Oct 19, 2012
4798e59
Implement abstract class DefaultConfigParser
EmilienKia Oct 19, 2012
501cdb0
Implement GenericConfigParser and related.
EmilienKia Oct 19, 2012
eb363e4
Virtualize GenericConfiguration with BaseConfiguration to really allo…
EmilienKia Oct 19, 2012
86e3262
Add GenericConfiguration function to parse from string (use GenericCo…
EmilienKia Oct 19, 2012
bae95f7
Add unit test for GenericConfiguration parsing.
EmilienKia Oct 22, 2012
31fc32c
Add stubs for upsmon.conf parser and config structure.
EmilienKia Oct 22, 2012
bf53b02
Add notify messages array in UpsmonConfiguration (oups !).
EmilienKia Oct 23, 2012
513bb43
Create and use a Settable helper which indicate if a parameter is set…
EmilienKia Oct 23, 2012
5e6487f
Implement UpsmonConfigParser and related.
EmilienKia Oct 23, 2012
c69305d
Implement nut.conf NutConfiguration parser.
EmilienKia Oct 23, 2012
ba516e7
Implement upsd.conf UpsdConfigParser.
EmilienKia Oct 23, 2012
4decf08
Add equality test operators for Settable<T> and UpsdConfiguration::Li…
EmilienKia Oct 24, 2012
e1a76f3
Add test for UpsdConfiguration parsing.
EmilienKia Oct 24, 2012
d9f652d
Add parsing options and allow ':' to be interpreted as normal character.
EmilienKia Oct 24, 2012
3c15b9a
Initial implementation of nut::NutStream sub-tree
Nov 16, 2012
b5b7cbc
Unit tests for nut::NutStream subtree
Nov 22, 2012
e95e289
Forgotten UT source from prev. commit
Nov 22, 2012
003e345
Partial implementation on NutWriter subtree
Nov 28, 2012
2e54e2d
NutWriter: ups.conf upsmon.conf upsd.conf support
Nov 30, 2012
5e9ae92
UpsConfiguration class added to libnutconf
Dec 5, 2012
a5da456
Special serialiser for upsd.users config file
Dec 6, 2012
3d8c92c
Bugfix: out. std::stringstream constr. arg ignored
Dec 6, 2012
754036c
Support for upsd.users config. file added
Dec 6, 2012
89a534c
(De)serialisation methods added to config. classes
Dec 7, 2012
38c9934
Basic unit tests for libnutconf
Dec 11, 2012
ff401e5
NUT IPC module introduction
Dec 14, 2012
f364e22
Add a little sample to use libconf.
EmilienKia Dec 20, 2012
e9e0752
nutipc: linking cleanup & exec UT
Jan 7, 2013
475580a
nutipc: ext. command execution improvements
Jan 7, 2013
6d6e56a
nutipc: signal sending UTs
Jan 8, 2013
0cf62c5
nutconf: fix of misplaced value quoting
Jan 8, 2013
b6ffc87
nutipc: signal handling UT added
Jan 9, 2013
46a3a45
C++11 code removed due platform compatibility
Jan 21, 2013
897a05b
The very 1st nutconf tool stub
Jan 22, 2013
62a3586
nutconf: --is-configured option introduced
Jan 23, 2013
b0efd21
nutconf: daily commit
Jan 24, 2013
1de379f
nutconf: daily commit
Jan 25, 2013
0b00605
nutconf: --{set|add}-device options added
Jan 25, 2013
b5a4db0
nutconf: --{set|add}-notifyflags options added
Jan 28, 2013
2c94e25
nutconf: --set-notifymsg option added
Jan 28, 2013
12143f5
nutconf: --set-shutdowncmd option added
Jan 28, 2013
40f0b69
Support for FreeIPMI 1.1.x and 1.2.x (#2)
aquette Sep 19, 2012
606663e
Support power supplies scan over the network
aquette Oct 4, 2012
601c46d
Add nut-scanner support for Eaton serial units
aquette Jan 22, 2013
1c6b2b2
Protect header files for C++ inclusion.
EmilienKia Jan 13, 2013
3c5a63f
nutconf: --{set|add}-user options added
Jan 29, 2013
14bfefb
nutconf: --scan-* options added
Jan 30, 2013
db64fe7
nutconf: --scan-snmp option added
Jan 31, 2013
1ec2f71
nutconf: added --scan-serial option
Feb 1, 2013
7122acd
nutconf: manpage added
Feb 1, 2013
930a000
nutconf: compilation & finishing touches
Feb 4, 2013
a2caf28
nutconf: bugfixes + HTML manpage
Feb 5, 2013
78cb35c
nutconf: device with no options bugfix
Feb 5, 2013
7be9634
nutconf: proper device config dump
Feb 5, 2013
04d5903
nutconf: another round of bugfixes
Feb 5, 2013
0320875
libnutscan: serial device type string undefined
Feb 7, 2013
9362bad
libnutscan: dev. type strings array size fixed
Feb 8, 2013
1be6bd4
nutconf: --scan-serial port list bugfix
Feb 8, 2013
6104c9a
tests: Fix build without libcppunit
clepple Mar 10, 2013
417fbfc
nutconf: reintroduction of funcs lost in trans.
Mar 18, 2013
345980b
nutconf: --{add|set}-device: <key>=<value> support
Mar 29, 2013
f6a29ec
nutconf man page update
Apr 12, 2013
ee97288
Merge tag 'v2.7.1' into libconf-nutconf (started from v2.6.5)
jimklimov Jan 27, 2024
b167401
Merge tag 'v2.7.4' into libconf-nutconf
jimklimov Jan 27, 2024
b42a448
Merge tag 'v2.8.0' into libconf-nutconf
jimklimov Jan 27, 2024
441dd4f
Merge tag 'v2.8.1' into libconf-nutconf
jimklimov Jan 27, 2024
0e19ab1
Import NUT source changes for nutconf tool from 42ITy (initial set)
jimklimov Jan 14, 2022
f5da712
tools/nutconf/Makefile.am: modernize
jimklimov Jan 14, 2022
4970227
tools/nutconf/nutconf.cpp: add (C) header
jimklimov Jan 14, 2022
3a722d6
Add tools/nutconf/.gitignore
jimklimov Jan 14, 2022
7853565
tools/nutconf/nutconf.cpp: adjust to changed API for nutscan_scan_xml…
jimklimov Jan 14, 2022
f30fbb3
Spellcheck manpage for nutconf tool
jimklimov Jan 14, 2022
231e4e2
nutconf codebase: fix C++17 warnings - dynamic throw() declaration
jimklimov Jan 15, 2022
1593273
nutconf codebase: fix C++17 warnings - equality operators should retu…
jimklimov Jan 15, 2022
f92941c
tools/nutconf/Makefile.am, tests/Makefile.am, configure.ac: limit the…
jimklimov Jan 15, 2022
cc5e316
tools/nutconf/Makefile.am: update Makefile markup and comments
jimklimov Jan 24, 2024
d423987
tools/nutconf/nutconf.cpp: fix file description
jimklimov Jan 24, 2024
87d5f04
nutconf related sources: fix whitespace style
jimklimov Jan 24, 2024
84d3517
common/nutconf.cpp: NutConfigParser::parseConfig(): pre-initialize "s…
jimklimov Jan 24, 2024
ee19b55
nutconf related sources: fix deprecated throw() declarations to not b…
jimklimov Jan 24, 2024
248d893
nutconf related sources: fix typos and wording in comments
jimklimov Jan 24, 2024
b0732a5
Rename include/nutconf.h => .hpp as a C++ specific source file
jimklimov Jan 24, 2024
892e578
nutconf related sources: use NUT_UNUSED_VARIABLE() to decorate the co…
jimklimov Jan 24, 2024
abe7c1a
common/nutconf.cpp: NutConfigParser::parseConfig(): fix switch/case t…
jimklimov Jan 24, 2024
7d75e18
nutconf related sources: fix implicit copy/move operator warnings - u…
jimklimov Jan 24, 2024
2b9a546
common/nutconf.cpp: NutConfigParser::parseConfig(): reshuffle base vs…
jimklimov Jan 27, 2024
bc1269c
include/nutipc.hpp: avoid naming clash for QUIT signal and command
jimklimov Jan 25, 2024
90a93b3
common/nutstream.cpp: formatIPv{4,6}addr(): code typo fix (bit maths,…
jimklimov Jan 24, 2024
256f6a0
include/nutipc.hpp: Process::Child<M>::wait(): fix error-case check
jimklimov Jan 24, 2024
8ff7e53
common/nutstream.cpp: address a run-time warning about tempnam()
jimklimov Jan 24, 2024
0ae8eca
tools/nutconf/nutconf.cpp: adapt nutscan_scan_usb() to libnutscan API…
jimklimov Jan 24, 2024
e833186
configure.ac, tests/nutconf_ut.cpp: rearrange to use ABS_TOP_SRCDIR a…
jimklimov Jan 24, 2024
6d791a4
tests/nutconf_ut.cpp: update expectations for current ups.conf.sample…
jimklimov Jan 24, 2024
1683379
nutconf related changes: avoid NULL ("zero as null pointer constant")…
jimklimov Jan 25, 2024
56b4d6f
nutconf related sources: avoid "no out-of-line virtual method definit…
jimklimov Jan 25, 2024
81b3216
include/nutconf.hpp: avoid naming clash for Token "type" and "str" pr…
jimklimov Jan 25, 2024
92910d2
nutconf related sources: avoid "old-style cast" usage
jimklimov Jan 25, 2024
b178b6c
include/nutconf.hpp: err on the safe side by having a default handler…
jimklimov Jan 25, 2024
4992258
include/nutconf.cpp: avoid annotating a switch/case fallthrough
jimklimov Jan 25, 2024
c6b9ca5
include/nutconf.cpp: NutConfigParser::parseConfig(): be explicit abou…
jimklimov Jan 25, 2024
b6eb8b3
include/nutconf.cpp: NutConfigParser::parseConfig(): explicitly handl…
jimklimov Jan 25, 2024
edd72d1
include/nutconf.hpp: align UpsmonConfiguration::notifyFlags type with…
jimklimov Jan 25, 2024
1a8fd30
include/nutstream.hpp: decorate unimplemented methods which only thro…
jimklimov Jan 25, 2024
7eb561d
include/nutipc.hpp: align templated class destructor name with class …
jimklimov Jan 25, 2024
10506cb
include/nutipc.hpp: align array deleter with allocator
jimklimov Jan 25, 2024
5b31da5
include/nutipc.hpp: align size_t vs ssize_t maths
jimklimov Jan 25, 2024
a03f151
include/nutstream.hpp: align size_t vs ssize_t maths
jimklimov Jan 25, 2024
031c0f0
include/nutwriter.hpp: comment away a currently unused static method
jimklimov Jan 25, 2024
fbd05cd
include/nutconf.{c,h}pp: align port type to uint16_t (not plain or sh…
jimklimov Jan 25, 2024
040f586
common/nutconf.cpp: cast around std::getline() for parenthesized syntax
jimklimov Jan 25, 2024
c3c850c
tools/nutconf/nutconf.cpp: align "us_timeout" to be "useconds_t" not …
jimklimov Jan 25, 2024
cb5344f
tools/nutconf/nutconf.cpp: mark almost all methods in the tool as static
jimklimov Jan 25, 2024
d5685d8
tools/nutconf/nutconf.cpp: avoid shadowing a class property with meth…
jimklimov Jan 25, 2024
685ae0e
tests/nutstream_ut.cpp: fix cast of size_t vs. double for "pivot"
jimklimov Jan 25, 2024
f5a01d9
nutconf related tests: declare the override of CPPUNIT methods
jimklimov Jan 25, 2024
94efa11
tests/nutipc_ut.cpp: declare the override of nut::Signal::Handler met…
jimklimov Jan 25, 2024
bc65ae2
nutconf related tests: avoid "no out-of-line virtual method definitio…
jimklimov Jan 25, 2024
12739f0
nutconf related tests: avoid "old-style cast" usage
jimklimov Jan 25, 2024
1182587
Merge remote-tracking branch 'upstream/master' as of 2024-01-22 into …
jimklimov Jan 27, 2024
bf217ee
configure.ac: use -Wno-exit-time-destructors and -Wno-global-construc…
jimklimov Jan 25, 2024
7567b49
ci_build.sh: add support for CANBUILD_NUTCONF toggle (NUT_BUILD_CAPS=…
jimklimov Jan 15, 2022
79327f9
tests/nutstream_ut.cpp: Randomize bind(port) to try avoiding collisio…
jimklimov Jan 28, 2024
a83873b
Merge remote-tracking branch 'upstream/master' into libconf-nutconf
jimklimov Jan 29, 2024
42f4bb6
Merge branch 'master' into libconf-nutconf
jimklimov Jan 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,19 @@ for L in $NODE_LABELS ; do
"NUT_BUILD_CAPS=cppunit"|"NUT_BUILD_CAPS=cppunit=yes")
[ -n "$CANBUILD_CPPUNIT_TESTS" ] || CANBUILD_CPPUNIT_TESTS=yes ;;

# Currently we don't build --with-nutconf" by default, unless desired
# explicitly by developers' local workflow (or NUT CI farm recipes),
# that codebase needs some clean-up first... This should cover both
# the tool and the cppunit tests for it (if active per above).
"NUT_BUILD_CAPS=nutconf=no")
[ -n "$CANBUILD_NUTCONF" ] || CANBUILD_NUTCONF=no ;;
"NUT_BUILD_CAPS=nutconf=no-gcc")
[ -n "$CANBUILD_NUTCONF" ] || CANBUILD_NUTCONF=no-gcc ;;
"NUT_BUILD_CAPS=nutconf=no-clang")
[ -n "$CANBUILD_NUTCONF" ] || CANBUILD_NUTCONF=no-clang ;;
"NUT_BUILD_CAPS=nutconf"|"NUT_BUILD_CAPS=nutconf=yes")
[ -n "$CANBUILD_NUTCONF" ] || CANBUILD_NUTCONF=yes ;;

# Some (QEMU) builders have issues running valgrind as a tool
"NUT_BUILD_CAPS=valgrind=no")
[ -n "$CANBUILD_VALGRIND_TESTS" ] || CANBUILD_VALGRIND_TESTS=no ;;
Expand Down Expand Up @@ -1060,6 +1073,21 @@ default|default-alldrv|default-alldrv:no-distcheck|default-all-errors|default-sp
CONFIG_OPTS+=("--enable-cppunit=no")
fi

if [ -z "${CANBUILD_NUTCONF-}" ] \
|| ( [ "${CANBUILD_NUTCONF-}" = "no-gcc" ] && [ "$COMPILER_FAMILY" = "GCC" ] ) \
|| ( [ "${CANBUILD_NUTCONF-}" = "no-clang" ] && [ "$COMPILER_FAMILY" = "CLANG" ] ) \
; then
CANBUILD_NUTCONF=no
fi

if [ "${CANBUILD_NUTCONF-}" = yes ] ; then
echo "WARNING: Build agent says it can build nutconf, enabling the experimental feature" >&2
CONFIG_OPTS+=("--with-nutconf=yes")
elif [ "${CANBUILD_NUTCONF-}" = no ] ; then
echo "WARNING: Build agent says it can not build nutconf (or did not say anything), disabling the feature" >&2
CONFIG_OPTS+=("--with-nutconf=no")
fi

if [ "${CANBUILD_VALGRIND_TESTS-}" = no ] ; then
echo "WARNING: Build agent says it has a broken valgrind, adding configure option to skip tests with it" >&2
CONFIG_OPTS+=("--with-valgrind=no")
Expand Down
11 changes: 10 additions & 1 deletion common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,22 @@
@NUT_AM_MAKE_CAN_EXPORT@export CCACHE_PATH=@CCACHE_PATH@
@NUT_AM_MAKE_CAN_EXPORT@export PATH=@PATH_DURING_CONFIGURE@

AM_CFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CXXFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_LDFLAGS = -no-undefined
EXTRA_DIST =

noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la
if WITH_NUTCONF
# We define the recipe below in any case, but only activate it by default
# if the build configuration tells us to:
noinst_LTLIBRARIES += libnutconf.la
endif

libparseconf_la_SOURCES = parseconf.c

libnutconf_la_SOURCES = nutconf.cpp nutstream.cpp nutwriter.cpp nutipc.cpp

# do not hard depend on '../include/nut_version.h', since it blocks
# 'dist', and is only required for actual build, in which case
# BUILT_SOURCES (in ../include) will ensure nut_version.h will
Expand Down
Loading
Loading