diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index eaf4170..0000000 --- a/.drone.yml +++ /dev/null @@ -1,38 +0,0 @@ -kind: pipeline -name: default - -steps: - - name: Build Bullseye - image: debian:bullseye - volumes: - - name: finished_files - path: /deb_files - commands: - - apt update - - apt -y upgrade - - apt -y install --no-install-recommends build-essential equivs devscripts git rename - - git clean -f -d -x - - mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control - - dpkg-buildpackage -b -uc - - rename 's/\.deb/_bullseye\.deb/' ../*.deb - - mkdir -p /deb_files/bullseye/ - - cp ../*.deb /deb_files/bullseye/ - - find /deb_files/ - - - name: gitea_release - image: plugins/gitea-release - volumes: - - name: finished_files - path: /deb_files - settings: - api_key: - from_secret: GITEA_KEY - base_url: https://git.neulandlabor.de/ - files: - - /deb_files/bullseye/* - when: - event: tag - -volumes: - - name: finished_files - temp: {} diff --git a/ChangeLog b/ChangeLog index 669274b..2a1df65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15853 +1,3 @@ -2022-04-04 Jim Klimov - - * configure.ac: configure.ac: cut the release of NUT v2.8.0 - * clients/Makefile.am, tools/nut-scanner/Makefile.am: tools/nut- - scanner/Makefile.am, clients/Makefile.am: bump "version-info" for - NUT v2.8.0 Development since 2.7.4 release included changes to - code structure, fought warnings, and might impact ABI/API by the - changes to arguments (specific integer types and size_t vs. - architecture-dependent choice). - -2022-04-26 Jim Klimov - - * docs/nut.dict: docs/nut.dict: update dict - * docs/download.txt: docs/download.txt: link to distro packaging wiki - page on NUT github - * docs/download.txt: docs/download.txt: update links to distro - packaging recipes and their results - * docs/download.txt: docs/download.txt: deprecate buildbot tarballs - * drivers/libusb0.c, drivers/libusb1.c: drivers/libusb{0,1}.c: report - why we could not open any HID devices Closes: #477 - -2022-04-23 Jim Klimov - - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 750T/HID (USB) Closes: #774 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 2200 SH and 650 SHL (USB) Closes: #646 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 2200 SHL (USB) Closes: #756 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 650 SH (USB) Closes: #473 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - Basic VI 1000 SB (USB) Closes: #818 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 3000 SCL (USB) Closes: #971 - * data/driver.list.in: driver.list.in: Add HCL info for PowerWalker - VI 1200 SHL (USB) Closes: #1270 - * data/driver.list.in: driver.list.in: Add HCL info for UPS Phasak - model 9465, renamed as P6N (USB) Closes: #1187 - * data/driver.list.in: driver.list.in: Add HCL info for Online-UPS - Xanto S700 [#1279] - * data/driver.list.in: driver.list.in: Add HCL info for Santak - MT*-PRO / Castle C*K (Serial) Closes: #1039 - * data/driver.list.in: driver.list.in: Add HCL info for Digitus - DN-170040, DN-170041, and Voltronic Power GalleonX9-RT LCD-1-3K - (USB) Closes: #1251 - * data/driver.list.in: driver.list.in: Add HCL info for Kebo - UPS-650VA (USB) from DDL - * data/driver.list.in: driver.list.in: Add HCL info for Kebo - UPS-1000D (USB) Closes: #981 - * data/driver.list.in: driver.list.in: Add HCL info for Aviem Pro - 2000VA (USB) Closes: #827 - * data/driver.list.in: driver.list.in: Add HCL info for Digitus - DN-170076 (USB) Closes: #948 - * data/driver.list.in: driver.list.in: Add HCL info for Ippon Back - Basic 850 Euro (USB) Closes: #802 - * data/driver.list.in: driver.list.in: Add HCL info for Energy - Technologies DPK1/1-3 (Serial) Closes: #762 - * data/driver.list.in: driver.list.in: Add HCL info for V7 - UPS1RM2U1500-1E UPS 1500VA Rack Mount 2U (USB) Closes: #716 - * data/driver.list.in: driver.list.in: Add HCL info for Advice PRS850 - and PRV700 Pro (USB) from DDL - * data/driver.list.in: driver.list.in: Add HCL info for Advice Top V - Pro 6-10K (USB) Closes: #744 - * data/driver.list.in: driver.list.in: Add HCL info for Tecnoware UPS - ERA PLUS 1100 (USB) Closes: #747 - * data/driver.list.in: driver.list.in: Add HCL info for Elsist UPS - Nemo2.0 160 (USB) Closes: #719 - * data/driver.list.in: driver.list.in: Add HCL info for Powercom - Raptor 2000 and RPT-600AP (USB) Closes: #633 - * data/driver.list.in: driver.list.in: Add HCL info for Eaton 9PX - 2000 RT (USB) Closes: #540 - * data/driver.list.in: driver.list.in: Add HCL info for Salicru SPS - ONE (USB) Closes: #554 - * data/driver.list.in: driver.list.in: Add HCL info for APC - SMC2200BI-BR (USB) Closes: #557 - * data/driver.list.in: driver.list.in: Update comment for APC Back- - UPS Pro 1000, Model BX1000M (USB) [nut#139] - * data/driver.list.in: driver.list.in: Add HCL info for Liebert - PowerSure PSA 500 series (USB) Closes: #601 - * docs/man/usbhid-ups.txt: docs/man/usbhid-ups.txt: document some - caveats with CyberPower UPSes [issues #520, #1394] - * data/driver.list.in: driver.list.in: Update for CyberPower Systems - OR1500ERM1U [#1338] - * data/driver.list.in: driver.list.in: Update comment for CyberPower - Systems PR1500RT2U [#1191] - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems CP850PFCLCD (USB) Closes: #605 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems BL1250U (USB) Closes: #1012 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems RT650EI (USB) Closes: #453 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems CP1500PFCLCD (USB) Closes: #520 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems BR1000ELCD (USB) Closes: #552 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems UT2200E (USB) Closes: #556 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems OR500LCDRM1U (USB) Closes: #578 - * data/driver.list.in: driver.list.in: Add HCL info for CyberPower - Systems EC850LCD (USB) Closes: #622 - * data/driver.list.in: driver.list.in: Add HCL info for Guardian LCD - 1500 AP (IGA1500LCD) (Serial) Closes: #449 - * data/driver.list.in: driver.list.in: Add HCL info for Ablerex MARS - MS3000RT (Serial) Closes: #449 - * data/driver.list.in: driver.list.in: Add HCL info for APC AP9584 - Serial-to-USB kit Closes: #181 - * data/driver.list.in: driver.list.in: Update comment for Tripp_Lite - SMX500RT1U (USB) [#584] - * data/driver.list.in: driver.list.in: Add HCL info for Huawei - UPS2000 series (modbus) [#954 #1066 #1198 #1017] - * data/driver.list.in: driver.list.in: Add HCL info for DEXP MIX - 850VA (USB) Closes: #721 - * data/driver.list.in: driver.list.in: Add HCL info for CPC, ARES and - Powercool models with hunnox protocol (USB) Closes: #537 - * data/driver.list.in: driver.list.in: Add HCL info for Greencell - Micropower 600 (USB) Closes: #1080 - * data/driver.list.in: driver.list.in: Add HCL info for Crown CMU- - SP1200IEC (USB) Closes: #1014 - * data/driver.list.in: driver.list.in: Add HCL info for DigiTECH - 650VA (USB) Closes: #674 - * data/driver.list.in: driver.list.in: Add HCL info for Hunnox - devices (and new protocol subdriver) (USB) [#638] - * data/driver.list.in: driver.list.in: Add HCL info for nJoy Aten PRO - 3000 (SNMP) Closes: #1281 - -2022-04-25 Jim Klimov - - * docs/nut.dict: docs/nut.dict: add wc - * docs/nut.dict: docs/nut.dict: add uniq - -2022-04-25 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add a - CI_BUILDDIR=obj into docs scenario; name "out-of-tree builds" as - such - -2022-04-24 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: run some tests with - CI_BUILDDIR - * .gitignore, ci_build.sh: ci_build.sh: prepare for CI_BUILDDIR=obj - * ci_build.sh: ci_build.sh: introduce CI_BUILDDIR to handle out-of- - tree builds other than distcheck - * docs/man/Makefile.am, docs/man/index.txt, docs/man/nutupsdrv.txt, - docs/man/upsd.txt, docs/nut.dict: docs/man/nutupsdrv.txt + - index.txt + upsd.txt: use {builddir}/linkman-*.txt for included - data - * docs/man/Makefile.am: docs/man/Makefile.am: refactor - LINKMAN_INCLUDE_CONSUMERS - * docs/man/Makefile.am: docs/man/Makefile.am: introduce A2X_VERBOSE - * docs/nut-qa.txt, docs/nut.dict: docs/nut-qa.txt: mention "make - check-NIT-devel" helper target - * docs/man/victronups.txt: docs/man/victronups.txt: update link to - cable pinout Closes: #1371 - * configure.ac: configure.ac: fix enableval vs withval - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, - drivers/tripplite_usb.c, drivers/usb-common.c, drivers/usb- - common.h, drivers/usbhid-ups.c: drivers/usb-common.{h,c} and USB- - capable drivers: introduce warn_if_bad_usb_port_filename() Closes: - #1368 - * ci_build.sh: ci_build.sh: disable check-NIT by default in CI runs - for now - -2022-04-23 Jim Klimov - - * drivers/main.c: drivers/main.c: simplify detection of PROGNAME="lt- - DRIVERNAME" making it more reliable for some platforms - -2022-04-18 Jim Klimov - - * drivers/cyberpower-mib.c: drivers/cyberpower-mib.c: update - cyberpower_power_status[] with new values [#1377] - -2022-04-23 Jim Klimov - - * data/driver.list.in: Update driver.list.in - -2022-04-23 Jim Klimov - - * configure.ac: configure.ac: fix nut_enable_check_NIT - * ci_build.sh: ci_build.sh: "--enable-check-NIT" and "--enable- - maintainer-mode" for developer builds without a BUILD_TYPE - * ci_build.sh: ci_build.sh: "--enable-check-NIT" for CI builds - * tests/NIT/nit.sh: tests/NIT/nit.sh: fix renaming typo - * tests/NIT/nit.sh: tests/NIT/nit.sh: remove mktemp-ed TESTDIR when - we exit - * tests/NIT/nit.sh: tests/NIT/nit.sh: refactor with TESTDIR - * clients/upssched.c, common/common.c, drivers/clone-outlet.c, - drivers/clone.c, drivers/dstate.c, include/common.h, - server/sockdebug.c, server/sstate.c: check_unix_socket_filename() - to meaningfully abort when our paths are too long - * docs/man/clone.txt, docs/man/dummy-ups.txt: docs/man/clone.txt + - dummy-ups.txt: clarify the dependency caveats Clone drivers do not - require to run after upsd, but may need to start after the "real" - driver whose socket thay leech onto. - * tests/NIT/nit.sh: tests/NIT/nit.sh: limit how long we wait for - UPS1/UPS2 to begin responding - * configure.ac, docs/configure.txt, docs/nut-qa.txt, - tests/NIT/Makefile.am: tests/NIT/Makefile.am + configure.ac: - introduce --enable-check-NIT - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: re-wrap long lines - and reword - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: highlight that - upsrw can not define new variables - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: update notes for - dummy-once mode ability to re-read file only if it changes - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: update notes for - dummy-once mode - * docs/man/clone.txt, docs/man/dummy-ups.txt: docs/man/dummy-ups.txt - + clone.txt: cross-link two man pages to remind about similar use- - cases - -2022-04-23 Jim Klimov - - * data/driver.list.in: driver.list.in: Add HCL info for nJoy Keen 600 - (USB) Closes: #867 - -2022-04-22 Jim Klimov - - * tests/NIT/nit.sh: tests/NIT/nit.sh: - testcase_sandbox_upsc_query_timer(): do not waste time if we did - get the answer we want - * tests/NIT/nit.sh: tests/NIT/nit.sh: - testcase_sandbox_upsc_query_timer(): for slower testers out there, - wait one more cycle - * tests/NIT/nit.sh: tests/NIT/nit.sh: ignore message from NSS builds - Those tend to add lines like Init SSL without certificate database - so we should better grep for expected char sequence - -2022-04-22 Paweł Rapkiewicz - - * data/driver.list.in, drivers/ever-hid.c, scripts/upower/95-upower- - hid.hwdb: Confirm support for ECO Pro AVR CDS series EVER UPS This - commit confirms that EVER UPS line 'ECO Pro AVR CDS' is supported - by NUT, from nowon, nut-scanner will recognize EVER Ups as follows: - [nutdev1] driver = "usbhid-ups" port = "auto" vendorid = "2E51" - productid = "0000" product = "ECO PRO AVR CDS" serial = - "XXXXXXXXXXXXXXXXXXXXXXXXX" vendor = "EVER" bus = "003" - -2022-04-22 Jim Klimov - - * tests/NIT/nit.sh: tests/NIT/nit.sh: add - testgroup_sandbox_cppnit_simple_admin() to troubleshoot dummy-ups - data propagation - * tests/NIT/nit.sh: tests/NIT/nit.sh: - testcase_sandbox_start_drivers_after_upsd(): wait for UPS1 and UPS2 - to respond - * tests/cpputest-client.cpp: tests/cpputest-client.cpp: allow up to - 10 seconds for SET VAR to propagate into read-back value - * tests/.gitignore: GitIgnore tests/cppnit binary and logs - * docs/nut.dict: Update nut.dict - * tests/NIT/nit.sh: tests/NIT/nit.sh: refactor test cases into - smaller routines and groups, and allow to select NIT_CASE - optionally - * tests/NIT/nit.sh: tests/NIT/nit.sh: refactor stop_daemons() - * Makefile.am, tests/Makefile.am, tests/NIT/Makefile.am: - tests/NIT/Makefile.am: extend with check-NIT-devel for iterating - * drivers/dstate.c: drivers/dstate.c: log start of processing in - sock_arg() - * drivers/dstate.c: drivers/dstate.c: whitespace fix - * tests/NIT/nit.sh: tests/NIT/nit.sh: allow to tweak NUT_DEBUG_MIN - * tests/cpputest-client.cpp: tests/cpputest-client.cpp: trace values - read back after setting - * tests/cpputest-client.cpp: tests/cpputest-client.cpp: rename "s1" - original value reading - * scripts/python/Makefile.am: scripts/python/Makefile.am: clean *.pyc - and __pycache__/ if present - -2022-04-21 Jim Klimov - - * drivers/dummy-ups.c: drivers/dummy-ups.c: fix dummy-once mode for - relative path in port - * tests/NIT/nit.sh: tests/NIT/nit.sh: name the "dummy.seq" so it - loops by default - * drivers/main.c: drivers/main.c: better fix for handling of libtool- - named binaries - * tests/NIT/nit.sh: tests/NIT/nit.sh: if "Error: Driver not - connected" retry with UPSD started after drivers are running - * drivers/main.c: drivers/main.c: fix the handling of libtool-named - binaries - * tests/NIT/nit.sh: tests/NIT/nit.sh: "sed -i" requires an extension - (may be empty, in BSD must be a separate CLI token, in others must - be same token - not empty is ok for all) - * tests/NIT/nit.sh: tests/NIT/nit.sh: "sed -i" requires an extension - (may be empty, in BSD must be a separate CLI token) - * drivers/dummy-ups.c: drivers/dummy-ups.c: cover exhaustive - case(enum) with pragmas for diametral warnings - * tests/NIT/nit.sh: tests/NIT/nit.sh: extend with mode=... for dummy- - ups [#1385] - * NEWS, UPGRADING, docs/man/dummy-ups.txt, drivers/dummy-ups.c: - dummy-ups: do re-read a "dummy-once" file, though only if it - changes while the driver runs r the commit message for your - changes. Lines starting - * NEWS, UPGRADING, docs/man/dummy-ups.txt, drivers/dummy-ups.c: - dummy-ups: separate MODE_DUMMY_ONCE from MODE_DUMMY_LOOP Closes: - #1385 - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: small rewording - * drivers/dummy-ups.c: drivers/dummy-ups.c: refactor "mode" from - random defines to an enum - * common/str.c, include/str.h: include/str.h, common/str.c: add - str_ends_with() - * tests/NIT/nit.sh: tests/NIT/nit.sh: make sure ups.status is not - pre-defined empty in test sandbox - * tests/cpputest-client.cpp: tests/cpputest-client.cpp: - test_auth_user(): bail out if "ups.status" reply is empty - * tests/NIT/nit.sh: tests/NIT/nit.sh: report DEBUG_SLEEP mode more - usefully - * tests/NIT/nit.sh: tests/NIT/nit.sh: spell out 127.0.0.1 and ::1 if - detected supported on local system - do not rely on ping CLI alone - * tests/NIT/nit.sh: tests/NIT/nit.sh: spell out 127.0.0.1 and ::1 if - detected supported on local system - -2022-04-20 Jim Klimov - - * tests/NIT/nit.sh: tests/NIT/nit.sh: report issues more usefully for - troubleshooting CI - * tests/NIT/Makefile.am: tests/NIT/Makefile.am: use more portable - clumsier code - * drivers/main.c: drivers/main.c: accept "lt-PROGNAME" to run - libtool-wrapped builds during development - * tests/NIT/nit.sh: tests/NIT/nit.sh: Avoid dummies with TIMER flip- - flops for cppnit if we can - * tests/Makefile.am: tests/Makefile.am: do not run "cppnit" as part - of TESTS, only give a recipe to build it - * clients/nutclient.h, tests/Makefile.am, tests/NIT/nit.sh, - tests/cpputest-client.cpp: NutActiveClientTest: introduce C++ - NutActiveClientTest for NIT and similar uses - * tests/NIT/nit.sh: tests/NIT/nit.sh: log OVERALL results before - DEBUG_SLEEP - * tests/NIT/nit.sh: tests/NIT/nit.sh: refactor upsd.users passwords - as shell vars to ease reuse - * tests/NIT/nit.sh: tests/NIT/nit.sh: check that test_nutclient.py - was generated before running it; export NUT_PORT just once - * tests/NIT/nit.sh: tests/NIT/nit.sh: embed weak randomization of - NUT_PORT At least this little magic is better than a hardcoded - number: if several CI executors run `make check` at once on same - host, they now have a decent chance to not collide (not guaranteed - though) - * tests/NIT/nit.sh: tests/NIT/nit.sh: let caller customize NUT_PORT - * Makefile.am, configure.ac, tests/Makefile.am, tests/NIT/.gitignore, - tests/NIT/Makefile.am: Add tests/NIT/Makefile.am for - straightforward integration of the test suite - * configure.ac, tests/Makefile.am: configure.ac: fix detection of - cppunit on some platforms Note for posterity: CFLAGS go before - source, LDFLAGS+LIBS after source, in g++ cmdline - * Makefile.am: Makefile.am: fix "make check-docs" and siblings from - root dir - * Makefile.am: Makefile.am: let "make check-NIT" from root dir - * tests/NIT/README, tests/NIT/nit.sh: tests/NIT: warn in - docs/comments that starting pwd should be the BUILDDIR - * tests/Makefile.am: tests/Makefile.am: help check-NIT pass in - distcheck (cleaner) - * tests/NIT/README, tests/NIT/nit.sh: tests/NIT/README: update a bit - * tests/Makefile.am: tests/Makefile.am: help check-NIT pass in - distcheck - * docs/nut-qa.txt: docs/nut-qa.txt: mention NUT NIT and update links - to Ubuntu QART - * tests/NIT/nit.sh: tests/NIT/nit.sh: make some debug noise optional - * tests/NIT/nit.sh: tests/NIT/nit.sh: typo fix for SRCDIR - * tests/NIT/nit.sh: tests/NIT/nit.sh: sanity checks for BUILDDIR - * tests/NIT/nit.sh: tests/NIT/nit.sh: bail out quickly if got no - daemons to run - * tests/Makefile.am: tests/Makefile.am: call NIT suite - * tests/NIT/nit.sh: tests/NIT/nit.sh: document DEBUG_SLEEP a bit - -2022-04-19 Jim Klimov - - * tests/NIT/.gitignore, tests/NIT/README, tests/NIT/nit.sh: NIT: NUT - Integration Tests (usable PoC) [another take at issue #3] - * clients/upsrw.c, docs/man/upsrw.txt: upsrw: accept "-l" for listing - Closes: #1382 - * scripts/python/module/test_nutclient.py.in: test_nutclient.py.in: - allow to override NUT_PORT, NUT_USER, NUT_PASS - * conf/ups.conf.sample: conf/ups.conf.sample: update with info from - docs/man/ups.conf.txt - -2022-04-18 Jim Klimov - - * clients/nutclient.cpp: clients/nutclient.{cpp,h}: - deviceMaster()/devicePrimary(): add fallback handling with the - other keyword [#840, #1374] - * clients/nutclient.cpp, clients/nutclient.h, - clients/nutclientmem.cpp, clients/nutclientmem.h, - docs/man/libnutclient_misc.txt: clients/nutclient{mem}.{cpp,h} - docs/man/libnutclient_misc.txt: add PRIMARY handling [#840] - Closes: #1374 - * clients/nutclient.cpp, clients/nutclient.h, - docs/man/libnutclient_tcp.txt: clients/nutclient.{cpp,h} - docs/man/libnutclient_tcp.txt: fix timeout from long to time_t - Closes: #1376 - * clients/upsc.c, clients/upsclient.c, clients/upsclient.h, - clients/upscmd.c, clients/upsimage.c, clients/upslog.c, - clients/upsmon.h, clients/upsrw.c, clients/upsset.c, - clients/upsstats.c, docs/man/upscli_connect.txt, drivers/dummy- - ups.c: clients/upsclient.{c,h} and many clients + dummy-ups: fix - port from int to uint16_t Closes: #1379 - * docs/man/libnutclient_variables.txt: - docs/man/libnutclient_variables.txt: fix English - * clients/upsclient.h: clients/upsclient.h: fix whitespace - * clients/upsclient.c, clients/upsclient.h, - docs/man/upscli_readline.txt, docs/man/upscli_sendline.txt: - clients/upsclient.{c,h} docs/man/upscli_{read,send}line.txt: fix - timeout from long to time_t Closes: #1373 - * clients/nutclient.cpp, clients/nutclient.h, - docs/man/libnutclient_tcp.txt, docs/nut.dict: - clients/nutclient.{cpp,h}: fix port type from unsigned short to - uint16_t Closes: #1375 - * docs/man/Makefile.am: docs/man/Makefile.am: `$( - - * docs/man/Makefile.am: docs/man/Makefile.am: abstract filenames into - LINKMAN_INCLUDE_GENERATED macro - -2022-04-16 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am: DOCBUILD_BEGIN: work - around older BSD make not seeing sources not present in builddir - It seems to resolve single-source documents well, but fails to find - the upsd.txt which depends on linkman*-names.txt and build a proper - relative path to it. - * docs/man/Makefile.am: docs/man/Makefile.am: ensure linkman- - drivertool*names.txt are in builddir - * docs/man/Makefile.am: docs/man/Makefile.am: ensure linkman- - drivertool*names.txt are in A2X_OUTDIR - * docs/man/Makefile.am: docs/man/Makefile.am: avoid spurious - regeneration of linkman-drivertool*names.txt whenever we reference - them - * docs/man/Makefile.am: docs/man/Makefile.am: generate linkman- - drivertool*names.txt independent of current dir being srcdir - * ci_build.sh: ci_build.sh: "cat" the "git diff" - -2022-04-15 Jim Klimov - - * docs/man/libnutclient_general.txt, docs/man/libnutclient_misc.txt, - docs/man/libnutclient_tcp.txt, docs/man/libnutclient_variables.txt, - docs/man/libupsclient-config.txt, docs/nut.dict: - docs/man/libnutclient*.txt: wrap long lines, minor rephrase, bullet - points - * docs/man/libnutclient_commands.txt, - docs/man/libnutclient_devices.txt: - docs/man/libnutclient_devices.txt, libnutclient_commands.txt: - synopsis for strarr - * docs/man/libnutclient_devices.txt: - docs/man/libnutclient_devices.txt: wrap long lines, minor rephrase, - bullet points - * docs/man/libnutclient_commands.txt: - docs/man/libnutclient_commands.txt: wrap long lines, minor - rephrase, bullet points; added optional param arg in API - * docs/man/upscli_strerror.txt: docs/man/upscli_strerror.txt: fix - return type modifier to const - * docs/man/upscli_add_host_cert.txt, docs/man/upscli_cleanup.txt, - docs/man/upscli_disconnect.txt, docs/man/upscli_fd.txt, - docs/man/upscli_get.txt, docs/man/upscli_init.txt, - docs/man/upscli_list_next.txt, docs/man/upscli_readline.txt, - docs/man/upscli_sendline.txt, docs/man/upscli_splitaddr.txt: - docs/man/upscli*.txt: wrap long lines, minor rephrase - * docs/man/nutscan_init.txt, docs/man/nutscan_new_device.txt, - docs/man/nutscan_scan_usb.txt: docs/man/nutscan*.txt: document - methods with (void) arg list as such - * docs/man/Makefile.am, docs/man/index.txt, docs/man/nutscan.txt, - docs/man/nutscan_add_device_to_device.txt, - docs/man/nutscan_add_option_to_device.txt, - docs/man/nutscan_cidr_to_ip.txt, - docs/man/nutscan_display_parsable.txt, - docs/man/nutscan_display_ups_conf.txt, - docs/man/nutscan_free_device.txt, - docs/man/nutscan_get_serial_ports_list.txt, - docs/man/nutscan_init.txt, docs/man/nutscan_new_device.txt, - docs/man/nutscan_scan_avahi.txt, - docs/man/nutscan_scan_eaton_serial.txt, - docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, - docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, - docs/man/nutscan_scan_xml_http.txt, - docs/man/nutscan_scan_xml_http_range.txt: - docs/man/nutscan_scan_xml_http_range.txt: document the method which - got extended from original nutscan_scan_xml_http() doing just a - local broadcast - * docs/man/nutscan_scan_ipmi.txt: docs/man/nutscan_scan_ipmi.txt: - document the method which now is implemented - * docs/man/nutscan.txt, docs/man/nutscan_add_device_to_device.txt, - docs/man/nutscan_add_option_to_device.txt, - docs/man/nutscan_cidr_to_ip.txt, docs/man/nutscan_free_device.txt, - docs/man/nutscan_get_serial_ports_list.txt, - docs/man/nutscan_init.txt, docs/man/nutscan_new_device.txt, - docs/man/nutscan_scan_avahi.txt, - docs/man/nutscan_scan_eaton_serial.txt, - docs/man/nutscan_scan_nut.txt, docs/man/nutscan_scan_snmp.txt, - docs/man/nutscan_scan_usb.txt, docs/man/nutscan_scan_xml_http.txt: - docs/man/nutscan*.txt: wrap long lines, minor rephrase, fix - timeouts to useconds_t - * docs/nut.dict: docs/nut.dict: spellcheck drivertool - * docs/man/apcsmart-old.txt, docs/man/apcsmart.txt, - docs/man/asem.txt, docs/man/bcmxcp_usb.txt, docs/man/liebert- - esp2.txt, docs/man/macosx-ups.txt, docs/man/microsol-apc.txt, - docs/man/nut.conf.txt, docs/man/nutdrv_atcl_usb.txt, - docs/man/nutdrv_qx.txt, docs/man/nutdrv_siemens_sitop.txt, - docs/man/oneac.txt, docs/man/optiups.txt, docs/man/upscode2.txt, - docs/man/usbhid-ups.txt: docs/man/*.txt: reformat AUTHOR(S) and - INTERNET RESOURCES blocks to common style - * docs/man/upsdrvsvcctl.txt: docs/man/upsdrvsvcctl.txt: list Jim - Klimov as the AUTHOR - * docs/man/nut-driver-enumerator.txt: docs/man/nut-driver- - enumerator.txt: list Jim Klimov as the AUTHOR - * docs/man/snmp-ups.txt: docs/man/snmp-ups.txt: list AUTHORS as a - bulleted list and add Jim Klimov - * docs/man/snmp-ups.txt: docs/man/snmp-ups.txt: wrap long lines and - reword a bit - * docs/man/optiups.txt: docs/man/optiups.txt: wrap long lines - * docs/man/phoenixcontact_modbus.txt: - docs/man/phoenixcontact_modbus.txt: wrap long lines - * docs/man/belkinunv.txt: docs/man/belkinunv.txt: add link to - protocol description copy on NUT site - * docs/support.txt: docs/support.txt: mention github instead of - subversion - * docs/man/.gitignore, docs/man/Makefile.am, docs/man/index.txt, - docs/man/nutupsdrv.txt, docs/man/upsd.txt: docs/man/index.txt, - upsd.txt, nutupsdrv.txt: generate the up-to-date list of drivers, - current for each iteration - * docs/man/index.txt, docs/man/nutupsdrv.txt, docs/man/upsd.txt: - docs/man/upsd.txt, nutupsdrv.txt, index.txt: move common - nutupsdrv[8] from the bulk of driver list - * docs/man/nutupsdrv.txt, docs/man/upsd.txt: docs/man/upsd.txt, - nutupsdrv.txt: generate current list of drivers - * docs/man/index.txt: docs/man/index.txt: generate current list of - drivers, separate "Driver Control" title - * docs/man/nutupsdrv.txt, docs/man/upsd.txt: docs/man/upsd.txt, - nutupsdrv.txt: reformat lists of drivers and tools to bullet lists - * docs/Makefile.am: docs/Makefile.am: DOCBUILD_BEGIN: symlink images/ - ONLY for PDF generation - * ci_build.sh: ci_build.sh: add notes to Consider `--enable- - maintainer-mode` - * .gitignore: GitIgnore IDEA metadata files - * docs/.gitignore: GitIgnore more intermediate XML files from docs - generation - -2022-04-14 Jim Klimov - - * docs/man/nutscan_display_parsable.txt, - docs/man/nutscan_display_ups_conf.txt, - docs/man/nutscan_free_device.txt, - docs/man/nutscan_get_serial_ports_list.txt: docs/man/nutscan*.txt: - fix formatting and typos - * docs/man/upscli_get.txt, docs/man/upscli_init.txt, - docs/man/upscli_list_start.txt: docs/man/upscli*.txt: fix sample - source formatting - * docs/man/upsmon.txt: docs/man/upsmon.txt: reword a dangling - sentence - * docs/man/tripplite_usb.txt: docs/man/tripplite_usb.txt: fix - formatting - * docs/man/riello_ser.txt: docs/man/riello_ser.txt: fix formatting - * docs/man/riello_usb.txt: docs/man/riello_usb.txt: fix formatting - * docs/man/snmp-ups.txt: docs/man/snmp-ups.txt: fix sample source - formatting - * docs/man/socomec_jbus.txt: docs/man/socomec_jbus.txt: fix - formatting and typos - * docs/man/Makefile.am, docs/nut.dict: docs/man/Makefile.am: list the - socomec_jbus.txt - * docs/man/pijuice.txt: docs/man/pijuice.txt: fix formatting - * docs/man/nutdrv_qx.txt: docs/man/nutdrv_qx.txt: fix formatting - * docs/man/nutdrv_atcl_usb.txt: docs/man/nutdrv_atcl_usb.txt: fix - formatting - * docs/man/nut.conf.txt: docs/man/nut.conf.txt: fix sample source - formatting - * docs/man/mge-utalk.txt: docs/man/mge-utalk.txt: fix formatting - * docs/man/liebert-esp2.txt: docs/man/liebert-esp2.txt: fix - formatting - * docs/man/clone.txt: docs/man/clone.txt: fix sample source - formatting - * docs/man/bestups.txt, docs/man/blazer-common.txt, - docs/man/masterguard.txt: docs/man/blazer-common.txt, - masterguard.txt, bestups.txt: fix formatting [#1361] - * docs/man/adelsystem_cbi.txt: docs/man/adelsystem_cbi.txt: fix - formatting - * docs/sock-protocol.txt: docs/sock-protocol.txt: fix formatting - * docs/snmp-subdrivers.txt: docs/snmp-subdrivers.txt: small typo - * docs/packager-guide.txt: docs/packager-guide.txt: reshuffle known - names - * docs/nut-qa.txt: docs/nut-qa.txt: list a few more tools we use - * TODO, docs/nut-qa.txt: Fix remaining links to asciidoc.org - * docs/nut-names.txt: docs/nut-names.txt: fix table formatting - * docs/new-clients.txt: docs/new-clients.txt: fix sample source - formatting - * docs/net-protocol.txt: docs/net-protocol.txt: fix version table - formatting - * docs/FAQ.txt: docs/FAQ.txt: fix formatting, extend some notes - * docs/nut.dict: Update nut.dict - * docs/developers.txt: docs/developers.txt: fix formatting, extend - some notes - * docs/developer-guide.txt: docs/developer-guide.txt: fix formatting; - update URL to evolution500.seq - * docs/design.txt: docs/design.txt: fix formatting; note FIXMEs for - documenting TRACKING support - * docs/daisychain.txt: docs/daisychain.txt: fix formatting - * drivers/snmp-ups.h: drivers/snmp-ups.h: update comment to clarify - the meaning of SU_TYPE_DAISY_1 and SU_TYPE_DAISY_2 - * docs/configure.txt: docs/configure.txt: fix formatting, add titles, - extend some notes - * docs/configure.txt: docs/configure.txt: add a section on modbus - drivers - * docs/configure.txt: docs/configure.txt: link to powerman project - * docs/configure.txt: docs/configure.txt: fix formatting, add driver - type titles, extend some notes - * docs/config-prereqs.txt: docs/config-prereqs.txt: fix formatting, - extend some notes - -2022-04-14 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am: A2X_COMMON_OPTS: use "-- - attribute=..." consistently - * docs/Makefile.am: docs/Makefile.am: have "images/" in A2X_OUTDIR - (fallout of #1152) Closes: #1365 - -2022-04-14 Jim Klimov - - * docs/solaris-usb.txt: docs/solaris-usb.txt: drop suggestions about - building special libusb-1.0/0.1 branches - * docs/solaris-usb.txt: docs/solaris-usb.txt: fix formatting, extend - some notes - * docs/solaris-usb.txt: docs/solaris-usb.txt: add a NOTE for USB - drivers ignoring port option [#1368] - * docs/config-notes.txt: docs/config-notes.txt: fix formatting, - extend some notes and warnings, and service-driven life-cycle - * docs/config-notes.txt: docs/config-notes.txt: document - ALLOW_NO_DEVICE for upsd.conf [#766, #837] - * docs/config-notes.txt: docs/config-notes.txt: reformat and extend - the NOTE for USB drivers ignoring port option [#1368] - * ci_build.sh, docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci- - farm-lxc-setup.txt: fix formatting, extend on Jenkins agent setup - * ci_build.sh: ci_build.sh: use "gmake" for "./ci_build.sh - spellcheck" if available and no particular MAKE was requested - - fall back to "make" if "gmake" is not available - -2022-04-13 Jim Klimov - - * docs/asciidoc.txt: docs/asciidoc.txt: update link to the Asciidoc - Manual (and project now on github) - -2022-04-12 Jim Klimov - - * Makefile.am: Makefile.am: define dependencies between recipes for - dist* and package; tarball, sig and checksum filenames - -2022-04-10 Jim Klimov - - * docs/daisychain.txt, docs/man/adelsystem_cbi.txt, - docs/man/al175.txt, docs/man/apcsmart-old.txt, - docs/man/apcsmart.txt, docs/man/apcupsd-ups.txt, docs/man/asem.txt, - docs/man/bcmxcp.txt, docs/man/bcmxcp_usb.txt, docs/man/belkin.txt, - docs/man/belkinunv.txt, docs/man/bestfcom.txt, - docs/man/bestfortress.txt, docs/man/bestuferrups.txt, - docs/man/bestups.txt, docs/man/blazer-common.txt, - docs/man/clone.txt, docs/man/dummy-ups.txt, docs/man/etapro.txt, - docs/man/everups.txt, docs/man/gamatronic.txt, - docs/man/generic_modbus.txt, docs/man/genericups.txt, - docs/man/hosts.conf.txt, docs/man/huawei-ups2000.txt, - docs/man/isbmex.txt, docs/man/ivtscd.txt, - docs/man/libnutclient.txt, docs/man/libnutclient_commands.txt, - docs/man/libnutclient_devices.txt, - docs/man/libnutclient_general.txt, docs/man/libnutclient_misc.txt, - docs/man/libnutclient_tcp.txt, docs/man/libnutclient_variables.txt, - docs/man/libupsclient-config.txt, docs/man/liebert-esp2.txt, - docs/man/liebert.txt, docs/man/macosx-ups.txt, - docs/man/masterguard.txt, docs/man/metasys.txt, docs/man/mge- - shut.txt, docs/man/mge-utalk.txt, docs/man/microdowell.txt, - docs/man/microsol-apc.txt, docs/man/netxml-ups.txt, docs/man/nut- - driver-enumerator.txt, docs/man/nut-ipmipsu.txt, docs/man/nut- - recorder.txt, docs/man/nut-scanner.txt, docs/man/nut.conf.txt, - docs/man/nutdrv_atcl_usb.txt, docs/man/nutdrv_siemens_sitop.txt, - docs/man/nutscan.txt, docs/man/nutscan_add_device_to_device.txt, - docs/man/nutscan_add_option_to_device.txt, - docs/man/nutscan_cidr_to_ip.txt, - docs/man/nutscan_display_parsable.txt, - docs/man/nutscan_display_ups_conf.txt, - docs/man/nutscan_free_device.txt, - docs/man/nutscan_get_serial_ports_list.txt, - docs/man/nutscan_init.txt, docs/man/nutscan_new_device.txt, - docs/man/nutscan_scan_avahi.txt, - docs/man/nutscan_scan_eaton_serial.txt, - docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, - docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, - docs/man/nutscan_scan_xml_http.txt, docs/man/nutupsdrv.txt, - docs/man/oneac.txt, docs/man/optiups.txt, - docs/man/phoenixcontact_modbus.txt, docs/man/pijuice.txt, - docs/man/powercom.txt, docs/man/powerman-pdu.txt, - docs/man/powerpanel.txt, docs/man/rhino.txt, - docs/man/richcomm_usb.txt, docs/man/riello_ser.txt, - docs/man/riello_usb.txt, docs/man/safenet.txt, docs/man/skel.txt, - docs/man/snmp-ups.txt, docs/man/socomec_jbus.txt, - docs/man/solis.txt, docs/man/tripplite.txt, - docs/man/tripplite_usb.txt, docs/man/tripplitesu.txt, - docs/man/ups.conf.txt, docs/man/upsc.txt, - docs/man/upscli_add_host_cert.txt, docs/man/upscli_cleanup.txt, - docs/man/upscli_connect.txt, docs/man/upscli_disconnect.txt, - docs/man/upscli_get.txt, docs/man/upscli_init.txt, - docs/man/upscli_list_next.txt, docs/man/upscli_list_start.txt, - docs/man/upscli_readline.txt, docs/man/upscli_sendline.txt, - docs/man/upscli_splitname.txt, docs/man/upsclient.txt, - docs/man/upscmd.txt, docs/man/upscode2.txt, docs/man/upsd.conf.txt, - docs/man/upsd.txt, docs/man/upsd.users.txt, docs/man/upsdrvctl.txt, - docs/man/upsdrvsvcctl.txt, docs/man/upsimage.cgi.txt, - docs/man/upslog.txt, docs/man/upsmon.conf.txt, docs/man/upsmon.txt, - docs/man/upsrw.txt, docs/man/upssched.conf.txt, - docs/man/upssched.txt, docs/man/upsset.cgi.txt, - docs/man/upsset.conf.txt, docs/man/upsstats.cgi.txt, - docs/man/upsstats.html.txt, docs/man/usbhid-ups.txt, - docs/man/victronups.txt, docs/nut-names.txt, docs/packager- - guide.txt: docs/man: be sure to keep a blank line after SYNOPSIS - and other titles [#1362] - * docs/FAQ.txt: docs/FAQ.txt: clarify about nutdrv_qx - * UPGRADING: UPGRADING: detail about "OBSOLETION WARNING" for - "Megatec Q*" - * docs/man/bestups.txt, docs/man/blazer-common.txt, - docs/man/masterguard.txt, drivers/bestups.c, drivers/blazer.c, - drivers/masterguard.c: Report deprecation messages when starting - older Qx drivers And document similarly in their man pages - (bestups, blazer, masterguard) - * docs/FAQ.txt, docs/nut.dict: docs/FAQ.txt: add more reasons and - symptoms that a running driver disappears - * docs/FAQ.txt, docs/nut.dict: docs/FAQ.txt: suggest checking Linux - USB HID Quirk [#630] - * ci_build.sh: ci_build.sh: use "gmake" for "./ci_build.sh - spellcheck" if available and no particular MAKE was requested - * docs/FAQ.txt, docs/nut.dict: docs/FAQ.txt: suggest how to pick - drivers for bogus vendor IDs - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: bump version for #1356 - and #1359 - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: bump version for - #584 - * drivers/mge-hid.c: drivers/mge-hid.c: bump version for #1357 - -2022-04-09 Stuart Henderson - - * drivers/usbhid-ups.c: reinstate handling for STATUS(ONLINE) in - usbhid-ups The recent onlinedischarge changes removed support for - some STATUS(ONLINE) cases, affecting at least CP1300EPFCLCD - this - brings them back. - -2022-04-08 Jim Klimov - - * NEWS: NEWS: note Liebert/Phoenixtec vs MGE HID handling of VendorID - 0x06da - * drivers/mge-hid.c: drivers/mge-hid.c: mge_claim(): test that - VendorID==PHOENIXTEC 0x06da has also Vendor or Product containing - "AEG" - * data/driver.list.in: data/driver.list.in: update for "PowerWalker - VFI 2000 TGS" via "usbhid-ups" [#564] - * docs/man/usbhid-ups.txt: docs/man/usbhid-ups.txt: update for "some - PowerWalker models" - -2022-04-08 Jim Klimov - - * NEWS: NEWS: tripplite_usb recognizes "3005" protocol for NUT v2.7.5 - -2022-04-08 Jim Klimov - - * NEWS, docs/nut.dict: NEWS: improve PowerWalker VFI 2000 TGS support - in NUT v2.7.5 - * drivers/liebert-hid.c, drivers/mge-hid.c: drivers/liebert-hid.c: - get PowerWalker VFI 2000 TGS working, read values correctly This - reverts commit c38b45a56a9d1283657d62a9fa1ed1af5daa1ba2 which added - such support into mge-hid.c (at risk to proper support of earlier - handled devices by various vendors), and transplants the new lines - into liebert-hid.c See issue #560 for a HID walk from the device - in question; data like that may help expand liebert-hid.c later - (its table seems to map a lot less field names than mge-hid.c, but - not sure if "true" Liebert/Phoenixtec HID devices support the - rest). - -2022-04-07 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: instcmd(): do not risk - NULL-dereference debugging about "using Path" with a NULL hidpath - (just in case) [#1346] - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: instcmd(): do not risk - NULL-dereference debugging about "using Path" too early [#1346] - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: instcmd(): wrap some - long lines - -2022-04-07 Jim Klimov - - * docs/nut.dict: docs/nut.dict: update spellchecker - * docs/nut.dict: docs/nut.dict: update spellchecker - -2022-04-05 Jim Klimov - - * docs/man/upsmon.conf.txt: docs/man/upsmon.conf.txt: fix markup - (pluses make emphasis and xmllint goes upset) - -2022-04-04 Jim Klimov - - * INSTALL.nut: INSTALL.nut: add another perspective on packages vs - source builds; refer to config-prereqs.txt - * INSTALL.nut: INSTALL.nut: trim trailing spaces - * README: README: trim trailing spaces - * README: README: clarify use of github - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - clarify pre-installation of python and perl - * docs/config-prereqs.txt: docs/config-prereqs.txt: clarify that non- - GNU makes should work well - -2022-04-02 Jim Klimov - - * scripts/python/app/NUT-Monitor: scripts/python/app/NUT-Monitor: fix - typo, thank CI - * UPGRADING: UPGRADING: detail the Py2/Py3 packages - * UPGRADING: UPGRADING: make note of systemd and Py2/3 changes on top - for packagers to see - * NEWS: NEWS: detail the split of NUT-Monitor and new wrapper script - * scripts/python/app/README: scripts/python/app/README: update with - sections; list Desktop menu integration and Kudos - * scripts/python/app/.gitignore, scripts/python/app/NUT-Monitor, - scripts/python/app/nut-monitor.desktop: Introduce new NUT-Monitor - name-holder as a wrapping script to pick usable implementation - * scripts/python/app/.gitignore: GitIgnore newly named variants of - NUT-Monitor-py2gtk2 and NUT-Monitor-py3qt5 - * scripts/python/app/README: scripts/python/app/README: document how - to get localized UI in dev/testing - * scripts/python/app/README: scripts/python/app/README: document how - to run UI app in-place - * m4/nut_check_python.m4: m4/nut_check_python.m4: extend list of some - python interpreter filenames - * configure.ac, scripts/python/Makefile.am, scripts/python/app/{NUT- - Monitor.in => NUT-Monitor-py2gtk2.in}, scripts/python/app/nut- - monitor-py2gtk2.desktop, scripts/python/app/nut-monitor.desktop, - scripts/python/app/{ => ui}/gui-1.3.glade, scripts/python/app/{ => - ui}/gui-1.3.glade.h: Rename NUT-Monitor UI app to NUT-Monitor- - py2gtk2 - * configure.ac, scripts/python/Makefile.am, scripts/python/app/{NUT- - Monitor.in => NUT-Monitor-py3qt5.in}, scripts/python/app/nut- - monitor-py3qt5.desktop, scripts/python/app/nut-monitor.desktop: - Rename modernized NUT-Monitor UI app to NUT-Monitor-py3qt5 - -2022-02-21 Luke Dashjr - - * scripts/python/Makefile.am, scripts/python/README, - scripts/python/app/NUT-Monitor.in, scripts/python/app/README, - scripts/python/app/gui-1.3.glade, - scripts/python/app/gui-1.3.glade.h, scripts/python/app/nut- - monitor.desktop, scripts/python/app/ui/aboutdialog1.ui, - scripts/python/app/ui/dialog1.ui, scripts/python/app/ui/dialog2.ui, - scripts/python/app/ui/window1.ui: NUT-Monitor: Port to - Python3+PyQt5 - -2022-02-13 Luke Dashjr - - * scripts/python/app/NUT-Monitor.in: NUT-Monitor: Run py2to3-3.10 - -2022-04-01 Jim Klimov - - * scripts/python/README: scripts/python/README: clarify that - `test_nutclient.py` requires an `upsd` running - * scripts/python/module/PyNUT.py.in: - scripts/python/module/PyNUT.py.in: fix typo (fallout of #840) - * docs/config-prereqs.txt: docs/config-prereqs.txt: fix typos in - OpenIndiana chapter - * NEWS, docs/net-protocol.txt, docs/nut.dict, server/netcmds.h: Add - "PROTVER" as alias to "NETVER" for NUT v2.8.0 Closes: #1347 - -2022-03-31 Jim Klimov - - * Makefile.am, docs/Makefile.am, docs/man/Makefile.am: - {.,docs,docs/man}/Makefile.am: add "all-man" target to build all - possible man pages (vs ones for enabled drivers), and weave this - and check targets to parent makefiles - * ci_build.sh: ci_build.sh: introduce shortcut for - BUILD_TYPE=fightwarn-all - * ci_build.sh: ci_build.sh: in BUILD_TYPE=default-all-errors report - visibly when no failures happened - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: treat - /usr/pkg/include as -isystem - * common/parseconf.c, common/str.c, drivers/apcsmart-old.c, - drivers/apcsmart.c, drivers/mge-utalk.c, drivers/serial.c, - drivers/snmp-ups.c, server/conf.c: Cast (size_t)(char) for - isprint(), isspace(), isdigit(), toupper(), etc. who may be macros - and use it as array subscript (due to sys/ctype_inline.h) - -2022-03-30 Jim Klimov - - * autogen.sh: autogen.sh: suggest to export PYTHON=python-x.y - * autogen.sh: autogen.sh: detect more python-x.y filenames - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - add chapter for NetBSD 9.2 builder setup - * docs/config-prereqs.txt: docs/config-prereqs.txt: drop bogus - command (copy-paste typo) - -2022-03-29 Jim Klimov - - * .github/pull_request_template.md: Update pull_request_template.md - -2022-03-28 Benjamin Berg - - * scripts/upower/95-upower-hid.hwdb, scripts/upower/95-upower- - hid.rules, tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: Use hwdb for - UPower rules - -2022-03-28 Jim Klimov - - * ci_build.sh: ci_build.sh: recognize more "*bsd" CI_OS_NAME values - * ci_build.sh: ci_build.sh: do not make noise about non-ubiquitous - options to "uname" program - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: set the onlinedischarge - variable based on flag presence - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: drop - DEFAULT_ONLINEDISCHARGE to match "VAR_FLAG" semantics - * docs/nut.dict: docs/nut.dict: add onlinedischarge - * NEWS: NEWS: clarify that NUT 2.8.0 is new name for old planned NUT - 2.7.5 - * NEWS: NEWS: added usbhid-ups onlinedischarge for NUT v2.7.5 - * docs/man/usbhid-ups.txt: docs/man/usbhid-ups.txt: document - onlinedischarge - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix var usage for - upsname - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix format string for - "onlinedischarge" help - -2022-03-26 Jim Klimov - - * ci_build.sh: ci_build.sh: default to clang if also available when - default gcc is too old - -2022-03-25 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: update openbsd - tools for man-page builds - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: avoid failure-prone - build toolkits for manpage tests - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: avoid - configure noise message - * m4/ax_check_compile_flag.m4: m4/ax_check_compile_flag.m4: extend to - check conftest.err log about unsupported flags - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: define - axisCombos_COMPILER_GCC_TOO_OLD near other compiler-related combos - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: fix scenarios with - "non-fatal warnings" that had BUILD_WARNFATAL=yes anyway (copy- - paste issue) - -2022-03-24 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: avoid even running - axisCombos_GCC_TOO_OLD where we require fatal warnings - * configure.ac: configure.ac: for very old GCC where we are not in - control of warnings, make them non-fatal always (for "auto" level) - * drivers/libhid.c: drivers/libhid.c: clang-3.4 does not know - "-Wtautological-type-limit-compare" either - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: make use of - dsbcStageTimeoutSettings - -2022-03-23 Jim Klimov - - * configure.ac: configure.ac: with nut_enable_warnings=auto, avoid - fatal warnings with GCC 4.3 or older (no support for diags pragmas) - * configure.ac: configure.ac: report initial nut_enable_warnings - (default or argument) - * configure.ac: configure.ac: pre-set nut_enable_warnings=auto by - default (not hardcoded "medium") - * ci_build.sh: ci_build.sh: set BUILD_WARNOPT and BUILD_WARNFATAL to - "auto" for BUILD_TYPE="fightwarn"* shortcuts (survive antique - compilers, default to medium/fatal normally) - * ci_build.sh: ci_build.sh: comment BUILD_WARNOPT setting for - BUILD_TYPE="fightwarn"* shortcuts - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: enable back - the "-isystem" tuning to not complain about packaged third-party - headers - * drivers/libhid.c: drivers/libhid.c: make use of - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE - (clang-6.0.0 of OpenBSD 6.4) - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - [HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE - * configure.ac: configure.ac: specify AC_PREREQ([2.64]) - * m4/nut_check_libgd.m4: m4/nut_check_libgd.m4: fix detection of - gdImagePng() with additional link requirements - * configure.ac: configure.ac: document practical requirement for - AC_PREREQ(2.64) - * NEWS, UPGRADING, docs/config-notes.txt, docs/man/upscmd.txt, - docs/man/upsrw.txt: docs, NEWS, UPGRADING: rename 2.7.5 to 2.8.0 in - text that appeared after 2.7.4 - * docs/net-protocol.txt: docs/net-protocol.txt: document "PRIMARY" as - alias to "MASTER" - * docs/net-protocol.txt: docs/net-protocol.txt: bump next release - from 2.7.5 to 2.8.0 - * configure.ac: configure.ac: bump NUT_NETVERSION to 1.3 to match - docs/net-protocol.txt - -2022-03-21 Jim Klimov - - * scripts/subdriver/gen-snmp-subdriver.sh: scripts/subdriver/gen- - snmp-subdriver.sh: fix back markup for mib2nut_info_t lines - Follow-up for #1327 Thanks to @aquette - -2022-03-19 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: qx_ups_walk(): log the - change of estimated remaining runtime - * NEWS: NEWS: nutdrv_qx: enhanced estimation of remaining battery - runtime for NUT v2.7.5 - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: comment about source and - data for estimated runtime corrections - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix trailing whitespace - * ci_build.sh: ci_build.sh: when parsing BUILD_TYPE=fightwarn, do not - default NUT_SSL_VARIANTS and NUT_USB_VARIANTS to "auto" - so - building just one variant at most, even if agent supports more - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: snr_command(): adapt to - usb_ctrl_charbuf - -2022-03-16 Jim Klimov - - * drivers/libhid.h, drivers/usbhid-ups.c: drivers/libhid.h, usbhid- - ups.c: define HID_DEV_HANDLE_CLOSED usable for both SHUT and USB - cases - -2022-03-15 Jim Klimov - - * drivers/libusb0.c, drivers/libusb1.c: drivers/libusb{0,1}.c: retry - getting Manufacturer/Product/Serial a few times if failed on the - first Kudos to Sam Varshavchik for proposing this code change in - discussion https://github.com/networkupstools/nut/issues/414 - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: try to close libusb - handle before reconnecting (from discussion of issue #414) - -2022-03-16 Jim Klimov - - * NEWS: NEWS: added driver adelsystem_cbi for NUT v2.7.5 - * drivers/adelsystem_cbi.h: drivers/adelsystem_cbi.h: functions - implemented in a header should be static - * drivers/adelsystem_cbi.c: drivers/adelsystem_cbi.c: extend pragmas - for covered/requred "default" case to work with clang-3.4 - -2022-03-15 Jim Klimov - - * ci_build.sh: ci_build.sh: if we only build USB variant(s), do not - shy away from testing some SSL and whatever drivers we can - -2022-03-15 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: currently refrain - from clang-13 in OI - * docs/config-prereqs.txt: docs/config-prereqs.txt: mark aspell as - recommended (it is not big) - * docs/config-prereqs.txt: docs/config-prereqs.txt: update - instructions for symlinks on OI - * docs/config-prereqs.txt: docs/config-prereqs.txt: fix typos in - instructions for OpenIndiana, and update for new toolkits available - in 2022 - -2022-03-12 Jim Klimov - - * ci_build.sh: ci_build.sh: add support for CI_CROSSBUILD_HOST and/or - CI_CROSSBUILD_TARGET settings [#1294, #1289, #1334] - * ci_build.sh: ci_build.sh: check for "gd" as one of names gdlib can - go by - * ci_build.sh: ci_build.sh: use PKG_CONFIG variable if provided (fall - back to pkg-config from PATH, but only for this script itself) - [#710] - * drivers/salicru-hid.c: Update salicru-hid.c Cosmetic fixes - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: improve - checks for actually present priv/auth protocols [#1289] Great - thanks to @eklinedi on GitHub for finding the issue and - investigating ways to fix it - * drivers/snmp-ups.h: drivers/snmp-ups.h: net-snmp after v5.9.1 does - not declare ONE_SEC that our code uses; stash the definiton - * configure.ac, m4/ax_c_pragmas.m4, m4/ax_run_or_link_ifelse.m4, - m4/nut_compiler_family.m4: Introduce m4/ax_run_or_link_ifelse.m4 to - facilitate cross-builds [#1289] - * ci_build.sh: ci_build.sh: report OS_* envvar values if passed by - caller - -2022-03-12 juantonio - - * drivers/salicru-hid.c: Add tested descriptors for Salicru Twin Pro - 2 - -2022-03-12 Jim Klimov - - * ci_build.sh: ci_build.sh: expand a bit CI_OS_HINT detection on - linux systems - -2022-03-11 Jim Klimov - - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: quiesce - -Wreserved-identifier (clang 13+) that acts up on system headers - * drivers/riello.c: drivers/riello.c: riello_parse_re(): assign - Pout#W and Pout#VA from pom_long not pom_word - * drivers/belkinunv.c: drivers/belkinunv.c: instcmd(): find use for - "r" to at least report failed cmds - -2022-03-11 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: rearrange - packages to not require heavy ones by default dependency footprint - (aspell, docs generation and libgd) - * server/netuser.c: server/netuser.c: copy-paste typo fix - * NEWS, UPGRADING: NEWS: rename pending NUT release from 2.7.5 to - 2.8.0 (config files using new keywords are not backwards- - compatible, not usable by old binaries) - * NEWS: NEWS: added battery.mfr.date APC HID UPS setting for NUT - v2.7.5 - * NEWS, docs/nut.dict: NEWS: added socomec_jbus driver for NUT v2.7.5 - * server/netuser.c: server/netuser.c: net_master(): provide more - details about client using deprecated commands - * docs/net-protocol.txt: docs/net-protocol.txt: update for "PRIMARY" - netcmd support (alias of "MASTER") [issue #840] - * NEWS: NEWS: update for "PRIMARY" netcmd support (alias of "MASTER") - [issue #840] - * scripts/python/module/PyNUT.py.in, server/netcmds.h, - server/netuser.c, server/netuser.h: netcmds.h, netuser.{c,h}, - PyNUT.py.in: deprecate protocol "MASTER" command in favor of - "PRIMARY" [issue #840] - * server/upsd.c: server/upsd.c: check_command(): instrument with - upsdebugx() - * server/netuser.c: server/netuser.c: net_login(): instrument with - upsdebugx() - * clients/upsmon.c: clients/upsmon.c: apply_for_primary(): request - elevation by PRIMARY, fall back to MASTER (for older upsd builds) - * NEWS, UPGRADING: NEWS: rename pending NUT release from 2.7.5 to - 2.8.0 (config files using new keywords are not backwards- - compatible, not usable by old binaries) - -2022-03-10 Jim Klimov - - * scripts/subdriver/gen-snmp-subdriver.sh: gen-snmp-subdriver.sh: put - back indented CFILE markup (fix here-docs, instead of - unmaintainable printf) - * scripts/subdriver/gen-snmp-subdriver.sh: gen-snmp-subdriver.sh: fix - valid chars HOSTNAME input (e.g. IP) - -2022-03-10 Jim Klimov - - * scripts/subdriver/gen-snmp-subdriver.sh: Update gen-snmp- - subdriver.sh Quote variable expansions; replace `echo -n` with a - more portable `printf` - -2022-03-10 Arnaud Quette - - * scripts/subdriver/gen-snmp-subdriver.sh: SNMP subdriver generation - script: minor reformatting - * scripts/subdriver/gen-snmp-subdriver.sh: SNMP subdriver generation - script: fixes and improvements - -2022-03-08 Jim Klimov - - * tests/getvaluetest.c: tests/getvaluetest.c: check different methods - to combine two "wire" bytes into a lenght word (follows up for - #1320), hopefully all work the same on all architectures - -2022-03-08 Thanos Chatziathanassiou - - * docs/man/socomec_jbus.txt: some documentatyion fixes - -2022-03-08 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: simplify back the bit- - maths to cast into uint8_t following discussion in #1320 - * drivers/libusb0.c, drivers/libusb1.c: drivers/libusb{0,1}.c: - simplify back the bit-maths to cast into uint8_t following - discussion in #1320 - -2022-03-07 Jim Klimov - - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: fix (commented- - away) hard_shutdown() to "unsigned char" and bit maths similar to - soft_shutdown() - * drivers/riello_usb.c: drivers/riello_usb.c: Get_USB_Packet(): cast - bit maths to (unsigned char) to err on safe side - * drivers/riello_usb.c: drivers/riello_usb.c: whitespace fix - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: upsdrv_initups(): cast - langid calculations to uint16_t (or wider) [similar to #1320] - * drivers/libusb0.c, drivers/libusb1.c: drivers/libusb{1,0}.c: - {nut_}libusb_open(): cast rdlen calculations to uint16_t (or wider) - [follow-up from #1320] - * drivers/libshut.c: drivers/libshut.c: shut_checksum(): address - (usb_ctrl_charbuf)buf as (unsigned char) in bit maths - * drivers/libshut.c: drivers/libshut.c: BYTESWAP(): cast "in" to - (uint16_t) for bit maths and use a full-width mask - * drivers/blazer_usb.c: drivers/blazer_usb.c: upsdrv_initups(): - address (usb_ctrl_charbuf)tbuf as (unsigned char) in bit maths - -2022-03-02 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: make sure - WITH_SNMP_LKP_FUN_DUMMY is defined - -2022-02-27 Nita Vesa - - * drivers/apc-hid.c, drivers/usbhid-ups.c: APC HID UPS: Add ability - to set battery battery.mfr.date Some APC UPSes allow for setting - battery.mfr.date, so it can be easily referenced later, even if - there were no stickers or papers left to refer to. This patch has - been tested to work with APC Back-UPS ES 550G. - -2022-03-02 Jim Klimov - - * drivers/mge-xml.c: drivers/mge-xml.c: mge_drycontact_info(): avoid - shadowing global variable - -2022-02-28 Nick Briggs - - * drivers/libusb0.c: Cast to unsigned type when interpreting HID - descriptor length bytes (libusb 0.1) The libusb 0.1 interface - definition declares a (signed) char type for control messages. The - HID descriptor length contained within a control message is - intended to be interpreted as a pair of unsigned bytes so we must - cast to uint8_t when doing the arithmetic rather than trip over the - sign bit. Closes #1261, closes #1312. - -2022-02-27 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: extend daisychain - initialization to use optional mapping function Note: ported sub- - set of "snmp-ups.[ch] : add support for extended fun/nuf l2s/s2l - conversions and use it for daisychain initialization" without the - actual 2x2 "fun/nuf l2s/s2l" support here. - -2022-02-27 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: daisychain_init(): add - debug trace - * drivers/eaton-pdu-marlin-helpers.c: drivers/eaton-pdu-marlin- - helpers.c: marlin_device_count_fun(): add debug trace - -2021-11-17 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_find_strval(): mark - NUT_UNUSED_VARIABLE(oid2info) when not WITH_SNMP_LKP_FUN - -2022-02-27 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: whitespace fix - -2017-10-11 Jim Klimov - - * drivers/snmp-ups.c: snmp-ups.c : publish device.count==1 too - -2021-10-13 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_find_strval() should - consider #if WITH_SNMP_LKP_FUN - -2019-09-25 Arnaud Quette - - * drivers/snmp-ups.c: Fix false positive when communication is lost - -2022-02-27 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - resync comments and use of SU_FLAG_SEMI_STATIC - -2022-02-25 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - break long lines - -2022-02-27 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: avoid stringop-truncation - warning: make sure string is finite - -2021-11-11 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: avoid stringop-truncation - warning - -2021-11-17 Jim Klimov - - * drivers/eaton-pdu-marlin-helpers.c: drivers/eaton-pdu-marlin- - helpers.c: include config.h first - -2021-11-25 Arnaud Quette - - * drivers/powerware-mib.c: Eaton SNMP: also publish ups.load for - 3phase Though there is output.Lx.power.percent, for 3phase, it's - desirable to also have the standard ups.load - -2022-01-12 Arnaud Quette - - * drivers/mge-xml.c: Eaton NMC: fix the non publication of real/power - with 3ph power and realpower for 3ph Lx were not publishing values - when they were 0 - -2021-11-22 Arnaud Quette - - * drivers/mge-xml.c: Eaton XML/PDC: add External Battery Module count - -2021-11-15 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c: Fix - regression on Eaton EMP002 temperature reading (SNMP) Following - the recent addition of the "String reformating function" - (su_find_strval()), a regression appeared on a corner case: when - flagging a data with ST_FLAG_STRING, while the SNMP OID is an int, - and when there is a fun_vp2s() conversion function, a double - conversion is applied, resulting in no value published. This was - limited to one data (temperature.unit) - -2021-06-14 Clappier, Eric - - * drivers/powerware-mib.c, drivers/snmp-ups.c: Add missing outlet - objects for master - -2021-02-01 Clappier, Eric - - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c: Fix dry - contacts status for EMP02 - -2022-02-27 Jim Klimov - - * drivers/snmp-ups-helpers.c, drivers/snmp-ups.c: Move - su_temperature_read_fun() from drivers/snmp-ups.c to snmp-ups- - helpers.c - -2021-01-26 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: fix regression on Eaton - ePDU Fix a regression that caused a mis-determination of the SNMP - base OID index (0 or 1, should be 1). This in turn caused a mis- - iteration over the outlets, from 0 to N-1 instead of 1 to N, which - resulted in the missing Nth outlet (last outlet of the PDU). This - also caused some data refresh issues - -2020-12-16 Clappier, Eric - - * drivers/eaton-pdu-marlin-mib.c, drivers/snmp-ups.c: Add - ambient.n.parent.serial for marlin epdu Regarding dropped code - from snmp-ups.c - per discussion in - https://github.com/42ity/nut/pull/117 this was not a typo: > It is - an intentional change for oid read value issue. > This allows to - actually retrieve an indirection value > (when an Oid points at an - Oid, like stood) - -2020-12-15 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: Restore legacy Eaton ePDU - switchability info Use a hack to also have switchability for both - the unit and its outlets on legacy Eaton G2 ePDU - -2020-12-15 Clappier, Eric - - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c: Change uid - and modbus address name according nut nomenclature - -2020-12-14 Clappier, Eric - - * drivers/powerware-mib.c: Add modbus_address and uuid in snmp-ups/pw - driver - -2019-11-07 Arnaud Quette - - * drivers/powerware-mib.c: SNMP Eaton Gb Network Card: various data - completion * fix reading of input.voltage, related to the ending - ".0", * fix existing commands handling, * add support for the load - segment (managed outlets), including status information and - commands - -2019-09-19 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c: SNMP Eaton - EMP002: handle sensor presence Sensor may not be present (or - connected). However, the values (temperature, humidity, ...) are - still available, but should not be considered - -2022-02-27 Jim Klimov - - * drivers/powerware-mib.c: drivers/powerware-mib.c: update comments - and implem for dummy - eaton_sensor_temperature_unit_fun()/su_temperature_read_fun() from - 42ity/nut - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - update comments and implem for dummy - eaton_sensor_temperature_unit_fun()/su_temperature_read_fun() from - 42ity/nut - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c, - drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups.{c,h}: - adjust su_temperature_read_fun() API to that used in NUT master - branch - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h: drivers/eaton-pdu-marlin-helpers.{c,h}: adjust - eaton_sensor_temperature_unit_fun() API to that used in NUT master - branch - -2019-09-19 Arnaud Quette - - * drivers/eaton-pdu-marlin-helpers.c: SNMP Eaton ePDU: always return - celsius for temperature since the value reading is always adapted - to celsius - -2016-05-25 Jim Klimov - - * drivers/powerware-mib.c: powerware-mib - renamed "ietf_*" and - "eaton_*" lookups to have "pw_*" prefix - -2019-09-12 Arnaud Quette - - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin-mib.c, - drivers/powerware-mib.c, drivers/snmp-ups.c, drivers/snmp-ups.h: - Typo fix: sorry Mr Fahrenheit And thanks to Jim Klimov for the - review! - * drivers/eaton-pdu-marlin-mib.c: Fix compilation warning - -2019-09-09 Arnaud Quette - - * drivers/powerware-mib.c: SNMP Eaton Gb Network Card: support for - EMPDT1H1C2 - -2022-02-27 Jim Klimov - - * drivers/eaton-pdu-marlin-helpers.c: drivers/eaton-pdu-marlin- - helpers.c: fix whitespace - -2017-10-11 Jim Klimov - - * drivers/eaton-pdu-marlin-helpers.c: eaton-pdu-marlin-helpers.c : in - device_count helper do not assume a trailing comma (as last char) - as an extra device - -2019-09-09 Arnaud Quette - - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h, drivers/eaton-pdu-marlin-mib.c: SNMP Eaton ePDU: support - for EMPDT1H1C2 - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: support for - daisychained ambient sensor - -2022-02-27 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - align comments around outlet.%i.name with FTY version - -2017-10-11 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : preferred - templated outlet.%i.name goes last in MIB - -2018-08-07 Jim Klimov - - * drivers/powerware-mib.c: powerware-mib.c : fix fallout from "snmp- - ups: support newer Genepi management cards" (unused variable - warning) - -2018-08-07 Arnaud Quette - - * drivers/powerware-mib.c: snmp-ups: support newer Genepi management - cards * duplicate some OIDs, with refinement to point at the first - index (i.e ".0" or ".1.0") since otherwise the agent doesn't - respond to queries. This could be fixed at the snmp-ups level later - * fixed "ups.type" (power topology of the UPS) which was pointing - at the output.source or ups.mode - -2022-02-27 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - align with "snmp-ups: Simplify the mapping structure" changes for - input.phases=>input.count - -2017-11-17 Arnaud Quette - - * drivers/eaton-ats16-nmc-mib.c, drivers/eaton-pdu-marlin-mib.c, - drivers/mge-mib.c, drivers/mge-xml.c, drivers/powerware-mib.c: - Modify "open" to "opened" for dry contacts status While "open" is - the best adjective for the opposite of "closed", and thus suitable - for GPI status, this may lead to confusion with the GPO actions - "open|close" Vs the GPI status "opened|closed". These last are also - not inapropriate, since they can refer to the fact that the GPI - state has change due to some external action or event - -2017-11-03 Arnaud Quette - - * drivers/eaton-ats16-nm2-mib.c, drivers/eaton-ats16-nmc-mib.c, - drivers/mge-mib.c, drivers/mge-xml.c, drivers/powerware-mib.c: Add - support for dry contacts to Eaton ATS16 and UPS Add support for - the 2 GPI accessible through EMP001 environmental sensor, connected - to a UPS or ATS16. The same is already available for Eaton ePDU. - This affect the snmp-ups driver (eaton_ats16 and pw/pxgx_ups MIBs), - and the netxml-ups driver - -2022-02-25 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: avoid "#if" with possibly - not-defined macro - -2018-08-02 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: Eaton feed color is semi - static - -2018-06-26 Arnaud Quette - - * docs/nut-names.txt, drivers/eaton-pdu-marlin-mib.c: snmp-ups: Eaton - ePDU input.power.nominal is realpower Fix data name, since the - published value is in Watts, so realpower, not power - -2017-10-30 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c/dmf: add - outlet timers Add support for shutdown and start timers - -2022-02-25 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - relocate outlet.%i.load.off.delay etc like in FTY - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - break long lines like in FTY - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - break long lines - -2017-10-17 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: fix Eaton ePDU group - phase handling Remove the not needed SU_FLAG_UNIQUE and the - erroneous value lookup structure index - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h, drivers/eaton-pdu-marlin-mib.c: snmp-ups: simplify Eaton - ePDU group phase handling - -2017-10-11 Jim Klimov - - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h: eaton-pdu-marlin-* : add support for extended fun/nuf - l2s/s2l conversions - -2017-10-13 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : updated - comments about input/feed relationship, and daisychain implications - -2017-10-13 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: Problem: Need to fix published feed - variables Solution: Attach 1 feed to the current input - -2017-10-13 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : fix OID - and raise questions on input.power.nominal - -2017-10-11 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : Revised - added OIDs with a single-group ePDU Also update line-breaks for - readability and 80-col standard - -2017-10-09 Jim Klimov - - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h, drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c / - drivers/eaton-pdu-marlin-helpers.[ch] : Implement conversion func - for "device.count" which returns a comma-separated list - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h, drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c / - drivers/eaton-pdu-marlin-helpers.[ch] : Implement conversion func - for "outlet.group.%i.phase" - * docs/nut-names.txt, drivers/eaton-pdu-marlin-mib.c: eaton-pdu- - marlin-mib.c : add basic listing of newly defined OIDs (not a full - solution - some mapping functions are needed and revision of MIB - data types) - -2017-08-30 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: Fix typo in OID, noticed by aquette - -2017-08-24 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c, drivers/snmp-ups.c, drivers/snmp- - ups.h: snmp-ups / eaton-marlin : introduce WITH_SNMP_LKP_FUN to - separate codebases that support these callbacks from those that - currently do not - * drivers/eaton-pdu-marlin-helpers.c, drivers/eaton-pdu-marlin- - helpers.h: eaton-pdu-marlin-helpers.c/h fix - * drivers/eaton-pdu-marlin-helpers.c: eaton-pdu-marlin-helpers.c : - update comments for marlin_outlet_group_phase_fun() - -2017-08-23 Jim Klimov - - * drivers/Makefile.am, drivers/eaton-pdu-marlin-helpers.c, - drivers/eaton-pdu-marlin-helpers.h: Expel the helper function that - interacts with dstate from eaton-pdu-marlin-mib.c to eaton-pdu- - marlin-helpers.c/.h - -2016-05-13 Jim Klimov - - * drivers/Makefile.am, drivers/apc-iem-mib.h, drivers/apc-mib.c, - drivers/apc-mib.h: drivers/apc-iem-mib.h: split some macro - definitions away from apc-mib.h and apc-mib.c and snmp-ups.c - -2017-10-11 Jim Klimov - - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups.[ch] : introduce - SU_FLAG_SEMI_STATIC - -2022-02-24 Jim Klimov - - * docs/nut.dict: Update nut.dict Update for Adelsystem CBI - -2022-02-24 Jim Klimov - - * NEWS: NEWS: Update synchronous=auto for NUT v2.7.5 - * drivers/dstate.c: drivers/dstate.c: send_to_all(): port - do_synchronous auto=>on fallback from send_to_one() - * drivers/dstate.c: drivers/dstate.c: send_to_one()/send_to_all(): - make the success-report less verbose (level 6) - * drivers/dstate.c: drivers/dstate.c: send_to_one()/send_to_all(): - make the reconnection WARNING more visible - * conf/ups.conf.sample, docs/man/ups.conf.txt, drivers/dstate.c, - drivers/main.c: driver/dstate.c, main.c: extend do_synchronous to - have an "auto" mode (now by default) so reconnections would be sync - * drivers/dstate.c: drivers/dstate.c: send_to_one(): log at level 0 - if write failed (twice maybe) and so driver is disconnecting - * drivers/dstate.c: drivers/dstate.c: send_to_one(): log more details - if throttling down, and if it helped - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): log - "walking device %d" at level 1 now, and without a dot-number (to - avoid confusion) - * drivers/dstate.c: drivers/dstate.c: send_to_one(): try to sleep and - resend failed posting; log the faults (and successes) at level 1 - -2022-02-23 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: send_to_all() send_to_one(): - clarify "disconnecting" when logging that write failed - * drivers/snmp-ups.c: drivers/snmp-ups.c: update comment for - snmp_ups_walk() for "single" device - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): for - "unitary" (non-daisychain member) devices, walk a ".1" device only - (should end up querying non-templated OIDs anyway) - avoid walking - .0 partially and .1 again for same data - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): log - walking an "unitary" device if not a daisy-chain, for balance - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): only log - "Skipping daisychain device.0" when in daisy-chain context (skip - anyway even for singular devices where we should also walk .1 - anyway) - * drivers/snmp-ups.c: drivers/snmp-ups.c: update heading comments for - daisychain related variables - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): only skip - "device.0" if in daisy-chain mode - * drivers/snmp-ups.c: drivers/snmp-ups.c: update comment for - current_device_number - -2022-02-22 Thanos Chatziathanassiou - - * docs/man/socomec_jbus.txt, drivers/Makefile.am, - drivers/socomec_jbus.c: Added socomec_jbus implementation - -2022-02-22 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): fix - taxonomy of "processing daisy-chain device" debug log - -2022-02-19 Jim Klimov - - * drivers/snmp-ups.c, server/upsd.c: drivers/snmp-ups.c - upsdrv_updateinfo(); server/upsd.c driver_free() mainloop(): trace - connection faults and reconnections better - * drivers/dstate.c: drivers/dstate.c: send_to_one(): consistently use - "buflen" - * drivers/dstate.c: drivers/dstate.c: send_to_all/send_to_one: extend - failed-send tracing - -2022-02-19 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: wrap long lines, add - comments - -2022-02-22 Jim Klimov - - * scripts/subdriver/gen-snmp-subdriver.sh: scripts/subdriver/gen- - snmp-subdriver.sh: generate "standard MIB items" into new MIB - mappings Kudos to @aquette for the catch in PR review - -2022-02-21 Luke Dashjr - - * scripts/python/Makefile.am, scripts/python/README, - scripts/python/app/NUT-Monitor.in, scripts/python/app/README, - scripts/python/app/gui-1.3.glade, - scripts/python/app/gui-1.3.glade.h, scripts/python/app/nut- - monitor.desktop, scripts/python/app/ui/aboutdialog1.ui, - scripts/python/app/ui/dialog1.ui, scripts/python/app/ui/dialog2.ui, - scripts/python/app/ui/window1.ui: NUT-Monitor: Port to - Python3+PyQt5 - -2022-02-19 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setOID(): uncomment the - fallback for "device.x.contact" not found as a "contact", and add - another to strip "device.1." => "device." to allow setting non- - templated values to daisy-chain master - * drivers/snmp-ups.c, server/upsd.c: drivers/snmp-ups.c - upsdrv_updateinfo(); server/upsd.c driver_free() mainloop(): trace - connection faults and reconnections better - * drivers/dstate.c: drivers/dstate.c: send_to_one(): consistently use - "buflen" - * drivers/dstate.c: drivers/dstate.c: send_to_all/send_to_one: extend - failed-send tracing - -2022-02-19 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: upsdrv_initups(): check - that there is no daisychain master entry before defining IETF-MIB - fallback defaults for contact/location/description - * drivers/snmp-ups.c: drivers/snmp-ups.c: upsdrv_initups(): comment - and log that IETF-MIB fallback defaults for - contact/location/description are only read once (not updated while - driver runs) - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_ups_get(): fake - current_device_number=1 to su_setinfo() when walking a daisy-chain - with non-templated OID - * drivers/snmp-ups.c: drivers/snmp-ups.c: get_and_process_data(), - su_ups_get(): add tracing logs to make sense of daisy-chain OID - adaptations - * drivers/snmp-ups.c: drivers/snmp-ups.c: wrap long lines, add - comments - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setinfo(): trace diags - for different code-paths about daisy-chained OID decisions - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setinfo(): this is not - the place to check for ".%i" after all - -2022-02-18 Jim Klimov - - * tools/nut-dumpdiff.sh: tools/nut-dumpdiff.sh: revise to also strip - frequency measurements - * tools/nut-dumpdiff.sh: tools/nut-dumpdiff.sh: revise to also strip - (load|temperature|humidity) measurements - * docs/documentation.txt: docs/documentation.txt: document tools/nut- - dumpdiff.sh helper - * tools/nut-dumpdiff.sh: tools/nut-dumpdiff.sh: revise to strip just - numeric measurements of (*.power|voltage|current) - * tools/nut-dumpdiff.sh: tools/nut-dumpdiff.sh: extend to not strip - ALL numeric values but ones that are likely measurements - * tools/Makefile.am, tools/nut-dumpdiff.sh: Add tools/nut-dumpdiff.sh - helper - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setOID(): handle e.g. - "device.contact" as either "device.0.contact" for "all devices" if - OID is templated or NULL, or "device.1.contact" for "master device" - in other cases - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setOID(): import - (commented away - not deemed necessary so far) fallback for e.g. - "device.x.contact" is not found as a "contact" - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setinfo(): fix comment - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix "device.varname" for - daisychain 'master' units * su_setinfo(): should not expose - master-specific data (like device.contact coming from IETF un- - templated data points not aware about daisy chains) as if it were - the data specific to every device in the chain; note that for - defaulted data (like device.type="pdu" hardcoded with NULL OID) we - still expose it across the board * su_setOID(): "upsrw ... - device.contact" should change the daisychain master device (for - IETF un-templated data; but in this commit - always) - -2022-02-17 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_setOID(): fix mis- - interpretation of "device*" as always a daisy-chain - * drivers/snmp-ups.c: drivers/snmp-ups.c: use "hard-coded" IETF MIB - for read-only access to sysDescr also (only if mib2nut does not yet - define a better value) - * drivers/snmp-ups.c: drivers/snmp-ups.c: use "hard-coded" IETF MIB - for read-only access to sysContact and sysLocation only if mib2nut - does not yet define a better value - * drivers/emerson-avocent-pdu-mib.c: drivers/emerson-avocent-pdu- - mib.c: whitespace fix - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - whitespace fix - * drivers/apc-mib.c: drivers/apc-mib: whitespace fix - * drivers/xppc-mib.c: drivers/xppc-mib.c: whitespace fix - * drivers/apc-ats-mib.c, drivers/apc-mib.c, drivers/baytech-mib.c, - drivers/bestpower-mib.c, drivers/compaq-mib.c, drivers/cyberpower- - mib.c, drivers/delta_ups-mib.c, drivers/eaton-ats16-nm2-mib.c, - drivers/eaton-ats16-nmc-mib.c, drivers/eaton-pdu-genesis2-mib.c, - drivers/eaton-pdu-marlin-mib.c, drivers/eaton-pdu-pulizzi-mib.c, - drivers/eaton-pdu-revelation-mib.c, drivers/emerson-avocent-pdu- - mib.c, drivers/hpe-pdu-mib.c, drivers/huawei-mib.c, drivers/ietf- - mib.c, drivers/mge-mib.c, drivers/netvision-mib.c, - drivers/powerware-mib.c, drivers/raritan-pdu-mib.c, - drivers/raritan-px2-mib.c, drivers/xppc-mib.c: drivers/*-mib.c: - define standard-MIB entries for device.description, contact, - location (RW STRING) - -2016-09-16 Arnaud Quette - - * drivers/snmp-ups.h: snmp-ups: update todo list The addition of - sysContact and sysLocation support is now addressed centrally - * drivers/snmp-ups.c: snmp-ups: add sysContact and sysLocation - support The generic MIB-2 provides system contact and location - information that are now publish respectively as device.contact and - device.location - -2022-02-18 Viktor Kuzmin - - * configure.ac: Fix individual drivers configuration - -2022-02-17 Dimitris Economou - - * drivers/adelsystem_cbi.c: handle covered-switch-default and switch- - enum warnings - * drivers/adelsystem_cbi.h: clean up, fix typos - * drivers/adelsystem_cbi.c: clean up, fix typos - * docs/man/Makefile.am, docs/man/adelsystem_cbi.txt: man page added - -2022-02-17 Jim Klimov - - * clients/upscmd.c, clients/upsrw.c: clients/upsrw.c, upscmd.c: fix - sanity-check of tracking_id length (forgot the nul-byte) - * scripts/systemd/nut-driver@.service.in: scripts/systemd/nut- - driver@.service.in: make sure drivers always try to start and - connect - how ever many attempts that takes - * scripts/systemd/nut-driver@.service.in: scripts/systemd/nut- - driver@.service.in: comment about "Before=nut-driver.target" - constraint - * scripts/systemd/nut-driver@.service.in: scripts/systemd/nut- - driver@.service.in: make sure drivers always try to start and - connect - -2022-02-16 Jim Klimov - - * drivers/libhid.c: drivers/libhid.c: string_to_path(): report - hid_lookup_usage() miss - * drivers/libhid.c: drivers/libhid.c: fix misfire of fightwarn commit - 58e5b49 (string_to_path(): range-check...) Closes: #1286 - * conf/upsd.conf.sample, conf/upsmon.conf.sample.in, - docs/man/upsd.conf.txt, docs/man/upsmon.conf.txt: upsd and upsmon - configuration sample files and man pages: add note about run-time - config reload with DEBUG_MIN setting in sight - -2022-02-16 Jim Klimov - - * clients/upsmon.c: clients/upsmon.c: restructure config reload for - debug_min to be more similar to that in upsd.c - * clients/upsmon.c: clients/upsmon.c: whitespace fix - -2022-02-16 Jim Klimov - - * clients/upsmon.c: clients/upsmon.c: allow upsmon to reload config - and apply its debug_min setting - * common/common.c: common/common.c: writepid(): debug-trace creation - of a PID file - -2022-02-16 Jim Klimov - - * scripts/systemd/nut-server.service.in: scripts/systemd/nut- - server.service.in: reload upsd without PID file [for #1299] - * server/conf.c: server/conf.c: allow upsd to reload config and apply - its debug_min setting - * clients/upsmon.c, docs/man/upsmon.txt: clients/upsmon.c: add "-P - pid" arg handling, and report result of sendsignal(), like in upsd - [for #1299, #123] - * docs/man/upsd.txt, scripts/systemd/nut-server.service.in, - server/upsd.c: upsd.c: add -FF option to stay foregrounded AND - write the PID file, use it in systemd/nut-server.service [for - #1299] - * docs/man/upsd.txt, server/upsd.c: server/upsd.c: add "-P PID" arg - for commands [for #1299] - * common/common.c, include/common.h: include/common.h, common.c: - refactor sendsignalfn() into parsepid() and sendsignalpid() - reusable methods - * server/upsd.c: server/upsd.c: warn about not saving a pid file - * server/upsd.c: server/upsd.c: handle extended return values from - sendsignalfn() to tell more about the error - * common/common.c: common/common.c: sendsignalfn(): if we use sig==0 - to probe that a process runs, no need to send that twice - * common/common.c, include/common.h: include/common.h, common.c: - extend sendsignalfn() return value for more error types - -2022-02-15 Jim Klimov - - * drivers/main.c: drivers/main.c: fix user:group separator in debug - message - * configure.ac: configure.ac: report default/detected - RUN_AS_USER/RUN_AS_GROUP values in help; check if "nobody" group is - not resolvable when "nogroup" us to use it as default RUN_AS_GROUP - instead - * drivers/main.c: drivers/main.c: report whether we succeeded or - failed chown/chmod for sockname - * docs/man/nutupsdrv.txt, docs/man/ups.conf.txt, drivers/main.c: - drivers/main.c: support setting group name for socket file - (ups.conf, CLI -g arg) Closes: #1296 - * drivers/dstate.c, drivers/dstate.h, drivers/main.c: drivers/main.c - + dstate.{c,h}: refactor dstate_init() to return a copy of the - "sockname" path used - * drivers/main.c: drivers/main.c: re-word debug message for "-u name" - overriding built-in or configured values - * drivers/main.c: drivers/main.c: trace do_global_args() and - main_arg() var/val stream - * docs/hid-subdrivers.txt: docs/hid-subdrivers.txt: describe tech for - "Fixing report descriptors" - * docs/hid-subdrivers.txt, docs/nut.dict, drivers/hidtypes.h: - docs/hid-subdrivers.txt: document where USAGE_POW_ and USAGE_BAT_ - macros come from - * drivers/apc-hid.c: drivers/apc-hid.c: apc_fix_report_desc(): - normalize indentations - -2022-02-14 Nick Briggs - - * drivers/apc-hid.c: Update APC HID driver version - * drivers/apc-hid.c: Only indicate report descriptor fixed if it was - actually changed. - -2022-02-14 Jim Klimov - - * docs/man/ups.conf.txt, drivers/main.c: drivers/main.c: allow to - specify a user for each driver via ups.conf Closes: #1288 - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: suggest "-d" when warning - about passing debugging through to actual drivers - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: only warn about passing - debugging through to actual drivers if (nut_debug_level_passthrough - == 0) - * docs/man/upsdrvctl.txt, drivers/upsdrvctl.c: drivers/upsdrvctl: add - "-d" option to pass debug level to drivers Closes: #1036 (Note: - that issue discusses other possible improvements around this - subject, which are synergetic with this one) - -2022-02-13 Luke Dashjr - - * scripts/python/app/NUT-Monitor.in: NUT-Monitor: Run py2to3-3.10 - -2022-02-13 Nick Briggs - - * drivers/apc-hid.c, drivers/cps-hid.c, drivers/hidparser.c, - drivers/hidparser.h, drivers/hidtypes.h: Fix incorrect limits for - input and config voltages in APC report descriptor The Back-UPS XS - 1400U has been observed to report input/config voltage limits that - are appropriate for the North American 120V region even though the - unit is operating in the European or other 220+V region. This - change diagnoses the the problem by checking if the logical maximum - values for UPS.Input.Voltage and UPS.Input.ConfigVoltage are - consistent with the UPS.Input.HighVoltageTransfer and if not, - increases them. A similar problem was reported for CPS units in - the EU region. - introduces #defines for all standard usages in - power system and battery device pages. - moves cps-hid.c - FindReport() to hidparser.c as FindObject_with_ID_Node(). - updates - cps-hid.c to account for new defines/function name - adds - apc_fix_report_desc() to implement change for APC UPS units - -2022-02-11 Jim Klimov - - * NEWS: NEWS: added usbhid-ups "ever-hid" subdriver for NUT v2.7.5 - * docs/man/upsd.conf.txt: docs/man/upsd.conf.txt: document - DISABLE_WEAK_SSL - * NEWS, docs/nut.dict: NEWS: announce "debug_min" options for daemons - in NUT v2.7.5 - * NEWS: NEWS: announce fore-/back-grounding options for daemons in - NUT v2.7.5 - * docs/man/upsd.conf.txt: docs/man/upsd.conf.txt: document optional - "DEBUG_MIN" setting - * conf/upsd.conf.sample: conf/upsd.conf.sample: document optional - "DEBUG_MIN" setting - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: document - optional "DEBUG_MIN" setting - * conf/ups.conf.sample: conf/ups.conf.sample: document optional - "debug_min" setting - * docs/man/upsmon.conf.txt: docs/man/upsmon.conf.txt: document - optional "DEBUG_MIN" setting - * docs/man/ups.conf.txt: docs/man/ups.conf.txt: document optional - "debug_min" setting - * server/conf.c, server/conf.h, server/upsd.c: server/upsd.c, conf.c: - support "debug_min" from upsd.conf - * clients/upsmon.c: clients/upsmon.c: support "debug_min" from - upsmon.conf - * drivers/main.c: drivers/main.c: comment typo fixes - * docs/man/upslog.txt: docs/man/upslog.txt: fix typo "upsmon" => - "upslog" - * clients/upslog.c: clients/upslog.c: align -F/-B options with - drivers/main.c - * scripts/systemd/nut-monitor.service.in: scripts/systemd/nut- - monitor.service.in: with daemon not backgrounding, "Type=forking" - no longer applies - * docs/man/upsd.txt: docs/man/upsd.txt: document -F/-B for fore/back- - ground enforcement, and that -D only defaults to foregrounding now - (can be overridden) - * server/upsd.c: server/upsd.c: align -F/-B options with - drivers/main.c - * docs/man/upsmon.txt: docs/man/upsmon.txt: document -F/-B for - fore/back-ground enforcement, and that -D only defaults to - foregrounding now (can be overridden) - * clients/upsmon.c: clients/upsmon.c: align -F/-B options with - drivers/main.c - * docs/man/nutupsdrv.txt: docs/man/nutupsdrv.txt: document -F/-B for - fore/back-ground enforcement, and that -D/-d only default to - foregrounding now (can be overridden) - * drivers/main.c: drivers/main.c: update comments - -2019-03-19 Jim Klimov - - * drivers/main.c: drivers/main.c : rearrange handling of configured - nut_debug_level_global vs nut_debug_level_driver vs ultimately used - nut_debug_level - * drivers/main.c: driver/main.c : separate toggles for driver - debugging and backgrounding - -2019-03-18 Jim Klimov - - * drivers/main.c: drivers/main.c : allow to configure debug_min=NUM - to ease service debugging - -2022-02-11 Dimitris Economou - - * drivers/adelsystem_cbi.c, drivers/adelsystem_cbi.h: coding style - changes - -2022-02-10 Jim Klimov - - * .github/pull_request_template.md: .github/pull_request_template.md: - remind to update recipes for new man pages - -2022-02-11 Dimitris Economou - - * drivers/adelsystem_cbi.c: fix parameter hiding global variable - -2022-02-10 Jim Klimov - - * configure.ac: configure.ac: avoid noise about pkg-config not - finding (lib)systemd.pc on systems where it is not installed - * configure.ac: configure.ac: default to detection of - systemdsystemunitdir (and systemdshutdowndir) - "auto" is not a - final option - * configure.ac, docs/configure.txt: configure.ac: default to - detection of systemdsystemunitdir (and systemdshutdowndir), non- - fatal if not found - * configure.ac: configure.ac: fall back from pkg-config queries for - "systemd" to try also "libsystemd" - fix calling "test" - -2022-02-10 Nick Geoghegan - - * drivers/riello_usb.c: Fixes formatting in riello_usb - * drivers/riello_ser.c: Updates riello_ser to version 0.07 - -2022-02-10 Jim Klimov - - * configure.ac: configure.ac: fall back from pkg-config queries for - "systemd" to try also "libsystemd" - * docs/man/Makefile.am: docs/man/Makefile.am: build and install - nutdrv_siemens_sitop man pages - -2022-02-09 Nick Geoghegan - - * drivers/riello_usb.c: Fixes 530 - -2022-02-09 Jim Klimov - - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - rename non-standard dstate variables to "experimental.*" namespace - Closes: NUT issue #1045 - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - fix "ups.delay.return" => "ups.delay.start" - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - whitespace fixes (some long lines) - * docs/packager-guide.txt: docs/packager-guide.txt: update for nut- - linux-i2c and nut-macosx-ups platform-dependent package groups - * docs/packager-guide.txt: docs/packager-guide.txt: fix title for - pkg-nut-modbus - * drivers/ever-hid.c: drivers/ever-hid.c: tag non-standard NUT - variable/command names as "experimental.*" to help identify lacking - mappings and rename some into standard data points - * drivers/ever-hid.c, drivers/ever-hid.h: drivers/ever-hid.{c,h}: - update (C) heading - * drivers/ever-hid.c: drivers/ever-hid.c: print unsigned int as %u - * drivers/ever-hid.c: drivers/ever-hid.c: mark - NUT_UNUSED_VARIABLE(double value) where appropriate - * drivers/ever-hid.c: drivers/ever-hid.c: use complete struct - initializers for info_lkp_t tables; use sentinels; mark static - * drivers/ever-hid.c: drivers/ever-hid.c: ever_alarms_fun(), - ever_workmode_fun(): define "workmode" on top of function - * drivers/ever-hid.c: drivers/ever-hid.c: fix switch/case whitespaces - * drivers/ever-hid.c: drivers/ever-hid.c: fix trailing whitespaces - * drivers/ever-hid.c: drivers/ever-hid.c: wrap some long lines for - readability - * drivers/ever-hid.c: drivers/ever-hid.c: adjust to upstream changes: - config.h goes first, PID/VID are unsigned, got a fix_report_desc() - default - * drivers/everups.c: drivers/everups.c: whitespace fixes; clarify - this is a serial driver (as opposed to ever-hid.c for USB devices) - -2022-02-08 Dimitris Economou - - * drivers/adelsystem_cbi.h: check ifndef READALL_REGS - * drivers/adelsystem_cbi.c: minor fix in upsdrv_updateinfo - * drivers/adelsystem_cbi.c, drivers/adelsystem_cbi.h: fix warning for - initializing structure with flexible array member - -2022-02-08 Jim Klimov - - * configure.ac: configure.ac: error out for unhandled --with- - drivers=xxx names - * configure.ac: configure.ac: improve handling of platform-dependent - (linux-i2c, macosx) drivers - do not default to require them - everywhere - * configure.ac: configure.ac: move --with-drivers=... handling to - before --with-all, and consult drivers/Makefile.am for list names - to require certain dependencies - * drivers/Makefile.am: drivers/Makefile.am: parameterize - POWERMAN_DRIVERLIST and IPMI_DRIVERLIST like others - * configure.ac: configure.ac: move "--with-drivers=name[,name...]" - handling to before we check for third-party dependencies - * clients/upssched.c: clients/upssched.c: sendcmd(): rectify - enclen/buflen sanity checks and usage - * clients/upssched.c: clients/upssched.c: whitespace and comment - fixes - -2022-02-07 Dimitris Economou - - * clients/upssched.c: fix code alignemnt, casting sizeof with ssize_t - -2022-02-07 Jim Klimov - - * scripts/subdriver/gen-usbhid-subdriver.sh: gen-usbhid-subdriver.sh: - suggest "fix_report_desc" in subdriver_t (follow-up to PR #1245) - -2022-02-06 Jim Klimov - - * docs/packager-guide.txt: docs/packager-guide.txt: mention ipmi and - modbus drivers as separate packaging goals - -2022-02-06 Dimitris Economou - - * clients/upssched.c: check zero bytes read from O_NDELAY socket - * clients/upssched.c: fix enc size write on pipeifd, fix parent - select on child's pipefd - * drivers/Makefile.am: adelsystem_cbi header filename fix - -2022-02-05 Jim Klimov - - * docs/nut.dict, docs/support.txt: docs/support.txt: detail abot - GitHub issues and PRs, and IRC channel - * drivers/al175.c, drivers/apc-ats-mib.c, drivers/apc-hid.c, - drivers/apc-mib.c, drivers/apc-pdu-mib.c, drivers/apcsmart-old.c, - drivers/apcsmart.h, drivers/apcupsd-ups.c, drivers/arduino-hid.c, - drivers/asem.c, drivers/baytech-mib.c, drivers/bcmxcp.c, - drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, - drivers/belkin.c, drivers/belkinunv.c, drivers/bestfcom.c, - drivers/bestfortress.c, drivers/bestpower-mib.c, - drivers/bestuferrups.c, drivers/bestups.c, drivers/blazer_ser.c, - drivers/blazer_usb.c, drivers/clone-outlet.c, drivers/clone.c, - drivers/compaq-mib.c, drivers/cps-hid.c, drivers/cyberpower-mib.c, - drivers/delta_ups-hid.c, drivers/delta_ups-mib.c, drivers/dummy- - ups.c, drivers/eaton-ats16-nm2-mib.c, drivers/eaton-ats16-nmc- - mib.c, drivers/eaton-ats30-mib.c, drivers/eaton-pdu-genesis2-mib.c, - drivers/eaton-pdu-marlin-mib.c, drivers/eaton-pdu-pulizzi-mib.c, - drivers/eaton-pdu-revelation-mib.c, drivers/emerson-avocent-pdu- - mib.c, drivers/etapro.c, drivers/everups.c, drivers/explore-hid.c, - drivers/gamatronic.c, drivers/generic_modbus.c, - drivers/genericups.c, drivers/hpe-pdu-mib.c, drivers/huawei-mib.c, - drivers/huawei-ups2000.c, drivers/idowell-hid.c, drivers/ietf- - mib.c, drivers/isbmex.c, drivers/ivtscd.c, drivers/legrand-hid.c, - drivers/libshut.c, drivers/libusb0.c, drivers/libusb1.c, - drivers/liebert-esp2.c, drivers/liebert-hid.c, drivers/liebert.c, - drivers/macosx-ups.c, drivers/masterguard.c, drivers/metasys.c, - drivers/mge-hid.c, drivers/mge-mib.c, drivers/mge-utalk.c, - drivers/microdowell.c, drivers/microsol-apc.c, drivers/netvision- - mib.c, drivers/netxml-ups.c, drivers/nut-ipmipsu.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/nutdrv_siemens_sitop.c, drivers/oneac.c, drivers/openups- - hid.c, drivers/optiups.c, drivers/phoenixcontact_modbus.c, - drivers/pijuice.c, drivers/powercom-hid.c, drivers/powercom.c, - drivers/powerman-pdu.c, drivers/powerpanel.c, drivers/powervar- - hid.c, drivers/powerware-mib.c, drivers/raritan-pdu-mib.c, - drivers/raritan-px2-mib.c, drivers/rhino.c, drivers/richcomm_usb.c, - drivers/riello_ser.c, drivers/riello_usb.c, drivers/safenet.c, - drivers/salicru-hid.c, drivers/skel.c, drivers/snmp-ups.c, - drivers/solis.c, drivers/tripplite-hid.c, drivers/tripplite.c, - drivers/tripplite_usb.c, drivers/tripplitesu.c, drivers/upscode2.c, - drivers/usbhid-ups.c, drivers/victronups.c, drivers/xppc-mib.c: - drivers: bump versions for all drivers, they could have been - refactored during fightwarn (so might add regressions) without - regard to versioning - * UPGRADING: NEWS: plea to package maintainers to share their - customizations into common uptream - * docs/documentation.txt, docs/nut.dict: documentation.txt: add a - blog by James Ridgway - * docs/documentation.txt: documentation.txt: update with a link to - video by Techno Tim - * docs/documentation.txt: developers.txt: "trac" is AWOL, update the - link to github wiki copy - * docs/developers.txt: developers.txt: "alioth" is AWOL, update the - text - * docs/download.txt: download.txt: "trac" and "alioth" are AWOL, - update the links - -2022-02-05 Dimitris Economou - - * drivers/adelsystem_cbi.c: apply Jim's modbus changes on PR #1239 - -2022-01-23 Jim Klimov - - * ci_build.sh: ci_build.sh: fix CI_FAILFAST to abort after failed - configure scripts - -2022-01-27 Jim Klimov - - * drivers/snmp-ups.c: Revert "drivers/snmp-ups.c: replace - strcmp("short string") with strncmp() (clang-3.4 warns about array - out of bounds)" This reverts commit - d2f7193af42e987f7948e072a963dc7bb1e25dc1. Currently the configure - script should properly avoid the built-in strcmp() versions which - upset current build compiler. Using the range-limited strncmp() has - a downside of matching start-of-string. - * drivers/snmp-ups.c: Revert "drivers/snmp-ups.c: fix strncmp() - limits for "v1" and "v3" checks (copy-pasting typo)" This reverts - commit d0d02d3a70c6544c8ea7868dd63738595f2ae657. Currently the - configure script should properly avoid the built-in strcmp() - versions which upset current build compiler. Using the range- - limited strncmp() has a downside of matching start-of-string. - * clients/upsclient.c, clients/upslog.c, clients/upsmon.c, - clients/upsrw.c, clients/upssched.c, clients/upsset.c, - common/state.c, common/upsconf.c, docs/developers.txt, - docs/nut.dict, drivers/apcsmart-old.c, drivers/apcsmart.c, - drivers/apcupsd-ups.c, drivers/belkin.c, drivers/belkinunv.c, - drivers/bestups.c, drivers/clone-outlet.c, drivers/clone.c, - drivers/dstate.c, drivers/gamatronic.c, drivers/huawei-ups2000.c, - drivers/main.c, drivers/masterguard.c, drivers/mge-utalk.c, - drivers/mge-xml.c, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_blazer-common.c, - drivers/nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic- - qs.c, drivers/nutdrv_qx_voltronic.c, drivers/oneac.c, - drivers/powercom.c, drivers/powerman-pdu.c, drivers/powerp-txt.c, - drivers/snmp-ups.c, drivers/tripplite_usb.c, drivers/upscode2.c, - drivers/victronups.c, server/conf.c, server/netget.c, - server/netlist.c, server/netset.c, server/user.c, - tests/cpputest.cpp, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/scan_snmp.c: Revert "Replace strcmp() and strcasecmp() use- - cases for short fixed string args by strncmp() and strncasecmp() - respectively" This reverts commit - a0d5ad57956ebcb5878744acb7657e1356ba0ea8. Currently the configure - script should properly avoid the built-in strcmp() versions which - upset current build compiler. Using the range-limited strncmp() has - a downside of matching start-of-string. - * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: Revert - "tools/nut-scanner/scan_snmp.c, drivers/snmp-ups.c: strcmp() - shorter "SHA" and "AES" and check this is all of the string length" - This reverts commit 57182d51b2954e6b7bb5199f658f38a89ce93648. - Currently the configure script should properly avoid the built-in - strcmp() versions which upset current build compiler. Using the - range-limited strncmp() has a downside of matching start-of-string. - -2022-01-23 Jim Klimov - - * NEWS, UPGRADING: NEWS, UPGRADING: snmp-ups.h flags (bit-mask - macros) changed for NUT v2.7.5 - * drivers/snmp-ups.h: drivers/snmp-ups.h: mib2nut mappings with - "zero" flag value are not illegal - -2022-01-18 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: mib2nut mappings with - "zero" flag value are not illegal Do not yell about them like it's - a bug, after all. - -2022-01-23 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: redefine bit-flags macros - so they do not overlap (and update some helper-masking macros) - follows up on issue from PR #1177 and aligns with ultimately DMF - (42ity fork) tested changes to help merge that later with less - effort - -2021-11-22 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: update mask for - SU_TYPE_DAISY() and comments for it and SU_DAISY - -2021-11-13 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: report if an snmp_info[] - entry flag was not defined (is 0) - * drivers/snmp-ups.h: drivers/snmp-ups.h: redefine bit-flags macros - so they do not overlap (and some helper-masking macros) [follow up - on issue from PR #1177] - -2022-01-22 Jim Klimov - - * NEWS: NEWS: drop chapters for "PLANNED NEWS" for releases after - v2.7.5 - * UPGRADING: UPGRADING: highlight libusb-1.0 in NUT v2.7.5 - -2022-01-21 Jim Klimov - - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - "libssl-dev" name is more popular nowadays than "openssl-dev" - (Debian and family) - * docs/nut.dict: docs/nut.dict: update for Armac subdriver NEWS - * data/driver.list.in: data/driver.list.in: add PiJuice HAT (big) and - pHAT (Zero) - -2022-01-20 Jim Klimov - - * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: tools/nut- - scanner/scan_snmp.c, drivers/snmp-ups.c: strcmp() shorter "SHA" and - "AES" and check this is all of the string length Alternative: move - matching to end of stack - * NEWS: NEWS: prepare for nutdrv-qx armac merge in 2.7.5 timeline - * NEWS: NEWS: added usbhid-ups fix_report_desc() for NUT v2.7.5 - * NEWS: NEWS: added powercom "nobt" option for NUT v2.7.5 - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): - accomodate "usb_ctrl_charbuf" and formatting changes for libusb-1.0 - support - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): mark as - static method - * drivers/nutdrv_qx_ablerex.c: drivers/nutdrv_qx_ablerex.c: - ablerex_process_status_bits(): mark as static method - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: ablerex_command(): - accomodate "usb_ctrl_charbuf" and formatting changes for libusb-1.0 - support - * ci_build.sh: ci_build.sh: make distcheck (pun intended) less noisy - * ci_build.sh: ci_build.sh: comment a suggestion how to use - BUILD_TYPE=fightwarn typically - * ci_build.sh: ci_build.sh: make distcheck (pun intended) less noisy - * ci_build.sh: ci_build.sh: comment a suggestion how to use - BUILD_TYPE=fightwarn typically - -2022-01-20 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): use - nut_usb_strerror(ret) Match updated libusb-1.0/0.1 API in NUT - master - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Fix nut_usb_strerror(ret) - for new libusb-1.0/0.1 support in master branch - -2022-01-19 Jim Klimov - - * drivers/legrand-hid.c: Update legrand-hid.c Initialize - "fix_report_desc", this file appeared from another PR merged before - #1245 - -2022-01-19 Jim Klimov - - * ci_build.sh: ci_build.sh: provision check_gitignore() calls for DMF - branch build products - * ci_build.sh: ci_build.sh: check_gitignore(): wrap long lines - * ci_build.sh: ci_build.sh: check_gitignore(): add a FILE_GLOB - support - * ci_build.sh: ci_build.sh: optional_dist_clean_check(): copypasta - error, GIT_ARGS not needed in this one - * ci_build.sh: ci_build.sh: fix "MAKE distclean" operations back to - not-quiet, they look weird as a half-muted wall of text - * ci_build.sh: ci_build.sh: fix use of git status $GIT_ARGS - consistently - * drivers/snmp-ups.c: drivers/snmp-ups.c: match_sysoid(): test for - NULL mib2nut[i]->snmp_info (and skip if so) - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): imply that - skipped value is not a "valid" name in the mapping table (name may - be known, but with no snmp_info attached) - -2022-01-18 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: handle not-loaded snmp_info - without segfaulting - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): better - tracing of mib_name comparisons - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): test for - NULL mib2nut[i]->snmp_info (and skip if so) before accounting - mibSeen=TRUE and trying to match_model_OID() - -2022-01-18 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: delete duplicates after - rebase - * drivers/{adele_cbi.c => adelsystem_cbi.c}, drivers/{adele_cbi.h => - adelsystem_cbi.h}: rename after rebase - * drivers/{adelsystem_cbi.c => adele_cbi.c}, - drivers/{adelsystem_cbi.h => adele_cbi.h}: rename for rebase - -2022-01-13 Dimitris Economou - - * drivers/adelsystem_cbi.c: try to reconnect on IVALID DATA and - INVALID CRC from read_all_regs - * drivers/adelsystem_cbi.c: try to reconnect on INVALID DATA and - INVALID CRC errors - * drivers/adele_cbi.c, drivers/adele_cbi.h, - drivers/adelsystems_cbi.c, drivers/adelsystems_cbi.h: delete - renamed driver files - * drivers/Makefile.am, drivers/adelsystem_cbi.c, - drivers/adelsystem_cbi.h: filename fixes - * drivers/Makefile.am, drivers/adelsystems_cbi.c, - drivers/adelsystems_cbi.h: adele changed to adelsystems - * drivers/adele_cbi.c, drivers/adele_cbi.h: macro name changes - * drivers/adele_cbi.c, drivers/adele_cbi.h: minor bug fixes - * drivers/adele_cbi.h: modify regs_data memory, devreg enum - rearrangement - -2022-01-12 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: some fixes in - read_all_regs approach - * drivers/adele_cbi.c, drivers/adele_cbi.h: read_all_regs aproach - integrated - -2022-01-11 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: ghost alarms bug fix, - other bug fixes - -2022-01-10 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: first testing release - -2022-01-09 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: alrm_t, alrm_ar_t data - structures, construction of upsdrv_updateinfo in progress - -2022-01-08 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: structure device data, - code get_dev_state, in progress - -2022-01-07 Dimitris Economou - - * drivers/adele_cbi.h: register status values and masks added - -2022-01-06 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: under construction - -2022-01-11 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: ghost alarms bug fix, - other bug fixes - -2022-01-10 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: first testing release - -2022-01-09 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: alrm_t, alrm_ar_t data - structures, construction of upsdrv_updateinfo in progress - -2022-01-08 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: structure device data, - code get_dev_state, in progress - -2022-01-07 Dimitris Economou - - * drivers/adele_cbi.h: register status values and masks added - -2022-01-06 Dimitris Economou - - * drivers/Makefile.am: Makefile.am modifications - * drivers/adele_cbi.c, drivers/adele_cbi.h: under construction - -2022-01-18 Dimitris Economou - - * drivers/{adelsystem_cbi.c => adele_cbi.c}, - drivers/{adelsystem_cbi.h => adele_cbi.h}: rename for rebase - -2022-01-18 Jim Klimov - - * drivers/usbhid-ups.h: drivers/usbhid-ups.h: rename pDesc arg to - match wording in usbhid-ups.c - * drivers/hidparser.c, drivers/hidparser.h: drivers/hidparser.{c,h}: - rename pDesc arg/var to avoid shadowing a global variable Pre- - emptively: `extern pDesc` is defined in libhid.h which does not - seem to be used in/along-with hidparser.{c,h} currently - but this - collision may happen later (especially with code-copying around). - * drivers/cps-hid.c: drivers/cps-hid.c: clean up trailing whitespaces - * drivers/cps-hid.c: drivers/cps-hid.c: FindReport() - cps_fix_report_desc(): rename pDesc arg to avoid shadowing a global - variable - * drivers/cps-hid.c: drivers/cps-hid.c: mark non-exported - FindReport() as static - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: enhance - NUT_CHECK_COMPILE_FLAG() to run the whole toolchain for "build and - run" when checking CLI option support - * ci_build.sh: ci_build.sh: build_to_only_catch_errors_target(): - CI_PARMAKE_VERBOSITY=silent should not hide warnings - * ci_build.sh: ci_build.sh: do not silent-make initial clean-up (it - is chatty anyway, so let us see the dirs processed) - * ci_build.sh: ci_build.sh: comment verbosity (non-)tweaks for builds - without a BUILD_TYPE - * ci_build.sh: ci_build.sh: report around initial clean-up for - clearer log reading - * ci_build.sh: ci_build.sh: refactor with check_gitignore() - * ci_build.sh: ci_build.sh: refactor ccache_stats() - * ci_build.sh: ci_build.sh: refactor make-verbosity settings and - adjust some for default builds to store less log - -2022-01-18 Jim Klimov - - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: avoid - SIGSEGV in libusb-1.0 when running as non-root and device fails to - open (e.g. perms error) - -2022-01-17 Jim Klimov - - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - report in usage() if "library not detected" for a scan option - -2022-01-17 Jim Klimov - - * drivers/generic_modbus.c: drivers/generic_modbus.c: address - -Wmissing-field-initializers complaints for timeval with timeouts - (memset to 0 instead) - * drivers/generic_modbus.c: drivers/generic_modbus.c: address - -Wstrict-prototypes complaints - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: raise the bar for - code quality non-regression, to fail on any (new) warnings in - master branch and PRs to it - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: shut back the - cppcheck-by-default - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: do not allow to - disable delayedIssueAnalysis on "stable branches" - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: enable cppcheck - slowBuild stages generally, not just for "fightwarn" branches - -2022-01-16 Jim Klimov - - * configure.ac: configure.ac: adjust test structure for both built-in - ntohl/htonl and string built-ins (using explicit -Werror -Wno-... - checks) - * configure.ac: configure.ac: adjust test structure for built-in - ntohl/htonl to be similar to that for string built-ins (using - explicit -Werror) - * ci_build.sh: ci_build.sh: do not lose original LDFLAGS - -2022-01-15 Jim Klimov - - * configure.ac: configure.ac: tweak LIBLTDL_CFLAGS same as - LIBNETSNMP_CFLAGS for -Wno-shadow if needed for string methods or - htonl() etc In some builds of the NUT CI farm dynamatrix (possibly - ones without SNMP support), the nutscan-ip.c complains about - "declaration shadows a local variable" -- investigation of which - leads into the macros expanded for common method names on those - systems and/or compiler toolkit versions. This PR hopes to avoid - that situation more extensively. - -2022-01-14 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: treat DISABLE_MIB_LOADING - more safely - -2022-01-14 Jim Klimov - - * tests/cpputest.cpp, tests/example.cpp, tests/nutclienttest.cpp: - tests/*.cpp: mark overridden class methods as such - * clients/nutclient.h, clients/nutclientmem.h: clients/nutclient.h + - nutclientmem.h: mark overridden class methods as such - -2022-01-13 Jim Klimov - - * configure.ac: configure.ac: adjust test for built-in string - functions (problematic on clang-3.4) to see any warnings and - specifically for unreachable code there - * ci_build.sh: ci_build.sh: relay more build-influencing envvars in - the (Jenkins-logged) printout - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: fix the - range-check and message/comment it better - * drivers/asem.c: drivers/asem.c: macro ACCESS_DEVICE() ends with a - brace; we HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT to - keep the useless trailing ";" for readability - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: add - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT(_BESIDEFUNC) - * drivers/asem.c: drivers/asem.c: declare upsdrv_shutdown() as - noreturn - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: avoid including usb- - common.h twice - -2022-01-13 Dimitris Economou - - * drivers/adelsystem_cbi.c: try to reconnect on IVALID DATA and - INVALID CRC from read_all_regs - * drivers/adelsystem_cbi.c: try to reconnect on INVALID DATA and - INVALID CRC errors - -2022-01-13 Jim Klimov - - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: ask CLANG to reject unknown - pragmas when checking for them - * common/common.c: common/common.c: check for - HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN - support before use - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: test specifically for HAVE_ - PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN(_BESIDEFUNC - ) support - -2022-01-13 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h, - drivers/adelsystems_cbi.c, drivers/adelsystems_cbi.h: delete - renamed driver files - * drivers/Makefile.am, drivers/adelsystem_cbi.c, - drivers/adelsystem_cbi.h: filename fixes - * drivers/Makefile.am, drivers/adelsystems_cbi.c, - drivers/adelsystems_cbi.h: adele changed to adelsystems - * drivers/adele_cbi.c, drivers/adele_cbi.h: macro name changes - * drivers/adele_cbi.c, drivers/adele_cbi.h: minor bug fixes - * drivers/adele_cbi.h: modify regs_data memory, devreg enum - rearrangement - -2022-01-12 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: some fixes in - read_all_regs approach - * drivers/adele_cbi.c, drivers/adele_cbi.h: read_all_regs aproach - integrated - -2022-01-12 Jim Klimov - - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: set default - C/C++ standards to GNU dialects for GCC/CLANG - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: set default - C/C++ standards to avoid C90-non-compliance warnings noise (on - compilers that can do better than that) - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: fix a test - from shell to autoscript - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - only evaluate if NUT_HAVE_LIBNETSNMP_* when we build WITH_SNMP - * common/common.c: common/common.c: use - HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: add HAVE_PRAGMA_GCC_DIAGNOS - TIC_IGNORED_UNREACHABLE_CODE_RETURN(_BESIDEFUNC) - * configure.ac, m4/nut_compiler_family.m4: m4/nut_compiler_family.m4 - + configure.ac: refactor NUT_COMPILER_FAMILY_FLAGS_DEFAULT_STANDARD - as a separate method to apply just before we set up warning-level - support - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - update dependency package naming for libusb-1.0 on Debian family - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: set default - C/C++ standards to GNU dialects for GCC/CLANG - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: set default - C/C++ standards to avoid C90-non-compliance warnings noise (on - compilers that can do better than that) - * ci_build.sh: ci_build.sh: comment why ./configure is not without - args - -2022-01-11 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: ghost alarms bug fix, - other bug fixes - -2022-01-10 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: first testing release - -2022-01-09 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: alrm_t, alrm_ar_t data - structures, construction of upsdrv_updateinfo in progress - -2022-01-08 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: structure device data, - code get_dev_state, in progress - -2022-01-07 Dimitris Economou - - * drivers/adele_cbi.h: register status values and masks added - -2022-01-06 Dimitris Economou - - * drivers/Makefile.am: Makefile.am modifications - * drivers/adele_cbi.c, drivers/adele_cbi.h: under construction - -2021-09-23 Jim Klimov - - * drivers/generic_modbus.c: drivers/generic_modbus.{c,h}: fix - whitespace style (original fix from master branch) - -2022-01-12 Jim Klimov - - * drivers/generic_modbus.c: drivers/generic_modbus.c: fix whitespace - style (in PR-1239) - -2022-01-12 Arnaud Quette - - * drivers/mge-xml.c: Eaton NMC: fix the non publication of real/power - with 3ph power and realpower for 3ph Lx were not publishing values - when they were 0 - -2022-01-11 Dave Williams - - * drivers/cps-hid.c: New HID fix strategy after consultation with CPS - It appears both input and output LogMin and LogMax values are - incorrect as the rated voltage (for EU models) is 170v to 270v - which is outside the logical limits reported by the HID. The fix - checks for the error (loosely) and then applies reasonable values - (0v and 511v) to allow the actual input and output voltages to be - reported rather than be constrained to the limits. - -2022-01-11 Jim Klimov - - * drivers/arduino-hid.c, drivers/delta_ups-hid.c, - drivers/hidparser.c, drivers/idowell-hid.c, drivers/powervar-hid.c, - drivers/salicru-hid.c: drivers/hidparser.c + *-hid.c: include - "config.h" first - -2022-01-11 Jim Klimov - - * docs/nut.dict: Update nut.dict Updated for PR - https://github.com/networkupstools/nut/pull/1256 - -2022-01-11 Jim Klimov - - * drivers/generic_modbus.c: drivers/generic_modbus.c: handle the two - APIs for libmodbus timeout setting - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: in tests for - API, the AC_DEFINE must be used with exact macro names (not - m4/shell variables) - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: in tests for - API, clarify if old API (timeval) can be used with variables from - new API (uint32) set into the struct - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: in tests for - API, "new/old" comments were confused - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: in tests for - API, initialize modbus_t *ctx differently - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: test actively - for the modbus timeout API (count and type of args used) - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: convert a - code block from plain shell to autoscript - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: test for - presence of modbus_set_byte_timeout() and - modbus_set_response_timeout() - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: detect support for - (ignoring) "-Wsign-conversion" - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: add guards to call - AX_C_PRINTF_STRING_NULL and AX_C_PRAGMAS logic only once - * drivers/generic_modbus.c: drivers/generic_modbus.c: bump - DRIVER_VERSION for feature change (connection timeout handling) - -2022-01-10 Ablerexsoftware - - * data/driver.list.in: update the driver.list.in - -2022-01-11 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: ghost alarms bug fix, - other bug fixes - -2022-01-10 Jim Klimov - - * docs/man/powercom.txt: Update powercom.txt Sentence restructure - -2022-01-10 Jim Klimov - - * .github/pull_request_template.md: pull_request_template.md: update - and reshuffle check-list items - * .../{PULL_REQUEST_TEMPLATE/nut-driver-PR.md => - pull_request_template.md}: Move fancy-named PR template to plain - .github/pull_request_template.md - * drivers/salicru-hid.c, scripts/upower/95-upower-hid.rules: - drivers/salicru-hid.c: add known compatibility for Salicru SLC TWIN - (PRO2, PRO3, RT3) per reports in issue #1142 - * data/driver.list.in: data/driver.list.in: add known compatibility - for Salicru TWIN (PRO2, PRO3, RT3) per reports in issues #450 and - #1142 - * .github/PULL_REQUEST_TEMPLATE/nut-driver-PR.md: Add - .github/PULL_REQUEST_TEMPLATE/nut-driver-PR.md template - -2022-01-10 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: first testing release - -2022-01-10 Jim Klimov - - * data/driver.list.in: data/driver.list.in: fix English typos in - comment - * docs/developers.txt: docs/developers.txt: remind to update - docs/acknowledgements.txt when adding vendor-backed support - * docs/man/usbhid-ups.txt: docs/man/usbhid-ups.txt: fix reference to - data/driver.list (typo in filename) - -2022-01-09 Rouben Tchakhmakhtchian - - * docs/man/powercom.txt, drivers/powercom.c: Powercom driver - (drivers/powercom.c) version bump from 0.17 to 0.18: * Implement - configuration flag "nobt" to skip battery test during - initialization * Cleanup old code to use testvar() for config - parameter checks in upsdrv_initups() * Add nobt flag to sample - config file in built-in doc Powercom driver man page - (docs/man/powercom.txt) update to explain nobt flag - -2022-01-09 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: alrm_t, alrm_ar_t data - structures, construction of upsdrv_updateinfo in progress - -2022-01-08 Dimitris Economou - - * drivers/adele_cbi.c, drivers/adele_cbi.h: structure device data, - code get_dev_state, in progress - -2022-01-07 Jim Klimov - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: be sure to have - PATH_MAX defined (for usb.h that did not bother by itself) - * drivers/usb-common.h: drivers/usb-common.h: be sure to have - PATH_MAX defined (for usb.h that did not bother by itself) - -2022-01-07 Dimitris Economou - - * drivers/adele_cbi.h: register status values and masks added - -2022-01-06 Jim Klimov - - * Jenkinsfile-dynamatrix: Revert "Jenkinsfile-dynamatrix: be sure to - reset slowBuild configs over dynacfgBase" This reverts commit - 18cf19ebc7e01f30c3d84c7b3b8f69e961429ebb as the "design flaw" which - that change worked around should now be (hopefully) fixed in the - jenkins-fynamatrix library itselg. - -2022-01-06 Dimitris Economou - - * drivers/Makefile.am: Makefile.am modifications - * drivers/adele_cbi.c, drivers/adele_cbi.h: under construction - -2022-01-05 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: fix - dynamatrixAxesCommonEnvCartesian cases to group the variables we - apply as one bunch, not as several separate hits - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: define - dynacfgPipeline.excludeCombos_DEFAULT (mismatched ARCHes only) - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - avoid implicit case fallthrough - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: be sure to reset - slowBuild configs over dynacfgBase - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: avoid running - "cppcheck" several times per host - -2022-01-04 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: reinstate - excludeCombos for autotools-only builds (fightwarn) to avoid - unsupported ARCH-bits mix builds - -2022-01-02 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: fix "Default - autotools driven build with default warning levels (gnu99/gnu++11)" - dynamatrixAxesVirtualLabelsMap mergeMode from "merge" to "replace" - (want to only build listed scenarios, not everything possible in - the matrix) - -2021-12-30 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: avoid using - undefined (null) excludeCombos_DEFAULT - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: fix references to - excludeCombos: ... axisCombos_COMPILER_(NOT_)GCC - -2022-01-05 Jim Klimov - - * m4/nut_check_cppcheck.m4: m4/nut_check_cppcheck.m4: relax required - tool version for cppcheck*.xml generation - * Makefile.am: Makefile.am: fix dependencies for cppcheck*.xml - generation - -2022-01-04 Dimitris Economou - - * drivers/generic_modbus.c: comment and code alignment fixes - -2022-01-03 Jim Klimov - - * ci_build.sh: ci_build.sh: set DO_CLEAN_CHECK=no for default- - tgt:cppcheck or docs-building scenarios by default, so we can - get/archive those costly media files - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: set - DO_CLEAN_CHECK=no for default-tgt:cppcheck scenarios, so we can get - that analysis data - -2021-12-30 Jim Klimov - - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - include config.h first - -2021-12-30 Jim Klimov - - * docs/developers.txt, docs/nut.dict: docs/developers.txt: update - about C89/GNU89 support (with GCC toolkit) - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: separate - C89/C90/ANSI builds with GCC (can actually pass strict and GNU - modes) and CLANG (more pedantic) - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: typo fix for - disableSlowBuildCIBuildExperimentalANSI - -2021-12-30 Jim Klimov - - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: do not test - for "-fcolor-diagnostics" - redundant for clang, and sometimes - toxic for gcc - * drivers/Makefile.am: drivers/Makefile.am: snmp-ups uses fabsf() so - needs libm - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: include - config.h first - * drivers/microsol-apc.c: drivers/microsol-apc.c: include config.h - first - * drivers/genericups.c: drivers/genericups.c: include config.h first - * include/nut_stdint.h: include/nut_stdint.h: define SSIZE_MAX if - missing - * drivers/serial.h: drivers/serial.h: pull more includes - -2021-12-30 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am: metasys uses fabsf() so - needs libm - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix comments to C-style - * drivers/powercom.c: drivers/powercom.c: fix comments to C-style - * drivers/microdowell.h: drivers/microdowell.h: fix comments to - C-style - * drivers/solis.h: drivers/solis.h: fix comments to C-style - * drivers/libshut.c: drivers/libshut.c: fix comments to C-style - * drivers/openups-hid.c: drivers/openups-hid.c: include config.h - first - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix comments to C-style - * drivers/riello_usb.c: drivers/riello_usb.c: fix comments to C-style - * drivers/generic_modbus.h: drivers/generic_modbus.h: fix comments to - C-style - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix comments to C-style - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - fix comments to C-style - * tools/nut-scanner/nutscan-init.c: tools/nut-scanner/nutscan-init.c: - fix comments to C-style - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: fix comments to C-style - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - comments to C-style - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: fix - comments to C-style - * server/upsd.c: server/upsd.c: fix comments to C-style - * server/conf.c: server/conf.c: fix comments to C-style - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix comments to C-style - * drivers/main.c: drivers/main.c: fix comments to C-style - * common/upsconf.c: common/upsconf.c: include config.h first - * common/str.c: common/str.c: fix comments to C-style - * server/user.c: server/user.c: include config.h first - * server/desc.c: server/desc.c: include config.h first - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: include config.h first - * drivers/riello_usb.c: drivers/riello_usb.c: include config.h first - * drivers/riello_ser.c: drivers/riello_ser.c: include config.h first - * drivers/rhino.c: drivers/rhino.c: include config.h first - * drivers/mge-utalk.c: drivers/mge-utalk.c: include config.h first - * drivers/libhid.c: drivers/libhid.c: include config.h first, and try - to get strings.h explicitly - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: include - config.h first - * drivers/dummy-ups.c: drivers/dummy-ups.c: include config.h first - * drivers/dstate.c: drivers/dstate.c: include config.h first - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: try to include explicitly both of - (sys/)signal.h - * server/upsd.c: server/upsd.c: try to include explicitly both of - (sys/)signal.h - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: include config.h first - * tools/nut-scanner/nutscan-device.c: tools/nut-scanner/nutscan- - device.c: include config.h first - * drivers/mge-xml.c: drivers/mge-xml.c: include config.h first - * drivers/libshut.c: drivers/libshut.c: include config.h first - * common/state.c: common/state.c: include config.h first - * common/str.c: common/str.c: include config.h first, and try to get - strings.h explicitly - * include/common.h: include/common.h: try to include explicitly - string(s).h and (sys/)signal.h - * configure.ac: configure.ac: test more actively for strcasecmp, - strncasecmp, strdup and usleep methods that are problematic for - strict C99+ builds - * configure.ac: configure.ac: detect explicitly string(s).h and - (sys/)signal.h - -2021-12-29 Jim Klimov - - * configure.ac: configure.ac: zero-init struct in ntohl/htonl - warning-tweaks test code - -2021-12-29 Jim Klimov - - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: be pragmatic - about possibly unreachable error handling in arch-dependent range - check - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: mark local - vars as static - * configure.ac: configure.ac: constrain warning-tweaks against macro - str*() and ntohl/htonl to LIBNETSNMP_CFLAGS (empirically) - * configure.ac: configure.ac: detect if compiler (e.g. older - clang-3.4) has a problem with built-in/macro variants of system - str*() and htonl/ntohl functions at our higher warning levels, and - mitigate that - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: rearrange - detection order of compiler flags - * drivers/generic_modbus.c: drivers/generic_modbus.c: quiesce - warnings about unreachable-code (default after full enum-case - handling) with older clang - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: ignore potentially - unreachable code in assert() - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: quiesce warnings about - unreachable-code (default after full enum-case handling) with older - clang - * drivers/upscode2.c: drivers/upscode2.c: quiesce warnings about - unreachable-code (default after full enum-case handling) with older - clang - * drivers/hidparser.c: drivers/hidparser.c: ignore potentially - unreachable code in platforms-dependent range checks - * drivers/libhid.c: drivers/libhid.c: ignore potentially unreachable - code in platforms-dependent range checks - * drivers/libshut.c: drivers/libshut.c: tell compiler that we do want - to treat a char array (managed by comms code) as the aligned - pointer to struct - * drivers/libshut.c: drivers/libshut.c: adjust data_size usage to - usb_ctrl_charbufsize typedef - fix pragmas for range-checks - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: quiesce warnings about - unreachable-code (default after full enum-case handling) with older - clang - * drivers/genericups.c: drivers/genericups.c: ignore potentially - unreachable code in platforms-dependent range checks - * drivers/bestuferrups.c: drivers/bestuferrups.c: ignore potentially - unreachable code in assert(0) - * drivers/bestfcom.c: drivers/bestfcom.c: ignore potentially - unreachable code in assert(0) - * clients/upsmon.c: clients/upsmon.c: ignore potentially unreachable - code in platforms-dependent range checks - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: ignore - potentially unreachable code in platforms-dependent range checks - * tools/nut-scanner/nutscan-init.c: tools/nut-scanner/nutscan-init.c: - ignore potentially unreachable code in platforms-dependent range - checks - * server/upsd.c: server/upsd.c: quiesce warnings about unreachable- - code (default after full enum-case handling) with older clang - * configure.ac: configure.ac: update "clang-medium" warnings level - with "-Wno-conversion" for older clang releases - * ci_build.sh: ci_build.sh: introduce CI_FAILFAST for - BUILD_TYPE=default-all-errors - * ci_build.sh: ci_build.sh: use configurable --enable-Wcolor for - compiler warnings in default quick build - * ci_build.sh: ci_build.sh: use configurable --enable-Wcolor for - compiler warnings in all BUILD_TYPEs - * configure.ac, m4/nut_compiler_family.m4: configure.ac + - m4/nut_compiler_family.m4: allow configurable --enable-Wcolor for - compiler warnings - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: add - diagnostics-color support for GCC - * configure.ac, m4/ax_check_compile_flag.m4, - m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: use - AX_CHECK_COMPILE_FLAG to detect generic options supported by - compilers - -2021-12-28 Jim Klimov - - * configure.ac: configure.ac: pass "-Wno-disabled-macro-expansion" in - clang-medium and clang-hard modes, to avoid choking on systems- - provided strncmp() etc. - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: pw_comm_setup(): ignore - potentially unreachable code in platforms-dependent range checks - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - ignore potentially unreachable code in platforms-dependent range - checks - * common/common.c: common/common.c: get_user_pwent(): ignore - "-Wunreachable-code" where we were required to have a return - * common/common.c: common/common.c: get_max_pid_t(): avoid warnings - in C89/C90/ANSI builds *because* we check for LLONG_MAX macro - * common/common.c: common/common.c: get_max_pid_t(): ignore - "-Wunreachable-code" - * common/common.c: common/common.c: vupslog(): ignore "-Wformat- - nonliteral" with older clang too - * configure.ac: configure.ac: with (older) clang, ignore "unused- - arguments" (of clang program) - * server/upsd.c: server/upsd.c: mainloop(): ignore "-Wcovered-switch- - default" with older clang too - * clients/upsclient.c: clients/upsclient.c: upscli_init(): fix "ret" - to "long", to match some versions of SSL_CTX_ctrl() (from - openssl/ssl.h e.g. in FreeBSD) - * drivers/riello_usb.c: drivers/riello_usb.c: riello_command(): - handle possibly undefined ETIME - * drivers/blazer_usb.c: drivers/blazer_usb.c: blazer_command(): - handle possibly undefined ETIME - * drivers/blazer_usb.c: drivers/blazer_usb.c: phoenix_command(): - avoid fall-through in a case - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: qx_command(): handle - possibly undefined ETIME - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: phoenix_command(): avoid - fall-through in a case - * drivers/mge-hid.c: drivers/mge-hid.c: nominal_output_voltage_fun(): - explicitly fall-through in a case - * drivers/libshut.c: drivers/libshut.c: shut_control_msg(): - explicitly fall-through in a case, and finish the default with a - break - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: comment away - setting "-isystem ..." common paths early in CFLAGS - * configure.ac: configure.ac: set "-Wno-system-headers" early in - gcc/clang medium and hard warning levels - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: set "-isystem - ..." paths early in CFLAGS - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: expel other - C89/C90/ANSI builds to only happen if not - disableSlowBuildCIBuildExperimentalANSI and only in branches (or - PRs to) matching ~/fightwarn.*89.*/ currently - * configure.ac: configure.ac: try to handle warnings in system - headers at our medium and hard levels - -2021-12-28 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix_report_desc(): - avoid shadowing global var with method arg name - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix_report_desc(): mark - NUT_UNUSED_VARIABLEs - -2021-12-28 Jim Klimov - - * docs/man/nutdrv_qx.txt: docs/man/nutdrv_qx.txt: mention Armac in - SUPPORTED HARDWARE section, and wrap long lines there - * docs/man/nutdrv_qx.txt, docs/nut.dict: docs/man/nutdrv_qx.txt: port - notes for "armac" subdriver from source code - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): move - variable declarations to top of scope - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): fix - varied int types to size_t, and move equation sides around to avoid - signedness - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: armac_command(): zero out - whole tmpbuf[], not one element - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: normalize whitespace for - "armac" code addition - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: add (C) for "armac" code - addition - -2021-12-25 Tomasz Fortuna - - * data/driver.list.in, docs/man/nutdrv_qx.txt, docs/nut.dict, - drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: add support for Armac UPS - (or maybe other richcomm_usb like) Based on Armac R/2000I/PSW, but - should support other UPSes that work with "PowerManagerII" software - from Richcomm Technologies from around 2004-2005. - -2021-12-28 Jim Klimov - - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: add a troubleshooting section, with entry for - cgroupsv1-only guests on a cgroupsv2-only host - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - add a chapter for CentOS 7 agent preparation - * docs/config-prereqs.txt: docs/config-prereqs.txt: clarify that - OpenBSD multitude of autotools versions is a blessing, not a pain - ;) - * docs/config-prereqs.txt: docs/config-prereqs.txt: clarify that JDK - installation in Debian guests may need /proc submounted - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: move "sudo" - installation away from useradd example (so "apt-get" does not - pollute non-debian guest examples) - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: change - CentOS7 example guest name from ...-x86_64 to ...-x86-64 (or - -amd64) to avoid loss of character - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: avoid - "AltArch" CentOS i686, use just x86_64 as something easier to get - hands on - -2021-12-27 hunter86bg - - * data/driver.list.in: Add Cyber Power PR1500RT2U, fixes - networkupstools/nut#1191 - -2021-12-27 Jim Klimov - - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: remind to - revise container MAC addresses - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: clarify - that "third-party distro" LXC helpers may need chiseling - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: hint at needed "pacman" for Arch Linux container - installation - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: add installation of RPM based distros as guests on non- - RPM (DEB) hosts - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: clarify how - to find defined LXC templates, and get usage details about them - -2021-12-25 Jim Klimov - - * drivers/riello_ser.c: drivers/riello_ser.c: do not include - hidparser.h (hiccups in usb-common.h due to lack of - WITH_LIBUSB_x_y) - * drivers/riello_ser.c: drivers/riello_ser.c: do not include - hidparser.h (hiccups in usb-common.h due to lack of - WITH_LIBUSB_x_y) - * drivers/libshut.c: drivers/libshut.c: adjust data_size usage to - usb_ctrl_charbufsize typedef - -2021-12-21 Jim Klimov - - * configure.ac: configure.ac: switch default warnings level to - "medium" - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: range-check quiesced by - pragmas (GCC) - * drivers/libusb0.c: drivers/libusb0.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/libusb1.c: drivers/libusb1.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/libshut.c: drivers/libshut.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/hidparser.c: drivers/hidparser.c: do not separate if-clause - parenthesis by pragmas (GCC) - -2021-12-20 Jim Klimov - - * drivers/libusb1.c: drivers/libusb1.c: fix whitespace (break long - lines) - * drivers/libshut.h: drivers/libshut.h: define ERROR_ACCESS etc. used - for USB(-like) result states - -2021-12-19 Jim Klimov - - * drivers/hidparser.c, drivers/hidparser.h, drivers/libhid.c, - drivers/libhid.h, drivers/libshut.c, drivers/libshut.h, - drivers/libusb0.c, drivers/libusb1.c, drivers/nut_libusb.h, - drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, - drivers/riello_usb.c, drivers/tripplite_usb.c, drivers/usb- - common.h, drivers/usbhid-ups.c: drivers (c,h) USB, HID and SHUT: - converge parameter usage from strict int types to backend API - dependent "usb_ctrl_*" and "usb_dev_handle" typedefs, then range- - check and cast the numbers, and avoid build warnings - -2021-12-25 Jim Klimov - - * drivers/libshut.c: drivers/libshut.c: adjust data_size usage to - usb_ctrl_charbufsize typedef - -2021-12-21 Jim Klimov - - * configure.ac: configure.ac: switch default warnings level to - "medium" - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: range-check quiesced by - pragmas (GCC) - * drivers/libusb0.c: drivers/libusb0.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/libusb1.c: drivers/libusb1.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/libshut.c: drivers/libshut.c: do not separate if-clause - parenthesis by pragmas (GCC) - * drivers/hidparser.c: drivers/hidparser.c: do not separate if-clause - parenthesis by pragmas (GCC) - -2021-12-20 Jim Klimov - - * drivers/libusb1.c: drivers/libusb1.c: fix whitespace (break long - lines) - * drivers/libshut.h: drivers/libshut.h: define ERROR_ACCESS etc. used - for USB(-like) result states - -2021-12-19 Jim Klimov - - * drivers/hidparser.c, drivers/hidparser.h, drivers/libhid.c, - drivers/libhid.h, drivers/libshut.c, drivers/libshut.h, - drivers/libusb0.c, drivers/libusb1.c, drivers/nut_libusb.h, - drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, - drivers/riello_usb.c, drivers/tripplite_usb.c, drivers/usb- - common.h, drivers/usbhid-ups.c: drivers (c,h) USB, HID and SHUT: - converge parameter usage from strict int types to backend API - dependent "usb_ctrl_*" and "usb_dev_handle" typedefs, then range- - check and cast the numbers, and avoid build warnings - -2021-12-25 Jim Klimov - - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, drivers/usb- - common.h, m4/nut_check_libusb.m4: m4/nut_check_libusb.m4, - drivers/usb-common.h + nutdrv_atcl_usb.c + richcomm_usb.c: only - apply usb_detach_kernel_driver_np to libusb-0.1 builds (no alias - tricks) - * drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c, m4/nut_check_libusb.m4: - m4/nut_check_libusb.m4, drivers/libusb1.c + nutdrv_atcl_usb.c + - richcomm_usb.c: honor that libusb-1.0 may - HAVE_LIBUSB_DETACH_KERNEL_DRIVER_NP - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, drivers/usb- - common.h, m4/nut_check_libusb.m4: m4/nut_check_libusb.m4, - drivers/usb-common.h + nutdrv_atcl_usb.c + richcomm_usb.c: only - apply usb_detach_kernel_driver_np to libusb-0.1 builds (no alias - tricks) - * drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c, m4/nut_check_libusb.m4: - m4/nut_check_libusb.m4, drivers/libusb1.c + nutdrv_atcl_usb.c + - richcomm_usb.c: honor that libusb-1.0 may - HAVE_LIBUSB_DETACH_KERNEL_DRIVER_NP - -2021-12-24 Jim Klimov - - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, - drivers/riello_usb.c: drivers/riello_usb.c, richcomm_usb.c, - nutdrv_atcl_usb.c: fix remaining uses of (lib)usb_strerror with - nut_usb_strerror() - -2021-12-25 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: map - libusb_detach_kernel_driver_np (1.0) as usb_detach_kernel_driver_np - (0.1) - * drivers/usb-common.h: drivers/usb-common.h: map - libusb_detach_kernel_driver_np (1.0) as usb_detach_kernel_driver_np - (0.1) - -2021-12-24 Jim Klimov - - * configure.ac: configure.ac: update "clang-medium" warnings pre-set - with -Wno-incompatible-pointer-types-discards-qualifiers - * drivers/libusb1.c: drivers/libusb1.c: some more whitespace and - comment fixes - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, - drivers/riello_usb.c: drivers/riello_usb.c, richcomm_usb.c, - nutdrv_atcl_usb.c: fix remaining uses of (lib)usb_strerror with - nut_usb_strerror() - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: missed - whitespace fixes - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: comment - "#else WITH_LIBUSB_..." in long blocks - -2021-12-20 Jim Klimov - - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - whitespace (indentation etc) - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: drop local - libusb-0.1 vs 1.0 definitions now provided by usb-common.h - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: update comments - -2021-12-19 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: make sure (missing) - methods from another API are defined in config.h (so "#if HAVE_..." - is valid and not guessed as 0) - -2021-12-20 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: whitespace-separate - definitions of ERROR_ACCESS etc., nut_usb_strerror() and similar - macros - -2021-12-21 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: include "common.h" - -2021-12-16 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: define - PRI_NUT_USB_CTRL_CHARBUFSIZE, usb_ctrl_msgvalue and - usb_ctrl_strindex - * drivers/usb-common.h: drivers/usb-common.h: clarify that libusb - timeouts are in milliseconds (with variouts int types per API - version) - * drivers/usb-common.h: drivers/usb-common.h: update comment about - mapping from libusb-0.1 to libusb-1.0 API - * drivers/nut_libusb.h: drivers/nut_libusb.h: comment the practical - mess around hid_rep_index - * drivers/usb-common.h: drivers/usb-common.h: comment which API - version each endif is for - * drivers/usb-common.h: drivers/usb-common.h: note the arg type for - libusb_strerror() in comments to our macro wrapper - nut_usb_strerror() - * drivers/usb-common.h: drivers/usb-common.h: update heading comment - with references to different API docs - * drivers/usb-common.h: drivers/usb-common.h: update heading comment - and (C) for libusb-1.0 related changes - -2021-12-24 Jim Klimov - - * drivers/libshut.c: drivers/libshut.c: shut_control_msg(): data_size - is a "short int" (not size_t) in this branch - -2021-12-15 Jim Klimov - - * drivers/libshut.c: drivers/libshut.c: shut_control_msg(): range- - check data_size before stuffing the number into a char - * drivers/libshut.c: drivers/libshut.c: range-check and cast ints to - struct members and library args - * drivers/libshut.c: drivers/libshut.c: braces fix - * drivers/nut_libusb.h, drivers/usb-common.h: drivers/usb-common.h + - nut_libusb.h: typedef more usb_ctrl_* tokens to match libusb-0.1 vs - 1.0 API - -2021-12-20 Jim Klimov - - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: comment FIXME for - possible uses of usb_ctrl_* typedefs - -2021-12-13 Jim Klimov - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, drivers/usb-common.h: - USB: Rename typedef usb_ctrl_char to usb_ctrl_charbuf to avoid - confsion (it is a char* sibling, not plain char) - * drivers/libshut.h, drivers/nut_libusb.h: drivers/nut_libusb.h, - libshut.h: whitespace fixes (align "version") - -2021-12-10 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: current use of - SHUT_MODE relies on defined/not-defined, not on value for plain #if - macro - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: adapt to usb-common.h and - (usb_ctrl_char) casting - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: adapt to usb-common.h - and (usb_ctrl_char) casting - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: adapt to usb- - common.h and (usb_ctrl_char) casting - -2021-12-20 Jim Klimov - - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: fix whitespace - (break long lines) - * drivers/riello_usb.c: drivers/riello_usb.c: fix whitespace (break - long lines) - -2021-12-10 Jim Klimov - - * drivers/riello_usb.c: drivers/riello_usb.c: adapt to usb-common.h - and (usb_ctrl_char) casting - * drivers/riello.h: drivers/riello.h: do not define duplicate - USB_ENDPOINT_IN/USB_ENDPOINT_OUT - * drivers/usb-common.h: drivers/usb-common.h: convert - usb_get_string{_simple}() from macro aliases to real mappings with - range-checks for libusb-1.0 API - * drivers/usb-common.h: drivers/usb-common.h: mark "static inline" - functions with - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC since not - all C files call them - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/libhid.h, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, - drivers/tripplite_usb.c, drivers/usb-common.h: drivers/usb- - common.h: consolidate libusb-0.1 vs 1.0 data/func mappings from - *usb.c files - * drivers/nut_libusb.h, drivers/usb-common.h: drivers/nut_libusb.h - already includes "usb-common.h" so no need to pull LibUSB headers - again - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: range-check and cast - args for usb_control_msg() => libusb_control_transfer() and - usb_interrupt_read() => libusb_interrupt_transfer() for libusb-1.0 - support - -2021-12-09 Jim Klimov - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - * drivers/usb-common.h: drivers/usb-common.h: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - -2021-12-08 Jim Klimov - - * drivers/nut_libusb.h: drivers/nut_libusb.h: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - -2021-12-24 Jim Klimov - - * drivers/libusb1.c: drivers/libusb1.c: - HAVE_LIBUSB_DETACH_KERNEL_DRIVER needs "#ifdef" not "#if" - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, tools/nut- - scanner/scan_usb.c: Convert C code from "#ifdef WITH_LIBUSB_x_y" to - "#if" tests for defined value - merging missed a few in - libusb-1.0+0.1 branch - -2021-12-08 Jim Klimov - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/nut_libusb.h, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, - drivers/tripplite_usb.c, drivers/usb-common.h, tools/nut- - scanner/nutscan-init.c, tools/nut-scanner/scan_usb.c, tools/nut- - usbinfo.pl: Convert C code from "#ifdef WITH_LIBUSB_x_y" to "#if" - tests for defined value - -2021-12-24 Jim Klimov - - * configure.ac: configure.ac: update "clang-medium" warnings pre-set - with -Wno-incompatible-pointer-types-discards-qualifiers - -2021-12-20 Jim Klimov - - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - whitespace (indentation etc) - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: drop local - libusb-0.1 vs 1.0 definitions now provided by usb-common.h - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: update comments - -2021-12-19 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: make sure (missing) - methods from another API are defined in config.h (so "#if HAVE_..." - is valid and not guessed as 0) - -2021-12-20 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: whitespace-separate - definitions of ERROR_ACCESS etc., nut_usb_strerror() and similar - macros - -2021-12-21 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: include "common.h" - -2021-12-16 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: define - PRI_NUT_USB_CTRL_CHARBUFSIZE, usb_ctrl_msgvalue and - usb_ctrl_strindex - * drivers/usb-common.h: drivers/usb-common.h: clarify that libusb - timeouts are in milliseconds (with variouts int types per API - version) - * drivers/usb-common.h: drivers/usb-common.h: update comment about - mapping from libusb-0.1 to libusb-1.0 API - * drivers/nut_libusb.h: drivers/nut_libusb.h: comment the practical - mess around hid_rep_index - * drivers/usb-common.h: drivers/usb-common.h: comment which API - version each endif is for - * drivers/usb-common.h: drivers/usb-common.h: note the arg type for - libusb_strerror() in comments to our macro wrapper - nut_usb_strerror() - * drivers/usb-common.h: drivers/usb-common.h: update heading comment - with references to different API docs - * drivers/usb-common.h: drivers/usb-common.h: update heading comment - and (C) for libusb-1.0 related changes - -2021-12-24 Jim Klimov - - * drivers/libshut.c: drivers/libshut.c: shut_control_msg(): data_size - is a "short int" (not size_t) in this branch - -2021-12-15 Jim Klimov - - * drivers/libshut.c: drivers/libshut.c: shut_control_msg(): range- - check data_size before stuffing the number into a char - * drivers/libshut.c: drivers/libshut.c: range-check and cast ints to - struct members and library args - * drivers/libshut.c: drivers/libshut.c: braces fix - * drivers/nut_libusb.h, drivers/usb-common.h: drivers/usb-common.h + - nut_libusb.h: typedef more usb_ctrl_* tokens to match libusb-0.1 vs - 1.0 API - -2021-12-20 Jim Klimov - - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: comment FIXME for - possible uses of usb_ctrl_* typedefs - -2021-12-13 Jim Klimov - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, drivers/usb-common.h: - USB: Rename typedef usb_ctrl_char to usb_ctrl_charbuf to avoid - confsion (it is a char* sibling, not plain char) - * drivers/libshut.h, drivers/nut_libusb.h: drivers/nut_libusb.h, - libshut.h: whitespace fixes (align "version") - -2021-12-10 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: current use of - SHUT_MODE relies on defined/not-defined, not on value for plain #if - macro - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: adapt to usb-common.h and - (usb_ctrl_char) casting - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: adapt to usb-common.h - and (usb_ctrl_char) casting - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: adapt to usb- - common.h and (usb_ctrl_char) casting - -2021-12-20 Jim Klimov - - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: fix whitespace - (break long lines) - * drivers/riello_usb.c: drivers/riello_usb.c: fix whitespace (break - long lines) - -2021-12-10 Jim Klimov - - * drivers/riello_usb.c: drivers/riello_usb.c: adapt to usb-common.h - and (usb_ctrl_char) casting - * drivers/riello.h: drivers/riello.h: do not define duplicate - USB_ENDPOINT_IN/USB_ENDPOINT_OUT - * drivers/usb-common.h: drivers/usb-common.h: convert - usb_get_string{_simple}() from macro aliases to real mappings with - range-checks for libusb-1.0 API - * drivers/usb-common.h: drivers/usb-common.h: mark "static inline" - functions with - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC since not - all C files call them - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/libhid.h, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, - drivers/tripplite_usb.c, drivers/usb-common.h: drivers/usb- - common.h: consolidate libusb-0.1 vs 1.0 data/func mappings from - *usb.c files - * drivers/nut_libusb.h, drivers/usb-common.h: drivers/nut_libusb.h - already includes "usb-common.h" so no need to pull LibUSB headers - again - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: range-check and cast - args for usb_control_msg() => libusb_control_transfer() and - usb_interrupt_read() => libusb_interrupt_transfer() for libusb-1.0 - support - -2021-12-09 Jim Klimov - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - * drivers/usb-common.h: drivers/usb-common.h: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - -2021-12-08 Jim Klimov - - * drivers/nut_libusb.h: drivers/nut_libusb.h: sanity check that - exactly one version of WITH_LIBUSB_x_y is set (defined and has - value 1) - -2021-12-24 Jim Klimov - - * drivers/libusb1.c: drivers/libusb1.c: - HAVE_LIBUSB_DETACH_KERNEL_DRIVER needs "#ifdef" not "#if" - -2021-12-08 Jim Klimov - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/nut_libusb.h, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c, - drivers/tripplite_usb.c, drivers/usb-common.h, tools/nut- - scanner/nutscan-init.c, tools/nut-scanner/scan_usb.c, tools/nut- - usbinfo.pl: Convert C code from "#ifdef WITH_LIBUSB_x_y" to "#if" - tests for defined value - -2021-12-18 Dave Williams - - * drivers/apc-hid.c, drivers/arduino-hid.c, drivers/belkin-hid.c, - drivers/cps-hid.c, drivers/delta_ups-hid.c, drivers/explore-hid.c, - drivers/hidtypes.h, drivers/idowell-hid.c, drivers/liebert-hid.c, - drivers/mge-hid.c, drivers/openups-hid.c, drivers/powercom-hid.c, - drivers/powervar-hid.c, drivers/salicru-hid.c, drivers/tripplite- - hid.c, drivers/usbhid-ups.c, drivers/usbhid-ups.h: Fix #439 - Incorrect Output Voltage on CPS*EFPCLCD - -2021-12-08 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am: define SHUT_MODE=1 (with - a value) so #if is predictable - -2021-12-09 Jim Klimov - - * configure.ac, m4/nut_check_libusb.m4: configure.ac + - m4/nut_check_libusb.m4: rectify WITH_LIBUSB_x_y definitions - -2021-12-08 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: (hidden) debug - before AC_DEFINE - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: always AC_DEFINE - the WITH_LIBUSB_1_0 and WITH_LIBUSB_0_1 macros with a 0 or 1 value - -2021-12-07 Jim Klimov - - * docs/configure.txt: configure.ac et al: drop the extra --with- - libusb-version and handle its goals via --with-usb=VERSION - -2021-12-24 Jim Klimov - - * configure.ac, m4/nut_check_libusb.m4: m4/nut_check_libusb.m4 + - configure.ac: port newer solution for libusb version selection from - libusb-1.0 branch - -2021-12-07 Jim Klimov - - * configure.ac: configure.ac: drop duplicate NUT_CHECK_LIBNETSNMP - * configure.ac: configure.ac: regroup some NUT_ARG_WITH() closer to - their NUT_CHECK_*() so help for detailed options is near - -2021-11-15 Jim Klimov - - * m4/nut_check_libusb.m4: Move "additional USB-related checks" from - configure.ac to m4/nut_check_libusb.m4 - -2021-12-08 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am: define SHUT_MODE=1 (with - a value) so #if is predictable - -2021-12-09 Jim Klimov - - * configure.ac, m4/nut_check_libusb.m4: configure.ac + - m4/nut_check_libusb.m4: rectify WITH_LIBUSB_x_y definitions - -2021-12-08 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: (hidden) debug - before AC_DEFINE - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: always AC_DEFINE - the WITH_LIBUSB_1_0 and WITH_LIBUSB_0_1 macros with a 0 or 1 value - -2021-12-24 Dimitris Economou - - * drivers/generic_modbus.c: fix in modbus response value check - -2021-12-23 dtsecon - - * drivers/generic_modbus.c, drivers/generic_modbus.h: handle broken - pine error in modbus TCP connections, configurable modbus response - timeouts between requests and frame bytes - -2021-12-23 Jim Klimov - - * ci_build.sh: ci_build.sh: separate the "RES" vars used for - configure_nut() and default-all-errors processing (extend to - libusb-1.0* branches) - * tests/getvaluetest.c: tests/getvaluetest.c: include "config.h" - first - * tests/Makefile.am: tests/Makefile.am: only TEST getvaluetest "if - WITH_USB" - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: do not report - misleading "none (libusb-0.1-config)" as the detected libusb - version Seems this confused not only human readers, but also the - verdict - whether we build WITH_USB - * ci_build.sh: ci_build.sh: separate the "RES" vars used for - configure_nut() and default-all-errors processing (extend to - libusb-1.0* branches - * tests/getvaluetest.c: tests/getvaluetest.c: include "config.h" - first - * tests/Makefile.am: tests/Makefile.am: only TEST getvaluetest "if - WITH_USB" - -2021-12-22 Jim Klimov - - * clients/upsclient.c: clients/upsclient.c: upscli_tryconnect(): in - logged messages, clarity "connect to NUT server %s" Otherwise nut- - scanner output looks awkward when looking at large subnets with - many protocols (including "Old NUT") - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - convert logging in the main loop from a lot of fprintf() to - manageable upsdebugx() - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: - convert logging in the main loop from a lot of fprintf() to - manageable upsdebugx() - * ci_build.sh: ci_build.sh: fix a typo, copypasted around - * tests/Makefile.am: tests/Makefile.am: only build getvaluetest "if - WITH_USB" - * drivers/blazer_usb.c: drivers/blazer_usb.c: forget - libusb_device_handle - * drivers/libhid.h: drivers/libhid.h: forget libusb_device_handle - -2021-12-19 Jim Klimov - - * ci_build.sh: ci_build.sh: allow to build custom - NUT_USB_VARIANTS=libusb-x.y (not plain "x.y") - * ci_build.sh: ci_build.sh: allow to build custom NUT_USB_VARIANTS - and skip building a separate NUT_SSL_VARIANTS=auto - -2021-12-22 Jim Klimov - - * ci_build.sh: ci_build.sh: fix a typo, copypasted around - * tests/Makefile.am: tests/Makefile.am: only build getvaluetest "if - WITH_USB" - * drivers/blazer_usb.c: drivers/blazer_usb.c: forget - libusb_device_handle - * drivers/libhid.h: drivers/libhid.h: forget libusb_device_handle - -2021-12-21 Jim Klimov - - * docs/nut.dict: docs/nut.dict: update for recent NEWS - * NEWS: NEWS: prepare for nutdrv-qx legrand merge in 2.7.5 timeline - * NEWS: NEWS: prepare for nutdrv-qx ablerex merge in 2.7.5 timeline - * NEWS: NEWS: know about usbhid-ups Delta Minuteman support for NUT - v2.7.5 - * NEWS: NEWS: fix USB LogMin/LogMax mismatch reporting (just once!) - for NUT v2.7.5 - * NEWS: NEWS: add a little delay between multicommands [PR #1228] for - NUT v2.7.5 - * NEWS: NEWS: prepare for libusb-1.0 merge in 2.7.5 timeline - -2021-05-25 Jim Klimov - - * NEWS: NEWS: added nutdrv_qx "phoenixtec" subdriver in NUT-2.7.5 - -2021-04-23 Jim Klimov - - * docs/nut.dict: docs/nut.dict + NEWS: fix both to pass spellcheck - -2019-03-13 Arnaud Quette - - * docs/nut.dict: Update spelling dictionary - -2021-12-19 Jim Klimov - - * ci_build.sh: ci_build.sh: allow to build custom - NUT_USB_VARIANTS=libusb-x.y (not plain "x.y") - * ci_build.sh: ci_build.sh: allow to build custom NUT_USB_VARIANTS - and skip building a separate NUT_SSL_VARIANTS=auto - * ci_build.sh: ci_build.sh: allow to build custom - NUT_USB_VARIANTS=libusb-x.y (not plain "x.y") - * ci_build.sh: ci_build.sh: allow to build custom NUT_USB_VARIANTS - and skip building a separate NUT_SSL_VARIANTS=auto - -2021-12-21 Jim Klimov - - * drivers/legrand-hid.c: drivers/legrand-hid.c: fix type of - usb_device_id_t vendorID/productID to uint16_t * *{usb,hid}.c: - sentinel in a table of uint16_t can not be -1 - -2021-12-21 Jim Klimov - - * ci_build.sh: ci_build.sh: separate the "RES" vars used for - configure_nut() and default-all-errors processing - -2021-12-15 Jim Klimov - - * drivers/libshut.h: drivers/libshut.h: whitespace fixes (make func - ptrs more visible) - -2021-12-13 Jim Klimov - - * drivers/libusb.h: drivers/libusb.h: whitespace fixes (make func - ptrs more visible) - -2021-12-10 Jim Klimov - - * ci_build.sh: ci_build.sh: comment the rationale reminder for - "default-all-errors" mode - * ci_build.sh: ci_build.sh: try more options for non-verbose MAKE - runs - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: update - suggestions and envvar list for NOTIFYCMD callouts - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNUSED_FUNCTION - -2021-12-19 Jim Klimov - - * drivers/hidparser.c, drivers/hidparser.h: drivers/hidparser.{c,h}: - fix ReportDescSize from int to size_t - -2021-12-15 Jim Klimov - - * drivers/libhid.c, drivers/libhid.h: drivers/libhid.{c,h}: - HIDGetDataValue(), refresh_report_buffer(), get_item_buffered(): - fix "age" from int to time_t, to match time() operations - -2021-12-21 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: date_conversion_fun(): - hush a string overflow warning (overkill the buffer size a bit) - -2021-12-15 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: date_conversion_fun(): - comment and cast numeric type conversions - -2021-12-16 Jim Klimov - - * include/nut_stdint.h: include/nut_stdint.h: make sure we know - PRIsize and PRIssize - -2021-12-21 Jim Klimov - - * docs/developers.txt, docs/nut.dict: docs/developers.txt: note that - we define "gcc-medium|gcc-hard" warnings without "pedantic" for - C89/C90/ANSI builds (flaws in OS headers are out of our control) - * configure.ac: configure.ac: define "gcc-medium|gcc-hard" warnings - with "extra" always, but without "pedantic" for C89/C90/ANSI builds - (flaws in OS headers are out of our control) - * tests/Makefile.am: tests/Makefile.am: consider LIBUSB_CFLAGS when - building parser test - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: separate (and - disable by default) ANSI C build scenarios, they are too noisy in - fightwarn for no real good - * common/common.c: common/common.c: s_upsdebug*(): move fmt2[] - declarations to top from code - * common/common.c: common/common.c: fix comments from // to /* */ - * drivers/hidparser.h: drivers/hidparser.h: include "config.h" - * server/upsd.c: server/upsd.c: #include config.h first - -2021-12-21 Jim Klimov - - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Fix this on some of the CI - platforms: ```` [2021-12-21T09:21:47.623Z] nutdrv_qx.c:1665:2: - error: initialization from incompatible pointer type [-Werror] - [2021-12-21T09:21:47.623Z] { USB_DEVICE(0xffff, 0x0000), NULL, - NULL, &ablerex_subdriver }, /* Ablerex 625L USB */ - [2021-12-21T09:21:47.623Z] ^ [2021-12-21T09:21:47.623Z] - nutdrv_qx.c:1665:2: error: (near initialization for - 'qx_usb_id[1].fun') [-Werror] ```` - -2021-12-21 Jim Klimov - - * scripts/upower/95-upower-hid.rules: Update 95-upower-hid.rules Add - VID/PID for Minuteman UPS - * drivers/blazer_usb.c: drivers/blazer_usb.c: cast tmp as char* - Older compilers complain that we are: passing argument 3 of - 'usb_interrupt_read' from incompatible pointer type expected 'char - *' but argument is of type 'char (*)[512]' - -2021-12-21 Jim Klimov - - * docs/nut.dict: Update nut.dict Update for PR #1135 - -2021-12-20 Jim Klimov - - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Whitespace fix - -2021-12-20 hunter86bg - - * data/driver.list.in: Add Powerwalker VFI 3000 TG Online UPS to - driver.list.in (#1224) - -2021-12-20 Jim Klimov - - * drivers/hidparser.c: Update hidparser.c Fix whitespace in recent - changes for LogMin/LogMax rectification - -2021-12-20 Jim Klimov - - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - whitespace (indentation etc) - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix whitespace (break - long lines) - * drivers/riello_usb.c: drivers/riello_usb.c: fix whitespace (break - long lines) - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: fix whitespace - (break long lines) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix whitespace (break - long lines) - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix whitespace (break - long lines) - -2021-12-19 Scott Colby - - * drivers/usbhid-ups.c: Add a short sleep between fallback instcmds - in usbhid-ups. For some devices, missing instcmds are emulated by - calling two instcmds that do exist in sequence. For some devices, - when these commands arrive too quickly, they are not properly - processed. (One, both, or neither of the commands are acted upon.) - Adding a 1/8th-second delay (125,000 microseconds) between the two - instcmds that make up the fallback command has worked to make the - TrippLite AVR750U (new version with the 3024 productId/protocol) - behave consistently when using the fallback commands - (shutdown.return and shutdown.stayoff). This delay is also short - enough that it seems unlikely to cause a problem for any devices - which don't exhibit this issue. - -2021-12-16 Ablerexsoftware - - * docs/acknowledgements.txt, docs/man/nutdrv_qx.txt, docs/nutdrv_qx- - subdrivers.txt, drivers/Makefile.am, drivers/nutdrv_qx.c: modify CI - warnings and Replace the new sub driver - -2021-12-15 Nick Briggs - - * drivers/hidparser.c: Move check for LogMax encoding error to - parsing of report description At least one UPS [APC Back-UPS - BX1600MI FW:294201G -302201G] is known to have encoding errors in - its USB HID report description such that a conforming - interpretation of the encoded LogicalMaximum value indicates that - it is -1 and the resulting LogicalMin..LogicalMax range is 0..-1. - The actual report values read are correctly encoded. Rather than - log a range error each time a value is read we can detect the - encoding error when the report description is read (once, at - startup) and adjust for the encoding error at that time. - -2021-12-09 Jim Klimov - - * ci_build.sh: Refactor `./ci_build.sh spellcheck` to be more useful - * ci_build.sh: ci_build.sh: refactor - build_to_only_catch_errors_target() out of - build_to_only_catch_errors() - * ci_build.sh, docs/developers.txt: ci_build.sh: introduce support - for CI_SHELL_IS_FLAKY=true - * docs/developers.txt: docs/developers.txt: when introducing - ci_build.sh, mention that NUT CI farm tells how to reproduce builds - -2021-12-08 Jim Klimov - - * docs/man/nut-scanner.txt: Update nut-scanner.txt Clarify SNMP - auth/priv proto support depends on Net-SNMP lib - * docs/man/snmp-ups.txt: Update snmp-ups.txt Clarify SNMP auth/priv - proto support depends on Net-SNMP lib - -2021-12-08 Mauro Guerrera - - * docs/man/snmp-ups.txt: Update snmp-ups docs - * docs/man/nut-scanner.txt: Update docs to list new auth and privacy - encryption options - -2021-12-07 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: refactor shell - if/case to m4 (tracking down missed parentheses) - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: port more function - probes from libusb-1.0+0.1 branch - * ci_build.sh, configure.ac, docs/configure.txt, - m4/nut_check_libusb.m4: configure.ac et al: drop the extra --with- - libusb-version and handle its goals via --with-usb=VERSION - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: port comments and - m4 markup from libusb-1.0+0.1 branch - * configure.ac, m4/nut_check_libusb.m4: configure.ac: move remaining - libusb sanity checks into the m4/nut_check_libusb.m4 file - * configure.ac: configure.ac: drop duplicate NUT_CHECK_LIBNETSNMP - * configure.ac: configure.ac: regroup some NUT_ARG_WITH() closer to - their NUT_CHECK_*() so help for detailed options is near - * drivers/libusb1.c: drivers/libusb1.c: nut_libusb_open(): range- - check and cast libusb_control_transfer() arg rdlen - * drivers/libusb1.c: drivers/libusb1.c: nut_libusb_open(): range- - check and cast libusb_control_transfer() arg rdlen - * Makefile.am: Makefile.am: do not let (parallel) "make maintainer- - clean" remove the files that cleanup recipe needs - * ci_build.sh: Revert "ci_build.sh: fix bogus expression for - BUILDSTODO" This reverts commit - e57eec425da5c2020656fd48ec3f8bb9bbf55c52 and adds comments and - handling why that weird construct was not bogus ;) - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: reword notes for default QEMU container memory settings - * ci_build.sh: Add a shortcut hack to "./ci_build.sh spellcheck" - easily - * common/Makefile.am: common/Makefile.am: some "make" implems dislike - DRY multi-entry definition of same target (common.c) - * ci_build.sh: Add a shortcut hack to "./ci_build.sh spellcheck" - easily - * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: drivers/snmp- - ups.c + tools/nut-scanner/scan_snmp.c: hide sanity checks before - generate_Ku() into pragmas to not warn about type-limits - ("comparison is always false due to limited range of data type" on - some architectures) - * drivers/solis.c: drivers/solis.c: make sure nut_stdint.h is - included early and defines size_t - -2021-12-06 Jim Klimov - - * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: drivers/snmp- - ups.c + tools/nut-scanner/scan_snmp.c: align (cast) arg type of - generate_Ku() with net-snmp headers, and document the inconsistency - of size_t vs u_int in the same API - * drivers/snmp-ups.c: drivers/snmp-ups.c: align (cast) arg type of - malloc()/realloc() - * drivers/snmp-ups.c: drivers/snmp-ups.c: align (cast) arg type of - snmp_errstring() vs response->errstat (int vs long), and document - the inconsistency with net-snmp headers - * drivers/snmp-ups.c: drivers/snmp-ups.c: upsdrv_makevartable(): fix - maths with size_t vs int - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: setvar(): cast - placing of new_unit_id into wire protocol (FIXME? Does that code - assume CPU endianness?) - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: - upsdrv_initinfo(): fix receiver of strtol() - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: whitespace fixes - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: setvar(): fix - determination of outlet index number - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: debug_message(): - fix len from int to size_t - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: soft_shutdown(): - cast placing of offdelay into wire protocol (FIXME? Does that code - assume CPU endianness?) - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: fix reading and - printing of offdelay (unsigned int in this driver) - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: fix hex2d() to - long as a consumer of strtol() - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: fix toprint_str() - length to size_t and toprint(x) to char - * drivers/netxml-ups.c: drivers/netxml-ups.c: fix type of "ret" for - ne_read_response_block() and ne_sock_read() to ssize_t (as in - libneon headers) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix qx_command() to - return ssize_t like ser_send() at least - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - "u_langid_fix" in upsdrv_initups() - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - length of "cmdlen" in phoenixtec_command() - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - bytes in phoenixtec_command() - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - bytes in fuji_command() - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - bytes in repetitive "Simple unicode -> ASCII inplace conversion" - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast int - vs size_t in subdriver handlers (buflen, ret, i++) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: initialize ret=0 before - we potentially use it in loop i+=ret (should not happen in current - code, but...) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: cast upsdebug_hex() - logging with non-size_t args - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: range-check and cast - receivers of strtol() - * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h: drivers/nutdrv_qx.{c,h}: - qx_process(), item_t.answer_len: fix lengths from int to size_t - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: qx_command(): indent - ifdefs for TESTING/QX_USB/QX_SERIAL for easier navigation - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: qx_command() complains - about unused parameters (not sure why); mark with - NUT_UNUSED_VARIABLE just in case - * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h: drivers/nutdrv_qx.{c,h}: - fix STATUS() macro, qx_status(), status_lkp_t.status_mask field and - ups_status var to all be "unsigned int" - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: - range-check and cast receivers of strtol(); wrap a few long lines - * drivers/nutdrv_qx_mecer.c: drivers/nutdrv_qx_mecer.c: fix receivers - of strtol() - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - masterguard_test_battery(): fix receivers of strtol() - duration - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - masterguard_shutdown(): fix receivers of strtol() - - ondelay/offdelay - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - masterguard_new_slaveaddr(): range-check and cast - "masterguard_next_slaveaddr" - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - fix receivers of strtol() - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - masterguard_output_voltages(): fix type for sizeof() maths - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - masterguard_model(): fix type of min_bp/max_bp - -2021-12-04 Jim Klimov - - * drivers/nutdrv_qx_blazer-common.c: drivers/nutdrv_qx_blazer- - common.c: fix and range-check receivers of strtol() - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: fix - receivers of strtol() - * drivers/nutdrv_qx_voltronic-qs-hex.c: drivers/nutdrv_qx_voltronic- - qs-hex.c: fix receivers of strtol() - * drivers/solis.c: drivers/solis.c: fix packet_size from int to - size_t - * drivers/apcsmart.c: drivers/apcsmart.c: bit-wise &= ~() insists it - is for unsigned (int) types - vt->flags - * drivers/apcsmart.c: drivers/apcsmart.c: bit-wise &= ~() insists it - is for unsigned (int) types - termios struct - * drivers/apcsmart.c: drivers/apcsmart.c: sdcmd_CS: fix cshd from int - to useconds_t - * drivers/apcsmart.c: drivers/apcsmart.c: whitespace fix - * drivers/apcsmart.c: drivers/apcsmart.c: apc_getcaps(): fix i, - nument, entlen from int to size_t - * drivers/apcsmart.c: drivers/apcsmart.c: cast prtchr() args from - (unsigned char) to (char) - * drivers/apcsmart.c: drivers/apcsmart.c: fix receivers of strtol() - * drivers/apcsmart.c: drivers/apcsmart.c: cast - apc_read*()/apc_write*() from ((const) char) to (const unsigned - char) - * drivers/apcsmart.c: drivers/apcsmart.c: fix receivers of strlen() - from int to ssize_t - * drivers/apcsmart.c, drivers/apcsmart.h: drivers/apcsmart.{c,h}: fix - ups_status and APC_STAT_* from int to long (to match strtol() used) - * drivers/apcsmart.c: drivers/apcsmart.c: fix receivers of strlen() - from int to ssize_t - * drivers/apcsmart.c: drivers/apcsmart.c: fix - apc_read*()/apc_write*() from int to ssize_t to match select_read() - et al - * drivers/apcsmart.c: drivers/apcsmart.c: include main.h => config.h - first - * drivers/apcsmart.c: drivers/apcsmart.c: convert_data(): fix - receivers of strtol() - * drivers/apcsmart-old.c, drivers/apcsmart-old.h: drivers/apcsmart- - old.c: fix const/unsigned/char usages - * drivers/apcsmart-old.c: drivers/apcsmart-old.c: do_capabilities(): - fix i, nument, entlen from int to size_t - * drivers/apcsmart-old.c, drivers/apcsmart-old.h: drivers/apcsmart- - old.c: fix receivers of strtol() - * drivers/solis.h: drivers/solis.h: fix packet_size from into to - size_t - * drivers/apcsmart-old.c: drivers/apcsmart-old.c: fix handling of - ser_*() retval from int to ssize_t - * drivers/clone.c: drivers/clone.c: fix ondelay/offdelay handling - from int to long (to match strtol() used) - * drivers/clone-outlet.c: drivers/clone-outlet.c: fix handling of - read()/write() retval from int to ssize_t - * drivers/clone.c: drivers/clone.c: fix handling of read()/write() - retval from int to ssize_t - * drivers/blazer.h, drivers/blazer_ser.c, drivers/blazer_usb.c: - drivers/blazer.h + blazer_{ser,usb}.c: blazer_command(): fix - handling of ser_get_buf() retval from int to ssize_t - * drivers/blazer.c: drivers/blazer.c: fix ondelay/offdelay handling - from int to long (to match strtol() used) - * drivers/blazer.c: drivers/blazer.c: fix receivers of strtol() - - delay tmp var - * drivers/powerp-txt.c: drivers/powerp-txt.c: fix ondelay/offdelay - handling from int to long (to match strtol() used) - * drivers/victronups.c: drivers/victronups.c: fix receivers of - strtol() - * drivers/victronups.c: drivers/victronups.c: fix handling of - ser_get_line() retval from int to ssize_t - * drivers/tripplite.c: drivers/tripplite.c: fix receivers of strtol() - => hex2d() - * drivers/tripplite.c: drivers/tripplite.c: fix handling of - ser_get_char() retval from int to ssize_t - * drivers/solis.c, drivers/solis.h: drivers/solis.{c,h}: fix - comm_receive() from int to size_t, and match ser_get_buf_len() len- - or-error returns - * drivers/solis.c, drivers/solis.h: drivers/solis.{c,h}: fix byte- - sized maths of str2bin() and day counts to uint8_t - * drivers/solis.c: drivers/solis.c: include main.h => config.h first - * drivers/solis.c, drivers/solis.h: drivers/solis.c: - save_ups_config(): fix casting of ConfigPack[] entries to (unsigned - char) from original types - * drivers/nutdrv_siemens_sitop.c: drivers/nutdrv_siemens_sitop.c: fix - handling of ser_get_line() retval from int to ssize_t - * drivers/safenet.c: drivers/safenet.c: fix ondelay/offdelay handling - from int to long (to match strtol() used) - * drivers/safenet.c: drivers/safenet.c: fix array loop iterator from - int to size_t - * drivers/safenet.c: drivers/safenet.c: fix handling of - ser_get_line() retval from int to ssize_t - * drivers/rhino.c: drivers/rhino.c: fix handling of ser_get_line() - retval from int to ssize_t - * drivers/powercom.h: drivers/powercom.h: fix whitespace - (indentations) - * drivers/powercom.c: drivers/powercom.c: fix array loop iterator - from int to size_t - * drivers/powercom.c: drivers/powercom.c: fix handling of - ser_get_line() retval from int to ssize_t - * drivers/optiups.c: drivers/optiups.c: a few whitespace nits - * drivers/optiups.c: drivers/optiups.c: fix OPTISBIT_* handling from - int to long (to match strtol() used) - * drivers/optiups.c: drivers/optiups.c: fix optifill() len from int - to size_t - * drivers/optiups.c: drivers/optiups.c: fix handling of - ser_get_line() retval from int to ssize_t - * drivers/oneac.c: drivers/oneac.c: fix handling of ser_get_line() - retval from int to ssize_t - * scripts/subdriver/gen-usbhid-subdriver.sh: scripts/subdriver/gen- - usbhid-subdriver.sh: update generated C heading comment with "TODO" - and update generated code whitespace markup - * drivers/arduino-hid.c, drivers/salicru-hid.c: drivers/usb- - common.{c,h} drivers/*{usb,hid}.c: fix type of usb_device_id_t - vendorID/productID to uint16_t Catch up to earlier change for - recently merged USB HID drivers; specifically * *{usb,hid}.c: - sentinel in a table of uint16_t can not be -1 for: * - drivers/salicru-hid.c * drivers/arduino-hid.c * - scripts/subdriver/gen-usbhid-subdriver.sh creating the boilerplates - -2021-12-03 Jim Klimov - - * drivers/microsol-common.c: drivers/microsol-common.c: fix - setup_poweroff_schedule() vars from int to bool_t to match - set_schedule_time() - * drivers/microsol-common.c: drivers/microsol-common.c: fix - get_base_info(), get_updated_info() buf sizes from unsigned int to - ssize_t (to match ser_get_buf_len() len-or-error returns) - * drivers/microsol-common.c: drivers/microsol-common.c: fix - comm_receive() from int to size_t - * drivers/microsol-common.c: drivers/microsol-common.c: - save_ups_config(): fix casting of configuration_packet[] entries to - (unsigned char) from original types - * drivers/microsol-common.c: drivers/microsol-common.c: fix byte- - sized maths of bitstring_to_binary() and day counts to uint8_t - -2021-12-06 Jim Klimov - - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: instcmd(): - range-check and cast for ups2000_write_register() and - handler_func() - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_update_alarm(): range-check and cast all_alarms_len from - snprintf() retval - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_update_info(): pragma disable warnings for non-fixed format - string - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_update_info(): cast uint32_t for reg-idx - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_read_serial(): range-check and cast ssize_t vs size_t - increments - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_update_info(): cast uint8_t calculations of reg_id parts - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_device_identification(): cast uint32_t calculations of - ups2000_ident - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_device_identification(): range-check and cast crc16 - calculations - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_write_registers(), ups2000_read_registers(), - ups2000_device_identification(): initialize variables that clang-9 - is not sure about Seems like a clang analyzer bug frankly: code - starts with a retrying loop that would initialize these variables. - But still, adding determinism into code never hurts ;) - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: crc16(): fix - casting to uint16_t when bit-shifting - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: ups2000_alarm[] - sentinel: fix uint16_t reg from -1 to 0 - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: - ups2000_device_identification(): fix r from int to size_t, to match - ser_send_buf() - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: fix - ups2000_read_serial() from int to size_t, to match ser_get_buf() - * drivers/huawei-ups2000.c: drivers/huawei-ups2000.c: mark local - variables static - -2021-12-03 Jim Klimov - - * drivers/microsol-common.c: drivers/microsol-common.c: fix (and - range-check) casting for memcpy - * drivers/microsol-common.c: drivers/microsol-common.c: wrap some - long comments - * drivers/microsol-common.c: drivers/microsol-common.c: include - main.h => config.h first - * common/Makefile.am: common/Makefile.am: limit the use of common.c - symlinking from srcdir to builddir only to cases when not - BUILDING_IN_TREE - * tools/nut-scanner/nutscan-init.c: tools/nut-scanner/nutscan-init.c: - comment that semaphore gets re-initialized by nut-scanner.c program - and why - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-init.c: - tools/nut-scanner/nutscan-init.c + nut-scan.h: hide "semaphore" - library variable - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - #include "config.h" first - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_xml_http.c: - tools/nut-scanner/*.c: fix use of size_t max_threads(_scantype) vs - (unsigned int) in sem_init() args - * tools/nut-scanner/nut-scan.h: tools/nut-scanner/nut-scan.h: fix - declaration of nutscan_semaphore(void) - * drivers/snmp-ups.c, m4/nut_check_libnetsnmp.m4, tools/nut- - scanner/nut-scanner.c, tools/nut-scanner/scan_snmp.c: - nut_check_libnetsnmp.m4, nut-scanner.c, scan_snmp.c, snmp-ups.c: - transition from NETSNMP_DRAFT_BLUMENTHAL_AES_04 (that may be not- - defined so #if is invalid) to - NUT_HAVE_LIBNETSNMP_DRAFT_BLUMENTHAL_AES_04 - * ci_build.sh: ci_build.sh: in default-all-errors mode, avoid last- - loop cleanup if DO_CLEAN_CHECK==no - * ci_build.sh: ci_build.sh: fix bogus expression for BUILDSTODO - * ci_build.sh: ci_build.sh: only score *_clean_check as SUCCEEDED if - they were not skipped, and report a bit more - -2021-11-30 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): import - tracing messages and points from 42ITy/DMF fork - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): clarify the - "trying the new match_sysoid() method" message - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): fix - upsdebugx() levels verbosity to make more sense - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): reformat - some debugs, use __func__ - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): report - device name (section) and host/IP in progress and errors - -2021-11-28 Jim Klimov - - * m4/nut_check_libpowerman.m4: m4/nut_check_libpowerman.m4: if - (lib)powerman.pc is missing, but header is present, check - -lpowerman directly - * m4/nut_check_libpowerman.m4: m4/nut_check_libpowerman.m4: they - deliver an empty version string, so we should not error out on that - -2021-11-27 Jim Klimov - - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: if libusb-config - and libusb.pc are missing, but header is present, check -lusb - directly - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: detect - NET_SNMP_CONFIG with AC_PATH_PROGS and/or configure option (and - handle if it is missing) - * docs/configure.txt: docs/configure.txt: document --with-net-snmp- - config configure option better - * docs/configure.txt: docs/configure.txt: rephrase comments about - --with-*-libs and --with-*-include - * docs/configure.txt, m4/nut_check_pkgconfig.m4: - m4/nut_check_pkgconfig.m4 + docs/configure.txt: detect - (dummy_)PKG_CONFIG with AC_PATH_PROGS and/or configure option (and - handle if it is missing) - * m4/nut_check_libgd.m4: m4/nut_check_libgd.m4: initialize empty - CFLAGS LIBS LDFLAGS - * m4/nut_check_libgd.m4: m4/nut_check_libgd.m4: detect GDLIB_CONFIG - with AC_PATH_PROGS and/or configure option (and handle if it is - missing) - * docs/configure.txt, m4/nut_check_libusb.m4: m4/nut_check_libusb.m4 - + docs/configure.txt: detect LIBUSB_CONFIG with AC_PATH_PROGS - and/or configure option (and handle if it is missing) - * m4/nut_check_libpowerman.m4: m4/nut_check_libpowerman.m4: consider - have_PKG_CONFIG - * m4/nut_check_libwrap.m4: *.m4: AC_LANG_PUSH before AC_LINK_IFELSE - and similar tests - -2021-11-27 Jim Klimov - - * m4/ax_c___attribute__.m4, m4/nut_check_headers_windows.m4, - m4/nut_check_libnetsnmp.m4, m4/nut_func_getnameinfo_argtypes.m4, - m4/nut_type_socklen_t.m4: *.m4: AC_LANG_PUSH before - AC_COMPILE_IFELSE and similar tests - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: try to report - toStringStageCountDump() in ircNotify() - * configure.ac: configure.ac: AC_LANG_PUSH before AC_COMPILE_IFELSE - and similar tests - * clients/upsclient.c, clients/upslog.c, clients/upsmon.c, - clients/upsrw.c, clients/upssched.c, clients/upsset.c, - common/state.c, common/upsconf.c, docs/developers.txt, - docs/nut.dict, drivers/apcsmart-old.c, drivers/apcsmart.c, - drivers/apcupsd-ups.c, drivers/belkin.c, drivers/belkinunv.c, - drivers/bestups.c, drivers/clone-outlet.c, drivers/clone.c, - drivers/dstate.c, drivers/gamatronic.c, drivers/huawei-ups2000.c, - drivers/main.c, drivers/masterguard.c, drivers/mge-utalk.c, - drivers/mge-xml.c, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_bestups.c, drivers/nutdrv_qx_blazer-common.c, - drivers/nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic- - qs.c, drivers/nutdrv_qx_voltronic.c, drivers/oneac.c, - drivers/powercom.c, drivers/powerman-pdu.c, drivers/powerp-txt.c, - drivers/snmp-ups.c, drivers/tripplite_usb.c, drivers/upscode2.c, - drivers/victronups.c, server/conf.c, server/netget.c, - server/netlist.c, server/netset.c, server/user.c, - tests/cpputest.cpp, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/scan_snmp.c: Replace strcmp() and strcasecmp() use-cases - for short fixed string args by strncmp() and strncasecmp() - respectively Some compilers on some OSes complain due to implem - nuances. Updated docs/developers.txt to make note for posterity. - * drivers/microdowell.c: drivers/microdowell.c: some more pragmatic - ignorance for CLAMP() macro uses (older clang-3.4 et al) - -2021-11-22 Yifeng Li - - * drivers/huawei-ups2000.c: huawei-ups2000.c: rework logic for - "load.on". Currently the driver prevents the user from executing - "load.on" when the UPS is already on, and reports a - STAT_INSTCMD_FAILED with error logs. We need to do this if the UPS - is in bypass mode, because the UPS would otherwise enter normal - mode - "load.on" is not supposed to do that. On the other hand, - executing "load.on" when the UPS is already in "normal-mode on" has - no effect, it's still a legal command and should not be rejected - arbitrarily, which can potentially confuse downstream applications - and users. It also contains two misleading typos in the error - logs: (1) it incorrectly suggests "bypass.off" instead of - "bypass.stop", and (2) reports "failed: reason unknown." when the - reason is simply an already-on UPS. This commit allows "load.on" - to execute when it's in normal mode and already on, and changes the - log messages from errors to warnings. Typos in the log messages are - also fixed. The "load.on" command is only rejected in bypass mode, - with error logs. Finally, the logic for the off test is reworked - to improve readability. The original code checks whether the UPS is - on by testing the negative "not OFF" condition, which is not easy - to understand - the reader must have intimate knowledge on the code - to know its correctness. Namely, When the UPS power status is - updated, 1 of the 5 mutually exclusive flags, OL, OB, OL ECO, - BYPASS, or OFF is always set, thus the absence of the OFF flag - always reliably indicates an ON status. This commits converts the - single negative "not OFF" test to three positive tests for "OL", - "OB" and "OFF", with additional comments added on reachable and - unreachable conditions. Thus, previous uncertainty is eliminated. - -2021-11-26 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix dummy nutscan_scan_xml_http_range() - (WITHOUT_NEON) arg type for useconds_t usec_timeout - * drivers/libhid.c: drivers/libhid.c: fix debug-printing of byte- - counts as size_t - * drivers/microdowell.c: drivers/microdowell.c: some more pragmatic - ignorance for CLAMP() macro uses - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: - whitespace fix - * tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- - scanner/scan_xml_http.c: tools/nut-scanner/scan_*.c: fix debug- - printing of thread accounting as size_t - -2021-10-26 Jim Klimov - - * drivers/hidparser.c: drivers/hidparser.c: Parse_ReportDesc(): fix - "max" to size_t and "id" to uint8_t, to match struct fields - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix cast of range- - checked u_langid_fix - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix cast of return - types to size_t vs int - * drivers/libhid.c: drivers/libhid.c: string_to_path(): range-check - and cast converted values for path->Node[] - * drivers/libhid.c: drivers/libhid.c: hid_lookup_usage(): fix cast of - usage_code for printing and returning - * drivers/libhid.c: drivers/libhid.c: string_to_path(): check for - type overflow, and cast - * drivers/libhid.c: drivers/libhid.c: fix types for iterating vs - rbuflen from int to size_t - * drivers/libhid.c, drivers/libhid.h: drivers/libhid.{c,h}: fix - interrupt_size from int to size_t - * drivers/libhid.c: drivers/libhid.c: fix types for iterating vs - rbuflen from int to size_t - * drivers/libhid.c, drivers/libhid.h: drivers/libhid.{c,h}: fix - max_report_size from int to size_t - * drivers/libhid.c: drivers/libhid.c: file_report_buffer(): fix - buflen from int to size_t - * drivers/hidtypes.h: drivers/hidtypes.h: change HIDDesc_t.replen[] - from (array of) int to size_t - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: cast for - bit math for qx_status() result - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: cast - for bit math for qx_status() result, and line-wrap a long message - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: cast arg for - upsdebug_hex() to size_t - * drivers/nutdrv_qx_voltronic-qs-hex.c: drivers/nutdrv_qx_voltronic- - qs-hex.c: cast arg for upsdebug_hex() to size_t - * drivers/libusb.c: drivers/libusb.c: libusb_open(): cast rdlen to - unsigned to match usb_control_msg() where it is safe to do so - * drivers/libhid.h: drivers/libusb.h: change reportbuf_t.len[] from - (array of) int to size_t - * drivers/hidparser.c, drivers/hidtypes.h: drivers/hidtypes.h + - hidparser.c: change HIDDesc_t.nitems from int to size_t - * drivers/hidparser.c: drivers/hidparser.c: cast int types to - explicit conversions where safe - -2021-10-04 Jim Klimov - - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: process(): fix int - types - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: upsdrv_initups(): fix - type of port - * drivers/nutdrv_qx.h: drivers/nutdrv_qx.h: define QX_FLAG_* macros - as typed numbers (UL) to match item_t->qxflags - * drivers/powercom-hid.c: drivers/powercom-hid.c: range-check and - cast uint16_t values for ups delays - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: align return - type of usb_interrupt_read() and our upsdebug_hex() args - * drivers/upscode2.c: drivers/upscode2.c: align types of two statuses - * drivers/upscode2.c: drivers/upscode2.c: fix useconds_t - output_pace_usec - * drivers/upscode2.c: drivers/upscode2.c: fix speed_t baud var - * drivers/upscode2.c: drivers/upscode2.c: fix ssize_t ret for ser*() - routines - * drivers/powerp-txt.c: drivers/powerp-txt.c: fix ssize_t ret for - ser*() routines - * drivers/powerp-bin.c: drivers/powerp-bin.c: fix ssize_t ret for - ser*() routines, and cmd len - * drivers/powerpanel.h: drivers/powerpanel.h: adjust powerpanel - subdriver_t funcptr type for initups() - * drivers/ivtscd.c: drivers/ivtscd.c: fix ssize_t for ivt_status() - and ser_*() involved - * drivers/riello_ser.c: drivers/riello_ser.c: riello_instcmd(): fix - int type of delay vs atoi() - * drivers/riello_ser.c: drivers/riello_ser.c: fix ssize_t ret for - read() routines - * drivers/riello_usb.c: drivers/riello_usb.c: ussleep(): fix - useconds_t type - * drivers/riello_usb.c: drivers/riello_usb.c: riello_instcmd(): fix - int type of delay vs atoi() - * drivers/riello_usb.c: drivers/riello_usb.c: Get_USB_Packet(): fix - int type of size - * drivers/riello.c: drivers/riello.c: riello_parse_rc(): cast uint8_t - into char - * drivers/riello.c: drivers/riello.c: riello_prepare*(): cast - delay%256 into uint8_t - * drivers/riello.c: drivers/riello.c: riello_parse_sentr(): cast pom - maths into uint16_t explicitly... range-check missing though - * drivers/riello.c: drivers/riello.c: riello_parse_sentr(): cast - uint8_t => char to construct Version byte by byte - * drivers/riello.c: drivers/riello.c: riello_parse_gn(): range-check - and cast the NomPowerKVA / NomPowerKW - * drivers/riello.c: drivers/riello.c: riello_calc_CRC(): clarify and - cast the bitness magic as needed - * drivers/powercom.c: drivers/powercom.c: fix int type of model vars - to match OPTImodels/BNTmodels/KINmodels/IMPmodels arrays - * drivers/powercom.c: drivers/powercom.c: avoid casting via wrong int - type for termios fields - * drivers/powercom.c, drivers/powercom.h: drivers/powercom.{c,h}: - align int size for delay (min, sec) and ser_send_char() sending a - char - * drivers/tripplite.c: drivers/tripplite.c: fix casting of unsigned - delays from atoi() - * drivers/tripplite.c: drivers/tripplite.c: fix casting of ints in - send_cmd() - * drivers/tripplitesu.c: drivers/tripplitesu.c: fix casting of ints - into unsigned min/max high/low transfer values - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - hide warnings for intentional variable format string use - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - avoid a few potential uninitialized uses - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - fix a case of shadowed vars in a clause - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - declare local vars and funcs as static - * drivers/netxml-ups.c: drivers/netxml-ups.c: fix casting ssize_t - value up to size_t for ne_buffer_append() args - * drivers/netxml-ups.c: drivers/netxml-ups.c: fix int type of port - for ne_sock_connect() args - -2021-09-28 Jim Klimov - - * drivers/microdowell.c: drivers/microdowell.c: shuffle include-file - order - * drivers/microdowell.c: drivers/microdowell.c: instcmd(): casting - and (pragma-hushed) range checks for "delay" - * drivers/solis.c: drivers/solis.c: convert_days(): limit the range - for safe casting to size_t for memcpy() - * drivers/rhino.c: drivers/rhino.c: align int types in send_command() - * drivers/microsol-common.c, drivers/microsol-common.h: - drivers/microsol-common.{c,h}: mark local variables as static; - expose a few reasonable ones as extern - * drivers/microdowell.c, drivers/microdowell.h: - drivers/microdowell.{c,h}: fix size_t lengths and uint16_t/uint32_t - status bitmasks - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - declare upsdrv_shutdown() as noreturn - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - declare file-local variables static - * drivers/hidparser.c: drivers/hidparser.c: avoid shadowed local - variables in HIDParse() - * drivers/hidparser.c: drivers/hidparser.c: fix Value cast in - FormatValue() - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix status_mask to - unsigned int for STATUS() and bitmask maths - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: fix parsing of - interrupt_size from args, and error out on invalid inputs - * drivers/nutdrv_siemens_sitop.c: drivers/nutdrv_siemens_sitop.c: fix - counters to unsigned int - * drivers/mge-hid.c, drivers/usbhid-ups.c, drivers/usbhid-ups.h: - drivers/usbhid-ups.{c,h} + mge-hid.c: fix ups_status from int to - "unsigned" to match the STATUS() macro and bitmask maths - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - type for snmp_sess.timeout assignment - * drivers/microsol-apc.h: drivers/microsol-apc.h: align type of - NOMINAL_POWER[] to int, like nominal_power var in microsol-common.h - * drivers/oneac.c: drivers/oneac.c: fix buf sizes to size_t - * drivers/main.c, drivers/main.h, drivers/mge-utalk.c, - drivers/nutdrv_siemens_sitop.c, drivers/usbhid-ups.c: - drivers/main.{c,h} et al: fix poll_interval to be time_t like the - time() it has maths with - * drivers/main.c: drivers/main.c: allow only positive pollinterval - settings (avoid DoS by crazy loop) - * drivers/main.c: drivers/main.c: report and fail with invalid - pollinterval settings - * drivers/serial.c: drivers/serial.c: after some investigation of - standards, we may cast useconds_t=>suseconds_t - * server/netset.c: server/netset.c: log tracking_disable() result to - find a use for it (warning fix) - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: - execute_and_retrieve_query(): fix int casting and add diags pragmas - for range checks - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: get_answer(): fix int - casting for tail; fix redundant comparison - * drivers/bestfortress.c: drivers/bestfortress.c: simplify - usleep(d_usec) to no casting - * drivers/belkin.c: drivers/belkin.c: comment why casting usleep(cnt) - is okay - -2021-09-27 Jim Klimov - - * clients/upsclient.c, common/common.c, docs/new-drivers.txt, - drivers/serial.c, drivers/serial.h, include/common.h: - include/common.h, drivers/serial.{c,h}, docs/new-drivers.txt, - common/common.c, clients/upsclient.c: fix d_sec long => time_t to - match timeval struct fields - * clients/upsclient.c, common/common.c, include/common.h: - include/common.h, common/common.c, clients/upsclient.c: fix - select_read()/select_write(): long d_usec => suseconds_t - * docs/nut.dict: docs/nut.dict: update for new-drivers.txt revision - * docs/new-drivers.txt: docs/new-drivers.txt: align USB-common - structure and method signature descriptions with current - drivers/*usb*.h - * docs/man/upscli_readline.txt, docs/man/upscli_sendline.txt: - docs/man/upscli_readline.txt + upscli_sendline.txt: update method - arguments to match code (timeout unsigned int => const long) - * docs/man/upscli_list_next.txt, docs/man/upscli_list_start.txt: - docs/man/upscli_list_start.txt + upscli_list_next.txt: update - method arguments to match code (numa/numq unsigned int => size_t) - -2021-09-26 Jim Klimov - - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: fix data types for - alarm() and sleep() - * drivers/mge-utalk.c: drivers/mge-utalk.c: fix int casting to - snprintf() (size_t/ssize_t) - * drivers/mge-utalk.c: drivers/mge-utalk.c: fix int casting to - ser_get*()/ser_send_*() (size_t/ssize_t) - * drivers/metasys.c: drivers/metasys.c: fix int casting to - ser_get*()/ser_send_*() (size_t/ssize_t) - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: fix int casting to - ser_get*() (size_t/ssize_t) - * drivers/gamatronic.c: drivers/gamatronic.c: fix int casting to - ser_get*() (size_t/ssize_t) and unify naming of msg(_)len - * drivers/bestups.c: drivers/bestups.c: fix int casting to ser_get*() - (size_t/ssize_t) - * drivers/bestuferrups.c: drivers/bestuferrups.c: fix int casting to - ser_get*() (size_t/ssize_t) - * drivers/bestfortress.c: drivers/bestfortress.c: fix int casting to - ser_get*() (size_t/ssize_t) - * drivers/bestfcom.c: drivers/bestfcom.c: fix int casting to - ser_get*() (size_t/ssize_t) - * drivers/belkinunv.c: drivers/belkinunv.c: fix int casting to - ser_get*(), read() and write() (size_t/ssize_t) - * drivers/belkin.c: drivers/belkin.c: fix int casting to ser_get*() - (size_t/ssize_t) - * drivers/al175.c: drivers/al175.c: fix raw_data_t::buf_size and - io_head_t::addr,len to size_t - * drivers/al175.c: drivers/al175.c: fix int casting to ser_get*() - (size_t/ssize_t) - * drivers/dstate.c: drivers/dstate.c: augment range check when using - size_t as int - * drivers/dstate.c: drivers/dstate.c: fix int casting to read() and - write(), add range checks for bytes written (size_t/ssize_t) - -2021-09-23 Jim Klimov - - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: fix elapsed_time type - and casting - * drivers/bcmxcp.c, drivers/bcmxcp_io.h, drivers/bcmxcp_ser.c, - drivers/bcmxcp_usb.c: drivers/bcmxcp*.{c,h}: fix types involved - with read() and write() to ssize_t - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: fix count to size_t - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: fix - buf_size to size_t - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: fix types involved with read() and - write() to ssize_t - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: fix size_t thread_count and its - iterator - * drivers/serial.c, drivers/serial.h: drivers/serial.[h,c]: fix - d_usec from long to useconds_t - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_xml_http.c: - tools/nut-scanner/*.[h,c]: fix usec_timeout from long to useconds_t - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix size_t thread_count and its iterator - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix recv_size use as size_t parameter - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/scan_xml_http.c: - tools/nut-scanner/nut-scan.h + scan_xml_http.c: fix port type to - uint16_t - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - arg type for generate_Ku() - * drivers/apc-hid.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, - drivers/blazer_usb.c, drivers/cps-hid.c, drivers/delta_ups-hid.c, - drivers/idowell-hid.c, drivers/liebert-hid.c, drivers/mge-hid.c, - drivers/nutdrv_atcl_usb.c, drivers/openups-hid.c, drivers/powercom- - hid.c, drivers/powervar-hid.c, drivers/richcomm_usb.c, - drivers/riello_usb.c, drivers/tripplite-hid.c, - drivers/tripplite_usb.c, drivers/usb-common.c, drivers/usb- - common.h: drivers/usb-common.{c,h} drivers/*{usb,hid}.c: fix type - of usb_device_id_t vendorID/productID to uint16_t * usb-common.h: - fix the definition * *{usb,hid}.c: sentinel in a table of uint16_t - can not be -1 * usb-common.c: uint16_t for vendor and product -- - change sentinel matcher for full (0,0,NULL) hits - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/scan_xml_http.c: - 32-bit IPv4 addr mask should be uint32_t not int - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/scan_xml_http.c: - 32-bit IPv4 addr should be uint32_t not int - -2021-10-12 Jim Klimov - - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - safety-check and cast use of small mask_byte values - -2021-09-23 Jim Klimov - - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: use - platform-dependent getnameinfo() argument types - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - size_t thread_count and its iterator - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: fix - size_t thread_count and its iterator - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: fix - size_t buf_size - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: align - upscli_*() numa and numq args from "unsigned int" to "size_t", to - match PCONF_CTX_t fields - * server/upsd.c: server/upsd.c: fix comparisons of nfds_t maxconn, - long sysconf() and size_t malloc() - * server/upsd.c: server/upsd.c: check if maxconn<1 to avoid - signedness issues and because zero connections are also useless - * server/upsd.c: server/upsd.c: align use of nfds_t vs. long - (maxconn) for GCC "-Wtype-limits" - -2021-09-22 Jim Klimov - - * server/sstate.c: server/sstate.c: fix missed include - * server/conf.c, server/upsd.c, server/upsd.h: server/upsd.c + - conf.c: align use of nfds_t vs. long (maxconn) - * server/upsd.c: server/upsd.c: align use of uint8_t when - constructing an UUID - * clients/upsclient.c, server/netssl.c: server/netssl.c + - clients/upsclient.c: fix ssl_error() to use ssize_t "ret" - * server/sstate.c: server/sstate.c: fix int casting to read() and - write(), add range checks for bytes written (size_t/ssize_t) - * clients/upsc.c, clients/upsclient.c, clients/upsclient.h, - clients/upscmd.c, clients/upsimage.c, clients/upslog.c, - clients/upsmon.c, clients/upsrw.c, clients/upsset.c, - clients/upsstats.c, docs/man/upscli_get.txt, drivers/dummy-ups.c: - clients/upsclient.h and numerous *.c: align upscli_get(), - upscli_list_start(), upscli_list_next() numa and numq args from - "unsigned int" to "size_t", to match PCONF_CTX_t fields - * clients/upsmon.c: clients/upsmon.c: fix int casting to read() and - write(), add separate retval processing from system() - * clients/upssched.c: clients/upssched.c: fix int casting to read() - and write(), add range checks for bytes written (size_t/ssize_t) - * clients/upsclient.c: clients/upsclient.c: fix receiver of strtol(), - and log a FIXME for sanity checks - * clients/upsmon.c: clients/upsmon.c: fix receiver of strtol() - * clients/upssched.c: clients/upssched.c: fix receiver of strtol() - * clients/upsmon.c: clients/upsmon.c: fix int type for use of - upscli_readline() - * clients/upscmd.c: clients/upscmd.c: fix int type for use of - upscli_readline() - * clients/upsimage.c: clients/upsimage.c: fix int casting - * clients/upsrw.c: clients/upsrw.c: fix receiver of strtol() - * drivers/nutdrv_qx.c, server/netset.c: server/netset.c + - drivers/nutdrv_qx.c: fix consumers of "long" getaux() - * common/str.c: common/str.c: fix buffer int length in str_to_*int*() - methods - * common/state.c, include/state.h, server/sstate.c, server/sstate.h: - common/state.c + server/sstate.c + *.h: aux field is a "long" so - getaux() should return long - * common/common.c, include/common.h: common/common.c: fix use of a - pid_t value - -2021-11-25 Jim Klimov - - * configure.ac: configure.ac: typo fix for ABS_TOP_* determination - -2021-11-25 Jim Klimov - - * docs/FAQ.txt: Update FAQ.txt Update rationale (reasonable use- - cases) for "clone" driver - -2021-11-25 Jim Klimov - - * common/Makefile.am, configure.ac: configure.ac + - common/Makefile.am: detect if building in-tree and differentiate - the recipe involving common.c based on that - * common/Makefile.am: common/Makefile.am: let OpenBSD 6.4 make cope - with common.c recipe - * docs/config-prereqs.txt: docs/config-prereqs.txt: add libusb1 for - OpenBSD - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - concerns about OpenBSD 6.4 freeipmi vs. "-largp" - -2021-11-25 Jim Klimov - - * NEWS, docs/nut.dict: NEWS: added new salicru-hid subdriver in - usbhid-ups for NUT v2.7.5 - -2021-11-25 xbgmsharp - - * drivers/salicru-hid.c: Rename unmapped.* to experimental.* data - points Add untested instant commands - -2021-11-24 xbgmsharp - - * drivers/salicru-hid.c: Update mapping - -2021-11-23 Jim Klimov - - * docs/FAQ.txt: docs/FAQ.txt: extend Q&A on "NUT proxying" with - mention of "clone" driver - -2021-11-22 xbgmsharp - - * data/driver.list.in, drivers/Makefile.am, drivers/salicru-hid.c, - drivers/salicru-hid.h, drivers/usbhid-ups.c, - scripts/upower/95-upower-hid.rules: Initial release for Salicru - driver - * data/driver.list.in, drivers/Makefile.am, drivers/salicru-hid.c, - drivers/salicru-hid.h, drivers/usbhid-ups.c, - scripts/upower/95-upower-hid.rules: Initial release for Salicru - driver - -2021-11-22 Yifeng Li - - * docs/nut.dict: docs/nut.dict: add model name "KRTS". - * docs/man/huawei-ups2000.txt: huawei-ups2000.txt: update tested - models and user report suggestions. - * docs/man/huawei-ups2000.txt: huawei-ups2000.txt: minor typo fixes - -2021-11-22 Jim Klimov - - * docs/FAQ.txt: Update docs/FAQ.txt Add example of dummy-ups (relay - mode) configuration section Co-authored-by: Helmut K. C. Tessarek - - -2021-11-18 Jim Klimov - - * drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups.{c,h}: - typedef snmp_info_t::flags and define its PRI_SU_FLAGS format to - ease type changes later Also adds a "default:" to case for - template flag handling (from FTY fork) - -2021-11-22 Jim Klimov - - * docs/FAQ.txt: docs/FAQ.txt: update for interactions via github - (issues, PRs, ...) - * docs/FAQ.txt: docs/FAQ.txt: update for use-cases of dummy-ups in - relay mode - -2021-11-20 Jim Klimov - - * ci_build.sh: ci_build.sh: Make end of log useful for spellcheck - failure handling - -2021-11-20 Jim Klimov - - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - add a chapter on OpenBSD build agent setup - * configure.ac: configure.ac: require at least autoconf-2.61 (macros - are used that are missing in 2.60 and before) - * autogen.sh: autogen.sh: comment that libtool is also needed - * autogen.sh: autogen.sh: comment about envs that want - AUTOCONF_VERSION or AUTOMAKE_VERSION - * autogen.sh, configure.ac, scripts/augeas/.gitignore, - scripts/devd/Makefile.am, scripts/udev/.gitignore, - scripts/udev/Makefile.am: autogen.sh + configure.ac: try to support - building on systems without Python or Perl - -2021-11-22 Arnaud Quette - - * drivers/mge-xml.c: Eaton XML/PDC: add External Battery Module count - -2021-11-16 Jim Klimov - - * drivers/snmp-ups-helpers.c: drivers/snmp-ups-helpers.c: reshuffle - includes - * drivers/snmp-ups.c: drivers/snmp-ups.c: include main.h => common.h - => config.h first - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix strncmp() limits for - "v1" and "v3" checks (copy-pasting typo) - * drivers/snmp-ups.c: drivers/snmp-ups.c: mention in help that SNMP - version may be "v3" - * drivers/libusb1.c: drivers/libusb1.c: fix devcount and devnum from - ssize_t to size_t - -2021-11-15 Jim Klimov - - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - printf() assumes floating-point numbers are doubles, satisfy its - warnings - * drivers/libusb1.c: drivers/libusb1.c: drop extra "int i" definition - * ci_build.sh: ci_build.sh: NUT_USB_VARIANT= => --with- - usb=libusb [libusb-1.0+0.1 branch] - * ci_build.sh: ci_build.sh: NUT_USB_VARIANT=no => --without-usb - explicitly - * ci_build.sh: ci_build.sh: default-all-errors: report - BUILDSTODO_INITIAL at the end of log, and if non-zero BUILDSTODO - remained unaccounted - * ci_build.sh: ci_build.sh: report which SSL/USB variants will be - looped - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - use a longer global var name for modbus_ctx (nee ctx) - * drivers/bcmxcp_ser.c, drivers/bcmxcp_ser.h, tools/nut- - scanner/scan_eaton_serial.c: drivers/bcmxcp_ser.{c,h} + tools/nut- - scanner/scan_eaton_serial.c: use longer global var name (AUT => - BCMXCP_AUTHCMD) - * drivers/bestfortress.c: drivers/bestfortress.c: comment an - analyzer-check complaint - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: avoid useless - comparison (warning) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: only define - "Compatibility layer between libusb 0.1 and 1.0" if we build with - QX_USB at all (no required headers are in context otherwise) - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts for SSL+USB are planned same as executed - and - handle explicit NUT_USB_VARIANTS=no - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts for SSL+USB are planned same as executed - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts are decremented when configuration failed - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": between - configure and build, report the Configured NUT_USB_VARIANT - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": between - configure and build, report the Configured NUT_SSL_VARIANT - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": support - looping over NUT_USB_VARIANTS as well - * drivers/libhid.c: drivers/libhid.c: HIDDumpTree(): mark that arg - "hd" is not used in SHUT_MODE - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: the "additional - USB-related checks" should now manipulate "LIBS" not "LIBUSB_LIBS" - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: comment on - "additional USB-related checks" - * m4/nut_check_libusb.m4: Move "additional USB-related checks" from - configure.ac to m4/nut_check_libusb.m4 - * drivers/nutdrv_qx.c: [libusb-1.0] Realign buffer casting to - (usb_ctrl_char) after merge from master - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - merge conflict [libusb-1.0+0.1] - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: complete the merge - from master to libusb-1.0+0.1 - * ci_build.sh: ci_build.sh: NUT_USB_VARIANT=no => --without-usb - explicitly - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: fix definition of - curDevice (libusb-1.0) - * ci_build.sh: ci_build.sh: default-all-errors: report - BUILDSTODO_INITIAL at the end of log, and if non-zero BUILDSTODO - remained unaccounted - * ci_build.sh: ci_build.sh: default-all-errors: report - BUILDSTODO_INITIAL at the end of log, and if non-zero BUILDSTODO - remained unaccounted - * ci_build.sh: ci_build.sh: report which SSL/USB variants will be - looped - -2018-03-14 Daniele Pezzini - - * data/cmdvartab, docs/nut-names.txt: libusb: update example of - driver.version.usb and add it to cmdvartab - -2021-11-15 François-Régis Degott - - * drivers/eaton-ats16-nm2-mib.c: eaton-ats16-nm2-mib.c: fix mul coef. - for ambient.temperature and humidity (#1173) * eaton- - ats16-nm2-mib.c: fix mul coef. for ambient.temperature and - ambient.humidity * Update eaton-ats16-nm2-mib.c Co-authored-by: - Arnaud Quette - -2021-11-15 Jim Klimov - - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": between - configure and build, report the Configured NUT_SSL_VARIANT - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts are decremented when configuration failed - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: avoid useless - comparison (warning) - * drivers/bestfortress.c: drivers/bestfortress.c: comment an - analyzer-check complaint - * drivers/bcmxcp_ser.c, drivers/bcmxcp_ser.h, tools/nut- - scanner/scan_eaton_serial.c: drivers/bcmxcp_ser.{c,h} + tools/nut- - scanner/scan_eaton_serial.c: use longer global var name (AUT => - BCMXCP_AUTHCMD) - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - use a longer global var name for modbus_ctx (nee ctx) - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - use a longer global var name for modbus_ctx (nee ctx) - * drivers/bcmxcp_ser.c, drivers/bcmxcp_ser.h, tools/nut- - scanner/scan_eaton_serial.c: drivers/bcmxcp_ser.{c,h} + tools/nut- - scanner/scan_eaton_serial.c: use longer global var name (AUT => - BCMXCP_AUTHCMD) - * drivers/bestfortress.c: drivers/bestfortress.c: comment an - analyzer-check complaint - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: avoid useless - comparison (warning) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: only define - "Compatibility layer between libusb 0.1 and 1.0" if we build with - QX_USB at all (no required headers are in context otherwise) - * configure.ac: configure.ac: neuter "nut_usb_lib" if building - --without-usb - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts for SSL+USB are planned same as executed - and - handle explicit NUT_USB_VARIANTS=no - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts for SSL+USB are planned same as executed - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": ensure - BUILDSTODO counts are decremented when configuration failed - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": between - configure and build, report the Configured NUT_USB_VARIANT - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": between - configure and build, report the Configured NUT_SSL_VARIANT - * ci_build.sh: ci_build.sh: BUILD_TYPE="default-all-errors": support - looping over NUT_USB_VARIANTS as well - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: report a NOTICE if - libusb-1.0 support was detected, but another was chosen - * drivers/libhid.c: drivers/libhid.c: HIDDumpTree(): mark that arg - "hd" is not used in SHUT_MODE - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: the "additional - USB-related checks" should now manipulate "LIBS" not "LIBUSB_LIBS" - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: comment on - "additional USB-related checks" - * configure.ac, m4/nut_check_libusb.m4: Move "additional USB-related - checks" from configure.ac to m4/nut_check_libusb.m4 - * configure.ac, docs/configure.txt, m4/nut_check_libusb.m4: - m4/nut_check_libusb.m4 et al: add support for --with-libusb- - version=(auto|0.1|1.0) - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: restore "ret" lost in - merging - * drivers/riello_usb.c: drivers/riello_usb.c: properly export - variables shared between driver subtypes (reapply to libusb-1.0 - branch) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: add a bit more of - "Compatibility layer between libusb 0.1 and 1.0" - * drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c: [libusb-1.0] Realign use of - nut_usb_strerror() after merge from master - * drivers/libusb1.c, drivers/nutdrv_qx.c: [libusb-1.0] Realign buffer - casting to (usb_ctrl_char) after merge from master - -2021-11-13 Dan Benton - - * data/driver.list.in: Add CyberPower RMCARD205 which is supported - -2021-11-13 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: hide clang-3.4 warnings - about str{n}cmp() args into pragmas - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: detect general "-Warray- - bounds" support - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: detect general - "-Wtautological-compare" - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: detect "pragma clang - diagnostic push/pop" support (needed with older clang versions not - on par with GCC) - * drivers/snmp-ups-helpers.c: drivers/snmp-ups-helpers.c: include - "config.h" before any system headers (such as time.h indirectly) - * configure.ac: configure.ac: be sure to detect "time.h" - * ci_build.sh: ci_build.sh: support a common DO_CLEAN_CHECK=no - -2021-11-13 Jim Klimov - - * drivers/snmp-ups-helpers.c: drivers/snmp-ups-helpers.c: include a - header, avoid a warning - * UPGRADING, docs/nut.dict: NEWS: updated build against various - generations of Net-SNMP for NUT v2.7.5 - * docs/configure.txt, m4/nut_check_libnetsnmp.m4: - m4/nut_check_libnetsnmp.m4: allow --with-netsnmp-config(=yes) to - mean prefer_NET_SNMP_CONFIG=true - * NEWS: NEWS: updated build against various generations of FreeIPMI - for NUT v2.7.5 - * drivers/snmp-ups.c: drivers/snmp-ups.c: replace strcmp("short - string") with strncmp() (clang-3.4 warns about array out of bounds) - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: resolve a "tautological - compare" when building on older agents - * drivers/nut-ipmi.h, drivers/nut-ipmipsu.c, drivers/nut- - libfreeipmi.c: drivers/nut-libfreeipmi.c nut-ipmipsu.c nut-ipmi.h: - adjust input_voltage_range_t (args of - ipmi_fru_multirecord_power_supply_information() vs. - ipmi_fru_parse_multirecord_power_supply_information() in different - FreeIPMI releases) [issue #1175] - * drivers/Makefile.am: drivers/Makefile.am: disable quick-hack of - nut_ipmipsu_CFLAGS+="-Wno-pointer-sign" [issue #1175] - * m4/nut_check_libusb.m4: m4/nut_check_libusb.m4: consider - have_PKG_CONFIG - * m4/nut_check_libopenssl.m4: m4/nut_check_libopenssl.m4: consider - have_PKG_CONFIG - * m4/nut_check_libnss.m4: m4/nut_check_libnss.m4: consider - have_PKG_CONFIG - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: consider - have_PKG_CONFIG - * m4/nut_check_libneon.m4: m4/nut_check_libneon.m4: consider - have_PKG_CONFIG - * m4/nut_check_libmodbus.m4: m4/nut_check_libmodbus.m4: consider - have_PKG_CONFIG - * m4/nut_check_libgd.m4: m4/nut_check_libgd.m4: consider - have_PKG_CONFIG - * m4/nut_check_libfreeipmi.m4: m4/nut_check_libfreeipmi.m4: consider - have_PKG_CONFIG - * m4/nut_check_libavahi.m4: m4/nut_check_libavahi.m4: consider - have_PKG_CONFIG - * m4/nut_check_pkgconfig.m4: m4/nut_check_pkgconfig.m4: separate - detection of support for have_PKG_CONFIG vs have_PKG_CONFIG_MACROS - * configure.ac: configure.ac: call PKG_CONFIG for systemd settings - query only if we have_PKG_CONFIG, and die if "yes" was required but - query is not possible - * m4/nut_check_pkgconfig.m4: m4/nut_check_pkgconfig.m4: extend to - consider PKG_CONFIG possibly detected by autoconf - * configure.ac, m4/nut_check_pkgconfig.m4: configure.ac: evict - NUT_CHECK_PKGCONFIG into m4/nut_check_pkgconfig.m4 - * clients/upsmon.c, drivers/mge-utalk.c, drivers/snmp-ups.c, - tools/nut-scanner/scan_snmp.c: clients/upsmon.c tools/nut- - scanner/scan_snmp.c drivers/snmp-ups.c mge-utalk.c: avoid - strcmp("") as the implementation may be invalid (reaches out of - one-element array for "") - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: whitespace - fix (indent if-clause content) - -2021-11-12 Jim Klimov - - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: support - (and prefer) pkg-config info to net-snmp-config script(s) - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: separate - "distcheck-valgrind" from "default-nodoc", to filter away - "NUT_BUILD_CAPS=valgrind=no" agents - -2021-11-13 Jim Klimov - - * ci_build.sh: ci_build.sh: update guessing SYS_PKG_CONFIG_PATH for - *openindiana*|*omnios*|*solaris*|*illumos*|*sunos* - * ci_build.sh: ci_build.sh: for optional_maintainer_clean_check(), - ignore ".ci*.log*" files if present - -2021-11-12 Jim Klimov - - * ci_build.sh: ci_build.sh: report which PWD failed a "git status" - query - * ci_build.sh: ci_build.sh: report if ".git" disappeared during - *clean check [issue #1167] - -2021-11-11 Jim Klimov - - * drivers/snmp-ups.h: drivers/snmp-ups.h: fix remaining SU_* flag - bits to (unsigned long), to match snmp_info_t->flags type - * drivers/snmp-ups.h: drivers/snmp-ups.h: comment SU_* bit usage by - bit-shifting macros - * drivers/snmp-ups.h: drivers/snmp-ups.h: wrap long comments, and - detail where flag-field bits come from - * drivers/snmp-ups.h: drivers/snmp-ups.h: comment typical use of - SU_TYPE(t) macro - * drivers/snmp-ups.h: drivers/snmp-ups.h: fix SU_TYPE_DAISY(t) macro - (had no arg) - * drivers/snmp-ups.h: drivers/snmp-ups.h: whitespace fixes - * drivers/snmp-ups.h: drivers/snmp-ups.h: comment SU_STATUS_NUM_ELEM - as possibly obsolete - -2021-10-27 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix buffer size to possibly - print max size_t - -2021-10-26 Jim Klimov - - * drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups.{c,h}: fix - SU_FLAG_* to (unsigned long) and their usage, to match - snmp_info_t->flags type - * drivers/snmp-ups.c: drivers/snmp-ups.c: decode_str(): range-check - return of snprintf() - -2021-11-11 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - rearrange lines to better match with 42ITy fork - * NEWS, docs/nut.dict: NEWS: improved SNMPv3 Auth/Priv algo support, - and nut-scanner threadcount, for NUT v2.7.5 - -2021-11-10 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am: hotfix header - (in)compatibility of different IPMI versions - * drivers/Makefile.am: drivers/Makefile.am: hotfix header - (in)compatibility of different IPMI versions - * drivers/Makefile.am: drivers/Makefile.am: hotfix header - (in)compatibility of different IPMI versions - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: hunnox_step is only used - qith QX_USB - * drivers/bcmxcp_usb.c, drivers/libusb.h, drivers/nutdrv_atcl_usb.c, - drivers/nutdrv_qx.c, drivers/richcomm_usb.c, - drivers/tripplite_usb.c: drivers/*usb*: align whitespace changes - with libusb-1.0 branch - * drivers/Makefile.am: drivers/Makefile.am: use LIBUSB_IMPL macro to - align with libusb-1.0 branch - * drivers/libusb.c: drivers/libusb.c: whitespace fixes and message - fixes to align with libusb-1.0 branch - * drivers/libusb.c, drivers/libusb.h, drivers/powervar-hid.c, - drivers/usbhid-ups.c: drivers/libusb.{c,h} + powervar-hid.c + - usbhid-ups.c: whitespace fixes after PR #1044 - * docs/config-prereqs.txt: docs/config-prereqs.txt: mention further - I2C-related packages in Debian/Ubuntu distros - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, report the - start of build variant and how many remain - * Makefile.am, clients/Makefile.am, common/Makefile.am, - conf/Makefile.am, data/Makefile.am, data/html/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - drivers/Makefile.am, include/Makefile.am, lib/Makefile.am, - scripts/Makefile.am, scripts/Solaris/Makefile.am, - scripts/augeas/Makefile.am, scripts/devd/Makefile.am, - scripts/hotplug/Makefile.am, scripts/python/Makefile.am, - scripts/systemd/Makefile.am, scripts/udev/Makefile.am, - scripts/ufw/Makefile.am, scripts/upsdrvsvcctl/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/Makefile.am, - tools/nut-scanner/Makefile.am: */Makefile.am: ensure that `make - maintainer-clean` also removes .dirstamp files - * .gitignore: .gitignore: remove a redundancy - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, ignore - strange exit-code from `expr` - if the maths result was "0" - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, ignore - strange exit-code from `expr` - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, do not - distclean before build (this just spends time to generate the - Makefile to kill it) - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, report - "SUCCEEDED build(s)" after final optional_maintainer_clean_check() - if that is called - * ci_build.sh: ci_build.sh: dumb down can_clean_check() to pass "set - -e" shells - * ci_build.sh: ci_build.sh: optional_*_clean_check() quickly skip if - there is no Makefile - * ci_build.sh: ci_build.sh: in "default-all-errors" mode, count - expected/remaining BUILDSTODO and call - optional_maintainer_clean_check() for the last iteration and - optional_dist_clean_check() for others - * ci_build.sh: ci_build.sh: introduce can_clean_check() to not fail - when we have nothing to test against - -2021-11-09 Jim Klimov - - * Makefile.am: Makefile.am: first-shot "git-realclean-check" and - targets to print *CLEANFILES lists - * ci_build.sh: ci_build.sh: introduce optional_dist_clean_check() to - use e.g. in "default-all-errors" case - * ci_build.sh: ci_build.sh: in loop for "default-all-errors", report - "build" successes as such - * ci_build.sh: ci_build.sh: skip optional_maintainer_clean_check() if - there is no .git [issue #1167] - -2021-11-09 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: consider SNMPv3 Auth/Priv - algos detected by configure script when reporting the usage (via - addvar() help messages) [issue #1169] - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - consider SNMPv3 Auth/Priv algos detected by configure script when - reporting the usage [issue #1169] - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: - comment the comment - * tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c + scan_snmp.c + scan_nut.c: ifdef the - references to max_threads_scantype - -2021-11-09 Jim Klimov - - * configure.ac: configure.ac: limit the impact of linux_i2c absent - libs when "auto" mode was requested - * ci_build.sh: ci_build.sh: start default build from a clean slate, - and do not REQUIRE to be able to build everything (do auto-detect) - * tests/Makefile.am, tools/nut-scanner/Makefile.am: tools/nut- - scanner/Makefile.am, tests/Makefile.am: do not refer to - LINKED_SOURCE_FILES with extra paths - -2021-11-09 Jim Klimov - - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: note about PTY definitions - * docs/config-prereqs.txt: docs/config-prereqs.txt: say a bit more - about OSes with containers - * docs/config-prereqs.txt: docs/config-prereqs.txt: say a bit more - about "General call to Test" and mention "ci_build.sh" - * docs/config-prereqs.txt, docs/nut.dict: docs/config-prereqs.txt: - revise pkgs available in Debian-like operating systems - -2021-11-08 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: use detected - NUT_HAVE_LIBNETSNMP_usm* support to define and use actual Priv or - Auth types - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: use - detected NUT_HAVE_LIBNETSNMP_usm* support to define and use actual - Priv or Auth types - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: detect - support of usmAES128PrivProtocol in Net-SNMP we build against - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: detect - support of (NETSNMP_DRAFT_BLUMENTHAL_AES_04) usmAES192PrivProtocol - usmAES256PrivProtocol in Net-SNMP we build against - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: detect - support of usmDESPrivProtocol usmHMACMD5AuthProtocol - usmHMACSHA1AuthProtocol in Net-SNMP we build against - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: detect - support of usmHMAC256SHA384AuthProtocol - usmHMAC384SHA512AuthProtocol usmHMAC192SHA256AuthProtocol in Net- - SNMP we build against - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: ifdef - all references to NETSNMP_DRAFT_BLUMENTHAL_AES_04 related code - * tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c: - tools/nut-scanner/... : move init/destroy of threadcount_mutex from - nut-scanner.c to nutscan-init.c - -2021-11-05 Dim - - * drivers/snmp-ups.c, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/scan_snmp.c: Added new auth methods to snmp - -2021-11-08 Jim Klimov - - * tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- - scanner/scan_xml_http.c: tools/nut-scanner/scan_eaton_serial.c + - scan_nut.c + scan_snmp.c + scan_xml_http.c: release global - semaphores in final protocol-scanner tread reaping - * tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- - scanner/scan_xml_http.c: tools/nut-scanner/scan_eaton_serial.c + - scan_nut.c + scan_snmp.c + scan_xml_http.c: report if we are - waiting for semaphored threads to complete - -2017-10-31 barraudl - - * tools/nut-scanner/Makefile.am, tools/nut-scanner/README, tools/nut- - scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/nutscan-init.c, tools/nut-scanner/nutscan-init.h: Revise - use of semaphores in nut-scanner vs libnutscanner Original commit - in 42ITy fork in 2017: "Fix the Debian package generation" Adapted - into NUT upstream code, considering 4 years of codebase evolution, - in 2021: - -2017-10-23 barraudl - - * configure.ac, tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut- - scanner.c, tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- - scanner/scan_xml_http.c: Add thread limitation to avoid memory - error Original development in 42ITy fork in 2017: UPDATE: Merged - with NUT upstream, considering evolution of codebases over 4 years - since original commit, revised 2021: - -2021-11-08 Jim Klimov - - * drivers/mge-hid.c: drivers/mge-hid.c: actively check and warn if we - truncated the string - * drivers/gamatronic.c: drivers/gamatronic.c: actively check and warn - if we truncated the string - * docs/nut.dict: docs/nut.dict: update for recent NEWS - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - safely limit a strncpy() call - * drivers/oneac.c: drivers/oneac.c: shield a potentially truncating - snprintf() into a small buffer - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRINGOP_TRUNCATION - * drivers/mge-hid.c: drivers/mge-hid.c: shield a potentially - truncating snprintf() into a small buffer - -2021-11-08 Jim Klimov - - * configure.ac: configure.ac: for CppUnit, also sanity-check - CPPUNIT_ASSERT_MESSAGE() - -2021-11-07 Jim Klimov - - * clients/Makefile.am: clients/Makefile.am: depend on "dummy" recipe - to re-evaluate out-of-dir libs (so development iterations in them - are reflected in rebuilds) - * drivers/Makefile.am: drivers/Makefile.am: depend on "dummy" recipe - to re-evaluate out-of-dir libs (so development iterations in them - are reflected in rebuilds) - * server/Makefile.am: server/Makefile.am: depend on "dummy" recipe to - re-evaluate out-of-dir libs (so development iterations in them are - reflected in rebuilds) - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - depend on "dummy" recipe to re-evaluate out-of-dir libs (so - development iterations in them are reflected in rebuilds) - * tests/Makefile.am: tests/Makefile.am: depend on "dummy" recipe to - re-evaluate out-of-dir libs (so development iterations in them are - reflected in rebuilds) - * tests/Makefile.am: tests/Makefile.am: drop obsoleted comment - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: add - test_strarr_alloc() This may seem trivial, but there are - suspicions this allocation does not always work (e.g. NUT issue - #1126) - -2021-11-07 Jim Klimov - - * drivers/gamatronic.c: drivers/gamatronic.c: shield a potentially - truncating snprintf() into a small buffer - * drivers/bcmxcp.c: drivers/bcmxcp.c: shield a potentially dangerous - snprintf() into a small buffer as tested-safe - * clients/upscmd.c: clients/upscmd.c: shield a potentially dangerous - snprintf() into a small buffer as tested-safe - * clients/upsrw.c: clients/upsrw.c: shield a potentially dangerous - snprintf() into a small buffer as tested-safe - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: add - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION - -2021-11-07 Jim Klimov - - * clients/nutclient.cpp: clients/nutclient.cpp: safety check in - strarr_alloc(): returned pointer should be not null - * clients/nutclient.h: tests/nutclienttest.h: whitespace fixes - (indent chars) - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: whitespace fixes - (wrap long lines for maintainability) - -2021-11-07 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: load_mib2nut(): do not - report "Unknown mibs value" just if a device did not match the - mapping [NUT issue #1141] - * drivers/snmp-ups.c: drivers/snmp-ups.c: refactor load_mib2nut() to - not `strcmp(mib, "auto")` many times - -2021-11-07 Jim Klimov - - * drivers/snmp-ups.c: Update snmp-ups.c Fix use of `char - su_scratch_buf[255]` (original static array moved to another file - in master branch), and bump `DRIVER_VERSION` - -2021-11-07 Jim Klimov - - * NEWS: NEWS: added snmp-ups support for ondelay/offdelay for - NUT-2.7.5 - -2021-11-07 Jim Klimov - - * drivers/snmp-ups.c: Update snmp-ups.c Use the common (and - sufficiently large for any runaway numeric madness) - `su_scratch_buf` instead of a local `char[6]` buffer. - * drivers/snmp-ups.c: Update snmp-ups.c A few small whitespace fixes - -2021-11-07 Jim Klimov - - * drivers/arduino-hid.c: drivers/arduino-hid.c: normalize whitespace - for NUT codebase - * drivers/arduino-hid.c, drivers/arduino-hid.h: drivers/arduino- - hid.{c,h}: update (C) to arduino-hid support author - * NEWS: NEWS: added usbhid-ups new subdriver arduino-hid support for - NUT-2.7.5 - * NEWS: NEWS: added USB HID support on interface number greater than - 0 for NUT-2.7.5 - * NEWS: NEWS: added huawei-ups2000 support for NUT-2.7.5 - -2021-11-07 Jim Klimov - - * docs/man/huawei-ups2000.txt: Update huawei-ups2000.txt Made the - `configure` example a bit friendlier for copy-pasting. - -2021-11-06 Jim Klimov - - * tests/.gitignore, tools/nut-scanner/.gitignore: GitIgnore - LINKED_SOURCES (follow-up to PR #1159) - * .gitignore: GitIgnore .dirstamp in build trees - * Makefile.am: Makefile.am: move removal of dist tarballs and build - packages from "distclean" to "maintainer-clean" - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: mark - use of LINKED_SOURCE_FILES as "nodist" - * tests/Makefile.am: tests/Makefile.am: mark use of - LINKED_SOURCE_FILES as "nodist" - * Makefile.am: Makefile.am: add a "make realclean" as alias to - maintainer-clean - * Makefile.am: Makefile.am: typo fix MAINTAINERCLEAN_FILES => - MAINTAINERCLEANFILES - * ci_build.sh: ci_build.sh: there is no default "make realclean" - implem in autotools, fall back to "maintainer-clean" support for - wipingg the workspace - * Makefile.am, clients/Makefile.am, common/Makefile.am, - conf/Makefile.am, data/Makefile.am, data/html/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - drivers/Makefile.am, include/Makefile.am, lib/Makefile.am, - scripts/Makefile.am, scripts/Solaris/Makefile.am, - scripts/augeas/Makefile.am, scripts/devd/Makefile.am, - scripts/hotplug/Makefile.am, scripts/python/Makefile.am, - scripts/systemd/Makefile.am, scripts/udev/Makefile.am, - scripts/ufw/Makefile.am, scripts/upsdrvsvcctl/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/Makefile.am, - tools/nut-scanner/Makefile.am: */Makefile.am: there is no default - "make realclean" implem in autotools, fall back to "maintainer- - clean" support for wipingg the workspace - * Makefile.am, clients/Makefile.am, common/Makefile.am, - conf/Makefile.am, data/Makefile.am, data/html/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - drivers/Makefile.am, include/Makefile.am, lib/Makefile.am, - scripts/Makefile.am, scripts/Solaris/Makefile.am, - scripts/augeas/Makefile.am, scripts/devd/Makefile.am, - scripts/hotplug/Makefile.am, scripts/python/Makefile.am, - scripts/systemd/Makefile.am, scripts/udev/Makefile.am, - scripts/ufw/Makefile.am, scripts/upsdrvsvcctl/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/Makefile.am, - tools/nut-scanner/Makefile.am: */Makefile.am: reshuffle what we - remove as part of "make distclean" vs. "make realclean" (can be - remade only by autogen.sh) - * Makefile.am: Makefile.am: do not "distclean" away some more parts - of "configure" script ecosystem (leave that to "realclean") - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - restore use of $(builddir) for LINKED_SOURCE_FILES - * tests/Makefile.am: tests/Makefile.am: restore use of $(builddir) - for LINKED_SOURCE_FILES - * ci_build.sh: ci_build.sh: call optional_realclean_check() after - more build variants - * tools/Makefile.am: tools/Makefile.am: distclean the helper scripts - that can be re-made - * ci_build.sh: ci_build.sh: change the cleanliness check from - "distcheck" to "realcheck" and factor into a method - * Makefile.am: Makefile.am: regenerate the helper needed for - ChangeLog if cleaned away - * Makefile.am: Makefile.am: delete the configure script and its - components not in a "make distclean" but in "make realclean" - -2021-11-05 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: use - BUILT_SOURCES=LINKED_SOURCE_FILES to avoid dist-ing temporary - symlinks as files - * tests/Makefile.am: tests/Makefile.am: use - BUILT_SOURCES=LINKED_SOURCE_FILES to avoid dist-ing temporary - symlinks as files - * ci_build.sh: ci_build.sh: only call dpkg if present - * ci_build.sh: ci_build.sh: configure_nut(): call ./autogen.sh before - CONFIGURE_SCRIPT if there is no configure script - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - revise the magic of LINKED_SOURCE_FILES for distcheck - * tests/Makefile.am: tests/Makefile.am: revise the magic of - LINKED_SOURCE_FILES for distcheck - * ci_build.sh: ci_build.sh: add a DO_DISTCHECK_CLEAN to make sure we - clean everything made, and no more (after any distcheck) - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - revise the magic of LINKED_SOURCE_FILES for distcheck - * tests/Makefile.am: tests/Makefile.am: revise the magic of - LINKED_SOURCE_FILES for distcheck - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: make - sure to symlink sources into $(builddir)/ - * tests/Makefile.am: tests/Makefile.am: make sure to symlink sources - into $(builddir)/ - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: work - around dmake bugs - * tests/Makefile.am: tests/Makefile.am: work around dmake bugs - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: quote - pathnames, and force the symlink (to overwrite older if any) - * tests/Makefile.am: tests/Makefile.am: quote pathnames, and force - the symlink (to overwrite older if any) - * Makefile.am: Makefile.am: distclean-local: first find(), then rm() - the findings (find-recursion fails otherwise) - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - symlink source used from another directory into current builddir, - do avoid external ".deps/" usage - * tests/Makefile.am: tests/Makefile.am: symlink source used from - another directory into current builddir, do avoid external ".deps/" - usage - * Makefile.am, clients/Makefile.am, common/Makefile.am, - drivers/Makefile.am, server/Makefile.am, tests/Makefile.am, - tools/nut-scanner/Makefile.am: */Makefile.am: Do not clean ".deps" - in SUBDIRS of the main project - * Makefile.am, clients/Makefile.am, common/Makefile.am, - conf/Makefile.am, data/Makefile.am, data/html/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - drivers/Makefile.am, include/Makefile.am, lib/Makefile.am, - scripts/Makefile.am, scripts/Solaris/Makefile.am, - scripts/augeas/Makefile.am, scripts/devd/Makefile.am, - scripts/hotplug/Makefile.am, scripts/python/Makefile.am, - scripts/systemd/Makefile.am, scripts/udev/Makefile.am, - scripts/ufw/Makefile.am, scripts/upsdrvsvcctl/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/Makefile.am, - tools/nut-scanner/Makefile.am: */Makefile.am: revise CLEANFILES and - DISTCLEANFILES (favored over clean-local target rules) - -2021-11-04 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: use - libcommon.la as part of libnutscan.(la|so) - -2021-11-04 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: do - not build common.c into nut-scanner (avoid double-definition of - nut_debug_level among other things) - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: fix - rule for NUT_SCANNER_DEPS to be sure - * clients/Makefile.am, common/Makefile.am, drivers/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/nut- - scanner/Makefile.am: */Makefile.am: define dependencies on out-of- - dir *.la helper libs: use AM_MAKEFLAGS (follows-up to PR #1151) - -2021-11-04 Jim Klimov - - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - revise parsing of --thread via strtol() Inspired by 42ITy fork - approach to similar issue - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - rename "--jobs" to "--thread" Inspired by 42ITy fork approach to - similar issue - -2021-11-04 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: fix - rule for NUT_SCANNER_DEPS to be sure - * clients/Makefile.am, common/Makefile.am, drivers/Makefile.am, - server/Makefile.am, tests/Makefile.am, tools/nut- - scanner/Makefile.am: */Makefile.am: define dependencies on out-of- - dir *.la helper libs: use AM_MAKEFLAGS (follows-up to PR #1151) - -2021-11-04 Jim Klimov - - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - refine sanity-checks for nofile_limit.rlim_cur value range - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_xml_http.c: tools/nut-scanner/nut-scanner.c - + scan_xml_http.c + scan_snmp.c + scan_nut.c + nut-scan.h: Add a - hard limit on netxml scanning thread count - * configure.ac, tools/nut-scanner/nut-scanner.c: tools/nut- - scanner/nut-scanner.c + configure.ac: detect if getrlimit() is - usable - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - constrain default or requested job count with current `ulimit -n` - (minus known overhead) - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - whitespace fix - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - wrap long line - -2021-11-03 Jim Klimov - - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: limit thread count like in scan_snmp.c - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: limit - thread count like in scan_snmp.c - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: define TRUE/FALSE - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: limit thread count like in scan_snmp.c - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - comment "#endif // HAVE_PTHREAD" to navigate in code better - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: only - loop to free the thread_array if any were allocated - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/scan_snmp.c: - tools/nut-scanner/nut-scan.h + scan_snmp.c: (C) header and some - cosmetic fixes - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - bump default max_threads to not lag with /24 subnets - -2021-11-03 Jim Klimov - - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: only - sleep after attempting pthread_tryjoin_np() if nothing got cleaned - away - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: hide - debug logging for thread herding - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/scan_snmp.c: - tools/nut-scanner/scan_snmp.c: update comments and messages - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - update log-tracing of pthread herding - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: move - locking of total thread count change when we add one - -2021-11-03 Jim Klimov - - * configure.ac, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/scan_snmp.c: configure.ac, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/nut-scanner.c: not all glibc versions - HAVE_PTHREAD_TRYJOIN - -2021-11-03 Jim Klimov - - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: limit - the thread count for parallelized scanning - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - add a threadcount_mutex to use in all children - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - handle max_threads, curr_threads - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - add support for -j N (--jobs=N) option to limit simultaneous - scanning threads - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - comment a FIXME for limiting the pthread count - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - nutscan_cidr_to_ip(): forbid scanning whole Internet - -2021-11-03 Jim Klimov - - * tests/.gitignore: GitIgnore test log and trace for "getvaluetest" - -2021-11-03 Jim Klimov - - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - tone down the debug-logging of CIDR processing - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - only free cidr_tok after we are done manipulating its memory buffer - * tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-ip.c: - nutscan-ip.c, nut-scanner.c: instrument the CIDR processing to - trace an error - -2021-11-02 Jim Klimov - - * docs/documentation.txt, docs/man/dummy-ups.txt: - docs/documentation.txt + docs/man/dummy-ups.txt: refer to - `tools/nut-ddl-dump.sh` in the same manner (issue #1111) - * docs/man/dummy-ups.txt: docs/man/dummy-ups.txt: fix use of "link:" - tag in asciidoc (issue #1111) and slightly reword - * docs/documentation.txt: docs/documentation.txt: fix use of "link:" - tag in asciidoc (issue #1111) and slightly reword - * docs/nut-names.txt: docs/nut-names.txt: fix use of "link:" tag in - asciidoc (issue #1111) - * docs/developers.txt: docs/developers.txt: fix use of "link:" tag in - asciidoc (issue #1111) - -2021-11-01 Jim Klimov - - * ci_build.sh: ci_build.sh: give the caller a way to disable parallel - builds with PARMAKE_FLAGS=" " (space) - * ci_build.sh: ci_build.sh: enable parallel builds for default build - (one without a BUILD_TYPE specified) - * ci_build.sh: ci_build.sh: enable parallel builds for "distcheck" in - default builds, which should now pass well (after usual build and - check passed) - * ci_build.sh: ci_build.sh: report chosen settings for parallel - builds - * configure.ac: configure.ac: test more proactively if valgrind can - test things and not crash by itself - * ci_build.sh: ci_build.sh: enable parallel builds for "default- - tgt:*" which should now pass well - * ci_build.sh: ci_build.sh: guess the available amount of parallelism - for the current system; consider load averages for GNU Make too - * docs/Makefile.am, docs/man/Makefile.am: docs/(man/)Makefile.am: - move back to builddir all files for the built documents, not just - the target name - * docs/Makefile.am, docs/man/Makefile.am: docs/(man/)Makefile.am: - before putting back the built documents, clean up the destination - if needed and make the workdir removable if needed (a2x can copy - system/EXTRA_DIST resources with their attrs) - -2021-10-31 Jim Klimov - - * docs/Makefile.am, docs/man/Makefile.am: docs/(man/)Makefile.am: - only delete target before build if it is a directory (chunked HTML) - * docs/Makefile.am: docs/Makefile.am: update comment about - destination dir for asciidoc/a2x - * docs/man/Makefile.am: Revert "docs/man/Makefile.am: tone down the - use of "touch" for multicomponent docs" This reverts commit - 0b9ac2500ddbc7bd11a639805d43cda9259bfb1f. - * docs/Makefile.am: docs/Makefile.am: avoid potential for races where - same document is built several times (mentioned in different list - variables) - * docs/man/Makefile.am: docs/man/Makefile.am: avoid races where same - document is built several times (mentioned in different list - variables) - * docs/man/Makefile.am: Revert "docs/man/Makefile.am: avoid races - where same document is built several times (mentioned in different - list variables)" This reverts commit - 29ae5a8f6e5524d689ebaf2abdf508528288b010. - * docs/man/Makefile.am: docs/man/Makefile.am: tag DOC-MAN-HTML - visibly different from DOC-HTML of the main docs dir - * docs/man/Makefile.am: docs/man/Makefile.am: avoid races where same - document is built several times (mentioned in different list - variables) - * docs/man/Makefile.am: docs/man/Makefile.am: tone down the use of - "touch" for multicomponent docs - * docs/.gitignore, docs/Makefile.am, docs/man/.gitignore, - docs/man/Makefile.am: docs/(man/)Makefile.am: fan out doc builds - into subdirectories, where we can, so parallel runs do not collide - -2021-11-01 Jim Klimov - - * ci_build.sh: ci_build.sh: update the heading comment - -2021-10-31 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am: whitespace fixes (drop - some indentation) - -2021-10-30 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am: as developer aid, add - "(all-)docs" target to try building all types regardless of - enablement by configure script; also add "make man" support - -2021-10-31 Jim Klimov - - * ci_build.sh: ci_build.sh: support CI_REQUIRE_GOOD_GITIGNORE=false - to bypass fatal error on git status being not empty after build - -2021-10-30 Jim Klimov - - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - reference nut_version.h in a way that does not offend "make - dist(check)" - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am: - reference some out-of-dir sources via top_srcdir (not ../..) - * clients/Makefile.am, drivers/Makefile.am, server/Makefile.am, - tests/Makefile.am, tools/nut-scanner/Makefile.am: */Makefile.am: - define dependencies on out-of-dir *.la helper libs, and reference - them via top_builddir (not ..) - * common/Makefile.am: common/Makefile.am: reference nut_version.h in - a way that does not offend "make dist(check)" - * ci_build.sh: ci_build.sh: default "minimal" ritual should not spend - half the time building docs - -2021-10-04 Jim Klimov - - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: range-check - and cast returned ipmi_dev->sensors_count - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: - libfreeipmi_get_sensors_info(): we check that sdr_record_len is not - negative, so can cast to (uint) - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: - libfreeipmi_get_board_info(): range-check and cast mfg_date_time - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: - libfreeipmi_get_psu_info(): range-check and cast libfreeipmi method - arguments which are ints - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: - libfreeipmi_get_psu_info(): range-check and cast libfreeipmi method - arguments which are uint8_t - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: - nut_ipmi_open(): range-check and cast libfreeipmi method arguments - which are uint8_t - -2021-09-23 Jim Klimov - - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: - range-check and cast ipmi_sec->authentication_type - ipmi_sec->privilege_level ipmi_id to match method signatures - -2021-10-15 Jim Klimov - - * ci_build.sh: ci_build.sh: report Build host settings - -2021-10-16 Jim Klimov - - * ci_build.sh, docs/developers.txt: ci_build.sh: add - BUILD_TYPE=fightwarn(-clang|-gcc) for presets with developer aid - Also updated docs/developers.txt with example and description - -2021-10-26 Jim Klimov - - * tests/getvaluetest.c: tests/getvaluetest.c: align test structure - with field types in HIDData_t - * tests/getvaluetest.c: tests/getvaluetest.c: fix bufsize size_t type - * tests/getvaluetest.c: tests/getvaluetest.c: mark static local - methods as such - * drivers/hidparser.c: drivers/hidparser.c: for skipping botched - LogMin/LogMax, also log a message - -2021-10-20 Stephan Blecher <_github@blecher.at> - - * drivers/hidparser.c: drivers/hidparser.c - -2021-10-22 Jim Klimov - - * autogen.sh: autogen.sh: surprise, not all systems have "dos2unix" - * configure.ac: configure.ac: fix use of --with-docs - * configure.ac: configure.ac: fix use of --with-valgrind - -2021-10-21 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: currently constrain - cppcheck phase(s) to fightwarn-related branch/PR builds - -2021-10-20 Jim Klimov - - * .gitignore, Jenkinsfile-dynamatrix, Makefile.am, ci_build.sh, - configure.ac, docs/config-prereqs.txt, docs/nut.dict, - m4/nut_check_cppcheck.m4: Add recipe support for cppcheck analysis - * ci_build.sh: ci_build.sh: let initial DO_DISTCHECK value be set by - caller - -2021-10-20 Arnaud Quette - - * tools/nut-scanner/scan_snmp.c: Only try all OIDs if sysOID matching - failed - -2021-10-19 Jim Klimov - - * drivers/nutdrv_qx_ablerex.c, drivers/nutdrv_qx_ablerex.h: - drivers/nutdrv_qx_ablerex.{c,h}: heading fixes -- name, descr, (C) - * drivers/nutdrv_qx.c, drivers/nutdrv_qx_ablerex.c: - drivers/nutdrv_qx.c + nutdrv_qx_ablerex.c: common whitespace fixes - * drivers/Makefile.am: drivers/Makefile.am: restore bits lost with - initial posting of PR #1135 - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: update DRIVER_VERSION for - added "ablerex" support - -2021-10-18 Ablerexsoftware - - * drivers/Makefile.am, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_ablerex.c, drivers/nutdrv_qx_ablerex.h: Add - nutdrv_qx driver for Ablerex model PR#2 - -2021-10-16 Jim Klimov - - * NEWS, UPGRADING, docs/nut.dict: UPGRADING: notice that upsdebugx() - et al became macros in NUT-2.7.5 - * NEWS: NEWS: another expected point for release after 2.7.5 - -2021-10-14 Jim Klimov - - * drivers/Makefile.am, drivers/snmp-ups-helpers.c, drivers/snmp- - ups.c, drivers/snmp-ups.h: Separate source files of snmp-ups.c - (driver core) and snmp-ups-helpers.c (shared mapping tables and - funcs) (#1134) * drivers/Makefile.am: bring some order into - snmp_ups_SOURCES list * drivers/snmp-ups.h: update (C) heading * - drivers/snmp-ups.h: comment that su_find*() are related to certain - info_lkp_t fields * drivers/snmp-ups.c: extract snmp-ups-helpers.c - that can be built independently * drivers/snmp-ups.h: mark the - range of data points related to Subdrivers shared helpers functions - -2021-10-12 Jim Klimov - - * drivers/powerware-mib.c, drivers/snmp-ups.c, drivers/snmp-ups.h: - drivers/snmp-ups.{h,c} + powerware-mib.c: reference date converter - by macro name instead of magic number - * drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups.{h,c}: - rename the fun/nuf mappings to fun_vp2s/nuf_s2l to match the DMF - codebase and ease eventual backports - * drivers/snmp-ups.h: drivers/snmp-ups.h: comment the fun/nuf mapping - and their relation to su_find_*() methods - * drivers/snmp-ups.c: drivers/snmp-ups.c: clarify that we pass a - "long*" arg to su_find_infoval() - * drivers/snmp-ups.c: drivers/snmp-ups.c: typo fix - * drivers/snmp-ups.c: drivers/snmp-ups.c: clarify in decode_str() - that we pass a "long*" arg to su_find_infoval() - * drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups.{c,h}: - rearrange braces, blank lines and some comments to match the - formatting fixes in DMF branch (and to simplify eventual backport) - * drivers/snmp-ups.c: drivers/snmp-ups.c: rearrange mib2nut[] in - alphabetic order (except *ietf tables that go last) and reference - mib.c sources - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - whitespace (indent) - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: fix regex pattern - for dynacfgPipeline.appliesToChangedFilesRegex_FILES_PY - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: parameterize - dynacfgPipeline.axisCombos* and excludeCombos_DEFAULT_* for - repetitive settings - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: parameterize - dynacfgPipeline.branchStableRegex - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: extend - sample capability labels with PYTHON variants - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: update for Python- - version build scenarios - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add - dynacfgPipeline.appliesToChangedFilesRegex_FILES_PY for future - handling - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: update - dynacfgPipeline.appliesToChangedFilesRegex_FILES_RECIPE to consider - changes of autogen.sh - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: fix whitespace style - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: fix - whitespace style - -2021-10-11 Jim Klimov - - * tools/nut-scanner/nutscan-device.c: tools/nut-scanner/nutscan- - device.c: fix whitespace style - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - whitespace style - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: fix - whitespace style - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: fix - whitespace style - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: fix whitespace style - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: fix - whitespace style - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix whitespace style - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: fix whitespace style - * tools/nut-scanner/nutscan-device.h: tools/nut-scanner/nutscan- - device.h: fix whitespace style - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - whitespace style - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: fix - whitespace style - * tools/nut-snmpinfo.py.in: tools/nut-snmpinfo.py.in: fix whitespace - style of generated header - * tools/nut-snmpinfo.py.in: tools/nut-snmpinfo.py.in: fix heading of - generated header - -2021-09-28 Jim Klimov - - * drivers/microdowell.h: drivers/microdowell.h: normalize whitespace - within the file - * drivers/microsol-apc.h: drivers/microsol-apc.h: whitespace fix - -2021-09-23 Jim Klimov - - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix whitespace style - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: fix whitespace style - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: fix - whitespace style - -2021-09-22 Jim Klimov - - * tests/cpputest.cpp: tests/cpputest.cpp: avoid "no out-of-line - virtual method definitions" (weak-vtables) - * tests/nutclienttest.cpp: tests/nutclienttest.h: avoid "unused - exception parameter ex" - * clients/nutclientmem.h: clients/nutclientmem.h: avoid "extra ; - after method" warnings - -2021-10-11 Jim Klimov - - * docs/Makefile.am, docs/man/Makefile.am: docs{,/man}/Makefile.am: - quiesce docs-generating targets by default to just state what they - make - * docs/nut.dict: Update spellchecker dict - -2021-10-09 Jim Klimov - - * ci_build.sh: ci_build.sh: add support for CI agents setting - NUT_BUILD_CAPS=valgrind=no - * Makefile.am: Makefile.am: `make spellcheck` from top dir should be - quieter (fallout from touchfiles) - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: stress to - `systemctl restart lxc-net` after edits of /etc/lxc/dnsmasq- - hosts.conf - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: stress that for CI_WRAP_SH method, the Prefix Start - Agent Commandshould not pollute stderr/stdout - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: report more details - about the build host when we "Inspect initial envvars" - -2021-10-08 Jim Klimov - - * scripts/subdriver/gen-snmp-subdriver.sh: gen-snmp-subdriver.sh: - deprecate "which" in favor of "command -v" - * ci_build.sh: ci_build.sh: deprecate "which" in favor of "command - -v" - -2021-10-07 Jim Klimov - - * m4/nut_check_python.m4: m4/nut_check_python.m4: export PYTHON(2,3) - envvars for other scripts called in the build - -2021-09-28 Jim Klimov - - * .gitignore: GitIgnore the tmp/ subdirectory used by CI builds - * .gitignore: GitIgnore Python precompiled files - -2021-09-27 Jim Klimov - - * configure.ac: configure.ac: split generation of "data" files vs. - "scripts" from *.in templates - * configure.ac: Update python scripts to be generated by configure - and using the detected PYTHON value - * clients/nutclient.h: clients/nutclient.h: whitespace typo fix - * docs/developers.txt: docs/developers.txt: fix reference to Fosshost - to be an URL - -2021-09-26 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: for a non-PR build - of a fightwarn* branch, reference 'fightwarn' for analysis - -2021-09-23 Jim Klimov - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl => generated nutscan- - usb.h: sentinel in a table of uint16_t can not be -1 - -2021-09-22 Jim Klimov - - * clients/upsclient.c, configure.ac: clients/upsclient.c + - configure.ac: fix use of CPU_TYPE - * configure.ac: configure.ac: add "-Wno-cast-qual" to clang-medium - and clang-hard warnings levels - -2021-10-05 Jim Klimov - - * docs/nut.dict: Update spellchecker - * NEWS: NEWS: added FTTx support and other genericups improvenets for - NUT-2.7.5 - -2021-10-05 Jim Klimov - - * configure.ac: configure.ac: more AC_CHECK_HEADERS_ONCE - * ci_build.sh: ci_build.sh: for default mode (no BUILD_TYPE) enable - cgi and dev files (no=>auto) and do not require serial drivers - (yes=>auto) - * m4/nut_type_socklen_t.m4: m4/nut_type_socklen_t.m4: fix detection - on windows Probably practical codebase should also account for - other arg types, e.g. "SOCKET" that is not even exported into a - macro so far. - * ci_build.sh: ci_build.sh: report CI_OS_NAME detection issues more - clearly It is not helpful to read just this: Could not recognize - ... from ''-'' - -2021-10-05 Jim Klimov - - * autogen.sh: autogen.sh: suggest CRLF fixes for the workspace (e.g. - if checked out on Windows) This falls a bit short of enforcing - with .gitattributes which may or may not interfere with platform- - native editors and other tools. - -2021-10-04 Jim Klimov - - * conf/Makefile.am, docs/man/Makefile.am: conf/Makefile.am, - docs/man/Makefile.am: avoid prerequisites on suffix rules - * drivers/apc-mib.c: drivers/apc-mib.c: bump APCC_MIB_VERSION for PR - #1113 - * docs/man/genericups.txt, drivers/genericups.c: genericups: - officially alias "NULL" and "none" setting keywords - -2021-10-04 Jim Klimov - - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: recommend a unique Remote root directory per agent - -2021-10-04 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: extend QEMU build - scenarios to "ssh-qemu-nut-builder" agents, and to iterate - "COMPILER" toolkits for cross-check on same platform - -2021-10-04 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: Debianish systems - tend to deliver g++ in a separate package from gcc - * docs/ci-farm-lxc-setup.txt, docs/nut.dict: docs/ci-farm-lxc- - setup.txt: add a chapter on Jenkins Build Agent setup for the - containers - -2021-10-03 Jim Klimov - - * docs/nut.dict: Update spellchecker - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: document - making a self-login ssh key for abuild - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: document - allowing container SSH server to accept envvars from client - -2021-10-03 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: Typo fix: remove - extra unstashCleanSrc() for ci_build.sh preparations - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: allow limited use - of QEMU containers as build agents (slow workers => few combos) - -2021-10-02 Jim Klimov - - * configure.ac: configure.ac: quiesce the check for usable valgrind - binary - * docs/nut.dict: Update spellchecker - * configure.ac: configure.ac: adapt warnings level (auto, minimal) - for GCC with c89/c90/ansi requested builds - * tests/getvaluetest.c: tests/getvaluetest.c: fix declaration of - variables in code body, and type of sizeof-derived iterator - * tests/getvaluetest.c: tests/getvaluetest.c: normalize whitespace to - NUT style - * tests/getvaluetest.c: tests/getvaluetest.c: add (C) and descriptive - heading - -2021-10-02 Jim Klimov - - * configure.ac: configure.ac: test if valgrind is actually usable on - build/check ssytem - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: fix - extraction of hosts-map data - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: make note - of lxc-create for other distros - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: add git to - early starter-kit of packages - -2021-09-30 Jim Klimov - - * Jenkinsfile-dynamatrix, docs/developers.txt: Jenkinsfile-dynamatrix - + developers.txt: for "GNU C89 standard builds with fatal - warnings", only run with a `fightwarn.*89.*` regex branch name; do - not pollute logs and analysis of "usual fightwarn" builds - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: for "GNU C standard - builds with non-fatal warnings, without distcheck and docs (must - pass)" slowBuild scenario, start with a "gnu89/gnu++98" non- - regression variant - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: reword some - slowBuild filter config descriptions and comments - * docs/developers.txt, docs/nut.dict: docs/developers.txt: extend the - description of NUT CI setup Clarification of adaptive jobs, - running different sets of scenarios, and how to reproduce a failed - test case locally. Also updated spellchecker dictionary. - * docs/developers.txt: docs/developers.txt: stress likely - incompatibility with stricter C89/GNU89/ANSI-C standard, so C99 - (GNU99) is the baseline - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: rearrange for - readability (line-split allowedFailure and excludeCombos blocks - that have many combos inside) - -2021-09-30 Jim Klimov - - * .lgtm.yml: .lgtm.yml: drop redundant lines - * autogen.sh: autogen.sh: whitespace fix - * autogen.sh, configure.ac, scripts/systemd/Makefile.am: nut- - common.tmpfiles.in: fix systemd magic vs autoconf magic Follows up - from PR #1037 for issue #1030 to let the trick work for distcheck - and similar out-of-tree builds. - -2021-09-27 Jim Klimov - - * .lgtm.yml: Add .lgtm.yml to specify search for python template - files * Index *.py.in + scripts/python/app/NUT-Monitor.in * Do not - consider them templates to ignore * Also turn off the FIXME alerts, - NUT has a lot of those so far - * NEWS: NEWS: updated the python 2+3 compatibility notice - * Makefile.am: Makefile.am: call the generated gitlog2changelog.py - from correct path - * scripts/augeas/Makefile.am, tools/Makefile.am: Fix "dist" targets - to call templates gen-nutupsconf-aug.py.in and nut-snmpinfo.py.in - that they have - * scripts/python/module/PyNUT.py.in, - scripts/python/module/test_nutclient.py.in: - scripts/python/module/PyNUT.py.in: update syntax for Python 3 (also - ok for 2.7) - * .gitignore: GitIgnore possible leftovers from interrupted configure - script run - * scripts/Solaris/.gitignore, scripts/augeas/.gitignore, - scripts/python/app/.gitignore, scripts/python/module/.gitignore, - tools/.gitignore: GitIgnore generated python scripts - * scripts/augeas/Makefile.am: scripts/augeas/Makefile.am: comment - where gen-nutupsconf-aug.py comes from - * autogen.sh: autogen.sh: simplify call of gen-nutupsconf-aug.py.in - in the subdir - * autogen.sh: autogen.sh: use gen-nutupsconf-aug.py.in with the - $PYTHON interpreter - * ci_build.sh: ci_build.sh: pass $PYTHON envvar -t configure --with- - python=... arg - * configure.ac: configure.ac: split generation of "data" files vs. - "scripts" from *.in templates - * configure.ac, scripts/Solaris/Makefile.am, - scripts/Solaris/{precheck.py => precheck.py.in}, - scripts/augeas/Makefile.am, .../{gen-nutupsconf-aug.py => gen- - nutupsconf-aug.py.in}, scripts/python/Makefile.am, - scripts/python/app/{NUT-Monitor => NUT-Monitor.in}, - scripts/python/module/{PyNUT.py => PyNUT.py.in}, - .../module/{test_nutclient.py => test_nutclient.py.in}, - tools/Makefile.am, tools/{gitlog2changelog.py => - gitlog2changelog.py.in}, tools/{nut-snmpinfo.py => nut- - snmpinfo.py.in}: Update python scripts to be generated by configure - and using the detected PYTHON value - * configure.ac, m4/nut_check_python.m4: configure.ac: detect PYTHON, - PYTHON2, PYTHON3 implementations in the build environment - * autogen.sh: autogen.sh: find various python versions if not - specified by $PYTHON - * clients/nutclient.h: clients/nutclient.h: whitespace typo fix - * docs/developers.txt: docs/developers.txt: fix reference to Fosshost - to be an URL - * NEWS: NEWS: expect a few more milestones for 2.7.6 (or later) - release - * UPGRADING: UPGRADING: mention protocol changes due to new TRACKING - ability - * NEWS, UPGRADING: NEWS + UPGRADING: Warn about API changes due to - fightwarn - -2021-09-26 Mark Dietzer - - * drivers/apc-mib.c: Add active power and apparent power from APC - MIBs for single-phase UPS devices - -2021-09-25 Jim Klimov - - * docs/developers.txt, docs/nut.dict: docs/developers.txt: replace - references to defunct Travis CI with new NUT CI farm [#869] - * docs/nut-qa.txt, docs/nut.dict: docs/nut-qa.txt: replace references - to defunct Travis CI with new NUT CI farm [#869] - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: with customized - shellcheck dynamatrixAxesLabels, be sure to match both OS_FAMILY - and OS_DISTRO as a bundle - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: with - docs+distcheck, also test compliance with available Make - interpreters - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: with shellcheck, - also test available Make interpreters - * Makefile.am, configure.ac, include/Makefile.am: configure.ac + - {./,include/}Makefile.am: revise the recipe for - include/nut_version.h - * docs/nut.dict: docs/nut.dict: update dict - * ci_build.sh: ci_build.sh: call "$MAKE -j NUM" with a space, to - cater for make implems that require a separate argument token - -2021-09-23 Jim Klimov - - * m4/nut_func_getnameinfo_argtypes.m4: - m4/nut_func_getnameinfo_argtypes.m4: reorder the loop to first try - current X/Open definition of getnameinfo() - * configure.ac, m4/nut_check_headers_windows.m4, - m4/nut_func_getnameinfo_argtypes.m4: - m4/nut_func_getnameinfo_argtypes.m4 - m4/nut_check_headers_windows.m4: lift recipes from cURL to detect - NUT_FUNC_GETNAMEINFO_ARGTYPES - -2021-09-22 Jim Klimov - - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE and HAVE_PRAGMA_GCC - _DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE Sometimes - library/system provided types are beyond our control and vary from - OS to OS... - -2021-09-23 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix whitespace style - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: fix - whitespace style - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - whitespace style - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: fix - whitespace style - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: fix - whitespace style - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: fix whitespace style - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: fix - whitespace style - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: fix whitespace style - * tools/nut-scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h: - tools/nut-scanner/nutscan-ip.c: fix whitespace style - * tools/nut-scanner/nutscan-init.c: tools/nut-scanner/nutscan-init.c: - fix whitespace style - * tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- - device.h: tools/nut-scanner/nutscan-device.[c,h]: fix whitespace - style - * tools/nut-scanner/nutscan-display.c: tools/nut-scanner/nutscan- - display.c: fix whitespace style - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - fix whitespace style - * tools/nut-scanner/nut-scan.h: tools/nut-scanner/nut-scan.h: fix - whitespace style - -2021-09-22 Jim Klimov - - * server/sstate.c: server/sstate.c: whitespace fix - -2021-09-23 Jim Klimov - - * ci_build.sh: ci_build.sh: warn that a build without BUILD_TYPE - ignores BUILD_WARNOPT and BUILD_WARNFATAL settings - -2021-09-22 Jim Klimov - - * tests/Makefile.am: tests/Makefile.am: comment a TODO for - referencing helpers built in other dirs - -2021-09-22 Yifeng Li - - * docs/nut.dict: nut.dict: add my name "Yifeng". - * docs/nut.dict: nut.dict: add technical terms for UPS2000 man page. - * docs/man/Makefile.am, docs/man/huawei-ups2000.txt: huawei-ups2000: - add documentation. - * drivers/Makefile.am, drivers/huawei-ups2000.c: huawei-ups2000: - Modbus driver for Huawei UPS2000 (1kVA-3kVA) This commit - implements a Modbus driver for Huawei UPS2000 (1kVA-3kVA) series - UPS units using the USB or RS-232 interface (USB is only support on - Linux 5.12+ via the "xr_serial" kernel module), with support for - power and battery status monitoring, alarm reporting, RW variables, - and instant commands for battery selftest, buzzer, shutdown, - restart, and bypass control. - -2021-09-23 Jim Klimov - - * drivers/generic_modbus.c: drivers/generic_modbus.c: fix assignments - of sigar[].type to enum - * drivers/generic_modbus.c: drivers/generic_modbus.{c,h}: fix - ser_parity to char, and sanity-check before dereferencing - * drivers/generic_modbus.c: drivers/generic_modbus.c: fix switch{} - warnings - * drivers/generic_modbus.c: drivers/generic_modbus.c: fix suseconds_t - for time ranges - * drivers/generic_modbus.c: drivers/generic_modbus.c: fix warnings - with declarations - * drivers/generic_modbus.c, drivers/generic_modbus.h: - drivers/generic_modbus.{c,h}: fix whitespace style - * NEWS: NEWS: added tripplite ability to manage outlet groups for - NUT-2.7.5 - -2021-09-23 Jim Klimov - - * docs/nut.dict: Update nut.dict - -2021-09-22 Jim Klimov - - * docs/nut.dict: docs/nut.dict: updated for recent NEWS and UPGRADING - * UPGRADING: UPGRADING: clarified upsdebugx() `[D#]` prefix impact - * UPGRADING: UPGRADING: stress that new Qx protocol drivers should be - developed in common nutdrv_qx framework - * UPGRADING: UPGRADING: Cut-off features that did land into master - branch to become the 2.7.5 release, vs. big chunks planned now for - later releases - * NEWS: NEWS: update reference to ChangeLog file vs. Git history - * NEWS: NEWS: refactored upsdebugx() and friends as macros for - NUT-2.7.5 - * NEWS: NEWS: HCL updated with Ippon Back Comfo Pro II 650/850/1050 - (USB) for NUT-2.7.5 - * NEWS: NEWS: added and clarified many battery.* protocol variables - for NUT-2.7.5 - * NEWS: NEWS: netxml-ups battery info fixed for NUT-2.7.5 - * NEWS: NEWS: HCL updated with Opti-UPS PS1500E (USB) for NUT-2.7.5 - * NEWS: NEWS: referenced Date and Time representations preferred for - NUT-2.7.5 - * NEWS: NEWS: added generic_modbus driver for NUT-2.7.5 - * NEWS: NEWS: updated systemd integration for NUT-2.7.5 - * NEWS: NEWS: added autoconf-2.70 update for NUT-2.7.5 - * NEWS: NEWS: added portable Makefile effort for NUT-2.7.5 - * NEWS: NEWS: added incremental "make spellcheck" support for - NUT-2.7.5 - * NEWS: NEWS: Cut-off features that did land into master branch to - become the 2.7.5 release, vs. big chunks planned now for later - releases - * NEWS: NEWS: added DISABLE_WEAK_SSL for NUT-2.7.5 - -2021-06-30 Jim Klimov - - * NEWS: NEWS: mention `experimental.*` namespace - * NEWS: NEWS: mention that master/slave deprecation did not impact - protocol currently - * NEWS: NEWS: mark libusb-1.0 support in main branch as "expected" - currently - -2021-05-24 Jim Klimov - - * NEWS: NEWS: added powerpanel driver support for CyberPower - OR1500LCDRTXL2U in NUT-2.7.5 - * NEWS: NEWS: added TcpClient C++ testing mock for NUT-2.7.5 - * NEWS: NEWS: improved USB HID parsing for NUT-2.7.5 - * NEWS: NEWS: improved USB device matching for NUT-2.7.5 - * NEWS: NEWS: microsol-apc added for NUT-2.7.5 - -2021-04-23 Jim Klimov - - * NEWS, docs/nut.dict: docs/nut.dict + NEWS: fix both to pass - spellcheck - -2021-04-21 Jim Klimov - - * NEWS: NEWS: Add 2.7.5 support for Tripplite AVR750U - -2021-04-20 Jim Klimov - - * NEWS: NEWS: List more achievements of 2.7.5 - -2020-01-20 Jim Klimov - - * NEWS: NEWS: described nut-driver-enumerator introduction - -2019-03-15 Arnaud Quette - - * NEWS: Add entry for openssl-1.1.0 support - -2019-03-13 Arnaud Quette - - * docs/nut.dict: Update spelling dictionary - -2019-02-28 Arnaud Quette - - * NEWS: Update NEWS for next release - -2018-02-28 Arnaud Quette - - * docs/nut.dict: Add Avocent to the spell check list - -2018-02-27 Arnaud Quette - - * NEWS: Update NEWS for Emerson Avocent PM3000 PDU - -2017-11-17 Arnaud Quette - - * NEWS: Update NEWS for next release - * NEWS: Update NEWS for next release - -2017-10-08 Charles Lepple - - * NEWS, UPGRADING, docs/nut.dict: Spell-check release notes - * NEWS, UPGRADING: Update NEWS and UPGRADING for next release - Current as of master @ b8df06b761, assuming libusb-1.0+0.1 gets - merged - -2021-09-22 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: cosmetically - update OmniOS notes - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: comment a - TODO for NAT setup desired - * docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc-setup.txt: comment why - LXC+LIBVIRT - * docs/ci-farm-lxc-setup.txt, docs/config-prereqs.txt, docs/user- - manual.txt: docs/config-prereq.txt + ci-farm-lxc-setup.txt + user- - manual.txt: fix markup so new docs can be chapters in user- - manual.html - -2021-09-21 Jim Klimov - - * scripts/Solaris/postinstall.in, scripts/Solaris/preremove.in: - scripts/Solaris/preremove.in + postinstall.in: configure sanity - checker likes datarootdir more than datadir - * ci_build.sh: ci_build.sh: fix reported BUILD_TYPE for default- - spellcheck builds - -2021-09-21 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am: try to avoid "warning: ignoring - prerequisites on suffix rule definition" - * docs/Makefile.am: docs/Makefile.am: when calling a sub-make for - *-spellchecked rule, make sure to use the - "$(abs_top_builddir)/docs/Makefile" (the original "top_builddir" - might come from outer caller in another subdir) - * docs/Makefile.am: docs/Makefile.am: move reading of the - spellchecked file out of the pipe so errors finding one are exposed - to build result - * conf/Makefile.am, data/Makefile.am, docs/Makefile.am, - docs/man/Makefile.am: docs/Makefile.am: conjure a portable - *-spellchecked rule that works for non-GNU make tools - * docs/Makefile.am: docs/Makefile.am: comment about a non-portable - GNU Make feature use - * docs/Makefile.am: docs/Makefile.am: for no-op *-spellchecked rule, - report SKIP-ASPELL with the target (touchfile) name to avoid - source-text determination - * docs/Makefile.am: docs/Makefile.am: be sure to run the quiet sub- - make using docs/Makefile.am to use its target definitions - * docs/Makefile.am: docs/Makefile.am: if SPELLCHECK_ENV_DEBUG, report - which file we would spellcheck (quiet sub-make might do and report - nothing for an already checked text) - * docs/Makefile.am: docs/Makefile.am: consider "-spellchecked" among - SUFFIXes - * docs/Makefile.am: docs/Makefile.am: comment about a non-portable - GNU Make feature use - -2021-09-21 Jim Klimov - - * .gitignore, Makefile.am, conf/Makefile.am, data/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - lib/Makefile.am, scripts/augeas/Makefile.am, - scripts/ufw/Makefile.am, tools/nut-scanner/Makefile.am: Makefiles: - change from *.spellchecked suffix pattern to *-spellchecked which - is easier to plug into POSIX make rulesets - * Makefile.am, conf/Makefile.am, configure.ac, data/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - lib/Makefile.am, scripts/Makefile.am, scripts/augeas/Makefile.am, - scripts/ufw/Makefile.am, tools/nut-scanner/Makefile.am: Makefiles + - configure.ac: add a way to "make clean" away the *.spellchecked - touch-files - * .gitignore, conf/Makefile.am, data/Makefile.am, docs/Makefile.am, - docs/man/Makefile.am: Makefiles: mark every spellchecked text file - with a touch-file to not re-test it again needlessly (at a cost of - some noise for some implementations of make) - -2021-09-21 Jim Klimov - - * drivers/legrand-hid.c: Update legrand-hid.c Address build warnings - from CI - -2021-09-21 Jim Klimov - - * scripts/Solaris/postinstall.in, scripts/Solaris/preremove.in: - scripts/Solaris/preremove.in + postinstall.in: configure sanity - checker likes datarootdir more than datadir - * ci_build.sh: ci_build.sh: fix reported BUILD_TYPE for default- - spellcheck builds - -2021-09-21 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am: try to avoid "warning: ignoring - prerequisites on suffix rule definition" - * docs/Makefile.am: docs/Makefile.am: when calling a sub-make for - *-spellchecked rule, make sure to use the - "$(abs_top_builddir)/docs/Makefile" (the original "top_builddir" - might come from outer caller in another subdir) - * docs/Makefile.am: docs/Makefile.am: move reading of the - spellchecked file out of the pipe so errors finding one are exposed - to build result - * conf/Makefile.am, data/Makefile.am, docs/Makefile.am, - docs/man/Makefile.am: docs/Makefile.am: conjure a portable - *-spellchecked rule that works for non-GNU make tools - * docs/Makefile.am: docs/Makefile.am: comment about a non-portable - GNU Make feature use - * docs/Makefile.am: docs/Makefile.am: for no-op *-spellchecked rule, - report SKIP-ASPELL with the target (touchfile) name to avoid - source-text determination - * docs/Makefile.am: docs/Makefile.am: be sure to run the quiet sub- - make using docs/Makefile.am to use its target definitions - * docs/Makefile.am: docs/Makefile.am: if SPELLCHECK_ENV_DEBUG, report - which file we would spellcheck (quiet sub-make might do and report - nothing for an already checked text) - * docs/Makefile.am: docs/Makefile.am: consider "-spellchecked" among - SUFFIXes - * docs/Makefile.am: docs/Makefile.am: comment about a non-portable - GNU Make feature use - -2021-09-21 Jim Klimov - - * .gitignore, Makefile.am, conf/Makefile.am, data/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - lib/Makefile.am, scripts/augeas/Makefile.am, - scripts/ufw/Makefile.am, tools/nut-scanner/Makefile.am: Makefiles: - change from *.spellchecked suffix pattern to *-spellchecked which - is easier to plug into POSIX make rulesets - * Makefile.am, conf/Makefile.am, configure.ac, data/Makefile.am, - docs/Makefile.am, docs/cables/Makefile.am, docs/man/Makefile.am, - lib/Makefile.am, scripts/Makefile.am, scripts/augeas/Makefile.am, - scripts/ufw/Makefile.am, tools/nut-scanner/Makefile.am: Makefiles + - configure.ac: add a way to "make clean" away the *.spellchecked - touch-files - * .gitignore, conf/Makefile.am, data/Makefile.am, docs/Makefile.am, - docs/man/Makefile.am: Makefiles: mark every spellchecked text file - with a touch-file to not re-test it again needlessly (at a cost of - some noise for some implementations of make) - * docs/nut.dict: docs/nut.dict: update for recent changes - * docs/man/apcsmart.txt, docs/man/generic_modbus.txt: - docs/man/apcsmart.txt: fix an indented block - * docs/man/apcsmart.txt, docs/man/generic_modbus.txt: - docs/man/generic_modbus.txt + apcsmart.txt: drop "[source, conf]" - decorators for sample configs and ASCII-art, pygmentize needs much - setup to render that - * docs/config-prereqs.txt: docs/config-prereqs.txt: add "pygmentize" - packages to the list, for HTML rendering of "source" blocks - * docs/man/generic_modbus.txt: docs/man/generic_modbus.txt: import a - note from discussion at NUT issue #1056 about the data-path and - generic use for the modbus driver - * docs/man/generic_modbus.txt: docs/man/generic_modbus.txt: line-wrap - long paragraphs - * tests/nutlogtest.c: tests/nutlogtest.c: fix more fallout from #675 - * configure.ac, m4/nut_check_libnss.m4: m4/nut_check_libnss.m4: fix - deterministic 32/64 bit builds (on illumos/solaris family of OSes - at least) - * ci_build.sh: ci_build.sh: tweak PKG_CONFIG_PATH setting for 64-bit - dirs on illumos/solaris and related operating systems (otherwise - pkg-config reports default data, can be for 32-bit libs, on 64-bit - hosts) - * ci_build.sh: ci_build.sh: report detected CI_OS_NAME if we had to - guess - * ci_build.sh: ci_build.sh: for developer workstation use, detect - CI_OS_NAME via uname as a fallback (if CI vars are not provided) - * ci_build.sh: ci_build.sh: recognize CI_OS_NAME from case- - insensitive match of "$OS_FAMILY-$OS_DISTRO", and recognize - solaris+sunos - * include/common.h: Fix some fallout from PR #685 * The - parenthesized "(label)" in debug macros is a safer expansion than - the original "label" * Avoid the dangling "args..." that may be - not-specified by caller (strict-C99 compat) - * docs/Makefile.am: docs/Makefile.am: do not spellcheck ../INSTALL - which is generated - * ci_build.sh: ci_build.sh: run the first spellcheck really quietly - * docs/Makefile.am, docs/nut.dict: docs/Makefile.am + docs/nut.dict: - add more texts from base dir to spellcheck them too - * docs/Makefile.am: docs/Makefile.am: report the directory relative - to which spellchecked text sources failed - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: use ci_build.sh to - spellcheck with a more user-friendly output - * ci_build.sh: ci_build.sh: extend the BUILD_TYPE=default-spellcheck - to do a quiet round first, and only report details about failed - files if needed - * ci_build.sh: ci_build.sh: fallback BUILD_WARNFATAL=true/false - handling; comment values for BUILD_WARNOPT - -2021-09-20 Jim Klimov - - * docs/nut.dict: docs/nut.dict: update for recently added docs and - merged PRs, and update sorting - * docs/config-prereqs.txt: config-prereqs.txt: fix markup to become - asciidoc - -2021-09-20 Jim Klimov - - * docs/Makefile.am, docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc- - setup.txt + docs/Makefile.am: update some notes and ability to - build the new doc - -2021-09-20 Jim Klimov - - * docs/ci-farm-lxc-setup.txt: ci-farm-lxc-setup.txt: update with - notes for "chroot apt-get" tricks - * docs/ci-farm-lxc-setup.txt: ci-farm-lxc-setup.txt: fix markup to - become asciidoc - -2021-09-21 Jim Klimov - - * docs/man/generic_modbus.txt: docs/man/generic_modbus.txt: some - whitespace issues - * m4/nut_type_socklen_t.m4: [NUT issue #1053] - m4/nut_type_socklen_t.m4: convert one remaining - AC_TRY_COMPILE(H,M,S) into modern - AC_COMPILE_IFELSE(AC_LANG_PROGRAM(H,M), S) - * configure.ac: [NUT issue #1053] configure.ac: apply recommendations - of "autoupdate" and warnings from "autoconf" for autotools-2.70 - -2021-09-20 Jim Klimov - - * docs/config-prereqs.txt: config-prereqs.txt: fix markup to become - asciidoc - * tests/.gitignore: GitIgnore test log and trace for "nutlogtest" - -2021-09-20 Jim Klimov - - * docs/Makefile.am, docs/ci-farm-lxc-setup.txt: docs/ci-farm-lxc- - setup.txt + docs/Makefile.am: update some notes and ability to - build the new doc - -2021-09-20 Jim Klimov - - * docs/nut.dict: docs/nut.dict: ordering and typo fixes in the - dictionary :) - * docs/ci-farm-lxc-setup.txt: ci-farm-lxc-setup.txt: update with - notes for "chroot apt-get" tricks - -2021-09-19 Jim Klimov - - * docs/nut-names.txt: docs/nut-names.txt: refactor the standalone - Time and Date format chapter - -2021-09-20 Jim Klimov - - * docs/ci-farm-lxc-setup.txt: ci-farm-lxc-setup.txt: fix markup to - become asciidoc - -2021-09-19 Jim Klimov - - * docs/ci-farm-lxc-setup.txt: Introduce docs/ci-farm-lxc-setup.txt - with setup notes - * docs/ci-farm-lxc-setup.txt: Introduce docs/ci-farm-lxc-setup.txt - with setup notes - -2021-09-17 Jim Klimov - - * Jenkinsfile-dynamatrix: Update Jenkinsfile-dynamatrix Revise - pattern for Makefiles and similar - * Jenkinsfile-dynamatrix: Update Jenkinsfile-dynamatrix Do not apply - filename regex filtering to main branch builds so they can always - serve as a reference - * Jenkinsfile-dynamatrix: Update Jenkinsfile-dynamatrix Remove - 'default' target as it brings little value: default-tgt:distcheck- - valgrind tests the distcheck part, and default-nodoc tests the main - recipe with default settings and no distcheck (both skip/disable - docs). - -2021-09-17 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: modularize the way - to constrain build scenarios not relevant to the changed files - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: find a way to - constrain build scenarios not relevant to the changed files (e.g. - no big rebuilds for a docs-only change) - -2021-09-16 Jim Klimov - - * docs/nut.dict: Update nut.dict - * docs/nut.dict: Update nut.dict - * docs/nut-names.txt: Update nut-names.txt Clarified an ambiguity - typo about time format, added examples for data with time zones - -2021-09-16 dtsecon - - * drivers/generic_modbus.c: change ulon to uint_32 - * drivers/generic_modbus.h: fix forward declarations of enum - occurances - -2021-09-15 Jim Klimov - - * docs/nut.dict: Update nut.dict Update for PR #1076 - * docs/nut.dict: Update nut.dict Add "FTTx" for PR #1061 - * tests/getvaluetest.c: Update getvaluetest.c Include NUT "common.h" - for NUT_UNUSED_VARIABLE among other things - * tests/getvaluetest.c: getvaluetest.c: Fixing a NUT_UNUSED_VARIABLE - -2021-09-15 Jim Klimov - - * clients/upsclient.c: upsclient.c: log upscli_init() as a no-op in - case of builds without SSL - * clients/upsclient.c: upsclient.c: add NUT_UNUSED_VARIABLE for the - stub implem in case of builds without SSL - * server/netssl.c: netssl.c: add NUT_UNUSED_VARIABLE for the stub - implem in case of builds without SSL - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: limit default- - withdoc(:man) scenarios to not iterate compiler variants, only OSes - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add a comment with - overview of the dynacfgPipeline.slowBuild goals and trade-offs - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add a groovy - shebang for highlighters - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: rephrase some - comments and filter bundle names - -2021-09-14 dtsecon - - * docs/nut.dict: update nut.dict - * docs/nut.dict: update nut.dic - -2021-09-13 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: only run and - withdocs:man on setups that did not yet run a witdocs:all (and are - declared capable of man) - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: remove distcheck- - light (sort of pointless WRT other scenarios) and withdocs:man - (redundant) from "various builds" - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: comment that - "default-all-errors" builds do not include docs and distcheck - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add "default- - alldrv:no-distcheck" variant - * ci_build.sh: ci_build.sh: add "default-alldrv:no-distcheck" variant - * ci_build.sh: ci_build.sh: comment "default-all-errors" builds with - varying SSL implementations and refactor into a loop and case - Should be helftul for https://github.com/networkupstools/jenkins- - dynamatrix/issues/4 eventually - * ci_build.sh: ci_build.sh: comment the case BUILD_TYPE to maintain - easier - -2021-09-12 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: reduce the amount - of build combos by careful use of dynamatrixAxesCommonEnv - -2021-09-11 Jim Klimov - - * tests/cpputest.cpp: tests/cpputest.cpp: add an optional verbose - mode to list executed test case names - * configure.ac: ci_build.sh: actively check that cppunit is not just - installed, but is usable with current compiler toolkit (we saw - linking issues and runtime segfaults with it) - * ci_build.sh: ci_build.sh: update a comment for OpenIndiana gcc-4.x - vs. libgd - * ci_build.sh: ci_build.sh: skip CGI builds for openindiana with - gcc-4.x (or older, preemptively) for now - * ci_build.sh: ci_build.sh: update constraints for libgd/cgi builds - on freebsd - * ci_build.sh: ci_build.sh: fix --disable-cppunit (not --without- - cppunit) - -2021-09-11 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: constrain autotools - builds to "*fightwarn*" branches and PRs - -2021-06-14 Doug Nazar - - * server/netssl.c: server: Add warning if DISABLE_WEAK_SSL is not - enabled. - -2021-06-12 Jim Klimov - - * server/netssl.c: Update netssl.c Comment the default value of - `disable_weak_ssl` (currently not getting in our way, but can - change later) - * server/netssl.c: Update netssl.c Slight pedantic fix for use of - NSS VMAJOR/VMINOR macros - * server/conf.c: Update conf.c Comment parse_boolean() and add - support for "0" and "1" string values there, for good measure - * conf/upsd.conf.sample: Update upsd.conf.sample Mention that - DISABLE_WEAK_SSL is "currently" disabled by default, hinting that - it can become enabled after some releases. - * docs/nut.dict: Update nut.dict Add "TLSv" support in - spellchecker - -2021-06-11 Doug Nazar - - * conf/upsd.conf.sample, server/conf.c, server/netssl.c, - server/netssl.h: server: Add option to disable weak SSL - protocols/ciphers. - -2021-09-01 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c, drivers/powerware-mib.c, - drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: Add a generic - function to convert date (#1078) This provides conversion from US - date (mm/dd/yyyy) to ISO Calendar date (yyyy-mm-dd). Also adapt the - function callback mechanism to make it more generic, and only char* - to char* reformating, beside from the int to char* value lookup. - Co-authored-by: Jim Klimov - -2021-08-03 Jim Klimov - - * clients/nutclient.h, clients/nutclientmem.cpp, - clients/nutclientmem.h: clients/nutclient.h + nutclientmem.h/.cpp: - add NUT_UNUSED_VARIABLE() where needed - * drivers/libshut.h: drivers/libshut.h: define the Device field - recently added to USBDevice_t - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: initialize the recently - added USBDevice_t Device field - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - fix the switch-case fallthrough that should not be (the case of "s" - is handled lower in the routine, so instant return is not logical) - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - complete the item_t initializers - * drivers/nutdrv_qx_masterguard.c: drivers/nutdrv_qx_masterguard.c: - be explicit about NUT_UNUSED_VARIABLEs - -2021-07-20 Jim Klimov - - * common/common.c: common/common.c: avoid C++ style comments - -2021-05-25 Jim Klimov - - * docs/images/ci/fosshost.org_Host_Light_309px.png, - docs/images/ci/fosshost.org_Host_Light_38px.png: docs/image/ci: add - more Fosshost logos tuned to be readable at smaller height - -2021-04-26 Jim Klimov - - * docs/man/dummy-ups.txt: dummy-ups.txt: mention the DDL and nut-ddl- - dump.sh - -2021-08-27 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: note caveats - about installing cppunit and gcc-4.4.4 on OpenIndiana - -2021-08-07 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: suggest - installing valgrind where available - -2021-08-04 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: suggest - installing source-highlight where available - -2021-08-03 Jim Klimov - - * docs/nut.dict: docs/config-prereqs.txt: list prerequisites for at - least a minimal build in OmniOS CE - update spellchecker - * docs/config-prereqs.txt: docs/config-prereqs.txt: list - prerequisites for at least a minimal build in OmniOS CE - * docs/config-prereqs.txt: docs/config-prereqs.txt: document libtool - as a prerequisite - -2021-08-02 Jim Klimov - - * docs/config-prereqs.txt: docs/config-prereqs.txt: revise - installation of supported shell interpreters - * docs/config-prereqs.txt: docs/config-prereqs.txt: add en-aspell for - freebsd profile - -2021-08-01 Jim Klimov - - * docs/Makefile.am, docs/config-prereqs.txt, docs/nut.dict, - docs/packager-guide.txt, docs/user-manual.txt: Introduce - docs/config-prereqs.txt and spellcheck for it - -2021-08-11 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: revise use of - requiredNodelabels/excludedNodelabels, and reset them to surely - delete any cached values in the reusable dynamatrix object - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: keep docs builds to - the standard set of builders (nut-builder not doc-builder) - -2021-08-10 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: use a custom-named - dynacfgPipeline.stashnameSrc - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: neuter the example - buildCommit - * Jenkinsfile-dynamatrix: Revert "Jenkinsfile-dynamatrix: list the - custom commits built on new NUT CI for initial history" This - reverts commit c9b5c870ac6834f16ebecb5334ac178de2d03d3d. Have that - list in history but do not clutter live version. - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: list the custom - commits built on new NUT CI for initial history - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: revise docs-all - build spec - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: modernize example - for custom replayed builds - -2021-08-04 Jim Klimov - - * ci_build.sh: ci_build.sh: double-quote path var expansions - * ci_build.sh: ci_build.sh: detect build agent capabilities for - Jenkins builds with NUT dynaMatrix config - * ci_build.sh: ci_build.sh: abstract from TRAVIS_OS_NAME to - CI_OS_NAME and set one for Jenkins builds with NUT dynaMatrix - config - -2021-08-03 Jim Klimov - - * configure.ac: configure.ac: hack around libtool when building with - custom bitness - -2021-08-03 Jim Klimov - - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: define autotools- - based distcheck for NUT - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: define autotools- - based distcheck for NUT - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: explicitly exclude - openindiana from build scenario with all docs types - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: typo fix - (require*d*Nodelabels after upstream refactor) - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: do not pass - "-Wno-unknown-warning" to GCC - * m4/nut_check_libavahi.m4: m4/nut_check_libavahi.m4: PoC enable - avahi build in FreeBSD - rearrange - -2021-08-02 Jim Klimov - - * Jenkinsfile-dynamatrix: Revert "Jenkinsfile-dynamatrix: try to - synchronize cloning of dsbcClone+stageNameClone" This reverts - commit 2d477fac1c67f7a8477c550f1e5a638e533ab2ad : "synchronized" is - not supported for Jenkins Groovy CPS - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: try to synchronize - cloning of dsbcClone+stageNameClone - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: define - dsbcClone+stageNameClone closer to start of closure to get the - correct copy ASAP - * Jenkinsfile-dynamatrix: Jenkinsfile-dynamatrix: add - SERVICE_FRAMEWORK="selftest" to shellcheck-nde (equivalent) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in: check for not-supported (t)csh interpreter - * Makefile.am: Makefile.am: add SERVICE_FRAMEWORK="selftest" to - shellcheck-nde - * Makefile.am: Makefile.am: add shellcheck-nde - * Makefile.am: Makefile.am: fix shellcheck (not all OSes serve - /bin/bash at that pathname) - -2021-07-31 Jim Klimov - - * m4/nut_check_libavahi.m4: m4/nut_check_libavahi.m4: PoC enable - avahi build in FreeBSD - * m4/nut_check_libneon.m4: m4/nut_check_libneon.m4: FreeBSD installs - stuff under /usr/local - -2021-07-28 Jim Klimov - - * ci_build.sh: ci_build.sh: report CONFIGURING NUT in a way - friendlier for copy-paste - * configure.ac, m4/nut_compiler_family.m4: configure.ac + - m4/nut_compiler_family.m4: introduce NUT_COMPILER_FAMILY_FLAGS to - propagate -Wno-unknown-warning(-opton) before any pkgconfig - * docs/man/Makefile.am: docs/man/Makefile.am: Fix check-man-txt to - also run from separate build dirs - * ci_build.sh: ci_build.sh: do not make TOO MUCH noise when dumping - config.log - * ci_build.sh: ci_build.sh: set DISTCHECK_FLAGS in "default-tgt:"* - handling too - -2021-07-27 Jim Klimov - - * ci_build.sh: ci_build.sh: introduce BUILD_TYPE=default-withdoc:man - (and allow it) - * .gitignore: GitIgnore CI-generated log files - * ci_build.sh: ci_build.sh: introduce BUILD_TYPE=default-withdoc:man - * ci_build.sh: ci_build.sh: make sure DISTCHECK_FLAGS is single-line - * configure.ac: configure.ac: tell compiler to not choke on unknown - options - -2021-07-26 Jim Klimov - - * ci_build.sh: ci_build.sh: parameterize $MAKE - * ci_build.sh: ci_build.sh: try to avoid problems with multi-token - CFLAGS etc. when passed from "${CONFIG_OPTS[@]}" array into - DISTCHECK_CONFIGURE_FLAGS string (envvar) - refactor - -2021-07-22 Jim Klimov - - * ci_build.sh: ci_build.sh: try to avoid problems with multi-token - CFLAGS etc. when passed from "${CONFIG_OPTS[@]}" array into - DISTCHECK_CONFIGURE_FLAGS string (envvar) - -2021-07-20 Jim Klimov - - * configure.ac: configure.ac: detect if i2c library is usable, and - cancel i2c driver build if it is not - -2021-06-26 Jim Klimov - - * Makefile.am, configure.ac: configure.ac: follow autotools doc - recommendation to automatically update the libtool script if it - becomes out-of-date - * configure.ac: configure.ac: AC_PROG_LIBTOOL is noisily deprecated - since autotools-2.70; LT_INIT is the replacement - * m4/nut_arg_with.m4: m4/nut_arg_with.m4: AC_HELP_STRING is noisily - deprecated since autotools-2.70; AS_HELP_STRING is available since - 2.59 and we use it already a lot elsewhere - -2021-04-26 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am: fix truncated comment - Text originates from SVN-Git migration in - e8e716e0598158f705e060c72f8f4b0444fbcd0f - -2021-08-23 Arnaud Quette - - * docs/nut-names.txt: Complete the date standardization proposal for - time - -2021-08-20 Arnaud Quette - - * docs/nut-names.txt: Propose to express dates using ISO 8601 when - possible - -2021-08-19 Stephan Blecher <_github@blecher.at> - - * drivers/legrand-hid.c: issue-616: legrand 600 fix input voltage - -2021-08-18 root - - * scripts/upower/95-upower-hid.rules: legrand hid rules update - -2021-08-12 Arnaud Quette - - * drivers/mge-xml.c: netxml-ups: fix for erroneous battery info - (MGEXML/0.30) (#1069) Some battery related information were - wrongly using output information - * docs/nut-names.txt: RFC: clarify and complete battery dates (#1063) - The existing battery.date means the installation or last - replacement date, as it seems to be implemented by various drivers. - Add an additional battery.date.maintenance for the next replacement - or maintenance date - * docs/nut-names.txt: Extend battery information collection (#1062) - * RFC: Add battery.capacity.nominal * RFC: add Li-ion battery - cell information * RFC: Add battery.status * Clarify Li-ion - battery cell information Mention that min/max cell voltage and - temperature are observed values, not settings - * docs/nut-names.txt: RFC: add new variable battery.packs.external - (#1060) * RFC: add new variable battery.packs.external * Improve - wording, as per Charles Lepple feedback * Improve example values, - which can or not be zero-padded - -2021-08-01 Jim Klimov - - * Jenkinsfile-dynamatrix: Introduce Jenkinsfile-dynamatrix - -2021-07-28 Jim Klimov - - * data/driver.list.in: data/driver.list.in: list Ippon Back Comfo Pro - II 650/850/1050 as supported by blazer_usb [#1035] - -2021-07-21 dtsecon - - * drivers/generic_modbus.c, drivers/generic_modbus.h: shutdown - configurable repetition with increasing time interval added - -2021-07-19 dtsecon - - * configure.ac, docs/Makefile.am, docs/man/Makefile.am: fix man pages - broken build process - -2021-07-16 dtsecon - - * docs/man/generic_modbus.txt: improve man page - * docs/man/Makefile.am, docs/man/generic_modbus.txt: man page text - created, added in build procedure - -2021-07-08 dogtopus - - * docs/man/genericups.txt, drivers/genericups.h: genericups: Change - type 23 to be active low. Seems that typical RS232 transceivers - inverts the signal automatically anyway, so there's no point of - making them active high by default. - -2021-07-06 dogtopus - - * docs/man/genericups.txt: docs: Document the special line NULL in - genericups documentation. - * drivers/genericups.c: genericups: Bump version number. - * docs/contact-closure.txt, docs/man/genericups.txt, - drivers/genericups.c, drivers/genericups.h: genericups: Add support - for FTTx battery backup. A lot of those "UPSes" use a 4-wire open- - drain-like contact closure signaling (dubbed "telemetry interface") - to report their status (see https://dl4jz3rbrsfum.cloudfront.net/do - cuments/CyberPower_UM_CBN50U48A-1.pdf for example). They are sorta - compatible with APC 940-0020B/C cables in terms of pin assignments, - with extra signals for replace battery and battery missing and lack - of shutdown signal. This patch adds a sample device type (23) for - this kind of device. It also adds support for the extra signal - types (RB for replace battery and BYPASS for disconnected battery) - used by these devices, as well as an option to unassign/disable an - unused signal in the config file by setting it to NULL. Note that - there is no standard cable for this kind of device, so type 23 - assumes RS232 control signaling and RTS as the voltage source for - input pin pullups. - -2021-07-06 dtsecon - - * drivers/generic_modbus.c, drivers/generic_modbus.h: fix serial - options in modbus_open - * drivers/generic_modbus.c: fix 'for' loop initial declarations for - compatibility out of C99 mode - * drivers/Makefile.am: generic_modbus.h added to Makefile.am - * drivers/generic_modbus.c: just one space less - -2021-06-30 Nick Briggs - - * tests/.gitignore, tests/Makefile.am, tests/getvaluetest.c: Create - test harness for GetValue() report value extraction (usbhid-ups) - Adds source and updates Makefile.am to build tests/getvaluetest, a - test harness for the report value extraction function GetValue() in - hidparser.c. getvaluetest has some built-in test cases, which are - easily extensible, but also accepts a single test specification on - the command line to allow for easy experimentation. getvaluetest - -h for usage - -2021-06-30 Jim Klimov - - * scripts/systemd/nut-driver-enumerator.service.in, - scripts/systemd/nut-driver@.service.in, scripts/systemd/nut- - monitor.service.in, scripts/systemd/nut-server.service.in: - systemd/*.service(.in): update units with SyslogIdentifier=%N The - log identifier should hopefully help make more sense of syslog or - journal entries where helper shell script traces might end up. - -2021-06-29 Dimitris Economou - - * drivers/generic_modbus.c: minor changes to comply with nut - development guidelines - * drivers/generic_modbus.c: variable ctx changed to mbctx - -2021-06-25 dtsecon - - * drivers/generic_modbus.c: removing unnecessary code - * drivers/generic_modbus.c: time_ellapsed fixed - -2021-06-25 abratchik - - * drivers/Makefile.am, drivers/arduino-hid.c, drivers/arduino-hid.h, - drivers/usbhid-ups.c, scripts/upower/95-upower-hid.rules: Arduino - UPS Support - -2021-06-12 abratchik - - * docs/FAQ.txt, drivers/libusb.c, drivers/libusb.h, drivers/powervar- - hid.c: HID-compliant UPS support with interface gt than 0 - -2021-06-24 dtsecon - - * drivers/generic_modbus.c: minor changes and tidying up - * drivers/generic_modbus.c: remove unnecessary stuff - * drivers/generic_modbus.c, drivers/generic_modbus.h: initial commit - of generic_modbus beta version source files - * drivers/Makefile.am: generic_modbus sources add in buidling - procedure - -2021-06-22 Tom Fifield - - * data/driver.list.in: Opti-UPS PS1500E is supported by blazer_usb - Opti-UPS PS1500E connects via serial over USB, and is supported by - the blazer_usb driver. This patch updates the compatibility list. - Manufacturer link: https://www.opti- - ups.com/index.asp?SCID=SC20060001 Device is automatically detected - by nut-scanner > [nutdev1] > driver = "blazer_usb" > - port = "auto" > vendorid = "0665" > productid = "5161" - > bus = "001" OB status is correctly detected, and other - correct values are displayed when queried: battery.charge: 100 - battery.voltage: 27.60 battery.voltage.high: 26.00 - battery.voltage.low: 20.80 battery.voltage.nominal: 24.0 - device.mfr: device.model: 1500VA device.type: ups driver.name: - blazer_usb driver.parameter.bus: 001 driver.parameter.pollinterval: - 2 driver.parameter.port: auto driver.parameter.productid: 5161 - driver.parameter.synchronous: no driver.parameter.vendorid: 0665 - driver.version: 2.7.4 driver.version.internal: 0.12 - input.current.nominal: 13.0 input.frequency: 60.0 - input.frequency.nominal: 60 input.voltage: 113.9 - input.voltage.fault: 111.4 input.voltage.nominal: 110 - output.voltage: 113.3 ups.beeper.status: enabled - ups.delay.shutdown: 30 ups.delay.start: 180 ups.firmware: ups.load: - 2 ups.mfr: ups.model: 1500VA ups.productid: 5161 ups.status: OL - ups.type: offline / line interactive ups.vendorid: 0665 - -2021-06-18 Scott K Logan - - * drivers/tripplite.c: drivers/tripplite.c: start using the 'X' value - Relatively ancient documentation seems to suggest that this - 'firmware checksum' value can be used to indicate the firmware - generation as well as the capabilities of the UPS, namely the - number of independently controllable plugs. - -2021-06-16 Nick Briggs - - * drivers/hidparser.c: Add note regarding sensitivity to 32- vs 64- - bit compilation and overflow - -2021-06-14 Doug Nazar - - * Makefile.am, conf/Makefile.am, data/Makefile.am, docs/Makefile.am, - docs/man/Makefile.am: Fix spellcheck to also run from separate - build dirs - -2021-06-12 Jim Klimov - - * docs/nut-names.txt: docs/nut-names.txt: add the note about RFC - Recording Document - * docs/nut-names.txt: docs/nut-names.txt: reword the intro paragraphs - and define the "experimental.*" namespace - * docs/FAQ.txt: FAQ.txt: make it easier to find suggestions for - missing "battery.charge.restart" workarounds - -2021-06-02 Nick Briggs - - * drivers/hidparser.c: Fix GetValue() to correctly extract values - from a report when compiled in LP64 mode Changes the strategy for - removing potential garbage bits from values extracted from a - report. Use the LogMin and LogMax fields to drive which bits are - meaningful but avoid confusion when, for example, given a range of - -1..2147483647 - -2021-05-30 Jim Klimov - - * configure.ac: configure.ac: bugfix - populate systemdtmpfilesdir in - its option, not systemdshutdowndir - * configure.ac: configure.ac: do not make noise with yet empty - systemdtmpfilesdir - * configure.ac: configure.ac: process other values for - systemdshutdowndir option - * configure.ac: configure.ac: just in case, double-quote to single- - tokenize detected systemd related options - * configure.ac: configure.ac: update comments for systemd related - options - -2021-05-28 Jim Klimov - - * docs/nut.dict: nut.dict: add new words for nut-website - * configure.ac: configure.ac: improve reporting of systemd options - processing - * autogen.sh, configure.ac, scripts/systemd/.gitignore, - scripts/systemd/nut-common.tmpfiles.in: configure.ac: generate - scripts/systemd/nut-common.in based on current config - * configure.ac: configure.ac: typo fix in comment - * Makefile.am, configure.ac, docs/configure.txt, docs/nut.dict, - scripts/systemd/.gitignore, scripts/systemd/Makefile.am, - scripts/systemd/nut-common.tmpfiles.in: [Issue #1030] Deliver - systemd-tmpfiles config to pre-create runtime locations - -2021-05-24 Jim Klimov - - * docs/nut.dict: Update nut.dict Update dict for PR #975 - * docs/man/nutdrv_qx.txt: Update nutdrv_qx.txt Our accepted - terminology is for multiple "UPSes" not "UPSen", however - questionable the language might be - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Bump version due to - addition of `phoenixtec_command()` - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Pre-initialize "e = NULL" - in phoenixtec_command(), we do not set it from `memchr()` later in - all cases. - * drivers/nutdrv_qx_masterguard.c: Update nutdrv_qx_masterguard.c - Add #include - * drivers/powerpanel.h: Update powerpanel.h Define a subdriver_t for - driver version (modifiable) vs type (bin/txt) - * drivers/powerp-txt.c: Update powerp-txt.c Fix subdriver type vs - subdriver version - * drivers/powerp-bin.c: Update powerp-bin.c Track subdriver version - * drivers/powerp-txt.c: Update powerp-txt.c Introduce versioning - * drivers/cyberpower-mib.c: Update cyberpower-mib.c Update reported - driver version after the bump - * drivers/cyberpower-mib.c: Update cyberpower-mib.c Handle - "battery.voltage" and "battery.current" readings for different MIB - revisions - -2021-05-24 Jim Klimov - - * lib/.gitignore: GitIgnore generated lib/libnutclientstub.pc - -2021-05-24 Jim Klimov - - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Formatting and slight - rewording of a comment - -2021-05-24 Jim Klimov - - * drivers/usb-common.h: drivers/usb-common.h: better comment "the 5 - pieces of information by which a USB device identifies itself" - * drivers/usb-common.h: drivers/usb-common.h: move the recently added - USBDevice_t Device field to the end, for a bit of cross-version - binary compatibility - * docs/man/blazer-common.txt, docs/man/nutdrv_qx.txt, - docs/man/tripplite_usb.txt, docs/man/usbhid-ups.txt: Docs: rephrase - Note for "device" option in USB drivers - -2021-05-18 Clappier, Eric - - * tests/nutclienttest.cpp: Fix typo - -2021-05-17 Clappier, Eric - - * clients/nutclientmem.cpp, clients/nutclientmem.h, - tests/nutclienttest.cpp: Take into account pull request remarks - -2021-05-07 Clappier, Eric - - * drivers/bcmxcp_ser.c: Fix coverity test issue - * tests/nutclienttest.cpp: Try fixing coverity test issue - * clients/Makefile.am, configure.ac, lib/Makefile.am, - lib/libnutclientstub.pc.in, tests/Makefile.am: Separate lib for - stub - -2021-05-05 Clappier, Eric - - * tests/nutclienttest.cpp: Add tests in cppunit - * clients/Makefile.am: Fix missing header - -2021-05-04 Clappier, Eric - - * clients/Makefile.am, clients/{nutclientmock.cpp => - nutclientmem.cpp}, clients/{nutclientmock.h => nutclientmem.h}, - tests/nutclienttest.cpp: Rename class Fix cppunit test Add - typedef for map - * clients/nutclientmock.cpp: Fix indentation - * clients/Makefile.am, clients/nutclient.cpp, clients/nutclient.h, - clients/nutclientmock.cpp, clients/nutclientmock.h: Separate - NutClientMock class - * clients/nutclient.cpp, clients/nutclient.h, - tests/nutclienttest.cpp: Add mock for TcpClient - -2021-05-20 Denis Yurin - - * drivers/powercom-hid.c: add temperature readings for Powercom - MRT-3000 add temperature readings support for Powercom MRT-3000 - -2021-05-18 Alexey Kazancev - - * drivers/nutdrv_qx.c: nutdrv_qx.c: bump version to 0.31 - * drivers/nutdrv_qx.c: nutdrv_qx.c: add batt.volt.act validation - Some UPS return zero batt voltage after communication error. This - validation must fix wrong runtime calculation. - * drivers/nutdrv_qx.c: nutdrv_qx.c: fix snr_command communication - error in protocol matching phase. - -2021-05-06 Alexey Kazancev - - * drivers/nutdrv_qx.c: nutdrv_qx.c: bump version to 0.30 - -2021-04-26 Alexey Kazancev - - * drivers/nutdrv_qx.c: nutdrv_qx.c: add correction of runtime - estimation - -2021-04-23 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: - fabula_hunnox_subdriver(): annotate NUT_UNUSED_VARIABLE(device) arg - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c: fix - initialization of delta_ups_type_info[] - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c: fix - initialization of delta_ups_type_info[] - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: - fabula_hunnox_subdriver(): annotate NUT_UNUSED_VARIABLE(device) arg - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: order includes and - subdrivers alphabetically - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: order includes and - subdrivers alphabetically - * clients/nutclient.cpp, clients/nutclient.h: - clients/nutclient.{h,cpp}: explicitly request assignment operator - generation for exception classes - -2021-04-09 Jim Klimov - - * drivers/metasys.c: drivers/metasys.c: fix SIZE_MAX comparison - * drivers/metasys.c: drivers/metasys.c: fix %zd printing of ssize_t - res - -2021-03-31 Jim Klimov - - * drivers/metasys.c: drivers/metasys.c: protect failsafe logic from - compiler warnings with pragmas - * drivers/metasys.c: drivers/metasys.c: upsdrv_initinfo(): pedantic - and stylistic fixes - * drivers/metasys.c: drivers/metasys.c: upsdrv_initinfo(): sanity- - check that reply was big enough to have a serial number, and then - cast for memcpy() - * drivers/metasys.c: drivers/metasys.c: get_answer(): rectify var - types to avoid signedness and range warnings - * drivers/metasys.c: drivers/metasys.c: fix arg type for - send_read_command() to avoid signedness mismatches - * drivers/metasys.c: drivers/metasys.c: refactor a get_word_float() - to simplify code - * drivers/metasys.c: drivers/metasys.c: fix fixed-width integers for - get_word()/get_long() or cast meaningfully where needed - * drivers/bcmxcp.c: drivers/bcmxcp.c: cast the bytes when - constructing "cbuf[]"s element by element - * drivers/bcmxcp.c: drivers/bcmxcp.c: instcmd(): cast use of sddelay - to avoid signedness warnings - * drivers/bcmxcp.c: drivers/bcmxcp.c: upsdrv_initinfo(): buf is - size_t by usage - * drivers/bcmxcp.c: drivers/bcmxcp.c: upsdrv_initinfo(): fix atoi() - of unsigned value for shutdown_delay - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix fixed-width integers for - get_word()/get_long()/init_outlet() or cast meaningfully where - needed - * drivers/al175.c: drivers/al175.c: avoid implicit conversion of byte - to int during bit-shifting - -2021-03-30 Jim Klimov - - * drivers/al175.c: drivers/al175.c: avoid implicit tcflag_t - signedness conversion - * drivers/al175.c: drivers/al175.c: avoid implicit char/byte - conversion - * drivers/al175.c: drivers/al175.c: avoid implicit long/unsigned long - conversion, and fix formatting nearby - * drivers/al175.c: drivers/al175.c: align arguments to wrappers of - al175_do() with the uint16_t type it accepts (avoid variable-width - signed int) - * drivers/libusb.c: drivers/libusb.c: mark hid_rep_index static (not - externalized) - -2021-01-20 Jim Klimov - - * drivers/eaton-ats16-nm2-mib.c, drivers/eaton-ats16-nmc-mib.c: - eaton-ats16-nm?-mib.c: port comments from 42ity fork to clarify - what is going on here for mib2nut_info_t definitions - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - comment about not-function pointers from libnet-snmp - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: fix - indentations and whitespaces - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: fix indentations and whitespaces - * tools/nut-scanner/nut-scanner.c: nut-scanner.c: some extra - whitespace, some missing, in longopts[] - -2021-01-06 Jim Klimov - - * server/netssl.c: server/netssl.c: #include "nut_stdint.h" for - limits definitions - * clients/upscmd.c, clients/upsimage.c, clients/upsmon.c, - clients/upsrw.c, clients/upsstats.c, common/common.c, common/str.c, - drivers/al175.c, drivers/bcmxcp.c, drivers/bcmxcp_ser.c, - drivers/bcmxcp_usb.c, drivers/bestfortress.c, drivers/etapro.c, - drivers/genericups.c, drivers/metasys.c, drivers/netxml-ups.c, - drivers/nutdrv_siemens_sitop.c, drivers/powercom.h, - drivers/richcomm_usb.c, drivers/serial.c, drivers/snmp-ups.c, - server/upsd.c: Various sources: use nut_stdint.h where limits.h was - introduced recently - * configure.ac, include/nut_stdint.h: nut_stdint.h: include limits.h - and make sure SIZE_MAX is defined - -2020-12-27 Jim Klimov - - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: fix size_t types - for upsdebugx_hex() and range-check the values - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix static const struct - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix whitespace - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix static const struct - -2020-12-26 Jim Klimov - - * server/conf.c, server/upsd.c, server/upsd.h: server/upsd.{c,h} - conf.c: fix maxconn to long, to match sysconf() return value; check - that practical value range allows to malloc() the buffers - * server/upsd.c: server/upsd.c: fix size_t/ssize_t types for - {ssl_,}write() in sendback() - * server/netssl.c, server/netssl.h: server/netssl.{c,h}: fix - ssl_write()/ssl_read() to return ssize_t (like upsclient - net_write()/net_read()) - * server/netssl.c: server/netssl.c: fix int types for OpenSSL - codepaths - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: fix numphases to - unsigned int - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: fix int size_t - types for read(), malloc() etc. - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: fix size_t types - for upsdebugx_hex() and some indentation - * drivers/isbmex.c: drivers/isbmex.c: fix int size_t types for - read(), malloc() etc. - * drivers/genericups.c: drivers/genericups.c: fix int types for - sleep() - * drivers/genericups.c: drivers/genericups.c: cast termios types for - bit magic - * drivers/gamatronic.h: drivers/gamatronic.h: fix speed_t/size_t in - baud_rates[] definition like for bcmxcp_ser - * drivers/gamatronic.c: drivers/gamatronic.c: fix some whitespace - * drivers/gamatronic.c: drivers/gamatronic.c: fix int size_t types - for read(), malloc() etc. - * drivers/etapro.c: drivers/etapro.c: constrain return value for - etapro_get_response() type - * drivers/bestuferrups.c: drivers/bestuferrups.c: fix size_t int type - for execute() (use-cases pass sizeof() anyway) - * drivers/bestfortress.c: drivers/bestfortress.c: constrain value for - usleep() in upssend() - * drivers/bestfortress.c: drivers/bestfortress.c: constrain return - value for upssend() type - * drivers/bestfortress.c: drivers/bestfortress.c: fix size_t types - for upsdebugx_hex() - -2021-04-23 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: fix back setparam() - arg type - -2020-12-01 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: fix printing of - ssize_t variable - -2020-11-30 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: use size_t where it - should be, for data chunk length parsing - -2020-12-26 Jim Klimov - - * drivers/bestfcom.c: drivers/bestfcom.c: fix size_t int type for - execute() (use-cases pass sizeof() anyway) - * drivers/belkinunv.c: drivers/belkinunv.c: fix int types for read(), - malloc() etc. - * drivers/belkinunv.c: drivers/belkinunv.c: fix int types for reg - (byte) - * drivers/belkin.c: drivers/belkin.c: fix size_t/useconds_t int type - for cnt (already limited to byte range) - * drivers/bcmxcp.c: drivers/bcmxcp.c: whitespace fix indentation in - set_alarm_support_in_alarm_map() - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix unsigned int type for index - arguments in set_alarm_support_in_alarm_map() - * drivers/serial.c: drivers/serial.c: fix ssize_t int type for - function returns vs size_t buflen argument - * drivers/dstate.c: drivers/dstate.c: fix size_t int type for - bufrw_max - * drivers/main.c: drivers/main.c: fix int types for poll_interval - * clients/upscmd.c: clients/upscmd.c: fix data range warnings for - asserts about implem-dependent overflow chances - * clients/upsrw.c: clients/upsrw.c: fix data range warnings for - asserts about implem-dependent overflow chances - * clients/upsclient.c: clients/upsclient.c: fix data range warnings - for asserts about implem-dependent overflow chances - * clients/upsmon.c, clients/upsmon.h: clients/upsmon.c: fix int types - for power value and totalpv accounting - * clients/upsmon.c: clients/upsmon.c: fix int types for sleep() - * clients/upsimage.c: clients/upsimage.c: make explicit casts from - floating-points into int types for rendering - * clients/upscmd.c: clients/upscmd.c: fix int types for timeouts from - upsclient.c - * clients/upsrw.c: clients/upsrw.c: fix int types for timeouts from - upsclient.c - * clients/upsclient.c: clients/upsclient.c: fix numq int types for - verify_resp() - -2020-12-25 Jim Klimov - - * clients/upsclient.c: clients/upsclient.c: make explicit a case - size_t/ssize_t casting - * clients/upsclient.c, clients/upsclient.h: clients/upsclient.{c,h}: - fix "timeout" type in - net_read/net_write/upscli_sendline_timeout/upscli_readline_timeout - to match upscli_select_read/upscli_select_write - * clients/upsclient.c: clients/upsclient.c: fix int types for OpenSSL - codepaths - -2020-12-07 Jim Klimov - - * drivers/metasys.c: drivers/metasys.c: various routines: fix - command_length into size_t - * drivers/bcmxcp_io.h, drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c: - bcmxcp*: various routines: fix command_length into size_t - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: get_answer(): fix - bytes_read, end_length and length into size_t - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: get_answer(): fix - bytes_read, end_length and length into size_t - -2020-12-02 Jim Klimov - - * drivers/bcmxcp.c: drivers/bcmxcp.c: use size_t for upsdebugx_hex() - and upsdebugx_ascii() args for logged data length - -2020-12-01 Jim Klimov - - * drivers/masterguard.c: drivers/masterguard.c: fix printing of - ssize_t variable - -2020-11-30 Jim Klimov - - * clients/upsstats.c: clients/upsstats.c: fix use of use size_t vs - int-argumented printf("%.*s", int, str) formatting - * drivers/al175.c: drivers/al175.c: check pointer math WRT buffer - lengths passed to logging - * common/common.c, include/common.h: common.{c,h}: use size_t for - upsdebugx_hex() and upsdebugx_ascii() args for logged data length - * drivers/tripplitesu.c: drivers/tripplitesu.c: init_comm(): fix data - types to size_t for strlen() function - * drivers/tripplitesu.c: drivers/tripplitesu.c: do_command(): fix up - "count" int type to be unsigned - * drivers/tripplitesu.c: drivers/tripplitesu.c: do_command(): fix up - "ret" int type to avoid conversions - * drivers/masterguard.c: drivers/masterguard.c: avoid value type - conversion by changing data types to size_t for strlen() function - * drivers/masterguard.c: drivers/masterguard.c: avoid value type - conversion by casting explicitly the return value of strlen() - function - -2020-12-27 Jim Klimov - - * clients/nutclient.cpp, clients/nutclient.h: - clients/nutclient.{h,cpp}: explicitly request copy constructor - generation for exception classes - -2020-11-30 Jim Klimov - - * clients/upsset.c: drivers/upsset.c: fix up int types to avoid - implicit conversions - * clients/upsimage.c: drivers/upsimage.c: avoid value type conversion - by casting explicitly the return value of strlen() function - * clients/upsimage.c: drivers/upsimage.c: fix up int types to avoid - conversions - * clients/cgilib.c: drivers/cgilib.c: fix up int types to avoid - conversions - * clients/upsstats.c: drivers/upsstats.c: fix up floating-point types - to avoid conversions and precision change - * clients/upsstats.c: clients/upsstats.c: use size_t where it should - be, for string length related processing - * clients/upslog.c: clients/upslog.c: use size_t where it should be, - for string length related processing - * clients/upslog.c: clients/upslog.c: avoid implicit floating-integer - conversion - -2021-03-30 Jim Klimov - - * configure.ac: configure.ac: nut_enable_warnings: clang presets - should let "-Wdocumentation" slide: NUT does not use it now, and - third-party headers are what they are - -2020-12-29 Jim Klimov - - * tests/nut-driver-enumerator-test.sh: tests/nut-driver-enumerator- - test.sh: allow to pass SHELL_PROGS="busybox_sh" as a single token - -2020-12-26 Jim Klimov - - * .travis.yml: .travis.yml: move _matrix_linux_gnustd_warn_viable a - bit up in _matrix_required_linux listing, to get more probable - failures earlier - -2021-04-23 Jim Klimov - - * drivers/delta_ups-mib.c: delta-mib.c: rename onbatt_info lookup - table in commented-away code sample (and match naming pattern with - other tables) - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c: typo in comment - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: comment that Vendor ID - 0x0483 is from ST Microelectronics - -2021-04-23 Jim Klimov - - * drivers/ever-hid.c: Update ever-hid.c Make and comment the macro - for ST Microelectronics vendor id (to generate udev data, etc. - properly) - * drivers/ever-hid.c: Update ever-hid.c Lowercase the hex in vendor - ID macro, for consistency - -2021-04-22 Nick Briggs - - * drivers/hidparser.c: correct 'for' loop initial declarations are - only allowed in C99 or C11 mode - * drivers/hidparser.c: Extract values in HIDParse correctly when - compiled in 64-bit (LP64) mode Reworks the conversion of bytes in - little-endian order to host order to operate independently of the - sizeof(long) and the byte-order of the host system. The extracted - value is stored as uint32_t as the code already performs casts to - signed/unsigned of varying sizes as appropriate to the context of - use. - -2021-04-21 Jim Klimov - - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: sync polling frequencies - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: remove (read-only) mappings for ups.delay* - in favor of same points polled for ups.timer* - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: comment away ups.mfr/model/serial setting - per PR comments - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: set voltage/current/frequency precision to - %.1f same for all entries - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: set battery.charge* precision to %.0f same - for all entries - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: import delta_ups_hid2nut[] entries "as is" - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: import Helper lookup tables and mapping - functions from master - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: change delta_ups_hid2nut[] content order - by names to be same as in master - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: import named delta_ups_usage_lkp[] content - from master - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: import delta_ups_format_model() content - from master - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: move delta_ups_format_model() to same - position as in master - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: indentations in delta_ups_claim() - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: indentations in delta_ups_hid2nut[] - * drivers/delta_ups-hid.c: drivers/delta_ups-hid.c/.h: sync PR #807 - code with master branch: indentations in delta_ups_usage_lkp[] - * drivers/delta_ups-hid.c, drivers/delta_ups-hid.h: - drivers/delta_ups-hid.c/.h: sync PR #807 code with master branch: - rename delta => delta_ups, sync comments - * drivers/Makefile.am, drivers/{delta-hid.c => delta_ups-hid.c}, - drivers/{delta-hid.h => delta_ups-hid.h}, drivers/usbhid-ups.c, - scripts/upower/95-upower-hid.rules: Rename delta-hid.c/.h to - delta_ups-hid.c/.h and sync vendor label for USB [#807] - -2021-04-21 Edgar Fuß - - * drivers/nutdrv_qx.c: Correct format string size_t is unsigned, so - use %zu (not %zd) in upsdebug() format string. - * drivers/nutdrv_qx.c: Remove vis-dependent debugging code Remove - (level 4) debugging code in the phoenixtex/masterguard USB - subdriver that depends on the BSD strvis() family for visual string - formatting. - -2021-04-20 Jim Klimov - - * drivers/delta-hid.c: Update delta-hid.c Sync the vendor-name - comment (for udev generation among others) with another Delta HID - driver merged to master recently. - -2021-04-20 Jim Klimov - - * drivers/delta_ups-hid.c, scripts/upower/95-upower-hid.rules: - 95-upower-hid.rules: regenerate for idVendor=05dd (Delta UPS) - * docs/documentation.txt: docs/documentation.txt: add a section on - reporting Data dumps for the DDL - -2021-04-20 Jim Klimov - - * docs/nut.dict: Update nut.dict Updated for PR #994 - -2021-04-20 Jim Klimov - - * docs/man/nutdrv_qx.txt: docs/man/nutdrv_qx.txt: fix copy-paste typo - -2021-04-20 Ygor Amadeo Sartori Regados - - * docs/man/microsol-apc.txt: Man page compilation error fixes - * docs/man/Makefile.am, docs/man/microsol-apc.txt: Added man page - * drivers/microsol-apc.c, drivers/microsol-common.h: Fix: wrong - operator and unused function - * drivers/microsol-apc.c, drivers/microsol-apc.h: Fixed driver name - -2021-04-20 Jim Klimov - - * drivers/microsol-apc.c: Update microsol-apc.c In upsdrv_info, - split contributors one per line for better source readability - -2021-04-20 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix back the name for - "fabula_hunnox_subdriver" (USB protocol subdriver vs. - "hunnox_subdriver" for device data mapping) - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: bump core DRIVER_VERSION - to reflect changes from PR #638 for "hunnox" support - * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: - simplify new subdriver/command naming from "fabula-hunnox" to - "hunnox" - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: restore indentation with - TABs - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fabula_command_hunnox(): - comment about truncating the buflen to 102 bytes - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fabula_command_hunnox(): - comment away scoping for (and use of) "hunnox_patch" leaving the - markers in comments for refactoring - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: comment that - fabula_hunnox_subdriver was reported to support more than Hunnox - branded devices - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fabula_command_hunnox(): - restore originally PRed choice of usb_get_string{,_simple}() based - on langid_fix alone - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: separate - fabula_command_hunnox() from fabula_command() without using a mixed - routine, to ensure no impact on currently supported devices - * docs/nut.dict: docs/nut.dict: typo fix - -2021-04-20 Jim Klimov - - * docs/nut.dict: Update nut.dict Some more keywords to the - dictionary from PR #638 - -2021-04-19 Jim Klimov - - * docs/nut.dict: Update nut.dict Update dictionary for Hunnox PR - #638 - * docs/man/nutdrv_qx.txt: Update nutdrv_qx.txt Basically mention - updates from Hunnox subdriver and protocol addition (PR #638). - * drivers/nutdrv_qx.c: Update nutdrv_qx.c Err on the safer side of - changing behavior for non-hunnox device support, limit the - applicability of langid_fix (per PR #638 review cautionary - comments). Maybe the proposed original change did apply to other - devices that support the fix-up, but that should be evaluated - separately and this new constraint reversed if needed. - * drivers/nutdrv_qx_hunnox.c: Update nutdrv_qx_hunnox.c Updated file - heading - * drivers/nutdrv_qx_hunnox.h: Update nutdrv_qx_hunnox.h Updated file - heading - -2021-04-10 Jim Klimov - - * docs/images/advanced.png, docs/images/bizarre.png: Vox populi: - replace master by primary and slave by secondary in documentation - images [#840] - -2021-04-09 Jim Klimov - - * docs/images/ci/fosshost.org_Host_Dark_56px.png, - docs/images/ci/jenkins-nut-large-256px.png, docs/images/ci/jenkins- - nut-large-squared.png, docs/images/ci/jenkins-nut-large.pdn, - docs/images/ci/jenkins-nut-large.png, docs/images/ci/jenkins-nut- - small-256px.png, docs/images/ci/jenkins-nut-small.pdn, - docs/images/ci/jenkins-nut-small.png, docs/images/ci/jenkins-nut- - squared.png, docs/images/ci/jenkins-nut-transparent-bg-40px.png, - docs/images/ci/jenkins-nut-transparent-bg.png, - docs/images/ci/jenkins-nut.css, docs/images/ci/jenkins-nut.png, - docs/images/ci/jenkins-nut.txt: Add image and CSS resources used in - new Jenkins CI [#869] - -2021-04-09 Jim Klimov - - * docs/nut.dict: Update nut.dict Missed a couple of new dictionary - words - -2021-04-09 Alexey Kazancev - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: add overflows protection - for snr subdriver - -2021-04-09 Jim Klimov - - * docs/nut.dict: Update nut.dict Added "snr" and "SNR" to - spellchecker dictionary - -2021-04-09 Alexey Kazancev - - * docs/acknowledgements.txt: docs/acknowledgements.txt: add NAG at - manufacturer list - * data/driver.list.in: data/driver.list.in: add various SNR-UPS-LID- - XXXX UPSes supported by nutdrv_qx Protocol: 'megatec' USB - subdriver: 'snr' - * docs/man/nutdrv_qx.txt: docs/man/nutdrv_qx.txt: update man page for - new 'snr' USB subdriver - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: add new 'snr' USB - subdriver to support SNR-UPS-LID units - -2021-04-08 Jim Klimov - - * docs/man/Makefile.am: Update Makefile.am Beside exactly "troff" - some systems have other "*roff" family tools and formats - -2021-04-07 Jim Klimov - - * configure.ac: configure.ac: satisfy both builders that have pkg- - config installed and those who do not - * configure.ac: configure.ac: avoid syntax errors if pkg-config is - not installed - -2021-04-06 Aaron Thompson - - * drivers/powercom.c: drivers/powercom.c: Fix a small error in output - voltage for KIN models. - -2021-03-31 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: protect failsafe logic from - compiler warnings with pragmas - -2021-03-30 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: alarm_set(): stretch slightly - absurd ways to avoid overflow and fix signed/unsigned mismatch - (follow up for #986) - * configure.ac: configure.ac: add --enable-cppunit to allow disabling - it even if deemed supported by compiler Practice shows that - libcppunit.so may be linked against a different compiler version - and/or libc than the one used for current NUT build. While formal - support checked by the script works, practical build fails. - * NEWS: NEWS: Reflect terminology change for upsmon - -2021-03-29 Jim Klimov - - * clients/upsmon.c: clients/upsmon.c: rename static functions - slavesync() => sync_secondaries() and checkmaster() => - apply_for_primary() and document them better - * README, clients/nutclient.cpp, clients/nutclient.h, - clients/upsmon.c, clients/upsmon.h, conf/ups.conf.sample, - conf/upsd.users.sample, conf/upsmon.conf.sample.in, docs/config- - notes.txt, docs/design.txt, docs/features.txt, docs/history.txt, - docs/man/clone.txt, docs/man/genericups.txt, - docs/man/libnutclient_misc.txt, docs/man/nut.conf.txt, - docs/man/nutdrv_atcl_usb.txt, docs/man/richcomm_usb.txt, - docs/man/upsd.txt, docs/man/upsd.users.txt, - docs/man/upsmon.conf.txt, docs/man/upsmon.txt, docs/net- - protocol.txt, docs/new-drivers.txt, docs/scheduling.txt, - docs/security.txt, drivers/optiups.c, scripts/augeas/README, - scripts/augeas/nutupsdusers.aug.in, - scripts/augeas/tests/test_nut.aug, scripts/perl/Nut.pm, - scripts/python/module/PyNUT.py, server/netcmds.h, server/netuser.c, - server/netuser.h, server/user.c: Vox populi: replace manager/master - by primary and subordinate/slave by secondary - * scripts/python/app/README: scripts/python/app/README: typo fix - * docs/man/libnutclient_misc.txt: docs/man/libnutclient_misc.txt: fix - English wording a bit - * docs/nut.dict: docs/nut.dict: update word-count after large docs - update - -2021-03-27 orbea - - * drivers/Makefile.am: drivers: Fix undefined references with - slibtool. - -2021-03-26 Arnaud Quette - - * scripts/upower/95-upower-hid.rules: Revert "95-upower-hid.rules - script updated" This reverts commit - 262c23c6b8f1368165c75a0df317b1ba9ff5c511. - -2021-03-26 Jim Klimov - - * tools/nut-snmpinfo.py: Update nut-snmpinfo.py Also handle the `//` - comments same way as `/*...` - -2021-03-25 Arnaud Quette - - * tools/nut-snmpinfo.py: nut-scanner: improve SNMP extractor script - Also remove EOL comments - -2021-03-24 Jim Klimov - - * drivers/bestups.c, drivers/blazer.c, drivers/blazer.h, - drivers/blazer_ser.c, drivers/blazer_usb.c: bestups, blazer* driver - sources: add obsoletion notices on top, in favor of nutdrv_qx - drivers - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: allow to trace USB - driver conflicts (e.g. obsoleted and new handlers of same - vendor/product IDs) - -2021-03-23 Ygor Amadeo Sartori Regados - - * drivers/microsol-apc.c, drivers/microsol-apc.h, drivers/microsol- - common.c, drivers/microsol-common.h: Bug fix: battery charge - calculation - -2021-03-23 Jim Klimov - - * ci_build.sh: ci_build.sh: make GitIgnores failure fatal (and report - what the difference is, for tracked and regenerated files) - * tests/.gitignore: GitIgnore tests/nutlogtest binary - * ci_build.sh: ci_build.sh: make GitIgnores failure fatal - -2021-03-23 Degott, Francois Regis - - * scripts/upower/95-upower-hid.rules: 95-upower-hid.rules script - updated - -2021-03-23 Ygor Amadeo Sartori Regados - - * drivers/microsol-common.c: Bug fix: Handle packet boundary - desynchronization - -2021-03-23 Degott, Francois Regis - - * scripts/upower/95-upower-hid.rules: 95-upower-hid.rules script - updated - * drivers/Makefile.am, drivers/eaton-ats16-nm2-mib.c, .../{eaton- - ats16-mib.h => eaton-ats16-nm2-mib.h}, .../{eaton-ats16-mib.c => - eaton-ats16-nmc-mib.c}, drivers/eaton-ats16-nmc-mib.h, - drivers/snmp-ups.c: improve support of EATON ATS16 NMC/NM2 - -2021-03-21 Ygor Amadeo Sartori Regados - - * drivers/microsol-apc.c: Fixed missing calculation part for BZ1500 - Bug identified with data provided on issue #697 - * drivers/microsol-common.c: CI fix: C89 compilation fixed - * drivers/Makefile.am: Missing header fixed - * drivers/Makefile.am: CI error fix: missing header file - -2021-03-19 Ygor Amadeo Sartori Regados - - * drivers/microsol-common.c, drivers/microsol-common.h: Fixed LGTM - alert about localtime_r Also passed microsol-common.c through - indent - * drivers/Makefile.am, drivers/microsol-apc.c, drivers/microsol- - apc.h, drivers/microsol-common.c, drivers/microsol-common.h: New - driver: microsol-apc Derived from solis driver, for newer APC - Back-UPS BR hardware. Support added for APC Back-UPS BZ1500, - BZ2200BI and BZ2200I. Tested on BZ2200BI. Created common file that - may be used on solis as well. - -2021-03-14 JungEon Kim - - * data/driver.list.in: Add Delta UPS Amplon R Series in drivers.list - -2021-03-14 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: alarm_set(): at least log the - truncated buf if it does not fit into dstate field - -2021-03-13 Jim Klimov - - * docs/developers.txt: docs/developers.txt: replace "master" where it - is easy, and update some recommendations - * clients/upsmon.c: clients/upsmon.c: comment that also several NUT - drivers can directly set FSD flag propagated from the smarter power - devices - * docs/security.txt: docs/security.txt: extend the Firewall section - for more considerations - * docs/man/upsmon.txt: docs/man/upsmon.txt: suggestions for - experiments about timing the shutdown vs. dummy SHUTDOWNCMD to - check the skeleton logic - * docs/man/upsmon.conf.txt: docs/man/upsmon.conf.txt: extend the - example for "bigserver" with manager vs subordinate upsmon's - * docs/history.txt: docs/history.txt: reflect that slave/master terms - were deprecated - * README: README: Make note of UPSes which allow multiple managerial - accesses - * clients/nutclient.cpp, clients/nutclient.h, clients/upsmon.c, - docs/net-protocol.txt, scripts/perl/Nut.pm, - scripts/python/module/PyNUT.py, server/netcmds.h, server/netuser.c, - server/netuser.h, server/user.c: Identify points in source code - (and few related docs) for deprecating master|slave terminology - * README, clients/upsmon.c, clients/upsmon.h, conf/ups.conf.sample, - conf/upsd.users.sample, conf/upsmon.conf.sample.in, docs/config- - notes.txt, docs/design.txt, docs/features.txt, docs/man/clone.txt, - docs/man/genericups.txt, docs/man/libnutclient_misc.txt, - docs/man/nut.conf.txt, docs/man/nutdrv_atcl_usb.txt, - docs/man/richcomm_usb.txt, docs/man/upsd.txt, - docs/man/upsd.users.txt, docs/man/upsmon.conf.txt, - docs/man/upsmon.txt, docs/net-protocol.txt, docs/new-drivers.txt, - docs/nut.dict, docs/scheduling.txt, docs/security.txt, - drivers/optiups.c, scripts/augeas/README, - scripts/augeas/nutupsdusers.aug.in, - scripts/augeas/tests/test_nut.aug, scripts/perl/Nut.pm, - server/user.c: Update documentation, emitted messages and easy-to- - fix code to rename master=>manager and slave=>subordinate - * docs/man/upsmon.txt: docs/man/upsmon.txt: suggestions for - experiments about timing the shutdown vs. dummy SHUTDOWNCMD to - check the skeleton logic - * docs/security.txt: docs/security.txt: extend the Firewall section - for more considerations - * docs/security.txt: docs/security.txt: reword one shade of "master" - * docs/solaris-usb.txt: docs/solaris-usb.txt: reword one shade of - "master" - * drivers/asem.c: drivers/asem.c: clarify the use of "S" word - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - clarify the use of "S" word - * drivers/nutdrv_qx.c, drivers/usbhid-ups.c: drivers/nutdrv_qx.c & - usbhid-ups.c: reword "Reference list of..." - * clients/upsmon.c, docs/net-protocol.txt: docs/net-protocol.txt + - upsmon.c: comment that also several NUT drivers can directly set - FSD flag propagated from the smarter power devices - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: note that - systems should only shutdown when less than MINSUPPLIES PSUs are - non-critical - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: note about - UPSes with manageable thresholds for critical state - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: note that - rack shutdowns can compete for I/O and take longer - * conf/upsmon.conf.sample.in: conf/upsmon.conf.sample.in: generalize - the example about multi-PSU servers - * docs/config-notes.txt: docs/config-notes.txt: update the example - about multi-PSU servers - -2021-03-13 JungEon Kim - - * drivers/Makefile.am, drivers/delta_ups-hid.c, drivers/delta_ups- - hid.h, drivers/usbhid-ups.c: delta_ups-hid: Add support for Delta - UPS Amplon R Series - -2021-03-13 Jim Klimov - - * docs/config-notes.txt: docs/config-notes.txt: note about upsmon - with 0 PSUs for just-monitoring - * data/html/header.html.in, docs/cables/apc-rs500-serial.txt, - docs/cables/ge-imv-victron.txt, docs/cables/powerware.txt, - docs/cables/repotec.txt, docs/cables/sms.txt, docs/man/apcsmart- - old.txt, docs/man/apcsmart.txt, docs/man/asem.txt, - docs/man/bcmxcp.txt, docs/man/bcmxcp_usb.txt, docs/man/belkin.txt, - docs/man/belkinunv.txt, docs/man/bestfcom.txt, - docs/man/bestuferrups.txt, docs/man/bestups.txt, - docs/man/everups.txt, docs/man/genericups.txt, docs/man/index.txt, - docs/man/libnutclient_misc.txt, docs/man/libnutclient_tcp.txt, - docs/man/libupsclient-config.txt, docs/man/liebert-esp2.txt, - docs/man/metasys.txt, docs/man/mge-shut.txt, docs/man/mge- - utalk.txt, docs/man/nut-driver-enumerator.txt, docs/man/nut- - ipmipsu.txt, docs/man/nut-scanner.txt, - docs/man/nutdrv_atcl_usb.txt, - docs/man/nutscan_add_device_to_device.txt, - docs/man/nutscan_add_option_to_device.txt, - docs/man/nutscan_cidr_to_ip.txt, - docs/man/nutscan_display_parsable.txt, - docs/man/nutscan_display_ups_conf.txt, - docs/man/nutscan_free_device.txt, - docs/man/nutscan_get_serial_ports_list.txt, - docs/man/nutscan_init.txt, docs/man/nutscan_new_device.txt, - docs/man/nutscan_scan_avahi.txt, - docs/man/nutscan_scan_eaton_serial.txt, - docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, - docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, - docs/man/nutscan_scan_xml_http.txt, docs/man/oneac.txt, - docs/man/optiups.txt, docs/man/phoenixcontact_modbus.txt, - docs/man/powercom.txt, docs/man/powerman-pdu.txt, - docs/man/rhino.txt, docs/man/richcomm_usb.txt, - docs/man/riello_ser.txt, docs/man/riello_usb.txt, - docs/man/skel.txt, docs/man/solis.txt, docs/man/tripplite.txt, - docs/man/ups.conf.txt, docs/man/upscli_add_host_cert.txt, - docs/man/upscli_connect.txt, docs/man/upscli_disconnect.txt, - docs/man/upscli_get.txt, docs/man/upscli_init.txt, - docs/man/upscli_splitaddr.txt, docs/man/upscli_splitname.txt, - docs/man/upscli_upserror.txt, docs/man/upsclient.txt, - docs/man/upscmd.txt, docs/man/upsd.conf.txt, docs/man/upsd.txt, - docs/man/upsd.users.txt, docs/man/upsdrvctl.txt, - docs/man/upsdrvsvcctl.txt, docs/man/upslog.txt, - docs/man/upsmon.conf.txt, docs/man/upsmon.txt, docs/man/upsrw.txt, - docs/man/upssched.txt, docs/man/upsset.cgi.txt, - docs/man/upsset.conf.txt, docs/man/upsstats.html.txt, - docs/man/usbhid-ups.txt, docs/man/victronups.txt: docs: fix some - trailing whitespaces - -2021-03-12 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: limit alarm_buf string to fit - into a dstate info status, and log errors and overflows from - alarm_set() [issue #960] - -2021-03-02 Edgar Fuß - - * docs/man/blazer-common.txt, docs/man/nutdrv_qx.txt, - docs/man/tripplite_usb.txt, docs/man/usbhid-ups.txt: Add a remark - that USB device numbers may be unstable In the documentation of - the USB device number matching, add a remark that device numbers - need not to be stable across re-boots or when re-plugging the - device. - * drivers/usb-common.c: USB device matching: add debug messages on - non-match When failing to match the Device part, note this via - upsdebugx() just like when not matching any other part (VendorId, - ProductId, Bus, etc.). - -2021-03-02 Jim Klimov - - * docs/man/nutdrv_qx.txt: Update nutdrv_qx.txt Fixed typo in a new - masterguard paragraph - -2021-02-12 Edgar Fuß - - * tools/nut-usbinfo.pl: Fix VendorID/ProductID matching In a line - like { USB_DEVICE(0x06da, 0x0002), "Phoenixtec Power","USB Cable - (V2.00)", &phoenixtec_subdriver },/* Masterguard A Series */ don't - match ProductID up to the closing parenthesis in the product name - string. - -2021-02-11 Edgar Fuß - - * docs/man/masterguard.txt, docs/man/nutdrv_qx.txt, docs/nutdrv_qx- - subdrivers.txt, drivers/Makefile.am, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_masterguard.c, drivers/nutdrv_qx_masterguard.h: - Add Masterguard A/E driver based on Q* framework Add a new driver - for Masterguard A and E series based on the Q* framework - (nutdrv_qx). Based on vendor documentation of both the command set - and USB protocol I was both asked not to disclose. Supports "new" - A700/1000/2000/3000(-19) and E40/60/100(-19) (totally untested due - to lack of hardware). Still sort of work in progress due to some - open questions on NUT integration. - * docs/man/blazer-common.txt, docs/man/nutdrv_qx.txt, - docs/man/tripplite_usb.txt, docs/man/usbhid-ups.txt, - drivers/blazer_usb.c, drivers/libusb.c, drivers/nutdrv_qx.c, - drivers/riello_usb.c, drivers/tripplite_usb.c, drivers/usb- - common.c, drivers/usb-common.h, drivers/usbhid-ups.c: Add USB - device number matching Extend the USB matching by a device number - (in addition to the existing bus number) by adding a Device field - to USBDevice_[st] and ammending the RegExp by a seventh field. - Maybe some #defines for the magical constants would be appropriate. - Add DEBUG_EXACT_MATCH_DEVICE analogous to DEBUG_EXACT_MATCH_BUS, - whatever its intended usage is. Document the device field where - the bus field was documented (which is not the case everywhere it's - actually used). - -2021-01-31 TJ McConnell - - * drivers/tripplite-hid.c: Move 0x3024 alphabetically. Add comment - about new version - -2021-01-26 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: fix regression on Eaton - ePDU Fix a regression that caused a mis-determination of the SNMP - base OID index (0 or 1, should be 1). This in turn caused a mis- - iteration over the outlets, from 0 to N-1 instead of 1 to N, which - resulted in the missing Nth outlet (last outlet of the PDU). This - also caused some data refresh issues - -2021-01-23 Yifeng Li - - * drivers/main.c: main.c: write upsdrv_initinfo/updateinfo() logs to - syslog When a NUT driver is started (via upsdrvctl start), it runs - the following sequence: 1. Run as a foreground process. 2. Do some - basic initialization, log to stderr. 3. If not debugging: - fork() - - Run as a daemon, stderr off, syslog on. The problem, however, is - that upsdrv_initinfo() and updateinfo() are first called before - forking, as a result, the log messages is only sent to stderr, not - syslog. On a traditional init + syslog server setup, those startup - messages are lost. However, those lost messages can be urgent - for - example, it can be a warning about a failed UPS inverter. If the - server is freshly started, the admin may miss them until much - later, or keep staring at the mysterious alarm word without finding - anything relevant in syslog. Similarly, other types of warnings, - such as a rounded ondelay value, should also be visible in syslog. - This patch checks the debugging flags and turn on syslog earlier - when it's in non-debug, non-fork mode, allowing the logs during - upsdrv_initinfo() and upsdrv_updateinfo() to be recorded in syslog. - Mailing list discussion: https://alioth- - lists.debian.net/pipermail/nut-upsdev/2021-January/007508.html - -2021-01-23 TJ McConnell - - * drivers/tripplite-hid.c, scripts/upower/95-upower-hid.rules: Add - AVR750U (0x3024). Use smart1500lcdt_scale for - voltage/current/frequence - -2021-01-20 Jim Klimov - - * drivers/delta_ups-mib.c: delta-mib.c: rename onbatt_info lookup - table in commented-away code sample - * drivers/huawei-mib.c: huawei-mib.c: rename onbatt_info lookup table - in commented-away code sample - * drivers/xppc-mib.c: xppc-mib.c: rename onbatt_info lookup table in - commented-away code sample - -2016-05-25 Jim Klimov - - * drivers/raritan-px2-mib.c: raritan-px2-mib - renamed lookups to - have "raritanpx2_*" prefix - * drivers/raritan-pdu-mib.c: raritan-pdu-mib - renamed lookups to - have "raritan_pdu_*" prefix - * drivers/powerware-mib.c: powerware-mib - renamed "ietf_*" and - "eaton_*" lookups to have "pw_*" prefix - -2016-05-23 Jim Klimov - - * drivers/mge-mib.c: mge-mib.c : rename rogue ietf_* lookups to mge_* - -2016-05-25 Jim Klimov - - * drivers/baytech-mib.c: baytech-mib - renamed "outlet_status_info" - lookup to "baytech_outlet_status_info" - * drivers/apc-ats-mib.c: apc-ats-mib.c- renamed "ats_*" lookups to - "apc_ats_*" - -2021-01-08 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix instant commands using numeric - parameters Instant commands using numeric parameters, like - on/off/cycle commands, were failing due to a bad value submitted - type (time instead of integer) Cherry-picked from - https://github.com/42ity/nut/pull/120 - -2020-12-29 Steve Magoun - - * drivers/macosx-ups.c: drivers/macosx-ups.c: Add ups.mfr and - ups.model legacy vars, fixes #949 - -2020-12-29 Jim Klimov - - * ci_build.sh: ci_build.sh: allow CI workers to say if they have - functional libgd (for the current compiler/ABI version) so whether - it should not be required - -2020-12-28 Jim Klimov - - * ci_build.sh: ci_build.sh: treat helper dirs (tmp/ .inst/ - CCACHE_DIR/) correctly even if named FS objects are symlinks to - dirs - * docs/Makefile.am, docs/man/Makefile.am: docs/{man/,}Makefile.am: - parameterize EGREP and call "file" sanity checks case-insensitive - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: detect Apple - LLVM as CLANG - -2020-12-27 Jim Klimov - - * configure.ac, docs/developers.txt: configure.ac - docs/developers.txt: add a "medium" warning pre-set difficulty - level - * configure.ac: configure.ac: document the choice rationale of no- - warning macros - * docs/developers.txt, docs/nut.dict: docs/developers.txt: document - the new --enable-warnings options - * configure.ac: configure.ac: define a clang-minimal warning preset - that our codebase already survives - * .travis.yml, configure.ac: Move comment about clang no-warning - selection from .travis.yml to configure.ac - * .travis.yml: .travis.yml: make use of BUILD_WARNFATAL=yes - BUILD_WARNOPT=hard to simplify the test setup specifications - -2020-12-26 Jim Klimov - - * configure.ac: configure.ac: hush clang warnings about nullptr in - C++ code (c++98 not compatible)) - * configure.ac: configure.ac: provide a hidden "gcc-legacy" warnings - option to cover previous behavior - * ci_build.sh: ci_build.sh: allow passing --enable-warnings=... and - --enable-Werror=... args via BUILD_WARNOPT and BUILD_WARNFATAL - envvars - * configure.ac: configure.ac: implement --enable-warnings=... and - --enable-Werror(=yes/no) to specify the presets we require to pass - * m4/nut_arg_with.m4: m4/nut_arg_with.m4: add NUT_ARG_ENABLE and - document the difference vs NUT_ARG_WITH - * ci_build.sh: ci_build.sh: support passing BUILD_SSL_ONCE=true to - only try whichever SSL implem is found, not both even if installed - * autogen.sh: autogen.sh: shell-check that generated configure script - is syntactically valid - * m4/nut_compiler_family.m4: m4/nut_compiler_family.m4: fix tracking - nut_cv_CLANGCC and determining CLANGCC=yes - * drivers/apcsmart.c, drivers/apcsmart.h: drivers/apcsmart.{c,h}: - drop custom debx()/logx()/fatx()/fate() macros in favor of NUT- - standard ones - -2020-12-02 Jim Klimov - - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix a few whitespaces - (indentation) - -2020-12-07 Jim Klimov - - * drivers/libusb.c: drivers/libusb.c: fix whitespace - -2020-12-25 Jim Klimov - - * common/common.c: common/common.c: fix initialization of a struct - timeval (initialize all fields) - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: fix - initialization of a info_lkp_t (initialize all fields) - * drivers/al175.c: drivers/al175.c: assert incoming numbers, error- - check the sprintf() result, and comment why - * drivers/blazer_usb.c, drivers/nutdrv_qx.c: nutdrv_qx blazer_usb: - report acceptable subdriver names in help() - -2020-12-25 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: - match_function_subdriver(): upsdebugx() device matching faults to - help troubleshoot driver setups - -2020-12-24 Jim Klimov - - * drivers/usb-common.c: usb-common.c: upsdebugx() device matching - faults to help troubleshoot driver setups - -2020-12-25 Jim Klimov - - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: add comment for per- - warning pragma naming - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: fix wrong long macro - name typo, for the pragmas gating - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.h: #include - (lost in cherrypick web) - * docs/nut.dict: docs/nut.dict: add Evgeny - * docs/nut.dict: docs/nut.dict: add maintainership - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: fix nesting of macros - for pragmas - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: use HAVE_PRAGMAS_FOR_GC - C_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce HAVE_PRAGMAS_FOR_ - GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE - (equivalent of HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS on - some compilers) - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: comment in/out function - contexts for the pragma - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: do macro magic for - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC working - with older compilers - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: separate the support for - #pragma GCC diagnostic... inside vs outside function bodies - (gcc-4.4 and older are upset about "inside" case) - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: cast type for printing - speed_t on different OSes - -2020-12-07 Jim Klimov - - * drivers/bcmxcp_ser.c, drivers/bcmxcp_ser.h: - drivers/bcmxcp_ser.{c,h}: get_answer(): fix baud rate processing - into speed_t and size_t - -2020-12-23 Jim Klimov - - * docs/user-manual.txt: docs/user-manual.txt: small typo fix - * docs/nut.dict: nut.dict: update with project names that nut-website - spellchecking prefers to know - * docs/nut.dict: nut.dict: update with project names that nut-website - spellchecking prefers to know - * docs/nut.dict: nut.dict: update with project names that nut-website - spellchecking prefers to know - -2020-12-21 Jim Klimov - - * docs/acknowledgements.txt: docs/acknowledgements.txt: update - persons currently involved, new maintainer https://alioth- - lists.debian.net/pipermail/nut-upsdev/2020-November/007494.html - -2020-12-15 Bi11 - - * drivers/snmp-ups.c, tools/nut-scanner/scan_snmp.c: Fix incorrect - fatal message for privProtocol - * tools/nut-scanner/scan_snmp.c: Fix incorrect usmAESPrivProtocol - import in nut-scanner In libnetsnmp, usmAES128PrivProtocol is a - pointer, while usmAESPrivProtocol is an array. This change is the - same as in c7cf507454bcf6f40b24b58e61c130c7772c5bf2. - -2020-12-15 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: Restore legacy Eaton ePDU - switchability info Use a hack to also have switchability for both - the unit and its outlets on legacy Eaton G2 ePDU Partially - cherry-picked from 42ity fork, and bumped to their faster moving - MIB mapping revision number. See - https://github.com/42ity/nut/pull/118 As for the behavior of the - fix: * on G2, the first outlet.switchable doesn't exist, so try - the 2nd, which is the ugly hack: try on the first outlet to see if - switchable * on G3, the first is good, so flag unique does the - rest Tested on MA G2 and G3. - -2020-11-30 Jim Klimov - - * drivers/dummy-ups.c: drivers/dummy-ups.c: use size_t where it - should be, for numargs-related parsing - * clients/upsclient.c: clients/upsclient.c: use size_t where it - should be, for numargs parsing - * server/netcmds.h, server/netget.c, server/netget.h, - server/netinstcmd.c, server/netinstcmd.h, server/netlist.c, - server/netlist.h, server/netmisc.c, server/netmisc.h, - server/netset.c, server/netset.h, server/netssl.c, server/netssl.h, - server/netuser.c, server/netuser.h, server/upsd.c, server/user.c: - server/*: numerous upsd commands: use size_t where it should be, - for numargs parsing - * server/sockdebug.c: server/sockdebug.c: use (and print) size_t - where it should be, for numargs parsing - * drivers/dstate.c: drivers/dstate.c: use size_t where it should be, - for numargs parsing - * clients/upssched.c: clients/upssched.c: use (and print) size_t - where it should be, for numargs parsing - * clients/upsmon.c: clients/upsmon.c: use size_t where it should be, - for numargs parsing - * clients/upsset.c: clients/upsset.c: use size_t where it should be, - for numargs parsing - * server/conf.c: server/conf.c: use size_t where it should be, for - numargs parsing - * drivers/snmp-ups.c: drivers/snmp-ups.c: whitespace fix - * drivers/snmp-ups.c: drivers/snmp-ups.c: use size_t where it should - be, for numargs parsing - * common/state.c, include/state.h, server/sstate.c: common and server - state.c: use size_t where it should be, for numargs and numflags - parsing - * drivers/clone-outlet.c: drivers/clone-outlet.c: use size_t where it - should be, for numargs parsing - * drivers/clone.c: drivers/clone.c: use size_t where it should be, - for numargs parsing - * server/netssl.c: server/netssl.c: avoid implicit size_t (arch- - dependent) vs. PRInt32 (Mozilla NSS) integer conversion - * clients/upsclient.c: clients/upsclient.c: avoid implicit size_t - (arch-dependent) vs. PRInt32 (Mozilla NSS) integer conversion - -2020-12-02 Jim Klimov - - * drivers/solis.c: Update solis.c Shuffle the comparison in the if- - clause to certainly bail out if we did not read from the port. - -2020-11-30 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: fix up int types to - avoid implicit conversions, and pre-initialize to avoid - uninitialized use - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: initialize - variable to avoid potential uninitialized use - * drivers/blazer.c: drivers/blazer.c: initialize variable to avoid - potential uninitialized use and convey an error if that happens - * drivers/powerpanel.c: drivers/powerpanel.c: initialize variable to - avoid potential uninitialized use and convey an error if that - happens - * drivers/solis.c: drivers/solis.c: initialize variable to avoid - potential uninitialized use and convey an error if that happens - * drivers/rhino.c: drivers/rhino.c: initialize variable to avoid - potential uninitialized use and convey an error if that happens - * drivers/bestfortress.c: drivers/bestfortress.c: initialize - variables to avoid potential uninitialized use and null-pointer - dereference if data processing fails - -2020-12-02 Jim Klimov - - * include/nut_float.h: Update nut_float.h Consider equality to - epsilon to be also treated as zero - * include/nut_float.h: Update nut_float.h Fix copyright line - -2020-11-30 Jim Klimov - - * drivers/cps-hid.c: drivers/cps-hid.c: employ nut_float.h for safer - floating point comparisons - * drivers/snmp-ups.c: drivers/snmp-ups.c: employ nut_float.h for - safer floating point comparisons - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: - employ nut_float.h for safer floating point comparisons - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: employ - nut_float.h for safer floating point comparisons - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: employ nut_float.h for - safer floating point comparisons - * drivers/blazer.c: drivers/blazer.c: employ nut_float.h for safer - floating point comparisons - * drivers/upscode2.c: drivers/upscode2.c: employ nut_float.h for - safer floating point comparisons - * drivers/solis.c: drivers/solis.c: employ nut_float.h for safer - floating point comparisons - * drivers/rhino.c: drivers/rhino.c: employ nut_float.h for safer - floating point comparisons - * drivers/metasys.c: drivers/metasys.c: employ nut_float.h for safer - floating point comparisons - * drivers/mge-hid.c: drivers/mge-hid.c: employ nut_float.h for safer - floating point comparisons - * configure.ac, include/Makefile.am, include/nut_float.h: Introduce - nut_float.h and check more carefully for presence of math.h and/or - float.h in the build system - * drivers/tripplitesu.c: drivers/tripplitesu.c: avoid "bad function - cast" by casting explicitly the return value of the function - * drivers/tripplite.c: drivers/tripplite.c: avoid "bad function cast" - by casting explicitly the return value of the function - * drivers/mge-xml.c: drivers/mge-xml.c: avoid "bad function cast" by - casting explicitly the return value of the function - * drivers/bestfortress.c: drivers/bestfortress.c: avoid "bad function - cast" by casting explicitly the return value of the function - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix snprintf() target - buffer size from bogus sizeof() determination (#926) - -2020-11-29 Jim Klimov - - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: fix const - qualifier usage - * drivers/snmp-ups.c: drivers/snmp-ups.c: fix const qualifier usage - * drivers/snmp-ups.h: drivers/snmp-ups.h: remove const qualifiers - from strings in snmp_info_t, we have code that writes into them - * drivers/dstate.c: drivers/dstate.c: dstate_tree_dump(): fix const - qualifier usage - * drivers/bestfcom.c: drivers/bestfcom.c: avoid "bad function cast" - by casting explicitly the return value of the function - * drivers/libshut.c: drivers/libshut.c: avoid alignment issues with - buffer used actually for different variable types - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN to quiesce warnings - about a value we anyway receive a pointer to - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN - -2020-11-25 Jim Klimov - - * drivers/solis.c: drivers/solis.c: avoid variable-length arrays, - their support became optional after C99 - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: avoid variable-length - arrays, their support became optional after C99 - * drivers/apcsmart.c: drivers/apcsmart.c: avoid variable-length - arrays, their support became optional after C99 - * drivers/rhino.c: drivers/rhino.c: upsdrv_shutdown(): use sendshut() - * drivers/rhino.c: drivers/rhino.c: sendshut(): handle negative - returns from send_command() - * drivers/rhino.c: drivers/rhino.c: fix mismatched signedness in - comparison - * drivers/rhino.c: drivers/rhino.c: avoid variable-length arrays, - their support became optional after C99 - -2020-11-29 Jim Klimov - - * server/sstate.c: server/sstate.c: sstate_dead(): do not shadow - global varname "maxage" with same-named func argument - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_ups_get(): do not shadow - function-scope varname "value" with temporary-scope namesake - * drivers/snmp-ups.c: drivers/snmp-ups.c: snmp_ups_walk(): do not - shadow global varnames "(input|output|bypass)_phases" with same- - named func local variables - * drivers/upscode2.c: drivers/upscode2.c: check_uppm(): do not shadow - function-scope varname "val" with temporary-scope namesake - * drivers/libhid.c: drivers/libhid.c: new_report_buffer(): do not - shadow global varname "pDesc" with same-named func argument - * drivers/libshut.c: drivers/libshut.c: do not shadow global varnames - "upsfd" and "device_path" with same-named func arguments in - numerous routines - * drivers/dummy-ups.c: drivers/dummy-ups.c: parse_data_file(): do not - shadow global varname "upsfd" with same-named func argument (unused - for good measure) - * clients/upsset.c: clients/upsset.c: print_rw(): do not shadow - global varname "upsname" with same-named func argument - * drivers/riello_usb.c: drivers/riello_usb.c: fix array initializers - for sentinel entries - * drivers/blazer_usb.c: drivers/blazer_usb.c: fix array initializers - for sentinel entries - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: fix - array initializers for sentinel entries - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: fix array initializers - for sentinel entries - * drivers/apcsmart_tabs.c: drivers/apcsmart_tabs.c: fix array - initializers for sentinel entries - * drivers/apcsmart_tabs.c: drivers/apcsmart_tabs.c: fix numeric 0 - into pointer NULL - * drivers/apcsmart.c: drivers/apcsmart.c: fix array initializers for - sentinel entries - * drivers/blazer_ser.c: drivers/blazer_ser.c: fix array initializers - for sentinel entries - * drivers/blazer.c: drivers/blazer.c: fix array initializers for - sentinel entries - * drivers/powerp-txt.c: drivers/powerp-txt.c: fix array initializers - for sentinel entries - * drivers/powerp-bin.c: drivers/powerp-bin.c: fix array initializers - for sentinel entries - * drivers/mge-hid.c: drivers/mge-hid.c: fix array initializers for - sentinel entries - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: upsdrv_initinfo(): - fix array initializer; small whitespace clean-up - * server/upsd.c: server/upsd.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * drivers/powerp-bin.c: drivers/powerp-bin.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * drivers/upscode2.c: drivers/upscode2.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT to - reinforce the defensive programming patterns - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * drivers/dstate.c: drivers/dstate.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * drivers/main.c: drivers/main.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * clients/upssched.c: clients/upssched.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * clients/upsmon.c: clients/upsmon.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * server/upsd.c: server/upsd.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES to quiesce a - system definition of signal routines - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM - * tools/nut-scanner/nutscan-ip.c: tools/nut-scanner/nutscan-ip.c: - whitespace/formatting fixes - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: - whitespace/formatting fixes - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM to quiesce a - thirdparty-strange usecase of enum - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - whitespace/formatting fixes - * tools/nut-scanner/nutscan-ip.h: tools/nut-scanner/nutscan-ip.h: - whitespace/formatting fixes - * tools/nut-scanner/nutscan-device.c: tools/nut-scanner/nutscan- - device.c: whitespace/formatting fixes - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - drop semicolons after scope braces - -2020-11-28 Jim Klimov - - * ci_build.sh: ci_build.sh: consider "gdlib" pkg-config presence - equivalent to "libgd" There is a discrepancy between OS distro - packaging names and the delivered .pc file name... - * .travis.yml: .travis.yml: mark "gnu*-nowarn-x86-32bit" test cases - evergreen - -2020-11-27 Jim Klimov - - * drivers/bcmxcp.c, drivers/bcmxcp.h: drivers/bcmxcp.{h,c}: typo fix - CAPASITOR=>CAPACITOR - * tests/cpputest.cpp: cpputest.cpp: be sure to be able to handle - exception objects - -2020-11-26 Jim Klimov - - * drivers/blazer_usb.c: drivers/blazer_usb.c: annotate - #if/#else/#endif relevant to TESTING builds - * scripts/Solaris/precheck.py: scripts/Solaris/precheck.py: quote - shell vars, and report mismatches if any - -2020-11-27 Jim Klimov - - * .travis.yml: .travis.yml: xenial@s390x does not have "time" for us - (missed one beat) - -2020-11-26 Jim Klimov - - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: copy-paste - typo fix about unreachable code - * drivers/libusb.c: drivers/libusb.c: copy-paste typo fix about - unreachable code - -2020-11-27 Jim Klimov - - * .travis.yml: .travis.yml: from 32-bit build envs, drop amd64 libs - that confuse the linker - * .travis.yml: .travis.yml: tell the linker to go 32-bit too - -2020-11-23 Jim Klimov - - * .travis.yml: .travis.yml: work around poor packaging of multilib - perl in ubuntu - * .travis.yml: .travis.yml: define a &deps_driverlibs_cross_i386 list - for cross-builds (x86 32-bit) - * .travis.yml: .travis.yml: for x86-32 builds with gnu17 standard, - try to change install order for g++-multilib - * .travis.yml: .travis.yml: for x86-32 builds with gnu99 standard, - avoid g++-multilib - -2020-11-20 Jim Klimov - - * .travis.yml: .travis.yml: explicit support on 64-bit Debianish - systems for "gcc -m32" at least appears with gcc-multilib and - g++-multilib packages - -2020-11-03 Jim Klimov - - * .travis.yml: .travis.yml: comment for exploring ways to get 32-bit - travis builds - * .travis.yml: Issue #823 follow-up: add explicitly x86 32-bit builds - in Travis CI - -2020-11-27 Jim Klimov - - * ci_build.sh: ci_build.sh: relax the naming of libgd options seen in - the wild - -2020-11-23 Jim Klimov - - * ci_build.sh: ci_build.sh: warn if libgd is not seen and a "default- - all-errors" build might go without CGI binaries - -2020-11-17 Jim Klimov - - * drivers/phoenixcontact_modbus.c: drivers/phoenixcontact_modbus.c: - mrir(): do not shadow global varname "ctx" with same-named func - argument - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: possibly_supported(): - do not shadow global varname "hd" with func argument "hd" - -2020-11-25 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: drop semicolons after scope braces - * tools/nut-scanner/nutscan-device.c: tools/nut-scanner/nutscan- - device.c: drop semicolons after scope braces - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: drop - semicolons after scope braces - * drivers/riello.c: drivers/riello.c: drop extra semicolons - * drivers/bcmxcp.c: drivers/bcmxcp.c: drop semicolons after scope - braces - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: drop - semicolons after scope braces - * drivers/powercom.c: drivers/powercom.c: drop semicolons after scope - braces - * drivers/dstate.c: drivers/dstate.c: declare a macro for scoped - block in a way that semicolon may follow - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - mark up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: mark - up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: mark up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: mark - up NUT_UNUSED_VARIABLEs - -2020-11-27 Jim Klimov - - * clients/Makefile.am: clients/Makefile.am: - AM_CXXFLAGS+=-I$(top_srcdir)/include - -2020-11-25 Jim Klimov - - * tests/example.cpp, tests/nutclienttest.cpp: tests/nutclienttest.cpp - example.cpp: wrap into - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS et al to - avoid warnings for CPPUnit macro implementation (boils down to - static vars) - * tests/cpputest.cpp, tests/example.cpp, tests/nutclienttest.cpp, - tests/nutlogtest.c: tests/*.{c,cpp}: update legaleze headings - * tests/example.cpp: tests/example.cpp: fix casting - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: fix CPPUNIT - assert after nullptr - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: fix NULL => - nullptr - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: fix casting - * tests/Makefile.am: tests/Makefile.am: fix delivery and tracking of - CPPUNITTEST(ER)SRC - * tests/nutlogtest.c: tests/nutlogtest.c: add more tests to - investigate NUT_STRARG() behaviors - * configure.ac, include/str.h, m4/ax_c_pragmas.m4: - m4/ax_c_pragmas.m4, str.h => common.h: introduce - HAVE_PRINTF_STRING_NULL and NUT_STRARG(x) macro (for issue #904) - * tests/nutlogtest.c: tests/nutlogtest.c: use - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW detection to - quiesce warnings about "%s" resolving from NULL pointer First shot - at issue NUT #904 - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: introduce - HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW detection First - shot at issue NUT #904 - * tests/cpputest.cpp: tests/cpputest.cpp: print final result code - more comprehensibly (especially since process exit code is - inverted) - * clients/Makefile.am: clients/Makefile.am: be sure to use NUT - libcommon for CXX client builds - * clients/nutclient.cpp, clients/nutclient.h: - clients/nutclient.{h,cpp}: move virtual destructors of exception - classes into CPP file to bolt a linker unit (avoid Weak Vtables - warnings and related build overheads) - * clients/nutclient.cpp: clients/nutclient.cpp: (presumed) typo fix - - line ended with comma not semicolon - * clients/nutclient.cpp: clients/nutclient.cpp: quiesce warning and - make visible the unused variable - * clients/Makefile.am: clients/Makefile.am: define HAVE_NUTCOMMON for - NUT C++ builds - * clients/nutclient.cpp: clients/nutclient.cpp: use pragmas for - -Wexit-time-destructors and -Wglobal-constructors handling for an - std:string static variable - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: define pragmas for -Wexit- - time-destructors and -Wglobal-constructors handling - * clients/nutclient.cpp, clients/nutclient.h: - clients/nutclient.{h,cpp}: align strarr_alloc() type with xcalloc() - it uses => size_t - * clients/nutclient.cpp: clients/nutclient.cpp: fix old-style C casts - into static_cast<>s - * clients/nutclient.cpp, clients/nutclient.h: clients/nutclient.cpp: - for (clang) c++ builds with C++11/17/20, avoid warnings about C++98 - compatibility that we do not claim anyway - quiesce in C++ source - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: for (clang) c++ builds with - C++11/17/20, avoid warnings about C++98 compatibility that we do - not claim anyway - check that we have pragmas for that - * clients/nutclient.h: clients/nutclient.h: align method docs with - param names - -2020-11-26 Bastien Nocera - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: Reindent upower rules - header This piece of the code was really confusing because it - looked like, at a glance (and at more than a glance), that the line - which we'd have read in the generated rules file was commented out. - Turns out that beginning of lines in the generated rules could be - in the middle of the line in the code that generated it. Reindent - everything so that each line in the output corresponds to one line - in the input, except for empty lines. There are no differences in - output between the versions before and after this change. - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: Simplify exit path Why - "!= usb" when we're already checking for usb and other values - above? Always go to the end label if we didn't already jump to the - section containing the actual rules. - -2020-11-25 Jim Klimov - - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: do - not wrap variable definitions into parentheses like function - pointers - * drivers/al175.c: drivers/al175.c: declare function(void) prototypes - explicitly - * drivers/netxml-ups.c: drivers/netxml-ups.c: - netxml_alarm_subscribe(): explicitly cast range-limited int - conversions - * drivers/powercom.c: drivers/powercom.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * drivers/powerman-pdu.c: drivers/powerman-pdu.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/powercom.c: drivers/powercom.c: annotate upsdrv_shutdown() - with noreturn attr - * drivers/riello_usb.c: drivers/riello_usb.c: annotate shutdown*() - with noreturn attr - * drivers/powercom.c: drivers/powercom.c: annotate shutdown*() with - noreturn attr - * drivers/al175.c: drivers/al175.c: annotate upsdrv_shutdown() with - noreturn attr - * clients/upsmon.c: clients/upsmon.c: annotate forceshutdown() with - noreturn attr - * clients/upsimage.c: clients/upsimage.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * clients/upsimage.c: clients/upsimage.c: annotate lots of routines - with noreturn attr - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - mark up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: mark - up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: mark up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: mark - up NUT_UNUSED_VARIABLEs - * drivers/netxml-ups.c: drivers/netxml-ups.c: align method docs with - param names - * drivers/netxml-ups.c: drivers/netxml-ups.c: align method docs with - supported keywords - * drivers/al175.c: drivers/al175.c: align method docs with param - names - * drivers/hidparser.c: drivers/hidparser.c: satisfy pedantic macro - parser (defined vs. used value) - * drivers/libshut.c: drivers/libshut.c: satisfy pedantic macro parser - (defined vs. used value) - -2020-11-26 Jim Klimov - - * drivers/libusb.c: drivers/libusb.c: copy-paste typo fix about - unreachable code - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: copy-paste - typo fix about unreachable code - -2020-11-25 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - -2020-11-26 Jim Klimov - - * drivers/nutdrv_qx_blazer-common.c: drivers/nutdrv_qx_blazer- - common.c: remove overly-eager protection from nonliteral format - strings - -2020-11-26 Bastien Nocera - - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: Fix handling of "bind" - events See https://lwn.net/Articles/837033/ for an in-depth - explanation of how "bind" events should be handled in udev rules. - In short: " The ACTION line causes the entire file to be skipped - for anything other than ADD or CHANGE events; in particular, that - is what will happen with BIND events. That will cause properties - associated with those events to be lost — and the device in - question to be set up improperly (if at all). " - -2020-11-26 Jim Klimov - - * .travis.yml: .travis.yml: mark "gnu*-nowarn-s390x" test cases - evergreen - -2020-11-25 Jim Klimov - - * .travis.yml: .travis.yml: xenial@s390x does not have "time" for us - -2020-11-24 Jim Klimov - - * .travis.yml: Issue #823 follow-up: add s390x (BigEndian) builds in - Travis CI - -2020-11-25 Jim Klimov - - * drivers/riello_usb.c: drivers/riello_usb.c: do not hijack system - "errno" definition, and no use for local var of that name found - anyway - * drivers/powerman-pdu.c: drivers/powerman-pdu.c: do not assign - invalid value not from enum range, especially when for no reason - other than to have an un-used initial value - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: cover all values - of enum in a switch() Note: everything not covered before this PR - got aliased into default cases. I do not know the hardware and - models to rule this out otherwise, possibly assignments of binary - and/or smart protocol (lack of?) support are now wrong. - * drivers/powerp-bin.c: drivers/powerp-bin.c: cover all values of - enum in a switch() - * drivers/bestfcom.c: drivers/bestfcom.c: do not "break" just after - "fatalx()" - * drivers/bcmxcp.c: drivers/bcmxcp.c: do not "break" just after - "return" - * common/strerror.c: common/strerror.c: do not warn about unreachable - code in the web of ifdef built blocks - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: fix indentation - -2020-11-20 Jim Klimov - - * common/upsconf.c: common/upsconf.c: conf_args(): fix numargs type - * common/str.c: common/str.c: str_to_{u,}short{,_strict}() routines: - explicit cast from temporary variable to return-value type - * common/common.c: common/common.c: common/common.c: snprintfcat(): - replace asserts by negative returns (and errno where applicable) - * common/common.c: common/common.c: common/common.c: snprintfcat(): - sort out the messy return types (avoid implicit cast in - verification assert) - -2020-11-25 Jim Klimov - - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: do not warn - about nonliteral format string in this case - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: do not warn about - nonliteral format string in this case - * drivers/snmp-ups.c: drivers/snmp-ups.c: various routines: do not - warn about nonliteral format string in these cases - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: - various routines: do not warn about nonliteral format string in - these cases - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: do not warn about - nonliteral format string in this case - * drivers/powerp-bin.c: drivers/powerp-bin.c: do not warn about - nonliteral format string in this case - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: do not warn about - nonliteral format string in this case - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: do not warn about - nonliteral format string in these cases - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: rename scope-local - 'val' variables that shadow another from same routine - * drivers/belkinunv.c: drivers/belkinunv.c: do not warn about - nonliteral format string in this case - * drivers/bcmxcp.c: drivers/bcmxcp.c: do not warn about nonliteral - format string in this case - * drivers/serial.c: drivers/serial.c: various routines: do not warn - about nonliteral format string in these cases - * clients/upsset.c: clients/drivers: error_page(): do not warn about - nonliteral format string in this case - * clients/upsmon.c: clients/drivers: do_notify(): do not warn about - nonliteral format string in this case - * clients/upsimage.c: clients/drivers: drawbar() noimage(): do not - warn about nonliteral format string in this case - * clients/upsclient.c: clients/upsclient.c: build_cmd(): do not warn - about nonliteral format string in this case - * clients/upsclient.c: clients/upsclient.c: upscli_strerror(): do not - warn about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * clients/nutclient.h: clients/nutclient.h: declare strarr routines - to be seen - -2020-11-25 Jim Klimov - - * tools/nut-scanner/nutscan-display.c: tools/nut-scanner/nutscan- - display.c: declare nutscan_device_type_string[] file-local variable - as static, and fix its indentation - -2020-11-23 Jim Klimov - - * drivers/snmp-ups.c, drivers/snmp-ups.h: drivers/snmp-ups*.{c,h}: - export *_info vars to avoid not-used allegations - * drivers/apcupsd-ups.h: drivers/apcupsd-ups.h: comment away - status_info[] as currently un-used - * drivers/riello.c, drivers/riello.h, drivers/riello_ser.c, - drivers/riello_usb.c: drivers/riello*.{c,h}: properly export - variables shared between driver subtypes - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: comment away - ipmi_config as currently un-used - * drivers/mge-xml.c, drivers/netxml-ups.c, drivers/netxml-ups.h: - drivers/netxml/mge-xml*.{c,h}: export shutdown_duration more - usefully - * drivers/riello.h, drivers/riello_ser.c, drivers/riello_usb.c: - drivers/riello*.{c,h}: export get_ups_statuscode() to avoid not- - used allegations - * drivers/libshut.c: drivers/libshut.c: fix pre-declaration of - LIBshut_set_report() - * drivers/al175.c: drivers/al175.c: declare ACT methods to keep - compiler happy even if some are not currently used - * drivers/bcmxcp.c: drivers/bcmxcp.c: comment away FreqTol as - currently un-used - * tools/nut-scanner/nutscan-display.c: tools/nut-scanner/nutscan- - display.c: use nut-scan.h header - * tools/nut-scanner/nutscan-init.c: tools/nut-scanner/nutscan-init.h: - use its own header - -2020-11-22 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: expose load_library() routine - -2020-11-23 Jim Klimov - - * server/netcmds.h: server/netcmds.h: declare function(non-void!) - prototype explicitly - -2020-11-22 Jim Klimov - - * server/netcmds.h: server/netcmds.h: declare function(void) - prototype explicitly - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - expose load_library() routine - * clients/upslog.h: clients/upslog.h: declare function(non-void*) - prototype explicitly - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: declare multiple file-local routines - as static - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - expose load_library() routine - * tools/nut-scanner/scan_usb.c: tools/nut-scanner/scan_usb.c: expose - load_library() routine - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: - declare a file-local routine as static - * tools/nut-scanner/scan_nut.c: tools/nut-scanner/scan_nut.c: expose - load_library() routine - * tools/nut-scanner/scan_ipmi.c: tools/nut-scanner/scan_ipmi.c: - expose load_library() routine - * drivers/nut-ipmi.h: drivers/nut-ipmi.h: declare function(void) - prototype explicitly - * drivers/apcsmart.c: drivers/apcsmart.c: declare multiple file-local - routines as static - * drivers/powercom.c: drivers/powercom.c: declare multiple file-local - variables as static - * drivers/oneac.c: drivers/oneac.c: declare multiple file-local - routines as static - * drivers/libshut.c: drivers/libshut.c: declare multiple file-local - routines as static - * drivers/microdowell.c: drivers/microdowell.c: rectify whitespaces - (indentations and blank lines) - * drivers/microdowell.c: drivers/microdowell.c: declare multiple - file-local routines as static - * drivers/microdowell.c: drivers/microdowell.c: declare a driver- - local variable as static - * drivers/metasys.c: drivers/metasys.c: declare multiple file-local - routines as static - * drivers/isbmex.c: drivers/isbmex.c: declare multiple file-local - routines as static - * drivers/gamatronic.c: drivers/gamatronic.c: do not mark common - routine as static - * drivers/gamatronic.c: drivers/gamatronic.c: declare multiple file- - local routines as static - * drivers/bestfortress.c: drivers/bestfortress.c: declare a file- - local routine as static - * drivers/bestfcom.c: drivers/bestfcom.c: declare multiple file-local - routines as static - * drivers/bestfcom.c: drivers/bestfcom.c: declare a driver-local - variable as static - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: declare a file-local - routine as static - * drivers/al175.c: drivers/al175.c: declare multiple file-local - routines as static - * server/conf.c: server/conf.c: declare a file-local variable as - static - * server/user.c: server/user.c: declare multiple file-local variables - as static, and fix their indentation - * server/upsd.c: server/upsd.c: declare multiple file-local routines - as static - * server/upsd.c: server/upsd.c: declare multiple file-local variables - as static, and fix their indentation - * server/netcmds.h: server/netcmds.h: declare a file-local variable - as static - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: declare a file-local variable as static - * tools/nut-scanner/nut-scan.h: tools/nut-scanner/nut-scan.h: declare - function(void) prototype explicitly - * tools/nut-scanner/nutscan-device.h: tools/nut-scanner/nutscan- - device.h: declare function(void) prototype explicitly - * tools/nut-scanner/scan_snmp.c: tools/nut-scanner/scan_snmp.c: - declare multiple file-local variables as static - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - declare a file-local routine as static - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - declare multiple file-local variables as static - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: declare - function(void) prototype explicitly - * drivers/nut-libfreeipmi.c: drivers/nut-libfreeipmi.c: declare - multiple file-local variables as static - * drivers/nut-ipmipsu.c: drivers/nut-ipmipsu.c: declare multiple - file-local variables as static - * drivers/powerman-pdu.c: drivers/powerman-pdu.c: declare multiple - file-local variables as static - * drivers/netxml-ups.c: drivers/netxml-ups.c: declare a driver-local - variable as static - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: declare multiple file- - local variables as static - * drivers/apc-hid.c: drivers/apc-hid.c: declare multiple file-local - variables as static - * drivers/emerson-avocent-pdu-mib.c: drivers/emerson-avocent-pdu- - mib.c: declare multiple file-local variables as static - * drivers/masterguard.c: drivers/masterguard.c: declare multiple - file-local variables as static - * drivers/Makefile.am, drivers/bcmxcp_ser.c, drivers/bcmxcp_ser.h, - tools/nut-scanner/scan_eaton_serial.c: Introduce bcmxcp_ser.h to - provide as extern some variables from the driver also used in nut- - scanner - * drivers/raritan-px2-mib.c: drivers/raritan-px2-mib.c: declare a - driver-local variable as static - * drivers/snmp-ups.h: clients/snmp-ups.h: declare some setter/getter - routines to be seen - * drivers/snmp-ups.h: drivers/snmp-ups.h: declare function(void) - prototype explicitly - * drivers/snmp-ups.c: drivers/snmp-ups.c: declare multiple file-local - routines as static - * drivers/snmp-ups.c: drivers/snmp-ups.c: declare multiple file-local - variables as static - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: declare - multiple file-local variables as static - * drivers/riello_usb.c: drivers/riello_usb.c: declare multiple file- - local routines as static - * drivers/riello_usb.c: drivers/riello_usb.c: declare multiple file- - local variables as static - * drivers/riello_ser.c: drivers/riello_ser.c: declare multiple file- - local routines as static - * drivers/riello_ser.c: drivers/riello_ser.c: declare multiple file- - local variables as static - * drivers/riello.h: drivers/riello.h: declare function(void) - prototype explicitly - * drivers/riello.c: drivers/riello.c: declare multiple file-local - variables as static - * drivers/apcupsd-ups.h: drivers/apcupsd-ups.h: declare a driver- - local variable as static - * drivers/apcsmart-old.h: drivers/apcsmart-old.h: declare multiple - file-local variables as static - * drivers/victronups.c: drivers/victronups.c: declare multiple file- - local variables as static - * drivers/mge-hid.c: drivers/mge-hid.c: declare multiple file-local - variables as static - * drivers/mge-hid.c: drivers/mge-hid.c: end all info_lkp_t arrays - with sentinel entries - * drivers/apc-hid.h, drivers/libhid.h: Move "extern int - max_report_size;" declaration from drivers/apc-hid.h to more - suitable drivers/libhid.h - * drivers/mge-utalk.c: drivers/mge-utalk.c: declare a driver-local - variable as static - * drivers/mge-utalk.h: drivers/mge-utalk.h: declare a driver-local - variable as static - * drivers/metasys.c: drivers/metasys.c: declare multiple file-local - variables as static - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: declare multiple - file-local routines as static - -2020-11-20 Jim Klimov - - * drivers/genericups.h: drivers/genericups.h: declare a driver-local - variable as static - * drivers/gamatronic.h: drivers/gamatronic.h: declare multiple file- - local variables as static - * drivers/bestuferrups.c: drivers/bestuferrups.c: declare a driver- - local variable as static - * drivers/dummy-ups.c: drivers/dummy-ups.c: declare multiple file- - local variables as static - * drivers/dummy-ups.h: drivers/dummy-ups.h: declare a driver-local - variable as static - * drivers/bestuferrups.c: drivers/bestuferrups.c: declare a file- - local variable as static - * drivers/bestfortress.c: drivers/bestfortress.c: declare a file- - local variable as static - * drivers/belkinunv.c: drivers/belkinunv.c: declare multiple file- - local variables as static - * drivers/bcmxcp_ser.c: drivers/bcmxcp_ser.c: declare multiple file- - local variables as static - * drivers/bcmxcp.c: drivers/bcmxcp.c: declare multiple file-local - variables as static - * drivers/main.c: drivers/main.c: declare multiple file-local - variables as static, and fix their indentation - * clients/upssched.c: clients/upssched.c: declare multiple file-local - variables as static, and fix their indentation - * clients/upsmon.h: clients/upsmon.h: declare file-local variable as - static: struct notifylist[] - * clients/upsset.c: clients/upsset.c: declare multiple file-local - variables as static, and fix their indentation - * clients/upsimagearg.h: clients/upsimagearg.h: declare file-local - variable as static: struct imgarg[] - * clients/status.h: clients/status.h: declare file-local variable as - static: struct stattab[] - * clients/upslog.h: clients/upslog.h: declare file-local variable as - static: struct logcmds[] - * clients/upsclient.c: clients/upsclient.c: declare file-local - variable as static: struct upscli_errlist[] - -2020-11-17 Jim Klimov - - * drivers/riello_ser.c: drivers/riello_ser.c: riello_serialcomm(): do - not shadow global varname "bufIn" with same-named func argument - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: shut_synchronise(): do not shadow - global varnames "upsfd" (from scan_eaton_serial.c and main.c) with - func argument "upsfd" - -2020-11-25 Jim Klimov - - * clients/nutclient.h, tests/nutclienttest.cpp: - tests/nutclienttest.cpp: add tests on Device, Variable and Command - copying by assignment and by constructor - -2020-11-24 Jim Klimov - - * clients/nutclient.cpp: clients/nutclient.cpp: whitespace fixes - (indentations, blank lines) - * clients/nutclient.h: clients/nutclient.h: whitespace fixes - (indentations) - -2020-11-17 Jim Klimov - - * clients/nutclient.cpp, clients/nutclient.h: nutclient.cpp: match a - copy constructor with a copy assignment operator (Device, Variable, - Command classes) - -2020-11-18 Jim Klimov - - * drivers/tripplite.c: drivers/tripplite.c: upsdrv_initinfo(): use a - literal format string - -2020-11-22 Jim Klimov - - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: fix diags pragmas to use our configured-support macros - for cleaner fencing (nonliteral format strings) - -2020-11-18 Jim Klimov - - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: do not warn about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/nutdrv_qx_voltronic-qs-hex.c: drivers/nutdrv_qx_voltronic- - qs-hex.c: fix diags pragmas to use our configured-support macros - for cleaner fencing (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/nutdrv_qx_voltronic-qs-hex.c: drivers/nutdrv_qx_voltronic- - qs-hex.c: various routines: do not warn about nonliteral format - string in these cases - -2020-11-22 Jim Klimov - - * drivers/nutdrv_qx_voltronic-qs.c: drivers/nutdrv_qx_voltronic-qs.c: - fix diags pragmas to use our configured-support macros for cleaner - fencing (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/nutdrv_qx_voltronic-qs.c: drivers/nutdrv_qx_voltronic-qs.c: - do not warn about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/nutdrv_qx_mecer.c: drivers/nutdrv_qx_mecer.c: fix diags - pragmas to use our configured-support macros for cleaner fencing - (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/nutdrv_qx_mecer.c: drivers/nutdrv_qx_mecer.c: various - routines: do not warn about nonliteral format string in these cases - -2020-11-22 Jim Klimov - - * drivers/nutdrv_qx_blazer-common.c: drivers/nutdrv_qx_blazer- - common.c: fix diags pragmas to use our configured-support macros - for cleaner fencing (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/nutdrv_qx_blazer-common.c: drivers/nutdrv_qx_blazer- - common.c: various routines: do not warn about nonliteral format - string in these cases - -2020-11-22 Jim Klimov - - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: fix diags - pragmas to use our configured-support macros for cleaner fencing - (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/nutdrv_qx_bestups.c: drivers/nutdrv_qx_bestups.c: various - routines: do not warn about nonliteral format string in these cases - -2020-11-22 Jim Klimov - - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: fix diags pragmas to - use our configured-support macros for cleaner fencing (nonliteral - format strings) - -2020-11-18 Jim Klimov - - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: do not warn about - nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/blazer.c: drivers/blazer.c: fix diags pragmas to use our - configured-support macros for cleaner fencing (nonliteral format - strings) - -2020-11-18 Jim Klimov - - * drivers/blazer.c: drivers/blazer.c: various routines: do not warn - about nonliteral format string in these cases - -2020-11-22 Jim Klimov - - * drivers/powerp-txt.c: drivers/powerp-txt.c: fix diags pragmas to - use our configured-support macros for cleaner fencing (nonliteral - format strings) - -2020-11-18 Jim Klimov - - * drivers/powerp-txt.c: drivers/powerp-txt.c: do not warn about - nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/mge-utalk.c: drivers/mge-utalk.c: fix diags pragmas to use - our configured-support macros for cleaner fencing (nonliteral - format strings) - -2020-11-18 Jim Klimov - - * drivers/mge-utalk.c: drivers/mge-utalk.c: various routines: do not - warn about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: fix diags pragmas - to use our configured-support macros for cleaner fencing - (nonliteral format strings) - -2020-11-18 Jim Klimov - - * drivers/bestfortress.c: drivers/bestfortress.c: setinfo_float(): - comment about a casting problem, and do not warn about nonliteral - format string in this case - * drivers/bestfortress.c: drivers/bestfortress.c: do not warn about - nonliteral format string in this case - -2020-11-22 Jim Klimov - - * drivers/serial.c: drivers/serial.c: fix diags pragmas to use our - configured-support macros for cleaner fencing (nonliteral format - strings) - -2020-11-18 Jim Klimov - - * drivers/serial.c: drivers/serial.c: do not warn about nonliteral - format string in this case - -2020-11-22 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: fix diags pragmas to use our - configured-support macros for cleaner fencing (nonliteral format - strings) - -2020-11-18 Jim Klimov - - * drivers/dstate.c: drivers/dstate.c: various routines: do not warn - about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * clients/upssched.c: clients/upssched.c: fix diags pragmas to use - our configured-support macros for cleaner fencing (nonliteral - format strings) - -2020-11-18 Jim Klimov - - * clients/upssched.c: clients/upssched.c: send_to_one(): do not warn - about nonliteral format string in this case - -2020-11-22 Jim Klimov - - * common/common.c: common/common.c: fix diags pragmas to use our - configured-support macros for cleaner fencing (nonliteral format - strings) - -2020-11-20 Jim Klimov - - * common/common.c: common/common.c: various routines: do not warn - about nonliteral format string in these cases - -2020-11-17 Jim Klimov - - * common/common.c: common/common.c: snprintfcat(): do not warn about - nonliteral format string in this case - -2020-11-24 Jim Klimov - - * .travis.yml: .travis.yml: run gnu17-clang-8-nowarn-ARM-64bit case - in fightwarn branches - * .travis.yml: .travis.yml: annotate clearer the different - allowed_failure OS build sections - * .travis.yml: .travis.yml: point all GCC -std=*++99 to *-98 I - thought it was an older GCC quirk, but even new ones complain: - g++: error: unrecognized command-line option '-std=gnu++99'; did - you mean '-std=gnu++98'? g++ (FreeBSD Ports Collection) 10.0.0 - 20191222 (experimental) Copyright (C) 2019 Free Software - Foundation, Inc. This is free software; see the source for copying - conditions. There is NO warranty; not even for MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. - -2020-11-23 Jim Klimov - - * .travis.yml: .travis.yml: mark gnuXX-gcc-*-arm64 test cases as - evergreen - * .travis.yml: .travis.yml: separate ARM64 test case matrices into - ..._viable and ..._fatal subsets - * .travis.yml: .travis.yml: introduce - NUT_MATRIX_TAG="gnu17-gcc-9-nowarn-ARM-64bit" test case - * .travis.yml: .travis.yml: drop gcc-multilib in ARM builds, seems - missing in Debian - * .travis.yml: .travis.yml: drop arm-32bit builds, seems a no-go on - Travis quickly - * .travis.yml: Issue #823 follow-up: add ARM 32-bit and 64-bit builds - in Travis CI - -2020-11-22 Jim Klimov - - * drivers/gamatronic.c: drivers/gamatronic.c: rectify whitespaces - (indentations and blank lines) - -2020-11-20 Jim Klimov - - * drivers/gamatronic.c: drivers/gamatronic.c: fix indentation and - scope whitespace - * drivers/gamatronic.c: drivers/gamatronic.c: fix trailing whitespace - * common/common.c: common/common.c: cleaner macro processing for - BUILD_64 - -2020-11-22 Jim Klimov - - * include/timehead.h: include/timehead.h: satisfy pedantic macro - parser (defined vs. used value) - -2020-11-23 Jim Klimov - - * m4/nut_report_feature.m4: m4/nut_report_feature.m4: report the - compiler tools and flags ultimately applied to this build - * .gitignore: GitIgnore configure-test.docbuild* dirs - * .travis.yml: .travis.yml: separate the matrix for - _matrix_freebsd_gnustd_warn_viable and ..._fatal cases - * .travis.yml: .travis.yml: mark "gnuXX-gcc-freebsd-warn" cases as - evergreen to keep that way - * .travis.yml: .travis.yml: on freebsd, `pkg install libgd` - explicitly (needs sudo) - * .travis.yml: .travis.yml: introduce freebsd test cases with - warnings (typo fix) - -2020-11-22 Jim Klimov - - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: alarm if bogus tests did - not fail - * m4/ax_c_pragmas.m4: m4/ax_c_pragmas.m4: adapt to gcc vs clang CLI - capabilities - * configure.ac, m4/nut_compiler_family.m4: Introduce - m4/nut_compiler_family.m4 detection - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: fix diags pragmas - to use our configured-support macros for cleaner fencing - (unreachable code) - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: fix diags - pragmas to use our configured-support macros for cleaner fencing - (unreachable code) - * drivers/libusb.c: drivers/libusb.c: fix diags pragmas to use our - configured-support macros for cleaner fencing (unreachable code) - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: fix diags pragmas - to use our configured-support macros for cleaner fencing - (unreachable code) - * configure.ac, m4/ax_c_pragmas.m4: Introduce m4/ax_c_pragmas.m4 - * .travis.yml: .travis.yml: curiously, gcc-7 in Travis does not alias - -std=gnu++99 to canonic gnu++98 - * autogen.sh: autogen.sh: do not hide the progress of autoreconf - * ci_build.sh: ci_build.sh: fix whitespace - * ci_build.sh: ci_build.sh: parameterize $CONFIGURE_SCRIPT as it may - be called differently on some platforms - * .travis.yml: .travis.yml: amend cygwin bin files ACLs to let them - execute Thanks https://stackoverflow.com/a/4493653/4715872 for the - hint - * .travis.yml: .travis.yml: use choco bins in PATH also with - /cygdrive/ prefix just in case - * .travis.yml: .travis.yml: use cygwin bins in PATH also with - /cygdrive/ prefix just in case - * .travis.yml: .travis.yml: allow to skip cygwin autotools install if - it was done earlier and cached - -2020-11-21 Jim Klimov - - * .travis.yml: .travis.yml: use cygwin bins as last resort (e.g. for - autoconf) - * .travis.yml: Revert ".travis.yml: run Windows test cases with - cygwin bash" This reverts commit - 4592860aa82a208969eb1ae3ac2ec1f96e77bc07. - -2020-11-19 Jim Klimov - - * .travis.yml: .travis.yml: for windows builds, add - /C/tools/cygwin/bin to PATH - * .travis.yml: .travis.yml: define a NUT_MATRIX_TAG="gnu99-clang-win- - warn" test case for completeness - -2020-11-22 Jim Klimov - - * .travis.yml: .travis.yml: add _matrix_freebsd_gnustd_warn to - _matrix_freebsd - * .travis.yml: .travis.yml: introduce freebsd test cases with nowarn - and gnu17 - * .travis.yml: .travis.yml: introduce freebsd test cases with - warnings - * .travis.yml: .travis.yml: mark "gnu99-gcc-freebsd-nowarn" and - "gnu99-clang-freebsd-nowarn" as required - * ci_build.sh: ci_build.sh: as of now, skip building cgi (needs - libgd) on freebsd too, for "default-all-errors" test cases - * .travis.yml: .travis.yml: define simple freebsd scenarios - -2020-11-20 Jim Klimov - - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: do not warn - about unreachable code where we handle a legacy off-chance that - fatalx() might not exit the program - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: do not warn about - unreachable code where we handle a legacy off-chance that fatalx() - might not exit the program - * drivers/libusb.c: drivers/libusb.c: do not warn about unreachable - code where we handle a legacy off-chance that fatalx() might not - exit the program - * server/upsd.c: server/upsd.c: a move "help" switch() handling to - default case - * server/upsd.c: server/upsd.c: a switch() default needs no break - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: a switch() default needs - no break - * drivers/riello_usb.c: drivers/riello_usb.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * drivers/blazer_usb.c: drivers/blazer_usb.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: wrap unreachable - exit() added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: control_outlet(): - do not warn about syntactic "break;" after returns in conditionals - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: wrap unreachable exit() - added due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * drivers/metasys.c: drivers/metasys.c: a switch() default needs no - break, especially not after fatalx() - * drivers/dummy-ups.c: drivers/dummy-ups.c: a switch() default needs - no break, especially not after fatalx() - * .gitignore: GitIgnore temporary dirs made by configure script - (remain around if it is aborted) - * clients/upsmon.c: clients/upsmon.c: wrap unreachable exit() added - due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * clients/upsmon.c: clients/upsmon.c: wrap unreachable switch()-break - after help() with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid - warnings - * clients/upslog.c: clients/upslog.c: wrap unreachable switch()-break - after help() with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid - warnings - * clients/upscmd.c: clients/upscmd.c: wrap unreachable exit() added - due to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * clients/upsc.c: clients/upsc.c: wrap unreachable exit() added due - to earlier compiler warnings with "ifndef - HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now - * server/upsd.c: server/upsd.c: wrap unreachable exit() added due to - earlier compiler warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" - to avoid opposite warnings now - * include/attribute.h: include/attribute.h: align with - AX_C___ATTRIBUTE__ autoconf macro - * m4/ax_c___attribute__.m4: m4/ax_c___attribute__.m4: extend to - declare support for certain __attribute__((...)) use-cases of - interest to NUT - * configure.ac, m4/ax_c___attribute__.m4: configure.ac: introduce - AX_C___ATTRIBUTE__ from gnu.org - * server/upsd.c: server/upsd.c: annotate help() with noreturn attr - -2020-11-17 Jim Klimov - - * server/upsd.c: server/upsd.c: help(): do not shadow global varnames - "progname" (from upsd.c and main.c) with func argument "progname" - -2020-11-20 Jim Klimov - - * drivers/nut-ipmipsu.c: drivers/nut-ipmipsu.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: annotate - nutusb_open_error() with noreturn attr - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: fix indenting - whitespace - * drivers/riello_ser.c: drivers/riello_ser.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/blazer.c: drivers/blazer.c: annotate upsdrv_shutdown() with - noreturn attr - * drivers/dummy-ups.c: drivers/dummy-ups.c: annotate - upsdrv_shutdown() with noreturn attr - * clients/upsmon.c: clients/upsmon.c: annotate several routines with - noreturn attrs - * clients/upsmon.c: clients/upsmon.c: help(): do not shadow global - varname "progname" with same-named func argument - * clients/upsset.c: clients/upsset.c: annotate several routines with - noreturn attrs - * clients/upsimage.c: clients/upsimage.c: annotate drawimage() with - noreturn attr - * clients/upslog.c: clients/upslog.c: annotate help() with noreturn - attr - -2020-11-17 Jim Klimov - - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: annotate help() with - noreturn attr - * drivers/macosx-ups.c: drivers/macosx-ups.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: annotate - upsdrv_shutdown() with noreturn attr - * drivers/ivtscd.c: drivers/ivtscd.c: annotate upsdrv_shutdown() with - noreturn attr - * drivers/clone.c: drivers/clone.c: annotate upsdrv_shutdown() with - noreturn attr - * drivers/skel.c: drivers/skel.c: annotate upsdrv_shutdown() with - noreturn attr - * drivers/liebert.c: drivers/liebert.c: annotate upsdrv_shutdown() - with noreturn attr - * drivers/serial.c: drivers/serial.c: annotate ser_open_error() with - noreturn attr - * drivers/dstate.c: drivers/dstate.c: annotate sock_fail() with - noreturn attr - * drivers/main.c: drivers/main.c: annotate forceshutdown() with - noreturn attr - * common/parseconf.c: common/parseconf.c: annotate pconf_fatal() with - noreturn attr - -2020-11-18 Jim Klimov - - * .travis.yml: .travis.yml: fix typo in recent fix for clang warnings - -2020-11-18 Jim Klimov - - * scripts/Solaris/precheck.py: scripts/Solaris/precheck.py: modernize - calling sub-processes for Python 2.6+ and 3+ (keep original way for - older systems compat) - -2020-11-17 Jim Klimov - - * scripts/augeas/gen-nutupsconf-aug.py: scripts/augeas/gen- - nutupsconf-aug.py: drop unused variables Originally PR meant to - drop "global" modifier outside a local function context, but found - that nothing defines or uses these three names. Must be some - leftover from planned but unfinished development. Re-ran - ./autogen.sh and it generates the same file for the build. - -2020-11-18 Jim Klimov - - * drivers/dstate.h: drivers/dstate.h: dstate_setaux(): fix missed - type change for "aux" - * drivers/dstate.c: drivers/dstate.c: dstate_setaux(): fix missed - type change for "aux" - * .gitignore: GitIgnore NetBeans project directory - -2020-11-16 Jim Klimov - - * .gitignore: GitIgnore .gdb_history files - * .gitignore: GitIgnore conf??????/ temporary directories that can - remain if configure script is aborted - * .gitignore: GitIgnore conf_nut_report_feature file (made by - m4/nut_report) - -2020-11-17 Jim Klimov - - * drivers/powerman-pdu.c: drivers/powerman-pdu.c: query_one() - query_all(): do not shadow global varname "pm" with same-named func - argument - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: - subdriver_match_func(): do not shadow global varname "hd" with func - argument "hd" - * drivers/mge-xml.c: drivers/mge-xml.c: numerous routines: do not - shadow global varname "val" (for XML element temp store?) with - same-named func argument - * drivers/netxml-ups.c: drivers/netxml-ups.c: send_http_request(): do - not shadow global varnames "session" and "uri" with func arguments - * drivers/upscode2.c: upscode2.c: upsc_setstatus(): do not shadow - global varname "status" with func argument "status" - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: callback(): do not - shadow global varname "udev" with func argument "udev" - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: callback(): do not - shadow global varname "hd" with func argument "hd" - * drivers/riello.c: drivers/riello.c: riello_calc_CRC(): change data - type to fix comparisons - * drivers/powercom.c: drivers/powercom.c: output_voltage(): avoid a - multiplication overflow by casting - * server/upsd.c: upsd.c: actually include signal.h from system - * common/common.c: common/common.c: upsdebug_hex() / - upsdebug_ascii(): fix const-ness of buf casting - * common/common.c: common/common.c: get_libname(): fix type to - receive strlen() - * common/state.c, drivers/dstate.c, include/state.h, server/netget.c: - state.c dstate.c etc.: fix st_tree_t->aux to "long" as we convert - via strtol() - * common/parseconf.c: common/parseconf.c: addchar(): signedness-aware - trim of ctx->ch range - * common/common.c: common/common.c: mark search_paths[] as a static - array - * common/common.c: common/common.c: snprintfcat(): sort out the messy - return types - * common/common.c: common/common.c: sendsignalfn(): fix pid to "long" - as we convert via strtol() - * common/common.c: common/common.c: writepid(): fix data type for - umask() - * common/parseconf.c: parseconf.c: add_arg_word(): fix argpos to - size_t, we do not expect negative offsets - * clients/upsclient.c, clients/upsclient.h, common/common.c, - drivers/apcsmart.c, drivers/serial.c, drivers/serial.h, - include/common.h: common, serial, upsclient: change read() and - write() operations from "int" to "ssize_t" - * include/attribute.h: include/attribute.h: satisfy pedantic macro - parser (defined vs. used value) - * drivers/powercom.c: drivers/powercom.c: do not check "if model >= - 2000" just after processing "model < 2000" - * drivers/pijuice.c: drivers/pijuice.c: do not check for - "powerInput5vIo <= POWER_PRESENT" twice in a row - * drivers/bcmxcp.c: drivers/bcmxcp.c: do not check for "value>=0" - when we pick it from "unsigned char[]" answer - * common/common.c: common/common.c: search_paths[]: comment the - reasoning (see also issue NUT #805) - * drivers/apcupsd-ups.c: drivers/apcupsd-ups.c: comment about htons() - return value range (why I did not fix an "x<0" check) - * .travis.yml: .travis.yml: run Windows test cases with cygwin bash - * .travis.yml: .travis.yml: add at least a cygwin automake to Windows - test cases - * .travis.yml: .travis.yml: limit builds on xcode7.x to C11 - * include/parseconf.h: include/parseconf.h: fix trailing whitespace - * .travis.yml: .travis.yml: mark clang builds with fatal warnings, - additionally with -Wno-reserved-id-macro -Wno-padded to play around - system header issues - -2020-11-16 Jim Klimov - - * configure.ac: configure.ac: rephrase the notice about looking for - required C library routines which are beyond strict C standards - -2020-11-10 Jim Klimov - - * configure.ac: configure.ac: make checks for "Required C library - routine" not fatal: -Wall -Werror frowns upon the ways autotools - probe the system - * configure.ac: configure.ac: detect routines that may be not - available in constrained standard-C modes - -2020-11-16 Jim Klimov - - * configure.ac, m4/nut_stash_warnings.m4: Introduce - m4/nut_stash_warnings.m4 and NUT_STASH_WARNINGS and - NUT_POP_WARNINGS in configure.ac - -2020-11-17 Jim Klimov - - * drivers/solis.c: drivers/solis.c: convert from localtime() to - localtime_r() which is thread-safe - * drivers/rhino.c: drivers/rhino.c: convert from localtime() to - localtime_r() which is thread-safe - * drivers/microdowell.c: drivers/microdowell.c: convert from - localtime() to localtime_r() which is thread-safe - * drivers/mge-hid.c: drivers/mge-hid.c: convert from localtime() to - localtime_r() which is thread-safe - * clients/upsstats.c: clients/upsstats.c: convert from localtime() to - localtime_r() which is thread-safe - * clients/upslog.c: clients/upslog.c: convert from localtime() to - localtime_r() which is thread-safe - -2020-11-16 Jim Klimov - - * ci_build.sh: ci_build.sh: build_to_only_catch_errors(): also report - on `make check` with the current test case - * .travis.yml: Revert ".travis.yml: DISABLE test case - "gnu99-clang-5.0-nowarn": it has some problem with the recently - changed "tests/" (and runs clang-7 anyway as it does not use the - PPA for 5.0)" This reverts commit - 4749e0b26a33990dbd7bb56ff863cfc30db4245e as we can now have this - test case working again. - * configure.ac: configure.ac: do not pick C++11 support if a standard - is explicitly requested by caller; fixes NUT issue #873 - * .travis.yml: .travis.yml: fix test cases for - NUT_MATRIX_TAG="*-clang-5.0-*" to actually use clang-5.0 explicitly - -2020-11-15 Jim Klimov - - * .travis.yml: .travis.yml: mark test-case "gnu17-gcc-9-warn" as - passing now - * .travis.yml: .travis.yml: add libnss3-dev and libssl-dev to test - against both SSL implems - * .travis.yml: .travis.yml: DISABLE test case - "gnu99-clang-5.0-nowarn": it has some problem with the recently - changed "tests/" (and runs clang-7 anyway as it does not use the - PPA for 5.0) - * drivers/snmp-ups.c, m4/nut_check_libnetsnmp.m4: drivers/snmp-ups.c: - fix the warning about how we get the size of usmAES128PrivProtocol - * ci_build.sh: ci_build.sh: configure_nut(): sleep more before data - dump so interactive devs can react to the broken configure run - * ci_build.sh: ci_build.sh: build_to_only_catch_errors(): report a - SUCCESS when we have one - * ci_build.sh: ci_build.sh: allow caller to customize their - PKG_CONFIG_PATH - * tests/Makefile.am: tests/Makefile.am: fix include dir for - cppunittest - * server/netssl.c: server/netssl.c: comment about non-fatal build - warnings from NSS include names we use - * server/netssl.c: server/netssl.c: mark up NUT_UNUSED_VARIABLEs for - build with Mozilla NSS - * clients/upsclient.c: clients/upsclient.c: mark up - NUT_UNUSED_VARIABLEs for build with Mozilla NSS - * m4/nut_check_libnss.m4: nut_check_libnss.m4 : warn that nss.pc is - more sensitive to matching PKG_CONFIG_PATH and build bitness than - others - * ci_build.sh: ci_build.sh : enable SSL build variants of "default- - all-errors" with both OpenSS and Mozilla NSS - * m4/nut_check_libnetsnmp.m4: m4/nut_check_libnetsnmp.m4: pick - correct bitness net-snmp-config-{32,64} script if available - -2020-11-14 Jim Klimov - - * tests/Makefile.am: tests/Makefile.am: fix include dir for - nutlogtest - -2020-11-10 Jim Klimov - - * .travis.yml: .travis.yml (#823) : green-light several GCC test - cases that now pass even with all warnings enabled as fatal - * clients/upsset.c: clients/upsset.c: refine whitespace - -2020-11-09 Jim Klimov - - * drivers/rhino.c: drivers/rhino.c: drop extraneous parentheses - * drivers/nutdrv_qx.h: drivers/nutdrv_qx.h: avoid a trailing comma in - enum list (C89) - -2020-11-12 Jim Klimov - - * docs/nut.dict: nut.dict: spellcheck new keywords around "fightwarn" - chapter - -2020-11-10 Jim Klimov - - * docs/developers.txt: docs/developers.txt: detail how to use - ci_build.sh intended for Travis CI to work on fixing stuff locally - -2020-11-13 Jim Klimov - - * tests/cpputest.cpp: tests/cpputest.cpp : wrap the test run to catch - exceptions, if any - * tests/cpputest.cpp: tests/cpputest.cpp : comment the progress - through steps - * tests/cpputest.cpp: tests/cpputest.cpp: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * tests/Makefile.am: tests/Makefile.am : comment the cases where we - do not compile CXX tests - * tests/Makefile.am, tests/nutlogtest.c: Introduce tests/nutlogtest.c - for upslog*() and friends - -2020-11-12 Jean-Baptiste Boric - - * drivers/main.c: Fix faulty dump mode logic - -2020-11-12 Jim Klimov - - * docs/nut.dict: Update nut.dict - -2020-11-10 Jim Klimov - - * configure.ac: configure.ac : detect abs() and fabs() funcs - -2020-11-12 Jim Klimov - - * docs/acknowledgements.txt: Update acknowledgements.txt Do not - constrain contribution from EVER Power Systems to one person - -2020-11-11 Jim Klimov - - * docs/developers.txt: docs/developers.txt: document - NUT_UNUSED_VARIABLE() - -2020-11-10 Jim Klimov - - * include/common.h: include/common.h : drop NUT_UNUSED and - NUT_UNUSED_FUNCTION macros as not portable enough - * drivers/mge-hid.c: drivers/mge-hid.c: mark up NUT_UNUSED_VARIABLEs - in the more portable manner - * drivers/tripplite-hid.c: drivers/tripplite-hid.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/serial.c: drivers/serial.c: mark up NUT_UNUSED_VARIABLEs in - the more portable manner - * drivers/bestfcom.c: drivers/bestfcom.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/dummy-ups.c: drivers/dummy-ups.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/apcsmart-old.c: drivers/apcsmart-old.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/cps-hid.c: drivers/cps-hid.c: mark up NUT_UNUSED_VARIABLEs - in the more portable manner - * drivers/apcsmart.c: drivers/apcsmart.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/bestfortress.c: drivers/bestfortress.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/blazer_usb.c: drivers/blazer_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/apc-hid.c: drivers/apc-hid.c: mark up NUT_UNUSED_VARIABLEs - in the more portable manner - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: mark - up NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/riello_usb.c: drivers/riello_usb.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/explore-hid.c: drivers/explore-hid.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * server/upsd.c: server/upsd.c: mark up NUT_UNUSED_VARIABLEs in the - more portable manner - * clients/upssched.c: clients/upssched.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * clients/upsset.c: clients/upsset.c: mark up NUT_UNUSED_VARIABLEs in - the more portable manner - * clients/upsimage.c: clients/upsimage.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * clients/upsstats.c: clients/upsstats.c: mark up - NUT_UNUSED_VARIABLEs in the more portable manner - * clients/upslog.c: clients/upslog.c: mark up NUT_UNUSED_VARIABLEs in - the more portable manner - * clients/upsmon.c: clients/upsmon.c: mark up NUT_UNUSED_VARIABLEs in - the more portable manner - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: mark up NUT_UNUSED_VARIABLEs in the - more portable manner - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - mark up NUT_UNUSED_VARIABLEs in the more portable manner - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - mark up NUT_UNUSED_VARIABLEs in the more portable manner - * drivers/libshut.c, drivers/riello_ser.c, drivers/snmp-ups.c, - tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_snmp.c: libshut.c riello_ser.c nut-scanner bits: - abolish non-standard u_char and u_short Probably standard C99 - "uint8_t" and 16(?) bit short would be more proper, especially for - serial-line protocols. But the original code used types derived - from hardware implementation sized "char" and "short" - so they - stayed this way here. - * drivers/riello_usb.c: drivers/riello_usb.c: avoid implicit switch - fall-through - * clients/upsc.c: clients/upsc.c: avoid implicit switch fall-through - * clients/upscmd.c: clients/upscmd.c: avoid implicit switch fall- - through - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: avoid implicit switch - fall-through - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: avoid implicit switch - fall-through - * drivers/blazer_usb.c: drivers/blazer_usb.c: avoid implicit switch - fall-through - * server/upsd.c: server/upsd.c: add blank lines for readability of - opts processing switch - * server/upsd.c: server/upsd.c: avoid implicit switch fall-through - * clients/upsstats.h: clients/upsstats.h: wrap with include-guards - * clients/upssched.h: clients/upssched.h: wrap with include-guards - * clients/upsmon.h: clients/upsmon.h: wrap with include-guards - * clients/upslog.h: clients/upslog.h: wrap with include-guards - * clients/upsimagearg.h: clients/upsimagearg.h: wrap with include- - guards - * clients/status.h: clients/status.h: wrap with include-guards - * clients/cgilib.h: clients/cgilib.h: wrap with include-guards - * drivers/tripplite.h: drivers/tripplite.h: wrap with include-guards - * drivers/safenet.h: drivers/safenet.h: wrap with include-guards - * drivers/riello.h: drivers/riello.h: reword the wrap with include- - guards - * drivers/powercom.h: drivers/powercom.h: wrap with include-guards - * drivers/mge-utalk.h: include/mge-utalk.h: wrap with include-guards - * drivers/oneac.h: drivers/oneac.h: wrap with include-guards - * drivers/main.h: drivers/main.h: reword the wrap with include-guards - * drivers/libusb.h: drivers/libusb.h: reword the wrap with include- - guards - * drivers/libshut.h: drivers/libshut.h: reword the wrap with include- - guards - * drivers/libhid.h: drivers/libhid.h: reword the wrap with include- - guards - * drivers/hidparser.h: drivers/hidparser.h: reword the wrap with - include-guards - * drivers/genericups.h: drivers/genericups.h: wrap with include- - guards - * drivers/gamatronic.h: drivers/gamatronic.h: wrap with include- - guards and fix trailing whitespace - * drivers/dummy-ups.h: drivers/dummy-ups.h: wrap with include-guards - * drivers/apcupsd-ups.h: drivers/apcupsd-ups.h: wrap with include- - guards - * drivers/apcsmart_tabs.h: drivers/apcsmart_tabs.h: reword the wrap - with include-guards - * drivers/apcsmart.h: drivers/apcsmart.h: reword the wrap with - include-guards - * drivers/apcsmart-old.h: drivers/apcsmart-old.h: wrap with include- - guards - * include/upsconf.h: include/upsconf.h: wrap with include-guards - * include/upsconf.h: include/upsconf.h: add (C) and license header - * include/upsconf.h: include/upsconf.h: refine whitespace - * include/timehead.h: include/timehead.h: add (C) and license header - * include/timehead.h: include/timehead.h: wrap with include-guards - * include/str.h: include/str.h: reword the wrap with include-guards - * include/state.h: include/state.h: reword the wrap with include- - guards - * include/proto.h: include/proto.h: add (C) and license header - * include/proto.h: include/proto.h: reword the wrap with include- - guards - * include/nut_stdint.h: include/nut_stdint.h: reword the wrap with - include-guards - * include/nut_platform.h: include/nut_platform.h: reword the wrap - with include-guards - * include/extstate.h: include/extstate.h: add (C) and license header - * include/extstate.h: include/extstate.h: reword the wrap with - include-guards - * include/extstate.h: include/extstate.h: refine whitespace - * include/common.h: include/common.h: reword the wrap with include- - guards - * include/attribute.h: include/attribute.h: add (C) and license - header - * include/attribute.h: include/attribute.h: reword the wrap with - include-guards - * server/user.h: server/user.h: update (C) and license header - * server/user.h: server/user.h: wrap with include-guards - * server/user-data.h: server/user-data.h: update (C) and license - header - * server/user-data.h: server/user-data.h: wrap with include-guards - * server/upstype.h: server/upstype.h: reword the wrap with include- - guards - * server/stype.h: server/stype.h: reword the wrap with include-guards - * server/sstate.h: server/sstate.h: reword the wrap with include- - guards - * server/nut_ctype.h: server/nut_ctype.h: protect header files for - C++ inclusion - * server/netuser.h: server/netuser.h: wrap with include-guards - * server/netuser.h: server/netuser.h: add (C) and license header - * server/netssl.h: server/netssl.h: reword the wrap with include- - guards - * server/netset.h: server/netset.h: wrap with include-guards - * server/netset.h: server/netset.h: add (C) and license header - * server/netmisc.h: server/netmisc.h: wrap with include-guards - * server/netmisc.h: server/netmisc.h: add (C) and license header - * server/netcmds.h: server/netcmds.h: add (C) and license header - * server/netlist.h: server/netlist.h: wrap with include-guards - * server/netlist.h: server/netlist.h: add (C) and license header - * server/netinstcmd.h: server/netinstcmd.h: wrap with include-guards - * server/netinstcmd.h: server/netinstcmd.h: add (C) and license - header - * server/netget.h: server/netget.h: wrap with include-guards - * server/netget.h: server/netget.h: add (C) and license header - * server/neterr.h: server/neterr.h: protect header files for C++ - inclusion - * server/neterr.h: server/neterr.h: wrap with include-guards - * server/neterr.h: server/neterr.h: add (C) and license header - * server/netcmds.h: server/netcmds.h: wrap with include-guards - * server/desc.h: server/desc.h: add (C) and license header - * server/desc.h: server/desc.h: wrap with include-guards - * server/conf.h: server/conf.h: update (C) and license header - * server/conf.h: server/conf.h: wrap with include-guards - -2020-11-09 Jim Klimov - - * docs/nut.dict: Update nut.dict Add EVER Sinline model name - -2020-11-09 Jim Klimov - - * drivers/asem.c: drivers/al175.c: update Linux i2c include mesh - (thanks to pijuice.c) - * drivers/pijuice.c: drivers/pijuice.c: set_power_off(): drop unused - "data" - * drivers/pijuice.c: drivers/pijuice.c: avoid setting "data" during a - write Compiler warnings resolved this puzzle: [2020-11-09 - 15:10:38] [build-err] pijuice.c:737:2: note: in expansion of macro - ‘I2C_WRITE_BYTE’ [2020-11-09 15:10:38] [build-err] 737 | - I2C_WRITE_BYTE( upsfd, cmd, shutdown_delay, __func__ ) [2020-11-09 - 15:10:38] [build-err] | ^~~~~~~~~~~~~~ [2020-11-09 15:10:38] - [build-err] pijuice.c:710:10: warning: variable ‘data’ set but not - used [-Wunused-but-set-variable] [2020-11-09 15:10:38] [build-err] - 710 | uint8_t data; [2020-11-09 15:10:38] [build-err] | - ^~~~ So we did not need to set it at all, can go to simple - anonymous negative-return check. - * drivers/pijuice.c: drivers/pijuice.c: use "__s32" de-facto in - headers instead of "s32" from manpages - * drivers/pijuice.c: drivers/pijuice.c: rearrange I2C_*() macros to - catch -1 error codes while fetching unsigned ints - * drivers/apcsmart.c: drivers/apcsmart.c: fix variadic macro logx() - call to accomodate modern standards - * drivers/apcsmart.c: drivers/apcsmart.c: fix variadic macro logx() - call to accomodate modern standards - * drivers/apcsmart.c: drivers/apcsmart.c: fix variadic macro debx() - call to accomodate modern standards - * drivers/pijuice.c: drivers/pijuice.c: set_poweroff(): fix limited - value range exceeded - * drivers/pijuice.c: drivers/pijuice.c: replace __FUNCTION__ by - __func__ to avoid warnings error: ISO C does not support - '__FUNCTION__' predefined identifier [-Werror=pedantic] - * drivers/bcmxcp.c: drivers/bcmxcp.c: bump string buffer size to - avoid potential overflows If we have some bug getting outlet - numbers into billions (int at 64-bit) the string might overflow - indeed... - * drivers/al175.c: drivers/al175.c: document a warning to address - later - * drivers/snmp-ups.c: drivers/snmp-ups.c: avoid warning: control may - reach end of non-void function - -2020-11-08 Jim Klimov - - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: avoid - implicit switch fall-through - * .travis.yml: .travis.yml: our code (and checks) should not rely on - specific compiler features; implicit switch FALLTHRU was solved by - explicit goto jumps - * docs/nut.dict: docs/nut.dict: update for conf/upsstats- - single.html.sample - * docs/developers.txt: docs/developers.txt: avoid spellcheck warning - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - rearrange phases_nb and sanity-check the value to debug-log - unexpectancies - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - sanity-check the outlet_group_nb (not negative) - -2020-11-05 Jim Klimov - - * drivers/hidparser.c: drivers/hidparser.c: hide logging check that - never fires hidparser.c:347:28: error: comparison is always false - due to limited range of data type [-Werror=type-limits] 347 | - if(pParser->Data.ReportID >= MAX_REPORT) uint8_t vs "500" CC - @aquette - -2020-11-06 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: drop g_usec_timeout which is not actually - used - * drivers/libusb.c: drivers/libusb.c: fix debug string formatting - -2020-11-05 Jim Klimov - - * drivers/solis.h: drivers/solis.h: swap "const static" => "static - const" Avoids error: 'static' is not at beginning of declaration - [-Werror=old-style-declaration] - * drivers/solis.c: drivers/solis.c: rectify C-style comments - * drivers/isbmex.c: drivers/isbmex.c: comment about magic D() macro - got debug logging vs. upsdebugx() - * drivers/rhino.c: drivers/rhino.c: ScanReceivePack(): rephrase if- - clause to avoid warnings Seems this is a correct change logically: - - if( !( SourceFail ) == RedeAnterior ) + if( RedeAnterior == !( - SourceFail ) ) given this assignment just below the if-clause: - RedeAnterior = !( SourceFail ); to avoid a compiler warning that - "!" might apply not in a way intended by author - * drivers/masterguard.c: drivers/masterguard.c: StringSplit(): use - the maxlen - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: setvar(): find a - use for "val" - -2020-11-04 Jim Klimov - - * clients/upssched.c: clients/upssched.c: main(): find use for argc - * clients/upsmon.c: clients/upsmon.c: sigpipe(): find use for sig - * clients/upsset.c: clients/upsset.c: print_rw(): find use for - upsname - -2020-11-08 Jim Klimov - - * drivers/blazer_usb.c: drivers/blazer_usb.c: upsdrv_initups(): - constrain langid_fix scanned values to fit into signed int - -2020-11-06 Jim Klimov - - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: upsdrv_initups(): - constrain langid_fix scanned values to fit into signed int - -2020-11-08 Jim Klimov - - * drivers/netxml-ups.c: drivers/netxml-ups.c: rearrange sscanf() of - inputs to avoid wrong int values - -2020-11-06 Jim Klimov - - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: avoid - buffer overflows iterating item->info_rw, possible NPE, and fix the - check for hitting the sentinel entry Fix warnings like: - nutdrv_qx_voltronic.c:4037:39: error: division 'sizeof (info_rw_t - *) / sizeof (info_rw_t)' does not compute the number of array - elements [-Werror=sizeof-pointer-div] 4037 | if (i >= - (int)(sizeof(item->info_rw) / sizeof(item->info_rw[0]))) { | - ^ nutdrv_qx_voltronic.c: In function 'voltronic_p31g_set': - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: - voltronic_fault(): avoid buffer overflows with sprintf() - -2020-11-04 Jim Klimov - - * clients/upscmd.c: clients/upscmd.c: increase buffers to avoid - overflow (warnings) - * clients/upsrw.c: clients/upsrw.c: increase buffers to avoid - overflow (warnings) - -2020-11-05 Jim Klimov - - * drivers/bestfcom.c: drivers/bestfcom.c: increase buffers to avoid - overflow (warnings) - * drivers/bcmxcp.c: drivers/bcmxcp.c: setvar(): increase buffers to - avoid overflow (warnings) - -2020-11-04 Jim Klimov - - * clients/upssched.c: clients/upssched.c: increase buffers to avoid - overflow (warnings) - -2020-11-06 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: tools/nut- - scanner/scan_xml_http.c: avoid possible buffer overflow - * drivers/snmp-ups.c: drivers/snmp-ups.c: su_alarm_set(): bump - alarm_info_value size to avoid print overflows - -2020-11-08 Jim Klimov - - * drivers/belkin-hid.c: drivers/belkin-hid.c: use fabs() for - floating-point math - * drivers/belkin-hid.c: drivers/belkin-hid.c: use fabs() for - floating-point math - -2020-11-06 Jim Klimov - - * drivers/upscode2.c: drivers/upscode2.c: use fabs() for floating- - point math - -2020-11-08 Jim Klimov - - * drivers/netxml-ups.c: drivers/netxml-ups.c: instcmd(): find a use - for "extra" - * drivers/riello_usb.c: drivers/riello_usb.c: instcmd(): find a use - for "extra" - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: instcmd(): find a - use for "extra" - -2020-11-06 Jim Klimov - - * drivers/riello_ser.c: drivers/riello_ser.c: instcmd(): find a use - for "extra" - * drivers/apcsmart-old.c: drivers/apcsmart-old.c: instcmd(): find a - use for "extra" - * drivers/ivtscd.c: drivers/ivtscd.c: instcmd(): find a use for - "extra" - * drivers/clone.c: drivers/clone.c: instcmd(): find a use for "extra" - * drivers/powerman-pdu.c: drivers/powerman-pdu.c: instcmd(): find a - use for "extra" - * drivers/powerp-txt.c: drivers/powerp-txt.c: powpan_instcmd(): find - a use for "extra" - * drivers/powerp-bin.c: drivers/powerp-bin.c: powpan_instcmd(): find - a use for "extra" - * drivers/victronups.c: drivers/victronups.c: instcmd(): find a use - for "extra" - -2020-11-05 Jim Klimov - - * drivers/tripplitesu.c: drivers/tripplitesu.c: instcmd(): find a use - for "extra" - * drivers/tripplite.c: drivers/tripplite.c: instcmd(): find a use for - "extra" - * drivers/solis.c: drivers/solis.c: instcmd(): find a use for "extra" - * drivers/nutdrv_siemens_sitop.c: drivers/nutdrv_siemens_sitop.c: - instcmd(): find a use for "extra" - * drivers/safenet.c: drivers/safenet.c: instcmd(): find a use for - "extra" - * drivers/rhino.c: drivers/rhino.c: instcmd(): find a use for "extra" - * drivers/powercom.c: drivers/powercom.c: instcmd(): find a use for - "extra" - * drivers/optiups.c: drivers/optiups.c: instcmd(): find a use for - "extra" - * drivers/mge-utalk.c: drivers/mge-utalk.c: instcmd(): find a use for - "extra" - * drivers/metasys.c: drivers/metasys.c: instcmd(): find a use for - "extra" - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: instcmd(): find a - use for "extra" - * drivers/etapro.c: drivers/etapro.c: instcmd(): find a use for - "extra" - * drivers/dummy-ups.c: drivers/dummy-ups.c: instcmd(): find a use for - "extra" - * drivers/bestups.c: drivers/bestups.c: instcmd(): find a use for - "extra" - * drivers/bestfortress.c: drivers/bestfortress.c: instcmd(): find a - use for "extra" - * drivers/belkinunv.c: drivers/belkinunv.c: instcmd(): find a use for - "extra" - * drivers/belkin.c: drivers/belkin.c: instcmd(): find a use for - "extra" - * drivers/bcmxcp.c: drivers/bcmxcp.c: instcmd(): find a use for - "extra" - -2020-11-04 Jim Klimov - - * drivers/al175.c: drivers/al175.c: instcmd(): find use for "extra" - -2020-11-08 Jim Klimov - - * drivers/mge-xml.c: drivers/mge-xml.c: mark up NUT_UNUSED_VARIABLEs - * drivers/netxml-ups.c: drivers/netxml-ups.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/riello_usb.c: drivers/riello_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/blazer_usb.c: drivers/blazer_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/bcmxcp_usb.c: drivers/bcmxcp_usb.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/tripplite-hid.c: drivers/tripplite-hid.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/explore-hid.c: drivers/explore-hid.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/explore-hid.c: drivers/explore-hid.c: a few whitespace - fixes - * drivers/cps-hid.c: drivers/cps-hid.c: mark up NUT_UNUSED_VARIABLEs - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: mark up - NUT_UNUSED_VARIABLEs - -2020-11-06 Jim Klimov - - * drivers/nutdrv_qx_voltronic.c: drivers/nutdrv_qx_voltronic.c: mark - up NUT_UNUSED_VARIABLEs - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/apcsmart-old.c: drivers/apcsmart-old.c: mark up - NUT_UNUSED_VARIABLEs - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - mark up NUT_UNUSED_VARIABLEs - * server/netuser.c: server/netuser.c: mark up NUT_UNUSED_VARIABLEs - * server/netmisc.c: server/netmisc.c: mark up NUT_UNUSED_VARIABLEs - * server/netssl.c: server/netssl.c: mark up NUT_UNUSED_VARIABLEs - * server/upsd.c: server/upsd.c: mark up NUT_UNUSED_VARIABLEs - * drivers/upsdrvctl.c: drivers/upsdrvctl.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/apcsmart.c: drivers/apcsmart.c: mark up - NUT_UNUSED_VARIABLEs - -2020-11-05 Jim Klimov - - * drivers/mge-hid.c: drivers/mge-hid.c: mark up NUT_UNUSED_VARIABLEs - * drivers/libshut.c: drivers/libshut.c: mark up NUT_UNUSED_VARIABLEs - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/dummy-ups.c: drivers/dummy-ups.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/bestfortress.c: drivers/bestfortress.c: mark up - NUT_UNUSED_VARIABLEs - * drivers/bestfcom.c: drivers/bestfcom.c: mark up - NUT_UNUSED_VARIABLEs - -2020-11-06 Jim Klimov - - * tools/nut-scanner/scan_eaton_serial.c: tools/nut- - scanner/scan_eaton_serial.c: mark up NUT_UNUSED_VARIABLEs - * tools/nut-scanner/scan_avahi.c: tools/nut-scanner/scan_avahi.c: - mark up NUT_UNUSED_VARIABLEs - -2020-11-04 Jim Klimov - - * drivers/serial.c: drivers/serial.c: mark up NUT_UNUSED_VARIABLEs - * clients/upssched.c: clients/upssched.c: mark up - NUT_UNUSED_VARIABLEs - * clients/upsmon.c: clients/upsmon.c: mark up NUT_UNUSED_VARIABLEs - * clients/upsset.c: clients/upsset.c: mark up NUT_UNUSED_VARIABLEs - * clients/upsimage.c, clients/upsstats.c: clients/upsimage.c: mark up - NUT_UNUSED_VARIABLEs - * clients/upsstats.c: clients/upsstats.c: mark up - NUT_UNUSED_VARIABLEs - * clients/upslog.c: clients/upslog.c: mark up NUT_UNUSED_VARIABLEs - * clients/upsclient.c: clients/upsclient.c: mark up - NUT_UNUSED_VARIABLEs for ifdef-ed codepaths - -2020-11-08 Jim Klimov - - * drivers/apc-hid.c: drivers/apc-hid.c: mark up NUT_UNUSED_VARIABLEs - (and comment a FIXME about possible use for that) - -2020-11-04 Jim Klimov - - * include/common.h: include/common.h: introduce NUT_UNUSED* macros to - mark up codebase - -2020-11-08 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c: comment about issue found - by pedantic compiler snmp-ups.c: In function 'nut_snmp_init': - snmp-ups.c:599:66: error: division 'sizeof (oid * {aka long - unsigned int *}) / sizeof (oid {aka long unsigned int})' does not - compute the number of array elements [-Werror=sizeof-pointer-div] - 599 | g_snmp_sess.securityPrivProtoLen = - sizeof(usmAESPrivProtocol)/sizeof(oid); | - ^ In file included from /usr/include/net-snmp/snmpv3_api.h:27, from - /usr/include/net-snmp/net-snmp-includes.h:78, from snmp-ups.h:79, - from snmp-ups.c:39: /usr/include/net- - snmp/library/transform_oids.h:50:26: note: first 'sizeof' operand - was declared here 50 | NETSNMP_IMPORT oid - *usmAES128PrivProtocol; /* backwards compat */ | - ^~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors - make[1]: *** [Makefile:1953: snmp_ups-snmp-ups.o] Error 1 - -2020-11-08 Jim Klimov - - * docs/developers.txt: Update developers.txt Another spellcheck fix - * docs/developers.txt: Update developers.txt Avoid "quiesce" to - satisfy the spellchecker - -2020-11-08 Jim Klimov - - * drivers/apc-hid.c: drivers/apc-hid.c: a few whitespace fixes - * drivers/openups-hid.c: drivers/openups-hid.c: initialize all fields - of info_lkp_t arrays - * drivers/tripplite-hid.c: drivers/tripplite-hid.c: initialize all - fields of info_lkp_t arrays - * drivers/powercom-hid.c: drivers/powercom-hid.c: initialize all - fields of info_lkp_t arrays - * drivers/cps-hid.c: drivers/cps-hid.c: initialize all fields of - info_lkp_t arrays - * drivers/belkin-hid.c: drivers/belkin-hid.c: initialize all fields - of info_lkp_t arrays - * drivers/apc-hid.c: drivers/apc-hid.c: initialize all fields of - info_lkp_t arrays - * drivers/apc-pdu-mib.c: drivers/apc-pdu-mib.c: define - APC_PDU_DEVICE_MODEL macro on top of file - * drivers/apc-pdu-mib.c: drivers/apc-pdu-mib.c: initialize all fields - of mib2nut_info_t arrays - * drivers/apc-pdu-mib.c: drivers/apc-pdu-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/apc-ats-mib.c: drivers/apc-ats-mib.c: initialize all fields - of mib2nut_info_t array - * drivers/apc-ats-mib.c: drivers/apc-ats-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/eaton-ats16-mib.c: drivers/eaton-ats16-mib.c: initialize - all fields of mib2nut_info_t arrays - * drivers/eaton-ats16-mib.c: drivers/eaton-ats16-mib.c: initialize - all fields of info_lkp_t arrays - * drivers/huawei-mib.c: drivers/huawei-mib.c: initialize all fields - of mib2nut_info_t array - * drivers/huawei-mib.c: drivers/huawei-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/hpe-pdu-mib.c: drivers/hpe-pdu-mib.c: initialize all fields - of mib2nut_info_t array - * drivers/hpe-pdu-mib.c: drivers/hpe-pdu-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/eaton-ats30-mib.c: drivers/eaton-ats30-mib.c: initialize - all fields of mib2nut_info_t array - * drivers/eaton-ats30-mib.c: drivers/eaton-ats30-mib.c: initialize - all fields of info_lkp_t arrays - * drivers/delta_ups-mib.c: drivers/delta_ups-mib.c: initialize all - fields of mib2nut_info_t array - * drivers/delta_ups-mib.c: drivers/delta_ups-mib.c: initialize all - fields of info_lkp_t arrays - * drivers/cyberpower-mib.c: drivers/cyberpower-mib.c: initialize all - fields of mib2nut_info_t array - * drivers/cyberpower-mib.c: drivers/cyberpower-mib.c: initialize all - fields of info_lkp_t arrays - * drivers/bestpower-mib.c: drivers/bestpower-mib.c: initialize all - fields of mib2nut_info_t array - * drivers/bestpower-mib.c: drivers/bestpower-mib.c: initialize all - fields of info_lkp_t arrays - * drivers/xppc-mib.c: drivers/xppc-mib.c: initialize all fields of - info_lkp_t arrays, and end sentinel entries to close them off - * docs/developers.txt, docs/nut.dict: Satisfy the spellchecker - * drivers/xppc-mib.c: drivers/xppc-mib.c: initialize all fields of - mib2nut_info_t array - * drivers/raritan-pdu-mib.c: drivers/raritan-pdu-mib.c: initialize - all fields of mib2nut_info_t array - * drivers/raritan-px2-mib.c: drivers/raritan-px2-mib.c: initialize - all fields of mib2nut_info_t array - * drivers/raritan-px2-mib.c: drivers/raritan-px2-mib.c: fix - indentations - * drivers/raritan-px2-mib.c: drivers/raritan-px2-mib.c: initialize - all fields of info_lkp_t arrays, and fix indentations in the table - * drivers/raritan-pdu-mib.c: drivers/raritan-pdu-mib.c: initialize - all fields of info_lkp_t arrays - * drivers/powerware-mib.c: drivers/powerware-mib.c: initialize all - fields of info_lkp_t arrays - * drivers/netvision-mib.c: drivers/netvision-mib.c: initialize all - fields of mib2nut_info_t array - * drivers/netvision-mib.c: drivers/netvision-mib.c: initialize all - fields of info_lkp_t arrays - * drivers/mge-mib.c: drivers/mge-mib.c: initialize all fields of - mib2nut_info_t array - * drivers/mge-mib.c: drivers/mge-mib.c: initialize all fields of - info_lkp_t arrays - * drivers/ietf-mib.c: drivers/ietf-mib.c: initialize all fields of - mib2nut_info_t arrays - * drivers/ietf-mib.c: drivers/ietf-mib.c: initialize all fields of - info_lkp_t arrays - * drivers/emerson-avocent-pdu-mib.c: drivers/emerson-avocent-pdu- - mib.c: initialize all fields of info_lkp_t arrays - * drivers/emerson-avocent-pdu-mib.c: drivers/emerson-avocent-pdu- - mib.c: initialize all fields of mib2nut_info_t array - * drivers/eaton-pdu-revelation-mib.c: drivers/eaton-pdu-revelation- - mib.c: initialize all fields of mib2nut_info_t array - * drivers/eaton-pdu-revelation-mib.c: drivers/eaton-pdu-revelation- - mib.c: initialize all fields of info_lkp_t arrays - * drivers/eaton-pdu-pulizzi-mib.c: drivers/eaton-pdu-pulizzi-mib.c: - initialize all fields of mib2nut_info_t array - * drivers/eaton-pdu-pulizzi-mib.c: drivers/eaton-pdu-pulizzi-mib.c: - initialize all fields of info_lkp_t arrays - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - initialize all fields of mib2nut_info_t array - * drivers/eaton-pdu-marlin-mib.c: drivers/eaton-pdu-marlin-mib.c: - initialize all fields of info_lkp_t arrays - * drivers/eaton-pdu-genesis2-mib.c: drivers/eaton-pdu-genesis2-mib.c: - initialize all fields of mib2nut_info_t array - * drivers/compaq-mib.c: drivers/compaq-mib.c: initialize all fields - of mib2nut_info_t array - * drivers/compaq-mib.c: drivers/compaq-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/baytech-mib.c: drivers/baytech-mib.c: initialize all fields - of mib2nut_info_t array - * drivers/baytech-mib.c: drivers/baytech-mib.c: initialize all fields - of info_lkp_t arrays - * drivers/apc-mib.c: drivers/apc-mib.c: initialize all fields of - mib2nut_info_t array (and comment concern whether the addition was - right?) - * drivers/apc-mib.c: drivers/apc-mib.c: replace verbatim OID string - we seek with a macro APC_UPS_DEVICE_MODEL like elsewhere - * drivers/apc-mib.c: drivers/apc-mib.c: initialize all fields of - info_lkp_t arrays - -2020-11-06 Jim Klimov - - * drivers/apcsmart_tabs.c: drivers/apcsmart_tabs.c: initialize all - fields of upsdrv_info_t array - * drivers/apcsmart_tabs.c: drivers/apcsmart_tabs.c: initialize all - fields of apc_vartab_t arrays - * tools/nut-scanner/nutscan-serial.c: tools/nut-scanner/nutscan- - serial.c: initialize all fields of device_portname_t arrays - * drivers/upscode2.c: drivers/upscode2.c: initialize all fields of - cmd_t and simple_t arrays - -2020-11-05 Jim Klimov - - * drivers/optiups.c: drivers/optiups.c: initialize all fields of - ezfill_t tables - * drivers/mge-hid.c: drivers/mge-hid.c: update arrays of info_lkp_t - with fourth (nuf) field and comment where a real nuf() might be - useful - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: update arrays of - info_lkp_t with fourth (nuf) field and comment where a real nuf() - might be useful - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: update arrays of - info_lkp_t with fourth (nuf) field - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: update HIDDevice_t - object with missing initializer for bcdDevice - * drivers/mge-hid.c: drivers/mge-utalk.c: update arrays of info_lkp_t - with fourth (nuf) field - * drivers/gamatronic.h: drivers/gamatronic.h: initialize the "value" - field in the struct array - * drivers/gamatronic.h: drivers/gamatronic.h: avoid anonymous struct - -2020-11-04 Jim Klimov - - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix info_lkp_t arrays to - consider fourth "nuf" field - -2020-11-08 Jim Klimov - - * drivers/mge-xml.c: drivers/mge-xml.c: avoid implicit switch fall- - through (comment whether that wondering is the right thing to do - though) - -2020-11-06 Jim Klimov - - * drivers/upscode2.c: drivers/upscode2.c: comment the fallthrough in - upsc_simple() switch, so far consider it explicitly desired as it - was before - * drivers/isbmex.c: drivers/isbmex.c: replace FALLTHRU comments with - more portable and reliable goto jumps - -2020-11-05 Jim Klimov - - * drivers/isbmex.c: drivers/isbmex.c: upsdrv_updateinfo(): fix - switch/break - -2020-11-08 Jim Klimov - - * drivers/blazer_usb.c: drivers/blazer_usb.c: avoid implicit switch - fall-through - * drivers/riello_usb.c: drivers/riello_usb.c: avoid implicit switch - fall-through - * drivers/tripplite_usb.c: drivers/tripplite_usb.c: avoid implicit - switch fall-through - -2020-11-06 Jim Klimov - - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - explicit fall through to displaying help - * drivers/nutdrv_qx.c: drivers/nutdrv_qx.c: qx_command(): explicit - fall through the switch - * drivers/mge-hid.c: drivers/mge-hid.c: replace FALLTHRU comments - with same returns as the next default case - -2020-11-05 Jim Klimov - - * drivers/mge-hid.c: drivers/mge-hid.c: quiesce -Wimplicit- - fallthrough=3 warnings about fall-through in switch - -2020-11-06 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: replace FALLTHRU - comments with more portable and reliable goto jumps - -2020-11-05 Jim Klimov - - * drivers/usbhid-ups.c: drivers/usbhid-ups.c: quiesce -Wimplicit- - fallthrough=3 warnings about fall-through in switch - -2020-11-06 Jim Klimov - - * clients/upsc.c: clients/upsc.c: replace FALLTHRU comments with more - portable and reliable goto jumps - -2020-11-04 Jim Klimov - - * clients/upsc.c: clients/upsc.c: quiesce -Wimplicit-fallthrough=3 - warnings about fall-through in switch - -2020-11-06 Jim Klimov - - * common/snprintf.c: common/snprintf.c: replace FALLTHRU comments - with more portable and reliable goto jumps - -2020-11-04 Jim Klimov - - * common/snprintf.c: common/snprintf.c: quiesce -Wimplicit- - fallthrough=3 warnings about fall-through in switch - -2020-11-08 Jim Klimov - - * ci_build.sh: ci_build.sh: refactor to track failing "default-all- - errors" so we can extend it to "configure_nut()" and - "build_to_only_catch_errors()" more variants - * ci_build.sh: ci_build.sh: refactor to have a - build_to_only_catch_errors() routine - * ci_build.sh: ci_build.sh: refactor to have a configure_nut() - routine - * docs/developers.txt: docs/developers.txt: document a valid use-case - of goto for clean switch-case fall-through - -2020-11-04 Jim Klimov - - * include/common.h: include/common.h: introduce NUT_UNUSED* macros to - mark up codebase - -2020-11-05 Jim Klimov - - * .travis.yml: .travis.yml: in NUT_MATRIX test cases, specify - -Werror=implicit-fallthrough=3 to let special comments quiesce the - warning where a FALLTHRU is intentional - * .travis.yml: .travis.yml: in clang test cases, do not insist that - all macros are used, or we can not pass even autoconf - -2020-11-04 Jim Klimov - - * .travis.yml: .travis.yml : enable "-Wextra -Weverything" for clang - (follow-up to issue #823) - * .travis.yml: .travis.yml : enable "-Wextra" for newer gcc versions - on Linux (follow-up to issue #823) - * .travis.yml: .travis.yml : enable "-Wextra" for default gcc - versions on Linux (follow-up to issue #823) - * configure.ac: configure.ac: revise the fix for AC_PROG_LIBTOOL to - only revert settings already passed to the compiler (that older - releases may not understand if we just force them) - * configure.ac: configure.ac : work around libtool weakness seen by - pedantic compilers (did not test for "${CLANG}" so drop it for now) - * configure.ac: configure.ac : work around libtool weakness seen by - pedantic compilers - * ci_build.sh: ci_build.sh: do not hide autogen.sh stderr - * ci_build.sh: ci_build.sh: if configure failed, sleep a bit before - dumping config.log - -2020-11-03 Jim Klimov - - * ci_build.sh: ci_build.sh : if configure script fails, dump its log - before exiting - * .travis.yml: .travis.yml : rephrase some comments - * .travis.yml: .travis.yml : separate the "_matrix_gnustd_nowarn" - * .travis.yml: Issue #823 follow-up: support branches named like - "fightwarn" to build more test cases in Travis CI (actually enable - those build matrices) - * .travis.yml: Issue #823 follow-up: support branches named like - "fightwarn" to build more test cases in Travis CI - -2020-11-07 Jim Klimov - - * drivers/eaton-ats16-mib.c: Update eaton-ats16-mib.c Reworded the - comments - * drivers/nutdrv_qx.c: Update nutdrv_qx.c drivers/nutdrv_qx.c: - rectify indentations - * drivers/tripplite_usb.c: Update tripplite_usb.c - drivers/tripplite_usb.c: drop trailing whitespace - * docs/acknowledgements.txt: Update acknowledgements.txt Acknowledge - a vendor contribution from EVER Power Systems - * drivers/ever-hid.c: Update ever-hid.c Small whitespace fixes - * docs/acknowledgements.txt: Update acknowledgements.txt Add vendor - contribution from AMETEK Powervar for UPM series - * drivers/liebert-hid.c: Update liebert-hid.c Minor whitespace fixes - -2020-11-06 Jim Klimov - - * configure.ac: configure.ac: drop trailing whitespace - * tools/nut-usbinfo.pl: tools/nut-usbinfo.pl: drop trailing - whitespace - * tools/nut-recorder.sh: tools/nut-recorder.sh: drop trailing - whitespace - * tools/nut-ddl-dump.sh: tools/nut-ddl-dump.sh: drop trailing - whitespace - * tests/nutclienttest.cpp: tests/nutclienttest.cpp: drop trailing - whitespace - * server/user.c: server/user.c: drop trailing whitespace - * server/upstype.h: server/upstype.h: drop trailing whitespace - * server/sstate.c: server/sstate.c: drop trailing whitespace - * server/sockdebug.c: server/sockdebug.c: drop trailing whitespace - * server/netlist.c: server/netlist.c: drop trailing whitespace - * server/netinstcmd.c: server/netinstcmd.c: drop trailing whitespace - * server/netget.c: server/netget.c: drop trailing whitespace - * server/conf.c: server/conf.c: drop trailing whitespace - * common/upsconf.c: common/upsconf.c: drop trailing whitespace - * common/state.c: common/state.c: drop trailing whitespace - * common/setenv.c: common/setenv.c: drop trailing whitespace - * common/parseconf.c: common/parseconf.c: drop trailing whitespace - * clients/upsmon.h: clients/upsmon.h: drop trailing whitespace - * clients/upsimagearg.h: clients/upsimagearg.h: rectify whitespace - * clients/upsclient.h: clients/upsclient.h: drop trailing whitespace - * clients/nutclient.cpp, clients/nutclient.h: - clients/nutclient.{cpp,h}: drop trailing whitespace - * clients/cgilib.c: clients/cgilib.c: drop trailing whitespace - * drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c: - drivers/nut-*ipmi**.{c,h}: drop trailing whitespace - * drivers/netxml-ups.c, drivers/netxml-ups.h: drivers/netxml- - ups.{c,h}: drop trailing whitespace - * drivers/mge-utalk.h, drivers/mge-xml.c, drivers/mge-xml.h: - drivers/mge*.{c,h}: drop trailing whitespace - * drivers/main.h: drivers/main.h: drop trailing whitespace - * drivers/main.c: Drop exec bit from source file - * drivers/liebert-hid.h, drivers/liebert.c: drivers/liebert*: drop - trailing whitespace - * drivers/libhid.c: drivers/libhid.h: drop trailing whitespace - * drivers/idowell-hid.c: drivers/idowell-hid.h: drop trailing - whitespace - * drivers/hidtypes.h: drivers/hidtypes.h: drop trailing whitespace - * drivers/genericups.h: drivers/genericups.h: drop trailing - whitespace - * drivers/everups.c: drivers/everups.c: drop trailing whitespace - * drivers/eaton-pdu-pulizzi-mib.c: drivers/eaton-pdu-pulizzi-mib.c: - drop trailing whitespace - * drivers/dummy-ups.h: drivers/dummy-ups.h: drop trailing whitespace - * drivers/dstate.c: drivers/dstate.c: drop trailing whitespace - * drivers/delta_ups-mib.c: drivers/delta_ups-mib.c: drop trailing - whitespace - * drivers/cyberpower-mib.c: drivers/cyberpower-mib.c: drop trailing - whitespace - * drivers/blazer.c, drivers/blazer_usb.c: drivers/blazer*.{c,h}: drop - trailing whitespace - * drivers/bestuferrups.c: drivers/bestuferrups.c: rectify - indentations - * drivers/bestuferrups.c: drivers/bestuferrups.c: drop trailing - whitespace - * drivers/belkin-hid.c, drivers/belkin-hid.h: drivers/belkin*.{c,h}: - drop trailing whitespace - * drivers/bcmxcp_io.h, drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c: - drivers/bcmxcp*.{c,h}: drop trailing whitespace - * drivers/baytech-mib.c: drivers/baytech-mib.c: drop trailing - whitespace - * drivers/apc-mib.c: drivers/apc-mib.c: drop trailing whitespace - * drivers/apc-hid.c, drivers/apc-hid.h: drivers/apc-hid.{c,h}: drop - trailing whitespace - * drivers/xppc-mib.c: drivers/xppc-mib.h: drop trailing whitespace - * drivers/tripplite-hid.h: drivers/tripplite-hid.h: drop trailing - whitespace - * drivers/snmp-ups.h: drivers/snmp-ups.h: drop trailing whitespace - * drivers/skel.c: drivers/skel.c: drop trailing whitespace - * drivers/richcomm_usb.c: drivers/richcomm_usb.c: drop trailing - whitespace - * drivers/powerware-mib.c: drivers/powerware-mib.c: drop trailing - whitespace - * drivers/openups-hid.c: drivers/openups-hid.c: drop trailing - whitespace - * drivers/oneac.c, drivers/oneac.h: drivers/oneac.{c,h}: drop - trailing whitespace - * drivers/nutdrv_atcl_usb.c: drivers/nutdrv_atcl_usb.c: drop trailing - whitespace - * drivers/riello.c, drivers/riello_ser.c, drivers/riello_usb.c: - drivers/riello*.{c,h}: drop trailing whitespaces - * drivers/apcsmart-old.c, drivers/apcsmart-old.h: drivers/apcsmart- - old.{c,h}: drop trailing whitespaces - * tools/nut-scanner/nut-scanner.c: tools/nut-scanner/nut-scanner.c: - fix whitespaces - * tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-ip.c, - tools/nut-scanner/nutscan-ip.h, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_ipmi.c, tools/nut-scanner/scan_usb.c: tools/nut- - scanner/*.{c,h}: drop trailing whitespaces - * server/netmisc.c: server/netmisc.c: drop trailing whitespaces - * server/netssl.c: server/netssl.c: drop trailing whitespaces - * server/upsd.c: server/upsd.c: drop trailing whitespaces - * drivers/ivtscd.c: drivers/ivtscd.c: drop trailing whitespaces - * drivers/powerp-bin.h, drivers/powerp-txt.h, drivers/powerpanel.c, - drivers/powerpanel.h: drivers/powerp*.{c,h}: drop trailing - whitespaces - * drivers/powerp-txt.c: drivers/powerp-txt.c: drop trailing - whitespaces - * drivers/powerp-bin.c: drivers/powerp-bin.c: drop trailing - whitespaces - * drivers/victronups.c: drivers/victronups.c: rectify whitespace - * drivers/upscode2.c: drivers/upscode2.c: rectify whitespace - -2020-11-05 Jim Klimov - - * drivers/tripplitesu.c: drivers/tripplitesu.c: drop trailing - whitespaces - * drivers/solis.c, drivers/solis.h: drivers/solis.{c,h}: rectify - whitespaces - * drivers/safenet.c: drivers/safenet.c: drop trailing whitespaces - * drivers/rhino.c: drivers/rhino.c: normalize whitespace heavily - * drivers/powercom.c: drivers/powercom.c: rectify leading whitespaces - * drivers/powercom.c: drivers/powercom.c: drop trailing whitespaces - * drivers/powercom.h: drivers/powercom.h: drop trailing whitespaces - * drivers/optiups.c: drivers/optiups.c: rectify whitespaces - * drivers/hidparser.c: drivers/hidparser.c: drop trailing whitespaces - * drivers/usb-common.c: drivers/usb-common.c: drop trailing - whitespaces - * drivers/libshut.h, drivers/libusb.h, drivers/usb-common.h: - drivers/libshut.h libusb.h usb-common.h: drop trailing whitespaces - * drivers/libshut.c: drivers/libshut.c: rectify whitespaces per style - guide - * drivers/mge-utalk.c: drivers/mge-utalk.c: drop trailing whitespaces - * drivers/metasys.c: drivers/metasys.c: drop trailing whitespaces - * drivers/masterguard.c: drivers/masterguard.c: rectify whitespaces - and drop comments opposing the project style guide - * drivers/masterguard.c: drivers/masterguard.c: drop trailing - whitespaces - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: rectify whitespaces - * drivers/liebert-esp2.c: drivers/liebert-esp2.c: drop trailing - whitespaces - * drivers/isbmex.c: drivers/isbmex.c: rectify whitespaces - * drivers/isbmex.c: drivers/isbmex.c: drop trailing whitespaces - * drivers/gamatronic.h: drivers/gamatronic.h: rectify whitespaces - * drivers/dummy-ups.c: drivers/dummy-ups.c: drop trailing whitespaces - * drivers/bestups.c: drivers/bestups.c: drop trailing whitespaces - * drivers/bestfortress.c: drivers/bestfortress.c: rectify whitespaces - * drivers/bestfcom.c: drivers/bestfcom.c: rectify whitespaces - * drivers/belkinunv.c: drivers/belkin.c: rectify whitespaces - * drivers/belkin.c: drivers/belkin.c: drop trailing whitespaces - * drivers/bcmxcp.c: drivers/bcmxcp.c: fix leading whitespaces - -2020-11-04 Jim Klimov - - * drivers/bcmxcp.c: drivers/bcmxcp.c: drop trailing whitespaces - * drivers/bcmxcp.h: drivers/bcmxcp.h: drop trailing whitespaces - * drivers/serial.c: drivers/serial.c: drop trailing whitespaces - * clients/upssched.c: clients/upssched.c: drop trailing whitespaces - * clients/upsmon.c: clients/upsmon.c: drop trailing whitespaces - * clients/upsset.c: clients/upsset.c: drop trailing whitespaces - * clients/upsimage.c: clients/upsimage.c: drop indented whitespaces - * clients/upsstats.c: clients/upsstats.c: drop trailing whitespaces - * clients/upslog.c: clients/upslog.c: drop trailing whitespaces - * clients/upsc.c: clients/upsc.c: drop trailing whitespaces - * clients/upsclient.c: clients/upsclient.c: drop trailing whitespaces - * common/snprintf.c: common/snprintf.c: rectify whitespace - -2020-11-06 amccartney - - * drivers/powervar-hid.c: Final clean up and edits for Powervar UPM - support - -2020-11-04 Jim Klimov - - * configure.ac: Fix issue #833 for (sys/)termios.h on BSD ...And - generally check if we CAN build serial drivers before trying to - (and/or guessing if we should try). - -2020-11-04 Jim Klimov - - * drivers/solis.c: Update solis.c Drop temporary unicode comment for - PR - * drivers/nutdrv_qx_voltronic.c: Update nutdrv_qx_voltronic.c Drop - temporary comment with unicode for PR - -2020-11-03 Eric Clappier - - * drivers/eaton-ats16-mib.c: Apply patch "Nut-scanner fix for - discovery ats16 with legacy NMC and newer Network-M2" - -2020-10-26 Arnaud Quette - - * drivers/eaton-pdu-marlin-mib.c: snmp-ups: fix outlet ID on Eaton - ePDU Tie outlet ID to a real OID, to avoid erroneous indexes (-1, - 0) - * docs/nut-names.txt, drivers/eaton-pdu-marlin-mib.c: snmp-ups: fix - Eaton ePDU switch ability Expose a general switchability of the - unit, using outlet.switchability, along with a more suitable per- - outlet mechanism - -2020-10-25 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am : @echo diagnostic - messages without a trace by default - -2020-10-22 Arnaud Quette - - * drivers/main.c: Fix dstate init call WRT data dump Closes: - https://github.com/networkupstools/nut/issues/835 - -2020-10-15 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am : in check-man-* - targets, count the checked files (to see better the cases where - none were available) - * docs/man/Makefile.am: docs/man/Makefile.am : typo fix ">&@" => - ">&2" for stderr - -2020-10-13 Jim Klimov - - * .travis.yml: .travis.yml (#823) : in default builds, disable - whatever is not in "_matrix_required" - * .travis.yml: .travis.yml (#823) : define a _matrix_linux and - _matrix_all groupings - * .travis.yml: .travis.yml (#823) : clarify the distro-dependent - relations of matrix jobs as required and allowfail per distro - -2020-10-12 Jim Klimov - - * docs/man/usbhid-ups.txt: Update usbhid-ups.txt Rearranged lines to - keep "all" block together, and finish the list item with a comma - without much context change ;) - * docs/nut.dict: Update nut.dict for PR #733 Add new product name - and vendor keywords - -2020-10-12 Jim Klimov - - * docs/acknowledgements.txt: docs/acknowledgements.txt: revise the - last paragraph for listing corporate contributors - -2020-10-12 amccartney - - * docs/man/usbhid-ups.txt, drivers/powervar-hid.c: Changes per NUT - review comments. Removed info fields from polling. Added - company/contributor info. Updated docs/man/usbhid-ups.txt - -2020-10-12 Jim Klimov - - * docs/nutdrv_qx-subdrivers.txt: docs/nutdrv_qx-subdrivers.txt: - revise a few typos - * docs/configure.txt: docs/configure.txt: update for gdlib pkg-config - support (follow-up to #809) - * docs/configure.txt: docs/configure.txt: update for gdlib pkg-config - support (follow-up to #809) - -2020-10-12 Jim Klimov - - * configure.ac: Update configure.ac Whitespace mess - -2020-10-12 Jim Klimov - - * docs/man/upsd.conf.txt: docs/man/upsd.conf.txt: mention that - ALLOW_NO_DEVICE envvar (e.g. from nut.conf) can override the - setting in upsd.conf - * conf/nut.conf.sample: conf/nut.conf.sample: fix ALLOW_NO_DEVICE - example to "export" it on a separate line - -2020-10-12 Jim Klimov - - * .travis.yml: .travis.yml (#823) : win bash has no time - -2020-10-12 Konstantin Gizdov - - * drivers/usbhid-ups.c: address some comments - -2020-10-12 Jim Klimov - - * .travis.yml: ci_build.sh (#823) : add gnu99-clang-win-nowarn - * ci_build.sh: ci_build.sh (#823) : only call dpkg on linux - * ci_build.sh: ci_build.sh (#823) : investigate win autogen - * .travis.yml: .travis.yml (#823) : fix delivery of ccache to win - builds - -2020-10-11 Jim Klimov - - * .travis.yml: .travis.yml (#823) : do not cache /usr/local/Cellar on - osx, it is too big and rejected anyway - * .travis.yml: .travis.yml (#823, #828) : extend matrix for osx - builds with -std=gnu* variants that seem to pass - * .travis.yml: .travis.yml (#823) : for osx builds, avoid "brew - update" by default, that since 2.0.0 release involves cleanup - automagically and takes a needless 15-30 minutes hit on a Travis - worker When desired we can set HOMEBREW_NO_AUTO_UPDATE - customizable per run - * .travis.yml: .travis.yml (#823) : for osx builds, add ccache; and - only bother for asciidoc + docbook-xsl if building docs - * .travis.yml: .travis.yml (#823) : cache locations related to Brew - between runs - * .travis.yml: .travis.yml (#823) : for now, enable CI_TRACE on Win - always (to find where ci_build.sh script dies) - * .travis.yml: .travis.yml : set jobs.fast_finish:true - -2020-10-10 Jim Klimov - - * .travis.yml: .travis.yml (#823) : group tests into YAML _matrix-* - lists to pick some easier for particular runs on dev branches - * .travis.yml: .travis.yml (#823) : xcode6.4 is deprecated on Travis, - try a newer oldest alternative (7.3) - * .travis.yml: .travis.yml (#823) : add c99-clang-xcode10.2-warn - * .travis.yml: .travis.yml (#823) : reorder some allowed_failure - tests to group logically - * .travis.yml: .travis.yml (#823) : drop gnu14-gcc-8-nowarn (no C14), - add gnu17-clang-8-nowarn - * .travis.yml: .travis.yml (#823) : drop gnu14 and gnu17 attempts - with gcc-7; try gnu14 with gcc-8 - * .travis.yml: .travis.yml (#823) : mark gnu17-gcc-9-nowarn as OK - * ci_build.sh: .travis.yml (#823) : give up on gdlib (--with-cgi) on - win for now - * .travis.yml: .travis.yml (#823) : add a few MacOS X and - Windows+clang9 build combos for diversity - * .travis.yml: .travis.yml (#823) : add more compilers and standards - to try, to collect max diags: c17-clang-8-warn gnu17-gcc-9-warn - * .travis.yml: .travis.yml (#823) : add more compilers and standards - to try : gnu14-gcc-7-nowarn gnu17-gcc-7-nowarn gnu17-gcc-9-nowarn - c99-clang-3.5-nowarn c17-clang-8-nowarn - * .travis.yml: .travis.yml (#823) : specify "compiler" in our - handmade matrix to hint to Travis which env we want - * .travis.yml: .travis.yml (#823) : comment the reference of C/C++ - standard support by gcc and clang versions used - * .travis.yml: .travis.yml : reshuffle default required builds order - to have the quicker ones more likely to fail in development - iterations to run first - * .travis.yml: .travis.yml : move BUILD_TYPE=default and - BUILD_TYPE=default-tgt:distcheck-light into common stack for - manageability - * .travis.yml: .travis.yml: declare linux "dist" that we want by - default - * ci_build.sh: ci_build.sh: handle runs with unspecified BUILD_TYPE - * ci_build.sh: ci_build.sh: report if PATH includes ccache, and if CC - and CXX understand passed C(XX)FLAGS - * ci_build.sh: ci_build.sh: report values of PATH, CC and CXX (and - versions of the latter) before adding CCACHE into the mix - -2020-10-09 Konstantin Gizdov - - * drivers/usbhid-ups.c: more compact logic - * drivers/usbhid-ups.c: remove leftover lines - * drivers/usbhid-ups.c: lay the groundwork for CyberPower UT - cputquirk - * drivers/usbhid-ups.c: fix indentation style - -2017-10-03 Arnaud Quette - - * docs/configure.txt: Remove an extraneous point - * docs/configure.txt: Update configure documentation for libusb - Document the possibility to override the auto-detection choice, - even though the implementation of this override is not yet - currently working - -2020-10-09 Jim Klimov - - * docs/developers.txt: docs/developers.txt : document coding style - examples for tabs vs spaces - * docs/developers.txt: docs/developers.txt : document a "for loop - initial declarations are only allowed in C99 or C11 mode" - portability offense - * docs/developers.txt: docs/developers.txt : document the official - C99+ standard support and that we have CI to help make sure what is - upheld - * .travis.yml: .travis.yml : update comment for the NUT_MATRIX_TAG - block of tests - * .travis.yml: .travis.yml : fix comment-naming for cDefault-gcc- - default-nowarn/gnu99-gcc-default-nowarn primary not-failing case to - keep up - * .travis.yml: .travis.yml : mark gnu89-gcc-default-nowarn as a not- - failing case to keep up - * drivers/solis.c: drivers/solis.c : fix C89 for-loop var - declarations - * .travis.yml: .travis.yml : mark gnu11-gcc-7-nowarn - gnu99-clang-5.0-nowarn as not-failing cases to keep up - * .travis.yml: .travis.yml : add gnu89-gcc-default-nowarn to the test - matrix to check if at least the basic syntax is okay (note that - current warnings for C89 seem to indicate faults that may be fatal - in binary code) - * .travis.yml: .travis.yml : mark gnu99-gcc-7-nowarn as a not-failing - case to keep up - * .travis.yml: .travis.yml : add gnu99-clang-5.0-nowarn to the test - matrix (hope clang can do GNU C dialect) - * .travis.yml: .travis.yml : add gnu11-gcc-7-nowarn to the test - matrix - -2020-10-08 Alexey Rodionov - - * .../python/app/locale/ru/LC_MESSAGES/NUT-Monitor.mo, - scripts/python/app/locale/ru/ru.po: Fixed two typos and translation - of the term load - -2020-10-08 Jim Klimov - - * .travis.yml: .travis.yml : add c11-clang-5.0-nowarn and - c11-clang-5.0-warn to the matrix - * .travis.yml: .travis.yml : add gnu99-gcc-7-nowarn - c99-clang-5.0-nowarn to test matrix (expected to be green) - * .travis.yml: .travis.yml : warning comment about multitoken CFLAGS - and distcheck - * ci_build.sh: ci_build.sh : spell case statements in consistent - style - * ci_build.sh: ci_build.sh : define default-all-errors separately - from default-alldrv - -2020-08-08 Sean McBride - - * clients/cgilib.c, clients/nutclient.cpp, clients/upsmon.c, - clients/upsset.c, drivers/al175.c, drivers/apcsmart-old.c, - drivers/asem.c, drivers/bcmxcp.c, drivers/belkinunv.c, - drivers/dstate.c, drivers/gamatronic.c, drivers/isbmex.c, - drivers/mge-utalk.c, drivers/nut-libfreeipmi.c, - drivers/nutdrv_qx_voltronic-qs-hex.c, - drivers/nutdrv_qx_voltronic.c, drivers/oneac.c, drivers/powercom.c, - drivers/rhino.c, drivers/riello_ser.c, drivers/snmp-ups.c, - drivers/solis.c, drivers/tripplite_usb.c, drivers/tripplitesu.c, - server/netssl.c, tools/nut-scanner/scan_nut.c: WIP: Fixed various - warnings and errors identified by cppcheck Specifically: - arrayIndexThenCheck,drivers/nutdrv_qx_voltronic-qs- - hex.c:222,style,Array index 'i' is used before limits check. - arrayIndexThenCheck,drivers/oneac.c:176,style,Array index 'i' is - used before limits check. - clarifyCalculation,drivers/belkinunv.c:1063,style,Clarify - calculation precedence for '&' and '?'. - clarifyCalculation,drivers/belkinunv.c:922,style,Clarify - calculation precedence for '&' and '?'. - clarifyCalculation,drivers/powercom.c:677,style,Clarify calculation - precedence for '&' and '?'. - clarifyCalculation,drivers/powercom.c:732,style,Clarify calculation - precedence for '&' and '?'. - clarifyCondition,drivers/asem.c:248,style,Boolean result is used in - bitwise operation. Clarify expression with parentheses. - duplicateConditionalAssign,drivers/solis.c:725,style,The statement - 'if (DaysOnWeek!=DaysOffWeek) DaysOnWeek=DaysOffWeek' is logically - equivalent to 'DaysOnWeek=DaysOffWeek'. - duplicateExpression,clients/cgilib.c:49,style,Same expression on - both sides of '||'. - duplicateExpression,drivers/nutdrv_qx_voltronic.c:270,style,Same - expression on both sides of '||'. - duplicateExpression,drivers/nutdrv_qx_voltronic.c:303,style,Same - expression on both sides of '||'. - duplicateExpression,drivers/nutdrv_qx_voltronic.c:397,style,Same - expression on both sides of '||'. identicalInnerCondition,drivers/t - ripplite_usb.c:579,warning,Identical inner 'if' condition is always - true. incorrectLogicOperator,drivers/dstate.c:1170,warning,Logical - conjunction always evaluates to false: c2 && !c2. - incorrectLogicOperator,drivers/rhino.c:190,warning,Logical - disjunction always evaluates to true: BattVoltage > 129 || - BattVoltage < 144. incorrectStringBooleanError,drivers/mge- - utalk.c:899,warning,Conversion of string literal "\r\n" to bool - always evaluates to true. - invalidPrintfArgType_sint,clients/upsset.c:393,warning,%d in format - string (no. 1) requires 'int' but the argument type is 'unsigned - int'. invalidPrintfArgType_sint,clients/upsset.c:676,warning,%d in - format string (no. 1) requires 'int' but the argument type is - 'unsigned int'. - invalidPrintfArgType_sint,drivers/isbmex.c:178,portability,%d in - format string (no. 1) requires 'int' but the argument type is - 'ssize_t {aka signed long}'. - invalidPrintfArgType_sint,drivers/tripplitesu.c:435,warning,%d in - format string (no. 1) requires 'int' but the argument type is - 'unsigned int'. - knownConditionTrueFalse,clients/upsmon.c:919,style,Condition 'un' - is always true - knownConditionTrueFalse,drivers/gamatronic.c:111,style,Condition - 'ret>=0' is always true - knownConditionTrueFalse,drivers/powercom.c:696,style,Condition - 'battval>bat0' is always true - knownConditionTrueFalse,drivers/solis.c:485,style,Condition - 'AppPower==0' is always false knownConditionTrueFalse,tools/nut- - scanner/scan_nut.c:180,style,Condition 'numa>=3' is always true - memleak,clients/upsset.c:664,error,Memory leak: val - nullPointerRedundantCheck,drivers/snmp-ups.c:1554,warning,Either - the condition 'info_template==NULL' is redundant or there is - possible null pointer dereference: info_template. - pointerLessThanZero,drivers/nut-libfreeipmi.c:864,style,A pointer - can not be negative so it is either pointless or an error to check - if it is. pointerLessThanZero,drivers/nut-libfreeipmi.c:884,style,A - pointer can not be negative so it is either pointless or an error - to check if it is. - postfixOperator,clients/nutclient.cpp:896,performance,Prefer prefix - ++/-- operators for non-primitive types. - redundantInitialization,drivers/al175.c:548,style,Redundant - initialization for 'reply'. The initialized value is overwritten - before it is read. - uninitMemberVar,clients/nutclient.cpp:504,warning,Member variable - 'TcpClient::_timeout' is not initialized in the constructor. - uninitMemberVar,clients/nutclient.cpp:513,warning,Member variable - 'TcpClient::_timeout' is not initialized in the constructor. - uninitvar,server/netssl.c:546,error,Uninitialized variable: ret - unsignedLessThanZero,drivers/apcsmart-old.c:928,style,Checking if - unsigned expression 'sdtype' is less than zero. - unsignedPositive,drivers/bcmxcp.c:785,style,Unsigned expression - 'commandByte' can't be negative so it is unnecessary to test it. - uselessAssignmentPtrArg,drivers/riello_ser.c:105,warning,Assignment - of function parameter has no effect outside the function. Did you - forget dereferencing it? - -2020-10-08 Jim Klimov - - * ci_build.sh: ci_build.sh : revise multi-token CONFIG_OPTS entries - * .travis.yml, ci_build.sh: .travis.yml / ci_build.sh : define a - BUILD_TYPE=default-all-errors specifically to list all files with - errors fatal for current build config (but not list whatever - succeds) - * ci_build.sh: ci_build.sh : allow to stack multi-token CC="ccache - clang" and such - * ci_build.sh: ci_build.sh : recognize is_clang() for ccache wrapping - * ci_build.sh: ci_build.sh : recognize is_clang() - * .travis.yml, ci_build.sh: Issue #823 : Set up Travis CI testing for - more compiler implementations and C/C++ standards - * ci_build.sh: ci_build.sh : fix a few historic typos - * ci_build.sh: ci_build.sh: make sure we build all possible binaries - in default-alldrv mode - -2020-10-08 Alexey Rodionov - - * .../app/locale/ru/LC_MESSAGES/NUT-Monitor.mo, - scripts/python/app/locale/ru/ru.po: Additional corrections of the - Russian translation - * .../app/locale/ru/LC_MESSAGES/NUT-Monitor.mo, - scripts/python/app/locale/ru/ru.po: Fixed typos, made changes - according to comments - -2020-10-08 Jim Klimov - - * drivers/Makefile.am: drivers/Makefile.am : drop redundant - pijuice_SOURCES listed in wrong section - -2020-10-07 Jim Klimov - - * docs/man/snmp-ups.txt, docs/nut.dict: Update snmp-ups manpage for - symmetrathreephase quirk to complete PR #788 - -2020-10-07 Jim Klimov - - * drivers/snmp-ups.c: Update snmp-ups.c Fixed indentation for - multiline if-clause - -2020-10-07 Jim Klimov - - * docs/man/Makefile.am, docs/man/index.txt, docs/man/pijuice.txt, - docs/nut.dict: Add initial manpage for pijuice driver, hastily - ripped off one for asem driver - * drivers/pijuice.c: pijuice.c cleanup : rectify leading indentations - * drivers/pijuice.c: pijuice.c cleanup : rectify tabulation of - definitions - * drivers/pijuice.c: pijuice.c cleanup : comment end of big block of - nested #if macros - * drivers/pijuice.c: pijuice.c cleanup : rectify indentation and - blank-line the default return - * drivers/pijuice.c: pijuice.c cleanup : indent stacked #if* macros - * drivers/pijuice.c: pijuice.c cleanup : trailing whitespaces - -2020-10-07 Jim Klimov - - * clients/upsmon.c: Update upsmon.c Log a warning if an UPS is both - OB+LB+Calibrating so due to this combo we do not tell the host to - shut down gracefully. Comment some ideas to work around such - situation in a smarter way if we have additional info to know if we - are in a safe environment just calibrating, or a known-unsafe one - with a real outage in progress. - * common/state.c: state.c: state_delinfo(): comment on immutables - For `state_delinfo()` not deleting immutable variables, comment - this near the function and log for runtime hits to help - troubleshooting. - -2020-10-06 Arnaud Quette - - * drivers/main.c: Driver datadump improvements Do not switch to - statepath, nor write pidfile, when using the datadump (-s -d) mode - -2020-09-22 Ross Williams - - * clients/upsmon.c, clients/upsmon.h: Do not shutdown if UPS is - performing calibration Some UPS calibration procedures (e.g. - CyberPower) involve discharging the battery below the LB level, but - we don't want systems to shut down if the UPS is only on battery - because it is calibrating. - -2019-04-01 Ross Williams - - * drivers/cyberpower-mib.c: cyberpower-mib: fix instant command - declarations Had desired OID values in default value field. Also, - default value for SU_TYPE_CMD should be NULL. - -2019-03-29 Ross Williams - - * drivers/cyberpower-mib.c: cyberpower-mib: Add instant commands - -2019-04-01 Ross Williams - - * drivers/cyberpower-mib.c: cyberpower-mib: got delay OID wrong Left - off .0 - * drivers/cyberpower-mib.c: cyberpower-mib: Add delay variables Add - some read/write variables affecting the sleep delay and return - delay. - * drivers/cyberpower-mib.c: cyberpower-mib: fix instant command - declarations Had desired OID values in default value field. Also, - default value for SU_TYPE_CMD should be NULL. - * drivers/cyberpower-mib.c: cyberpower-mib: NUT runtime is seconds - not minutes - * drivers/cyberpower-mib.c: cyberpower-mib: clarify status values - * drivers/cyberpower-mib.c: cyberpower-mib: correct sysOID At least - newer CyberPower management cards report a sysOID of CPS-MIB::ups, - not the base CyberPower enterprise MIB that was previously defined. - -2019-03-29 Ross Williams - - * drivers/cyberpower-mib.c: cyberpower-mib: Add instant commands - * drivers/cyberpower-mib.c: cyberpower-mib: add support for battery - status Reports LB, CAL, and RB flags - -2020-08-12 Konstantin Gizdov - - * drivers/usbhid-ups.c: initial patch that works - -2020-07-29 Fabrice Fontaine - - * m4/nut_check_libgd.m4: nut_check_libgd.m4: try to find gd through - pkg-config gdlib-config has been dropped from version 2.3.0 with h - ttps://github.com/libgd/libgd/commit/d62f608c7c4a814c70d4ba777725e3 - e62d9e2cde - -2020-07-21 Luka Kovačič - - * drivers/delta-hid.c: drivers: delta-hid: Update entry flags - appropriately Update entry flags to use HU_FLAG_QUICK_POLL for - status and alarm variables, HU_FLAG_SEMI_STATIC for variables that - can change on user changes and HU_FLAG_STATIC for variables that - don't need to be updated after init. - -2020-07-02 Luka Kovačič - - * drivers/Makefile.am, drivers/delta-hid.c, drivers/delta-hid.h, - drivers/usbhid-ups.c, scripts/upower/95-upower-hid.rules: drivers: - delta-hid: Add Delta HID subdriver Delta HID subdriver is added to - support Delta RT Series, Single Phase, 1/2/3 kVA UPS devices. The - driver was tested and tweaked on Delta RT 3 kVA UPS. - -2020-07-17 Alexey Rodionov - - * .../app/locale/ru/LC_MESSAGES/NUT-Monitor.mo, - scripts/python/app/locale/ru/ru.po: Add Russian translation for - NUT-Monitor - -2020-07-11 Matt Merhar - - * docs/security.txt: Fix typo in TCP Wrappers documentation - -2020-06-15 Florian Bernd - - * drivers/apcupsd-ups.c: Do not overwrite `poll_interval` in - `apcupsd-ups` This commit removes the hardcoded poll-interval of - 60 seconds and instead only makes sure that the user-defined - interval is greater than a minimum-interval. - * drivers/apcupsd-ups.c, drivers/apcupsd-ups.h: Do not call - `dstate_delinfo()` for LB-condition variables This commit fixes - the `ignorelb` flag for the `apcupsd-ups` driver. Previusly - "battery.charge" and "battery.runtime" was cleared before invoking - `status_commit()` which caused the LB-condition to always be - `false`. - * common/state.c: Respect `ST_FLAG_IMMUTABLE` in `dstate_delinfo()` - -2020-06-11 Eric Zinnikas - - * drivers/cyberpower-mib.c: Support CyberPower RMCARD205 - -2020-06-11 Peter Klein - - * clients/nutclient.cpp, clients/nutclient.h: Remove dynamic - exception specifications from clients/nutclient.cpp These are - invalid in c++17 and must be removed for compatibility with modern - compilers. - -2020-06-02 Jim Klimov - - * drivers/apc-ats-mib.c: apc-ats-mib.c : use a ..._MODEL_NAME macro - and bump version to complete earlier fix - -2020-05-31 Timothy Pearson - - * drivers/snmp-ups.c: Fix long-standing transfer threshold read bug - with APCC 3 phase Symmetra units - -2020-05-14 Arnaud Quette - - * tools/nut-scanner/scan_snmp.c: SNMP scan: check the match dup on - 'mib' instead of 'sysoid' This actually avoids duplication when - multiple sysOIDs are declared for the same MIB - -2020-05-01 gprints - - * drivers/liebert-hid.c: Update liebert-hid.c - -2020-04-28 Arnaud Quette - - * drivers/eaton-ats16-mib.c: snmp-ups: cleanup Eaton ATS16 with new - Network-M2 Duplicate the definition, as a workaround to the bugger - scanner data extraction, and point at the same eaton_ats16 name, - since there is no interest in separating mib2nut entries pointing - at the same MIB mapping - -2020-01-15 Clappier, Eric - - * drivers/ietf-mib.c: Issue corection filter ietf mib (cherry picked - from commit 93a64efbdae28355be60329b651d3c42c7ddedf8) - -2020-04-28 Arnaud Quette - - * tools/nut-snmpinfo.py: Fix Python issue in the SNMP scan extractor - -2020-01-15 Clappier, Eric - - * tools/nut-scanner/scan_snmp.c, tools/nut-snmpinfo.py: Fix nutscan - snmp (cherry picked from commit - bc5a6c218e21c0af454007e2929c084129b6f3ed) - * drivers/apc-ats-mib.c: Issue correction no pointer null at - beginning of the SNMP IDs device table (cherry picked from commit - 9d167892a36bf75d30839e7d4d6b53f037751666) - -2020-04-28 Arnaud Quette - - * drivers/huawei-mib.c: Huawei MIB: add a counter check OID This - avoids getting a false result when trying all OIDs, due to the use - of Net SNMP sysOID (.1.3.6.1.4.1.8072.3.2.10), found in various - implementations - -2016-05-25 Jim Klimov - - * drivers/huawei-mib.c: huawei-mib - renamed lookups to have - "huawei_*" prefix (cherry picked from commit - fd29f32b2837588518ec7bea07f414c2631d5c8f) - -2020-04-21 Jim Klimov - - * scripts/augeas/nutupsdconf.aug.in: nutupsdconf.aug.in: complete the - ALLOW_NO_DEVICE definition - * conf/nut.conf.sample, conf/upsd.conf.sample, - docs/man/upsd.conf.txt, scripts/augeas/nutupsdconf.aug.in, - scripts/augeas/tests/test_nut.aug, server/conf.c, server/upsd.c, - server/upsd.h: Rename NUT_NOCONF_ALLOWED to ALLOW_NO_DEVICE as - suggested in PR comments - * conf/nut.conf.sample: nut.conf.sample: update the comment about - NUT_NOCONF_ALLOWED - * server/upsd.c: upsd.c : CONST char* temp "envvar" as we do not - change the string later - -2020-04-17 Jim Klimov - - * conf/upsd.conf.sample, docs/man/upsd.conf.txt: Re-spell "Boolean" - to satisfy spell-checker - * conf/upsd.conf.sample, docs/man/upsd.conf.txt, - scripts/augeas/nutupsdconf.aug.in, - scripts/augeas/tests/test_nut.aug, server/conf.c, server/upsd.c, - server/upsd.h: Allow to configure NUT_NOCONF_ALLOWED option via - upsd.conf - -2020-04-17 Arnaud Quette - - * drivers/eaton-ats16-mib.c, drivers/eaton-ats16-mib.h, drivers/snmp- - ups.c: snmp-ups: add Eaton ATS16 with new Network-M2 Add support - for Eaton ATS16 using the new Network-M2 communication cards, and - including a fixed sysOID fingerprint - -2020-04-03 Jim Klimov - - * clients/nutclient.cpp: clients/nutclient.cpp: sanity-check - getDevicesVariableValues() called with empty device list - -2020-03-14 Jim Klimov - - * docs/nut.dict: nut.dict : fixes for NUT_NOCONF_ALLOWED addition - * scripts/systemd/nut-driver-enumerator.service.in, - scripts/systemd/nut-driver@.service.in, scripts/systemd/nut- - monitor.service.in, scripts/systemd/nut-server.service.in: SystemD - service units: source EnvironmentFile=...nut.conf if available - * conf/nut.conf.sample: nut.conf.sample : prepare an uncommentable - line for NUT_NOCONF_ALLOWED=true - * server/upsd.c: server/upsd.c: introduce support for envvar - NUT_NOCONF_ALLOWED=true to allow starting with 0 ups.conf sections - -2018-09-19 Arnaud Quette - - * server/upsd.c: upsd should return EXIT_FAILURE when -c failed - -2020-02-19 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in: when autostarting/reloading upsd (nut-server), do - it for previously "failed" unit too - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in: do systemctl daemon-reload between editing a unit - definition and auto-starting it - -2018-12-18 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : centralize management of TIMEOUT_CMD and - TIMEOUT_ARGS, and use it for driver stop/start - it hangs too - sometimes - -2020-02-09 Laurent Bigonville - - * scripts/python/app/nut-monitor.appdata.xml, scripts/python/app/nut- - monitor.desktop: Update the appdata file to the latest version of - the specification (#727) * nut-monitor: Update the appdata file to - the latest version of the specification Fixes: #724 * nut- - monitor: Update the desktop file to follow the last version of the - sepcification - -2020-02-09 Jim Klimov - - * docs/Makefile.am, docs/documentation.txt, docs/nut.dict, - docs/solaris-usb.txt, scripts/Solaris/README: Add docs/solaris- - usb.txt for posterity (#755) - -2020-01-08 Fernando Chaves <38504809+fernandolcx@users.noreply.github.com> - - * drivers/apcupsd-ups.h: apcupsd-ups: add real power and current - variables LOAD_W => ups.realpower LOADAPNT => power.percent - OUTCURNT => `output.current` LOAD_VA => `ups.power` NOMAPNT => - `ups.power.nominal` Closes: - https://github.com/networkupstools/nut/pull/753 - -2019-11-06 Charles Lepple - - * data/driver.list.in: HCL: Add PowerWalker VFI 1000 CG PF1 Closes: - https://github.com/networkupstools/nut/issues/648 - -2019-09-18 andrewmccartney - - * drivers/Makefile.am, drivers/libusb.c, drivers/powervar-hid.c, - drivers/powervar-hid.h, drivers/usbhid-ups.c: Changes to add - support for Powervar UPM as usb-hid UPS. Includes adding a report - index to libusb.c in order to handle the composite device in the - UPM. - -2019-09-12 Andrew Anderson - - * drivers/pijuice.c: Conditionally include linux/i2c.h Check for - I2C_FUNC_I2C to avoid errors caused by conflicts between - linux/i2c-dev.h and linux/i2c.h - * configure.ac, drivers/pijuice.c: Add more granular I2C support - checks Accommodate one more variation of SMBUS/I2C support where - both the headers and the libraries exist and are usable. - * drivers/pijuice.c: Pull over the latest development version Clean - up the upsdebugX() labels Pull the conditional I2C support code - closer to the includes block Don't report battery temp as UPS temp - Warn if we adjust shutdown_delay - * drivers/pijuice.c: Fix the length passed into memset() - * drivers/asem.c: Add pijuice I2C driver for PiJuice HAT 4/4 Update - asem.c to complie cleanly by adding an include for - * configure.ac: Add pijuice I2C driver for PiJuice HAT 3/4 Check for - both the i2c-tools 3.x and 4.x include files (i2c-dev.h/smbus.h) - and set flags accordingly. Link with the i2c library file from - i2c-tools 4.x if it is available. - * drivers/Makefile.am: Add pijuice I2C driver for PiJuice HAT 2/4 - Update the driver Makefile.am to add pijuice driver to the - LINUX_I2C_DRIVERLIST - * drivers/pijuice.c: Add pijuice I2C driver for PiJuice HAT 1/4 Add - pijuice driver - -2019-09-02 Laurent Bigonville - - * scripts/python/app/nut-monitor.desktop: nut-monitor: Drop the .png - extension for the Icon in the .desktop file - -2019-08-18 Laurent Bigonville - - * scripts/python/Makefile.am, scripts/python/app/icons/256x256/nut- - monitor.png, .../python/app/{ => icons/48x48}/nut-monitor.png, - scripts/python/app/icons/64x64/nut-monitor.png, - scripts/python/app/icons/scalable/nut-monitor.svg: nut-monitor: Add - scalable, 64x64 and 256x256 icon for nut-monitor FTR, this icon - comes from gnome-icon-theme 2.28 - -2019-07-22 rpvelloso - - * drivers/solis.c: solis: avoid index out of bounds Since the - parameter taken by autonomy_calc() is used to index a couple of - arrays of 5 positions and the variable `im`, which is passed to - autonomy_calc(), can be equal to 4, blindly incrementing it by one, - when it's 4, leads to an index out of bounds. - -2019-07-30 Daniele Pezzini - - * drivers/nutdrv_siemens_sitop.c: nutdrv_siemens_sitop: move to the - new "battery.charge.approx" var - * data/cmdvartab, docs/nut-names.txt: Add and document a new - "battery.charge.approx" var - -2019-07-12 Spencer Shimko - - * drivers/tripplite_usb.c: Report load for Tripp Lite USB 3005 - protocol The debug output for a device using the Tripp Lite 09ae - 3005 protocol seems to show that the ups.debug.L is the load as - noted on mailing list posts. Decode it and report it as ups.load. - Tested on TRIPP LITE SMART500RT1U. - -2019-07-11 Jim Klimov - - * scripts/Solaris/nut-driver.xml.in: Solaris/nut-driver.xml.in : - constrain the impact of managing SMF instances for missing devices - * scripts/systemd/nut-driver@.service.in: nut-driver@.service.in : - fix back templated @SBINDIR@ - * scripts/systemd/nut-driver@.service.in: Problem: Attempts to start - a nut-driver@bogusname actually run upsdrvctl on everything - Solution: First check if service instance name is valid, then use - it Should fix https://github.com/42ity/nut/issues/87 - -2019-07-10 Laurent Bigonville - - * clients/Makefile.am, tools/nut-scanner/Makefile.am: libupsclient, - libnutscan: Only export symbols part of the public API Fixes: #713 - -2019-07-09 Laurent Bigonville - - * clients/upsclient.c, clients/upsmon.c, drivers/apcsmart.c, - drivers/bcmxcp.h, drivers/bestuferrups.c, drivers/main.c, - drivers/masterguard.c, drivers/metasys.c, drivers/mge-hid.c, - drivers/mge-mib.c, drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_q1.h, - drivers/optiups.c, drivers/solis.c, scripts/python/app/NUT-Monitor, - tools/nut-scanner/nut-scanner.c: Fix several typos - * configure.ac, lib/libupsclient.pc.in, m4/nut_check_libnss.m4, - m4/nut_check_libopenssl.m4: Use pkg-config module names instead of - listing the libraries Fixes: #709 - -2019-07-02 Jim Klimov - - * common/common.c: common.c : BUILD_64 not detected in some distros, - needs stdint.h - -2018-05-04 Matthijs ten Berge - - * docs/man/nutdrv_siemens_sitop.txt: Spelling fix - * drivers/nutdrv_siemens_sitop.c: Remove %-sign from variable values - * drivers/nutdrv_siemens_sitop.c: Fix line endings - * docs/man/nutdrv_siemens_sitop.txt: Better explanation of serial - port polling - -2018-04-11 Matthijs ten Berge - - * data/driver.list.in, docs/man/Makefile.am, docs/man/{siemens- - sitop.txt => nutdrv_siemens_sitop.txt}, drivers/Makefile.am, - drivers/{siemens-sitop.c => nutdrv_siemens_sitop.c}: Rename driver - siemens-sitop to nutdrv_siemens_sitop As requested in https://gith - ub.com/networkupstools/nut/pull/545#pullrequestreview-106712942 - -2018-03-26 Matthijs ten Berge - - * drivers/siemens-sitop.c: Various code improvements after review - - The number of delimiter characters is no longer hard-coded, but - will be detected and thrown away at runtime - Discard any remains - in the RX buffer after communication errors - collapse repeating - code - upsdrv_shutdown now uses instcmd (removes duplicate code) - - obsolete ups.* variables removed - poll_interval not hard-coded, - but give a warning when a large value is encountered - option - parsing improved - * docs/man/siemens-sitop.txt: Improve manpage layout - -2018-03-23 Matthijs ten Berge - - * docs/man/siemens-sitop.txt, docs/nut.dict: Spellcheck fixes - * data/driver.list.in, docs/man/Makefile.am, docs/man/siemens- - sitop.txt, drivers/Makefile.am, drivers/siemens-sitop.c: Initial - commit of siemens-sitop: driver for Siemens SITOP UPS500-series - UPSes - -2019-04-26 William Chase - - * drivers/bestfcom.c: Fix for Ferrups FE7000 "off" command (#692) - "off" command for FE7000 required at least 5 seconds for the - command to be accepted. Also should match the off with autostart - or "o" with "a" to be consistent with the manual: - https://www.eaton.com/content/dam/eaton/products/backup-power-ups- - surge-it-power-distribution/backup-power-ups/eaton-ferrups-tower- - ups/eaton-ferrups-FE-QFE-userguide-.pdf (o [time] a is how the - manual references the "short" command) - -2019-04-16 Ross Williams - - * drivers/snmp-ups.c: snmp-ups: add ability to set TimeTicks - correctly (#687) * snmp-ups: add ability to set TimeTicks - correctly Driver had been setting read/write parameters as either - Integer or String, but OIDs that expect TimeTicks cannot be set - using an Integer. snmp-ups already supported getting TimeTicks - correctly and had helper functions for setting TimeTicks, but logic - had not been implemented in su_setOID(). * Missing semicolon ;-( - * snmp-ups: use NUT's str_to_long() in su_setOID() Safer - conversion from provided strings to instant command or read/write - value. Omitted default value if !SU_MODE_INSTCMD because it is not - possible for read/write variable functions to be called without a - value (unlike instant commands). - -2019-04-11 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c, drivers/snmp-ups.c: [DNMY] Fix snmp - templates (#681) * eaton-pdu-marlin-mib.c : move "outlet.count" - query higher * snmp-ups.c : anticipate lack of OIDs in templates - -2019-04-05 Jim Klimov - - * .travis.yml, Makefile.am, ci_build.sh: Introduce shell script - syntax checks (#675) * Introduce shell script syntax checks * - Makefile.am : do not shellcheck/spellcheck by default as it can - fail for external circumstances (e.g. missing tools) * Makefile.am - : visibly separate the "check-scripts-syntax" implementation (with - current system shells) vs "shellcheck" which may get impemented - differently (with external tools) in later iterations * - Makefile.am : update the check-scripts-syntax comment (clarify - text, fix typo) * Makefile.am : clarify the check-scripts-syntax - vs shellcheck comment * .travis.yml and ci_build.sh : leave TBDs - for future shellcheck tool integration * ci_build.sh : call both - shellcheck and check-scripts-syntax targets; it does not duplicate - the work and reports while one calls another for now - and will do - two tests when they become independent - * configure.ac: configure.ac : fix mismatched usage of have_cxx11 - envvar (#689) - * server/conf.c: Problem: isdigit() receives a char* instead of char - (#690) Solution: as a quick fix, pick the first char of the string - we pass. The proper fix would be to use the str_*() API for safe - conversions, in a later iteration. See-also: - https://github.com/networkupstools/nut/issues/676 - -2019-04-01 Jim Klimov - - * include/common.h: common.h : use the common do/while idiom for - macro with if clause - -2019-04-01 Jim Klimov - - * common/common.c, include/common.h: Problem: upsdebug*() pass data - and allocate vars always Solution: wrap old well-known API - routines into macros that check debugging level first, and only - invest into calling routines and passing data later - if that would - not be in vain. - -2019-03-25 Jean-Baptiste Boric - - * tools/nut-scanner/scan_snmp.c: Fix nut-scanner SNMPv3 (#680) - -2019-03-19 Arnaud Quette - - * drivers/compaq-mib.c, drivers/eaton-ats16-mib.c, drivers/eaton-pdu- - marlin-mib.c, drivers/hpe-pdu-mib.c, drivers/netxml-ups.c, - drivers/powerware-mib.c: Refresh firmware information for Eaton/HPE - devices Despite the static nature of these data, firmware can be - updated by various means, and should thus be refreshed by the - driver, without needing a driver restart. A "semi static" approach - should be done in the end, as in usbhid-ups, but is not part of the - present development, though commented in the code. For the time - being, simply remove the STATIC flags to refresh the data (snmp- - ups) and allow to refresh product information (netxml-ups) - -2019-03-19 Jean-Baptiste Boric - - * tools/nut-scanner/scan_snmp.c: Fix SNMPv3 in nut-scanner (#679) - -2019-03-15 Arjen de Korte - - * clients/upsclient.c, clients/upssched.c, - m4/nut_check_libopenssl.m4, server/netssl.c: Add support for - openssl-1.1.0 (#504) * Add support for openssl-1.1.0 * Allow - TLSv1 and higher (not just TLSv1) * Fix check for empty string * - Report TLS handshake in debug mode * Update - nut_check_libopenssl.m4 * Update upsclient.c * Update netssl.c - -2019-03-14 Charles Lepple - - * docs/man/nutupsdrv.txt, docs/man/ups.conf.txt: nutupsdrv: reword - "user" directive section Closes: - https://github.com/networkupstools/nut/issues/336 Closes: - https://github.com/networkupstools/nut/issues/671 - -2019-03-11 Arnaud Quette - - * docs/new-clients.txt: libnutclient: add comments to the code sample - -2019-03-11 Jean-Baptiste Boric - - * clients/nutclient.cpp, clients/nutclient.h, docs/new-clients.txt, - docs/nut.dict: Implement tracking commands in libnutclient (#673) - * Implement tracking commands in libnutclient * Add - TrackingResult::INVALID_ARGUMENT - -2019-02-26 Arnaud Quette - - * drivers/solis.c: Fix regression in solis authors list - -2019-02-26 Roberto Panerai Velloso - - * drivers/solis.c, drivers/solis.h: Added author info for previous - merge https://github.com/networkupstools/nut/pull/511 (#672) * - added author information - -2019-02-26 Arnaud Quette - - * clients/Makefile.am, clients/upsclient.c, clients/upsclient.h, - clients/upscmd.c, clients/upsrw.c, common/snprintf.c, - conf/upsd.conf.sample, docs/man/Makefile.am, - docs/man/upscli_cleanup.txt, docs/man/upscli_readline.txt, - docs/man/upscli_sendline.txt, docs/man/upscmd.txt, - docs/man/upsd.conf.txt, docs/man/upsrw.txt, docs/net-protocol.txt, - docs/nut-names.txt, docs/nut.dict, docs/sock-protocol.txt, - drivers/dstate.c, drivers/upshandler.h, include/common.h, - scripts/augeas/nutupsdconf.aug.in, - scripts/augeas/tests/test_nut.aug, server/conf.c, server/netget.c, - server/netinstcmd.c, server/netset.c, server/nut_ctype.h, - server/sstate.c, server/upsd.c, server/upsd.h, tools/nut- - scanner/nut-scanner.c: INSTCMD and SET VAR status tracking - implementation (#659) * INSTCMD and SET VAR status tracking - implementation This commit implements the instant commands - (instcmd) and variables settings (setvar) status tracking, to get - the actual execution status from the driver * Missing Revision - history * Fix nut-names.txt modification that should not be here - * Augeas support: add CMDSETSTATUSDELAY for upsd.conf * INSTCMD - and SET VAR status tracking completion Following Daniele Pezzini - thorough review, sanitize and improve the code, and also complete - documentation * INSTCMD and SET VAR status tracking completion - implement support for status tracking in upscmd and upsrw * - upscmd/upsrw: delay retries for status tracking * Remove comment - There is no need to condition CMDSET_STATUS commands received by - upsd from the driver, on cmdset_status_enabled, since what matters - is the presence of a list and id * Complete comment * UUID v4 - implementation replaced the initial rxi/uuid4 library used by a - cross platform version. Though more basic, it is enough for our - needs, at least for now * status_info should be static * No - need for else, since fatalx is called before * Suppress \n from - debug output * Group sanity checks * Get rid of dynamic memory - allocation * Improve and enforce the use of UUID4_LEN * Comment - on the size of dest for nut_uuid_v4() * Move structures and - defines to more appropriate places * Add functions with timeout - Add upscli_sendline_timeout and upscli_readline_timeout, beside - from the classic blocking versions. Also make a common define for - timeout, and use it in upsclient and nut-scanner * upscmd/upsrw: - add a timeout option * Basic homebrew UUID v4 implementation * - Prefer to use static buffer for UUID * log actual result of - instcmd / setvar * Fix tracking ID reporting due to static memory - changes * upsclient: use unsigned int for timeouts Also, - explicit that upscli_cleanup() takes no argument. * upscmd/upsrw: - use unsigned int for timeout + our str_to_uint() for it Also, - slightly reword the help message for `-t` (timeout) option, in - order to clarify which is the unit (seconds) used for the provided - value. * upscmd/upsrw: don't sleep after receiving a non-PENDING - CMDSET_STATUS Also, remove some nesting in do_cmd() and do_set(). - * net-protocol: clarify the format of GET CMDSET_STATUS + - is not optional to get the status of a - command/setvar with CMDSET_STATUS, so drop the [square brackets] - from it. Also drop "quotes" in SET CMDSET_STATUS's , since - it's expected to be a single word. Plus, fix markup of INSTMCD's - parameter. * sock-protocol: align case and markup of - command parameters * dstate: fix handling of INSTCMD's optional - parameters We should still support the old `INSTCMD - []` format, and not only consider when also - `STATUS_ID ` is provided. Also, fix the format of our sock- - protocol commands mentioned in comments, and add function names to - debug info. * common: document the recently added things * upsd: - in INSTCMD/SET handlers, also accept NULL for status_id Plus: - - use a simpler approach to test if status_id is not empty, - align - the way the SET command is built to the one used for the INSTCMD - command. * upsd: drop unnecessary/unused global * upsd: move - sanity checks of cmdset_status_get() after declaration of vars - Also, drop some nesting in that function. * Move from - CMDSET_STATUS / STATUS_ID to TRACKING This is just a big, big - rename, no code changes. * upsd: refine the tracking API Add a - couple of functions to change in a predictable way the value of the - general enablement of tracking and make it visible only inside - upsd.c. Also, move the tracking type (tracking_t) and the list of - items inside upsd.c. * net-protocol: also return TRACKING between - OK and , for INSTCMD/SET VAR * dstate: *really* fix handling - of INSTCMD's optional parameters Erroring out on `INSTCMD - ` doesn't seem like a good idea... * common: massage - default timeouts Rename the default timeout used in network - operations by upsclient and nut-scanner to be more specific: from - DEFAULT_TIMEOUT to DEFAULT_NETWORK_TIMEOUT. Plus, make the default - timeout used when retrieving the result of an INSTCMD/SET VAR with - TRACKING enabled a common #define'd value - (DEFAULT_TRACKING_TIMEOUT), and use it also to publish the default - value of the -t option in the help messages of upscmd and upsrw. - As suggested by Charles Lepple. * upsd: ignore case of UUID4 in - tracking API Also, remove some nesting in tracking_del(). * - libupsclient: generate manpages for - upscli_{read,send}line_timeout() To keep things simple, at least - for now, only generate manpages and not html pages (and, as such, - don't even think of using our linkman AsciiDoc macro with those - functions, to avoid dead links). * libupsclient: bump version as - per recent changes - addition of upscli_{read,send}line_timeout(), - - upscli_cleanup() -> upcli_cleanup(void) Note: only increase - 'current' and not 'age', because the upscli_cleanup() change could - (potentially) make it not compatible with previous versions. * - upscmd/upsrw: warn that also the drivers need to support TRACKING, - for -w * Fix typo and spelling * Add check around atoi() - conversion - -2019-02-25 Roberto Panerai Velloso - - * drivers/solis.c, drivers/solis.h: solis: various improvements and - fixes - fixed two memory leaks (unnecessary strdup's), - removed - ser_flush calls that were causing the driver to desync, - - refactored code, mostly bit mainpulation functions, - other minor - improvements in source code. - -2019-02-23 Jim Klimov - - * clients/Makefile.am: clients/Makefile.am : also consider HAVE_CXX11 - for .la target - * tests/Makefile.am: tests/Makefile.am : explicitly consider - HAVE_CXX11 - * clients/Makefile.am, tests/Makefile.am: tests, clients Makefiles : - consider HAVE_CXX11 - * configure.ac: configure.ac : expose HAVE_CXX11 into automake - * configure.ac: configure.ac : add C++0X as draft C++11 support - detection (older GCC on some systems) - * configure.ac: configure.ac : refactor C++11 detection for - readability - * configure.ac: Problem: OpenBSD mktemp complains on short pattern - Solution: bump from XXXXX to XXXXXXX which did not complain in - another part of the configure script - -2019-02-20 Jim Klimov - - * clients/Makefile.am, tools/nut-scanner/Makefile.am: nut-scanner and - clients Makefile.am : comments about version-information - -2019-02-16 Jim Klimov - - * docs/nut.dict: nut.dict : add words for upsdrvsvcctl doc - -2019-02-08 Jim Klimov - - * common/common.c: Problem: 32-bit builds fail to load 64-bit libs - Solution: Do our best to guess the bitness of a build, and use it - in search paths for get_libname() - -2019-02-03 Daniele Pezzini - - * server/upsd.c: upsd: fix the calling of netcmds items' func() - Since, as per our network protocol, it's perfectly legal to have - single-word commands (and we already have a few, e.g. VER, NETVER, - HELP, ...), we do not do an early check to ensure that at least one - argument was provided to the command. As such, the list of words - generated by parseconf could actually end with the command itself. - That said, trying to access something that should not be there - doesn't seem like a good idea, so, only pass to netcmds items' - func() the list of arguments (which starts at the second item of - the list of words), if there are arguments, otherwise just pass - NULL. - * server/sstate.c: sstate: make sure ADDRANGE/DELRANGE have all the - needed parameters Since ADDRANGE and DELRANGE take 3 arguments - (, , ), we have to ensure all of them - were provided, before attempting to use them. - * drivers/dstate.c: dstate: fix dstate_delrange() socket protocol - command The documented (and used in server-side) command for - deleting a range is `DELRANGE `, not - `DELRANGE " "`, as used in - dstate_delrange(). So, fix that unused (well, at least in NUT) - function to use the correct format. Also, remove an extraneous - additional space in the command used in dstate_addrange(). - -2019-02-01 Arnaud Quette - - * configure.ac, scripts/augeas/Makefile.am: Augeas support: execute - lenses tests if possible This is however disabled for now, while - waiting to fix the reported issue Ref: - https://github.com/networkupstools/nut/issues/657 - * configure.ac: Fix wording that breaks some syntax highlighting - systems - * docs/nut-names.txt: Add the missing delayed versions of some - commands - -2019-01-30 Jean-Baptiste Boric - - * clients/nutclient.cpp, clients/nutclient.h: libnutclient: introduce - getDevicesVariableValues() (#654) A performance bottleneck was - identified within the 42ity project, where querying all variable - values from 300 ePDUs through upsd and libnutclient took 15 seconds - to complete. The new method TcpClient::getDevicesVariableValues() - allows querying device variable values in bulk, by sending all LIST - VAR commands ahead of time and then parsing all the results at - once. Throughput is vastly improved, with the mega-query completing - about 15 times faster. - -2019-01-28 Arnaud Quette - - * clients/Makefile.am, clients/nutclient.h: libnutclient: fix version - and interface * Library version should be updated to reflect - changes, and is now 1:0:0 * Interface should be adapted so that the - additional argument to instant commands can be optional - * drivers/eaton-pdu-marlin-mib.c, drivers/hpe-pdu-mib.c: snmp-ups: - support extra param for instcmd (Eaton/HPE) Add support for extra - parameter for instant commands on Eaton and HPE ePDU - * drivers/snmp-ups.c: snmp-ups: fix potential segfault when using - delayed instant commands, with a NULL default value, and not - providing a value, the driver can segfault - * docs/nut.dict: Fix spellcheck - * clients/nutclient.cpp, clients/nutclient.h, docs/net-protocol.txt: - Add support for extra parameter for instant commands Instant - commands were almost ready for supporting additional parameter. - However, it was not documented, and libnutclient was not supporting - it yet - -2019-01-24 Arnaud Quette - - * drivers/apc-ats-mib.c, drivers/apc-mib.c, drivers/apc-pdu-mib.c, - drivers/baytech-mib.c, drivers/bestpower-mib.c, drivers/compaq- - mib.c, drivers/cyberpower-mib.c, drivers/eaton-ats16-mib.c, - drivers/eaton-ats30-mib.c, drivers/eaton-pdu-genesis2-mib.c, - drivers/eaton-pdu-marlin-mib.c, drivers/eaton-pdu-pulizzi-mib.c, - drivers/eaton-pdu-revelation-mib.c, drivers/emerson-avocent-pdu- - mib.c, drivers/hpe-pdu-mib.c, drivers/ietf-mib.c, drivers/mge- - mib.c, drivers/netvision-mib.c, drivers/powerware-mib.c, - drivers/raritan-pdu-mib.c, drivers/raritan-px2-mib.c, drivers/snmp- - ups.c, drivers/snmp-ups.h, scripts/subdriver/gen-snmp-subdriver.sh: - snmp-ups: Rework instant commands handling Use snmp_info_t->dfl, - which is a char*, instead of snmp_info_t->info_len for instant - commands default value. This allows to distinguish between commands - that do not require a mandatory value. For instcmd requiring a - parameter (such as *.delay), a NULL snmp_info_t->dfl and no - extradata will result in STAT_INSTCMD_INVALID value returned Also - adapt subdrivers and gen-snmp-subdriver.sh to match this - * drivers/delta_ups-mib.c, drivers/eaton-pdu-marlin-mib.c, - drivers/huawei-mib.c, drivers/snmp-ups.c, drivers/snmp-ups.h, - drivers/xppc-mib.c, scripts/subdriver/gen-snmp-subdriver.sh: snmp- - ups: Simplify the mapping structure * snmp_info_t->setvar is not - used anymore, so drop it, * hence, also delete flag SU_FLAG_SETINT - and references to it, * adapt subdrivers and gen-snmp-subdriver.sh - to match this - -2019-01-23 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: Fix warnings (memset-elt- - size/pointer-sign) - * drivers/snmp-ups.c: snmp-ups: Actually fix commands offset (off by - 1) The last fix was wrongly setting the offset to negative, and - substracting it again from the current device number, which - resulted in an addition, not a substraction - * drivers/mge-hid.c, drivers/usbhid-ups.c: usbhid-ups / MGE: bump - versions to reflect changes - -2019-01-22 Arnaud Quette - - * drivers/mge-hid.c, drivers/usbhid-ups.c, drivers/usbhid-ups.h: - usbhid-ups: Fix erroneous OB report on Eaton UPS Also created a - read accessor on status bits and move the related definitions to - the driver header - -2019-01-22 Jean-Baptiste Boric - - * drivers/mge-xml.c, drivers/netxml-ups.c, drivers/netxml-ups.h: - netxml-ups: Report calibration status (#650) - -2019-01-22 Arnaud Quette - - * data/driver.list.in, drivers/Makefile.am, drivers/hpe-pdu-mib.c, - drivers/hpe-pdu-mib.h, drivers/snmp-ups.c: snmp-ups: Add support - for HPE ePDU - -2019-01-21 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: Improve ALARM flag handling - -2019-01-17 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: Fix ALARM flag on non-daisychained - devices - * drivers/snmp-ups.c: snmp-ups: Fix erroneous integration of hpe_pdu - * drivers/snmp-ups.c: snmp-ups: Fix commands offset (off by 1) - * drivers/snmp-ups.c: snmp-ups: Fix detection and display of hex - strings - -2019-01-11 Arnaud Quette - - * drivers/compaq-mib.c: snmp-ups: Add firmware version for new - Network card Also bump HPE/Compaq subdriver version to 1.62 - -2018-12-04 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh : note to not skip full "main" evaluation in daemon - mode - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh : support SIGHUP causing a quick reconfig when - received both during the sleep and processing in-progress - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh : avoid continuous reconfiguration (esp. in daemon - mode) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : for many discovered changes, avoid the lag of - running systemctl daemon-reload for every item in the loop - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : in single-run, daemon and full-reconfig modes, - take note if the config file had changed while we were running - - re-sync services vs sections ASAP then - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : introduce calc_md5_file() and comment calc_md5() - a bit better - -2018-12-07 Scott Shambarger - - * clients/upsmon.c, clients/upssched.c, common/parseconf.c: Add - FD_CLOEXEC flag to config files, pipes and sockets File - descriptors are leaking to processes spawned by upsmod and - upssched, leading to SELinux errors when (for example) sendmail - attempts to read from fd #4. - -2018-12-01 mjan - - * drivers/Makefile.am, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_hunnox.c, drivers/nutdrv_qx_hunnox.h: Add support - for Hunnox HNX-850 - -2018-11-19 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : critical typo fix (Environment is valid in - section Service, not Unit) - -2018-11-16 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : refactor upsconf_getSection_content() to have - one place of logic to add the parsed section line - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test--ups.conf, tests/nut-driver-enumerator-test.sh: - nut-driver-enumerator.sh.in : section-name brackets should contain - a single token and not be inside another string - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : refactor upslist_normalizeFile_filter() into a - more readable standalone routine - -2018-11-13 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : update the list of config factors that mean an - USB nutdrv_qx device - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test.sh: nut-driver-enumerator-test.sh / nut-driver- - enumerator-test--ups.conf / nut-driver-enumerator.sh.in : extend - upsconf_getValue() to query for several values in the same call to - more efficiently check if any key/flag is set - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test--ups.conf, tests/nut-driver-enumerator-test.sh: - nut-driver-enumerator-test.sh / nut-driver-enumerator-test-- - ups.conf / nut-driver-enumerator.sh.in : do not ignore driver flags - followed by a comment - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : fix \t into TABCHAR - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : show the expected vs actual diff in any shell interpreter - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : add a disclaimer about config parser (probable - non-)conformity to NUT binary definitions - * tests/nut-driver-enumerator-test--ups.conf: nut-driver-enumerator- - test--ups.conf : test a section with indented name - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test--ups.conf, tests/nut-driver-enumerator-test.sh: - nut-driver-enumerator-test.sh / nut-driver-enumerator-test-- - ups.conf / nut-driver-enumerator.sh.in : in section-name lines, - ignore anything outside the first set of brackets - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : show a diff of expected vs actual, if the shell allows in-place - docs - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : suggest to a dev how to re-run the failed test verbosely - -2018-11-05 Jim Klimov - - * tools/Makefile.am, tools/nut-scanner/Makefile.am: tools/ Makefiles - : refactor with clarifications from DMF branch (#636) - -2018-11-04 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : fix svcprop queries to base service level - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : consider "unknown" systemd unit state as one to - be restarted - * scripts/upsdrvsvcctl/upsdrvsvcctl.in: upsdrvsvcctl.in : fix -D for - debugging level - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test--ups.conf, tests/nut-driver-enumerator-test.sh: - nut-driver-enumerator-test.sh / nut-driver-enumerator.sh.in : - support USB and Serial modes for nutdrv_qx - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : track changes of global config and restart - drivers and nut-server if that happened - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test.sh: nut-driver-enumerator-test.sh / nut-driver- - enumerator.sh.in : in upslist_debug() show also the global config - section - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in, tests/nut-driver- - enumerator-test--ups.conf, tests/nut-driver-enumerator-test.sh: - nut-driver-enumerator-test.sh / nut-driver-enumerator.sh.in : - support flag values (line is a single token) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : do not use an "other" section as a magic value - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : "break" the loop, not return from it (artefact - of moving code from a sub-shell) - -2018-11-01 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh : Use a timeout to restart/reload nut-server - (systemd) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh : Do not restart/reload nut-server if not already - running (systemd) - -2018-10-22 Robert W. Cashman - - * drivers/cyberpower-mib.c: Added UPS load, battery charge, input - voltage/frequency, and output voltage, MIB mappings to cyberpower- - mib.c - -2018-10-12 Jim Klimov - - * .travis.yml: .travis.yml : move nut-driver-enumerator-test jobs - lower in stack - we want slow jobs to start first - * .travis.yml: .travis.yml : matrix job seems to require having at - least two items - -2018-10-11 Jim Klimov - - * tests/nut-driver-enumerator-test.sh: Update nut-driver-enumerator- - test.sh Standardize the testing setup - -2018-10-11 Jim Klimov - - * builds/nut-driver-enumerator-test/ci_build.sh: builds/nut-driver- - enumerator-test/ci_build.sh : use the "selftest" dummy service - framework if systemd is not available in the testing OS environment - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : support a "selftest" dummy service framework - * builds/nut-driver-enumerator-test/ci_build.sh: builds/nut-driver- - enumerator-test/ci_build.sh : let the tests have some - SERVICE_FRAMEWORK - * tests/nut-driver-enumerator-test.sh: tests/nut-driver-enumerator- - test.sh : update envvar processing - * builds/nut-driver-enumerator-test/ci_build.sh: builds/nut-driver- - enumerator-test/ci_build.sh : export BUILDDIR SRCDIR for the test - script - * builds/nut-driver-enumerator-test/ci_build.sh: builds/nut-driver- - enumerator-test/ci_build.sh : debug the testing script itself - * .travis.yml, builds/nut-driver-enumerator-test/ci_build.sh, - tests/nut-driver-enumerator-test.sh: Problem: nut-driver-enumerator - not Travised Solution: Add call to its selftest - -2018-10-10 Jim Klimov - - * docs/nut.dict: nut.dict : add components of --show-all-configs - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : echo if there is nothing to reconfigure (add - timestamp, do not spam in daemonized loop by default) - * scripts/Solaris/postinstall.in, scripts/Solaris/preremove.in: - Solaris preremove.in postinstall.in : pass the last-active nut- - driver-enumerator instance across package upgrades done over a - short timeframe - * scripts/Solaris/postinstall.in, scripts/Solaris/preremove.in: - Solaris preremove.in postinstall.in : less spam from "svcadm clear" - of not-failed services - * scripts/Solaris/postinstall.in, scripts/Solaris/preremove.in: - Solaris preremove.in postinstall.in : support the multi-instance - nut-driver-enumerator service now - * tests/Makefile.am: tests/Makefile.am : EXTRA_DIST the new nut- - driver-enumerator-test script and config - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : echo if there is nothing to reconfigure (early - on or after the loop has done some changes) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : update comments regarding SMF service instance - wrapping - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : test for changed sections before testing for - changed set of section vs service names - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : small sanity check in - upslist_checksums_unchanged() - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : update comments regarding new support for - detection of changed device section contents - * scripts/upsdrvsvcctl/upsdrvsvcctl.in: upsdrvsvcctl.in : SMF service - management should wait for completion, to be same as systemd - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : optimize loop work - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : basic support for detecting changes in ups.conf - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : commented a couple of FIXMEs illustrated by the test expected - data - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : call testcase_upslist_debug() last in the suite - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : store SECTION_CONTENT in a variable and spit it - out once - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : update tests for only trimming whitespace around first "=" - character - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : refer to systemd unit via SVCINST not $1 when - registering - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : update comments - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : drop unneeded assignment in calc_md5() - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : in upslist_normalizeFile() only trim whitespace - around first "=" character (do not touch subsequent ones in value - part) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : optimize upsconf_getValue() since we use pre- - normalized data - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : add DEBUG=trace - * tests/nut-driver-enumerator-test--ups.conf, tests/nut-driver- - enumerator-test.sh: nut-driver-enumerator-test.sh : add a test case - for dummy-ups proxying to a localhost "remote" device; add examples - of quoted key values with spaces - -2018-10-09 Jim Klimov - - * tests/nut-driver-enumerator-test--ups.conf, tests/nut-driver- - enumerator-test.sh: nut-driver-enumerator-test.sh : add a test case - for querying global config pseudo-section - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : support getting global config values (when - device section value is empty) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : zsh not supported - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : add a test case for config value that was quoted - * tests/nut-driver-enumerator-test.sh: nut-driver-enumerator-test.sh - : control values of section and device name checksums in - upsconf_debug() - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : expose section and device name checksums in - upsconf_debug() - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : introduce upsconf_getSection_MD5() to checksum - the normalized payload of a config section - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : in --reconfigure should exit() not return() - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : in systemd_validFullUnitName() add the .service - suffix if needed - * tests/.gitignore, tests/nut-driver-enumerator-test--ups.conf, - tests/nut-driver-enumerator-test.sh: Introduce simple unit tests - for nut-driver-enumerator.sh - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : expose upsconf_debug() and upslist_debug() to - CLI - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : avoid direct exit during loop processing - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : use a variable SYSTEMD_CONFPATH - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : use UPSCONF_DATA_SDP and rearrange getSection() - routines for certain use-cases - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : use upslist_readFile_once() in command-line - tools to avoid re-parsing the config many times - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : use cached UPSCONF_DATA in upsconf_getSection() - rather than FS access every time - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : rearrange and document the initial slurping and - normalization of ups.conf, reducing the work done - * docs/man/nut-driver-enumerator.txt, scripts/upsdrvsvcctl/nut- - driver-enumerator.sh.in, scripts/upsdrvsvcctl/upsdrvsvcctl.in: nut- - driver-enumerator.sh.in : add --show-configs to expose UPSCONF_DATA - with normalized content of ups.conf - -2018-10-05 Jim Klimov - - * scripts/upsdrvsvcctl/upsdrvsvcctl.in: upsdrvsvcctl.in : add - "reconf(igure)" call to pass into nut-driver-enumerator.sh - * scripts/upsdrvsvcctl/upsdrvsvcctl.in: upsdrvsvcctl.in : update - usage() - * docs/man/nut-driver-enumerator.txt, scripts/upsdrvsvcctl/nut- - driver-enumerator.sh.in: nut-driver-enumerator.txt : make - spellchecker happy - * scripts/Solaris/postinstall.in: solaris postinstall : - REPORT_RESTART_42=no when reconfiguring - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : update message for reconfig dropping of old - service - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : fix fall-through daemonization for DASH - * scripts/Solaris/README: Solaris README : update about two nut- - driver-enumerator instances - * docs/man/nut-driver-enumerator.txt: nut-driver-enumerator.txt : add - recently introduced options into manpage - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : typo fix - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : typo fix - * scripts/Solaris/nut-driver-enumerator.xml.in: nut-driver- - enumerator.xml.in : support daemonization into background (contract - service) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : support daemonization into background - * scripts/Solaris/nut-driver-enumerator.xml.in: nut-driver- - enumerator.xml.in : typo fix - * scripts/Solaris/nut-driver-enumerator.xml.in: nut-driver- - enumerator.xml.in : avoid creating default service twice - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : support SIGHUP for the daemon - * scripts/Solaris/README, scripts/Solaris/nut-driver- - enumerator.xml.in: nut-driver-enumerator : use --daemon(=freq) in - Solaris SMF service, implement it as an option (two prepackaged - services, with and without loop) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator : add --daemon(=freq) to monitor ups.conf vs. services - changes ourselves in a loop - * scripts/Solaris/postinstall.in: nut-driver-enumerator : use - --reconfigure to remake units from scratch in Solaris postinstall - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator : add --reconfigure to remake units from scratch - -2018-10-04 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : for network-depending connections, wait for - ifplugd to set up physical network, if enabled - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : for network-depending connections, wait for DNS - resolver to appear - * scripts/systemd/nut-driver-enumerator.service.in: nut-driver- - enumerator.service.in : do NOT remain active when done, allow nut- - driver-enumerator.path to start this again - * scripts/Solaris/README: Solaris README : note that there is no - dynamic refresh when ups.conf is changed - * scripts/Solaris/README: Solaris README : update reference to - upsdrvsvcctl directory - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : when removing a systemd instance, also remove - systemd complaints about it (if any) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : less ambiguity - manage ".service" instances as - such - -2018-10-03 Jim Klimov - - * common/common.c: get_libname() : support more 64-bit pathname - patterns (#609) - -2018-09-08 Jim Klimov - - * drivers/usbhid-ups.c: usbhid-ups.c : libusb/libshut tracing debug - text - -2018-10-02 Jim Klimov - - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : in systemd use-case, fall back to rude restart - if reload-or-restart of nut-server stalled and failed - -2018-09-28 Jim Klimov - - * scripts/systemd/nutshutdown.in: Update nutshutdown.in No strict - restrictions for fallback timeout - -2018-09-27 Jim Klimov - - * scripts/Solaris/nut-server.xml.in, scripts/Solaris/svc-nut- - server.in, scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut- - driver-enumerator.sh.in / nut-server.xml.in / svc-nut-server.in : - reload the running upsd instead of restarting it fully when - possible (Solaris SMF) - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : reload the running upsd instead of restarting it - fully when possible (Linux SystemD) - -2018-09-26 Jim Klimov - - * scripts/systemd/nut-driver-enumerator.path.in: nut-driver- - enumerator.path.in : typo fix for CONFDIR => CONFPATH - * docs/man/Makefile.am: docs/man/Makefile.am : handle other - nutclient*.3 manpages that are mass-implemented by some - libnutclient*.txt - * scripts/systemd/nutshutdown.in: nutshutdown.in : fallback short - timeout if config is absent or not parsable - * scripts/systemd/nutshutdown.in: nutshutdown.in : check that needed - programs exist first - -2018-09-19 Jim Klimov - - * configure.ac: configure.ac : syntactic sugar - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - reformatted - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - also the values registered - with comm_driver structure - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - reformatted - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - also the values registered - with comm_driver structure - * drivers/usbhid-ups.c: usbhid-ups.c : report the libusb version - involved in the driver at this time - * tools/Makefile.am, tools/nut-scanner/Makefile.am: Update comments - in tools(/nut-scanner)/Makefile.am regarding new more proper - dependency definitions - -2018-09-17 Daniele Pezzini - - * data/driver.list.in: HCL: update support level of some Meta System - devices As per the provided protocol: see nut-website's - 66d30c90401ff7929b25e5a87f9299b728f861ea - -2018-09-08 Jim Klimov - - * tools/Makefile.am: tools/Makefile.am : GENERATED_USB_FILES also - depend on nutdrv_qx.c - * tools/Makefile.am: tools/Makefile.am : generalize - GENERATED_SNMP_FILES too for consistency - * tools/Makefile.am: Makefile.am : fix back calling scripts from - distdir while being in builddir - -2018-09-07 Jim Klimov - - * tools/Makefile.am, tools/nut-snmpinfo.py, tools/nut-usbinfo.pl: - tools/nut-snmpinfo.py tools/nut-usbinfo.pl tools/Makefile : use - TOP_SRCDIR/TOP_BUILDDIR to pass with distcheck too - -2018-09-08 Jim Klimov - - * scripts/Solaris/postinstall.in: Solaris/postinstall.in : clarify - tests for present vs non-empty config files - * scripts/Solaris/postinstall.in, scripts/Solaris/postremove.in, - scripts/Solaris/preinstall.in, scripts/Solaris/preremove.in: Insert - or update header comments in Solaris pre/post-install/remove - scripts - -2018-09-07 Jim Klimov - - * tools/Makefile.am: tools/Makefile.am : update dependency on C - sources - * Makefile.am: Makefile.am : "dist" drivers/*.c before tools (which - generates further files from that) - * drivers/libusb0.c, drivers/libusb1.c: libusb0/1.c : ease debugging - by trace messages - * drivers/libusb1.c: libusb1.c : inverted order of - usb_communication_subdriver_t name/ver fields - * drivers/libusb0.c: libusb.c : inverted order of - usb_communication_subdriver_t name/ver fields - * configure.ac: configure.ac : syntactic sugar - * drivers/libusb.c: libusb.c : inverted order of - usb_communication_subdriver_t name/ver fields - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : fix initial setup with 0 service instances - present - * scripts/upsdrvsvcctl/nut-driver-enumerator.sh.in: nut-driver- - enumerator.sh.in : try to enable "nut-server" when restarting it - * tools/Makefile.am: tools/Makefile.am : avoid rebuilding generated - files after "make dist" over and over - * tools/nut-scanner/Makefile.am: tools/nut-scanner/Makefile.am : - structurally arrange built dependencies, reduce hardcoded - references to their names - -2018-09-06 Jim Klimov - - * drivers/libshut.c, drivers/libusb.c, drivers/usbhid-ups.c: libusb - tracing debug text - -2018-09-06 Daniele Pezzini - - * data/driver.list.in: HCL: add some Legrand devices supported by - nutdrv_qx Also, specify that Legrand Multiplug is USB-only. - * data/driver.list.in: HCL: update support level of some Meta System - devices As per the provided protocol: see nut-website's - 570c1e5e9f1fb4f82abef9359897b5159e88fc50 Also, fix name of "HF Line - /2". - -2018-09-06 Gabriele Taormina - - * drivers/metasys.c: metasys: retrieve also battery charge and - runtime The added command is only supported by devices with an 'id - code' >= 14, while for other, older, models the command is not - enabled by default, and the user has to perform a specific - procedure via serial to enable it (where supported). - -2018-09-05 Daniele Pezzini - - * drivers/metasys.c: metasys: remove useless initialisation of vars - -2018-08-27 Gabriele Taormina - - * data/driver.list.in, drivers/metasys.c: metasys: support some newer - Meta System and Legrand devices Add to the metasys driver a few - new models (Meta System DHEA, and others now branded Legrand) - speaking the Meta System UPS protocol. - * drivers/metasys.c: metasys: treat any '\0' in the serial number as - a '0' - * drivers/metasys.c: metasys: for bypass mode, call status_set() with - "BYPASS", not "BY" - * drivers/metasys.c: metasys: fix handling of errors/special values - As per protocol documentation, data is sent by the device with - unsigned integers of 8, 16 or 32 bits, with errors/special values - being: - for uint16: 0xFFFF and 0xFFFE, - for uint32: 0xFFFFFFFF. - Alas, those values are (and, probably, have always been) actually - reported in the documentation (mostly) as if their types were not - unsigned (so, in decimal: -1, and -2) and the metasys driver used - them like that, converting the values to non-fixed width signed - types (int and long) and then expecting a value of -1 or -2 to - signal a particular event, but this only happens on platforms where - int is exactly 16 bits, and long 32 bits. So, leave values as - unsigned types (adjusting all the printf formats accordingly), and - use the right hex values, instead. - * data/driver.list.in, drivers/Makefile.am, drivers/legrand-hid.c, - drivers/legrand-hid.h, drivers/usbhid-ups.c: usbhid-ups: add - Legrand subdriver - * data/driver.list.in, drivers/nutdrv_qx.c: nutdrv_qx: add support - for some Legrand USB devices - -2018-08-29 Jim Klimov - - * scripts/systemd/Makefile.am: EXTRA_DIST scripts/systemd/nut.target - also - -2018-08-21 Jim Klimov - - * m4/nut_check_libneon.m4: nut_check_libneon.m4 : shell typo fix - * m4/nut_check_libneon.m4: nut_check_libneon.m4 : do not AC_MSG_WARN - inside a standard message chain - * m4/nut_check_libneon.m4: nut_check_libneon.m4 : provide fallback - defaults when pkg-config fails - -2018-08-14 Jim Klimov - - * m4/nut_check_libneon.m4: nut_check_libneon.m4 : comment about - detecting without pkgconfig as a fallback - * m4/nut_check_libavahi.m4: nut_check_libavahi.m4 : typo fix - -2018-08-19 Daniele Pezzini - - * configure.ac: configure: fix messages of pkg-config checks The - PKG_*() macros we use there already print messages, therefore we - can't use AC_MSG_CHECKING() before calling them, and - AC_MSG_RESULT() after, or we will get something like: checking for - autoconf macro support of pkg-config... checking for pkg-config... - /usr/bin/pkg-config ^^^ AC_MSG_CHECKING() - ^^^ PKG_*() macro output checking pkg-config is at least version - 0.9.0... yes ^^^ PKG_*() macro output -- continuation ok ^^^ - AC_MSG_RESULT() checking for autoconf macro support of pkg-config - module checker... checking for dummy_PKG_CONFIG... yes ^^^ - AC_MSG_CHECKING() ^^^ - PKG_*() macro output ok ^^^ AC_MSG_RESULT() ...which is not - exactly desirable. So, move the messages to AC_MSG_NOTICE(), with - the result being explicitly printed only on failure (AC_MSG_WARN() - call). - * docs/man/Makefile.am: docs/man: fix man8 target for linux/i2c - * docs/man/Makefile.am, drivers/Makefile.am: nutdrv_qx: don't - duplicate make targets Since nutdrv_qx is both a serial and a USB - driver, up until now, its executable and manpages appeared in two - lists: serial and USB drivers, in order to be built in both cases, - when ./configure'd for only one of them... but, by doing this, when - ./configure'd for both, we ended up with dupes, which could - potentially cause problems, e.g. when installing them (and this - just happened). For the executable, luckily, libtool calls install - one file at a time, so this was not, and it still should not be, a - problem. For the manpages, we were previously saved by automake, - which splits the list of files to be installed in different calls - if they are too many (see automake's am__install_max var, currently - set to 40), so the two nutdrv_qx entries ended up in different - calls to install, but the 8b75b03 commit, by adding more manpages - before nutdrv_qx's ones, pushed also the first occurrence to the - second call to install, which already contained the other one, - causing an error. While other alternative, more flexible, but also - less portable, ways for solving this exist (e.g. using GNU make's - $(sort) on the generated lists), at least for now, prefer a more - portable solution, adding new intermediate lists for serial/USB - drivers and using simple automake conditionals. Close - https://github.com/networkupstools/nut/issues/594 - -2018-08-14 Jim Klimov - - * .gitignore, Makefile.am, README, common/Makefile.am, configure.ac, - docs/FAQ.txt, docs/config-notes.txt, docs/developers.txt, - docs/features.txt, docs/man/Makefile.am, docs/man/index.txt, - docs/man/nut-driver-enumerator.txt, docs/man/upsdrvctl.txt, - docs/man/upsdrvsvcctl.txt, docs/net-protocol.txt, docs/nut.dict, - include/Makefile.am, scripts/Aix/.gitignore, scripts/Aix/nut.init, - scripts/Aix/nut.init.in, scripts/Makefile.am, - scripts/Solaris/.gitignore, scripts/Solaris/Makefile.am, - scripts/Solaris/README, scripts/Solaris/makelocal.sh, - scripts/Solaris/nut-driver-enumerator.xml.in, scripts/Solaris/nut- - driver.xml.in, scripts/Solaris/nut-monitor.xml.in, - scripts/Solaris/nut-server.xml.in, scripts/Solaris/nut.in, - scripts/Solaris/nut.xml.in, scripts/Solaris/pkginfo.in, - scripts/Solaris/postinstall.in, scripts/Solaris/postremove, - scripts/Solaris/postremove.in, scripts/Solaris/preinstall, - scripts/Solaris/preinstall.in, scripts/Solaris/prepackage.py, - scripts/Solaris/{preproto.pl => preproto.pl.in}, - scripts/Solaris/preremove.in, scripts/Solaris/svc-nut-monitor.in, - scripts/Solaris/svc-nut-server.in, scripts/systemd/.gitignore, - scripts/systemd/Makefile.am, scripts/systemd/README, - scripts/systemd/nut-driver-enumerator.path.in, scripts/systemd/nut- - driver-enumerator.service.in, scripts/systemd/nut- - driver.service.in, scripts/systemd/nut-driver.target, - scripts/systemd/nut-driver@.service.in, scripts/systemd/nut- - monitor.service.in, scripts/systemd/nut-server.service.in, - scripts/systemd/nut.target, scripts/systemd/nutshutdown.in, - scripts/upsdrvsvcctl/.gitignore, scripts/upsdrvsvcctl/Makefile.am, - scripts/upsdrvsvcctl/README, scripts/upsdrvsvcctl/nut-driver- - enumerator.sh.in, scripts/upsdrvsvcctl/upsdrvsvcctl.in: Use target - for drivers in Linux systemd (updated) and SMF instances for - drivers in new Solaris-like systems (and bring AIX initscript into - better shape) (#330) * Use target for drivers in systemd This - allows much better granularity and better monitoring in case of - multiple UPSes. * nut-driver.target improvements suggested by - @peterhoeg in PR#229 * systemd units dependencies revised and - commented * nut-driver-enumerator.sh initial commit * nut- - driver@.service.in : integrate comments from @peterhoeg about - extending unit requirements * WIP : initial integration of nut- - driver-enumerator.sh/service into makefiles etc. * nut-driver- - enumerator.sh renamed into nut-driver-enumerator.sh.in as it has - processable templates in code * nut-driver-enumerator.sh.in : add - its own config-file support to set the variables used inside (if - not via command-line env) * nut-driver-enumerator.sh.in : fix up - the copyright header * Subject: Fix systemd service file for - Debian From: Laurent Bigonville Forwarded: not- - needed * nut-driver-enumerator.sh.in : complete the Solaris SMF - support in the helper script * EXTRA_DIST the scripts/systemd/nut- - driver.target (non-templated) file * nut-driver-enumerator.sh.in : - updated comments (esp. about usage and exit-codes) and runtime - messages * nut-driver-enumerator.service.in : define an actual - service payload * nut-driver-enumerator.sh.in : refactor the logic - of MAIN PROGRAM into smaller routines for readability * nut- - driver-enumerator.sh.in : introduce routines to help define custom - dependencies of particular drivers on other services * nut-driver- - enumerator.sh.in : allow custom NUT_CONF_DIR from envvar, to - facilitate testing * nut-server.service.in : typo fix in comments - * nut-driver-enumerator.sh.in : support the concept of localhost - networking dependencies, and define vars with lists of services to - depend on * nut-driver-enumerator.sh.in : use proper FMRI:instance - separator for SMF * nut-driver-enumerator.sh.in : added variables - for dependency type on third-party service units * nut-driver- - enumerator.sh.in : change upsconf_getDriverMedia() output from tab- - separated to multiline; add upsconf_getMedia() and upsconf_debug() - and upslist_debug() * nut-driver-enumerator.sh.in : refactor with - upsconf_getValue() and cached pre-cooked ups.conf data; - infrastructure to configure service dependencies when adding the - service instance * Remove hardcoded dependencies on udev and - network from provided systemd units; add comments about extending - via drop-in files and that nut-driver-enumerator will do this for - nut-drivers * nutshutdown.in : mark executable * nut-driver- - enumerator.sh.in : complete the systemd drop-in support for custom - dependencies for a driver * nut-driver-enumerator.sh.in : complete - the SMF drop-in support for custom dependencies for a driver * - nut-driver-enumerator.sh.in : comment-away upslist_debug() in - default runs * WIP Adding Solaris SMF manifests for NUT * - Sanitize Solaris SVR4 packaging rules * Sanitize Solaris packaging - scripts some more * Add configure options for Solaris packaging - variants * Sanitize Solaris packaging scripts some more - consider - DESTDIR for installation root * Turn solaris preproto.pl into a - template so it uses proper (configured) user/group strings * - Makefile.am : ensure there is a DESTDIR set before packaging * - Makefile.am : use $(MAKE) $(AM_MAKEFLAGS) instead of explicit - "make" (mostly in packaging recipe) * makelocal.sh : commented and - revised * Solaris/Makefile.am : put generated SVR4 package into - builddir (not srcdir that may be readonly) to match other OS - recipes * Makefile.am : ensure the DESTDIR is used for packaging - purposes (when calling sub-makes) * Solaris/pkginfo.in : ARCH is - CPU_TYPE, not OS_NAME * GitIgnore built Solaris/NUT*.local.gz - product * GitIgnore built systemd files * GitIgnore - _install_pkgprotodir * Makefile.am : ensure only the custom - DESTDIR is used for packaging purposes * Makefile.am : convert the - big packaging "if" into "case"; link steps with "&&"; retain - DESTDIR if Solaris packaging fails; ensure the correct custom - DESTDIR is absent before packaging (and after Solaris packaging) * - Solaris/Makefile.am : Revise recipe-names and comments for Solaris - packaging variants * Solaris/Makefile.am and *.xml.in : relocate - SMF methods and manifests under NUT DATADIR to package compactly * - Solaris-SMF : svc-nut.in svc-nut-client.in : use @RUN_AS_*@ and - @PIDPATH@ vars instead of hardcoding * Solaris/Makefile.am : list - helper scripts and installation scripts and data in variables and - depend on them in packaging; chmod +x the scripts after copying - over to proto area * GitIgnore config.cache * Remove - Solaris/prepackage.py (unreferenced duplicate of precheck.py) * - Solaris/nut.in : sanitize the default init-script * - Solaris/Makefile.am : put init-scripts under NUT share (DATADIR) to - package it compactly; copy to OS dirs in postinstall * Makefile.am - .gitignore etc. relocate successfully built package files to - abs_top_builddir * Change Aix/nut.init to a .in template * svc- - nut.in svc-nut-client.in : consider nut.conf if available * - Solaris/Makefile.am and SVR4 scripts : install augeas lenses as - part of NUT package (in DATADIR at least) * configure.ac : comment - about sysconfdir for NUT * Sanitize Aix/nut.init.in * More - standardization of Solaris initscripts and SMF methods; use - LD_LIBRARY_PATH to prefer NUT provided libs in case of conflicts - (facilitate bundling with third-party packages) * - Solaris/Makefile.am : add ability to "make check" something here, - e.g. validate manifest XMLs * Solaris SMF XML manifests : fix - "dependent" definitions, and add dependencies on required config - files * configure.ac : fix a manually crafted "Checking for" into - using AC_MSG routines * Solaris SVR4 packaging should now take - care of SMF service registration/teardown * Solaris preremove.in - postinstall.in : Usage of @datadir@ caused "${prefix}" strings to - pop up - define the vars * Solaris scripts : use lower-cased - @datadir@ in templates processed by configure * - Solaris/preremove.in : fix FMRI pattern when removing package * - Solaris/postinstall.in : fix SMF manifest dir * - Solaris/postremove.in : fix verbose RM; wipe the /var/run/nut dir - too * Solaris/preremove.in : fix commands when removing package * - Solaris/postinstall.in : enable SMF services if configs are already - available (esp. create nut-driver instances) * - Solaris/preremove.in : fix commands when removing package * - Solaris/postinstall.in : enable SMF services if configs are already - available (esp. create nut-driver instances) - verbosity * - Solaris/nut-driver-enumerator.xml.in : use a unique dependency name - (avoid conflict in nut-driver instances chain of deps) * systemd - and Solaris : fix up embedded ${prefix} in service files and SMF - manifests after generation * systemd/README : add recent authors - * Define a NUT_DATADIR and NUT_LIBEXECDIR with expanded path values - to use in service manifests * Solaris : packaged service - addition/removal more verbose * nut-driver-enumerator.xml.in nut- - driver.xml.in : do not block startup of nut server * nut.xml.in : - do not block startup of nut server due to failed nut-driver- - enumerator * nut-driver-enumerator.sh.in : improve portability by - using TAB char as is (not regex \t which gets misinterpreted by - some tools) * nut-driver-enumerator.sh.in : comment the caveats * - nut-driver-enumerator.sh.in : apcsmart is serial only * nut- - driver-enumerator.sh.in : By default, update wrapping of devices - into services... but keep the door open to other uses of the script - * nut-driver-enumerator.sh.in : refactor a bit and add externally - callable actions * Introduce upsdrvsvcctl with semantics similar - to upsdrvctl, but managing stop/start of SMF or systemd unit - instances * nut-driver-enumerator.sh.in : consider possible - difference of device and service instance names * nut-driver- - enumerator.sh.in : refactor md5 * nut-driver-enumerator.xml.in : - add REFRESH action and do not die on RESTART * Mention nut-driver- - enumerator and upsdrvsvcctl in (systemd/|Solaris/)README * - upsdrvsvcctl.in : updated comments * upsdrvsvcctl.in : added a - resync option * Rename Solaris SMF services to match systemd - patterns and ease life for sysadmins * Add systemd nut.target to - manage the bundle of NUT services * config-notes.txt : document - the systemd and SMF support in NUT * nut.dict : update - spellchecker * Solaris/Makefile.am : support copying where attrs - can not be preserved * Solaris postinstall : report if services - were not instantly enabled due to missing config files * - upsdrvsvcctl.in : reformat prettily * nut-driver-enumerator.sh.in - : wrap usage() * nut-driver-enumerator.sh.in : added --list- - services-for-devices * nut-driver@.service.in : comment about - aligning timeouts with ups.conf maxstartdelay * nut.xml.in : - Revise comments * nut-driver-enumerator.sh.in : when amending - service unit instance config for systemd, update the Description to - state the NUT device section name * nut-driver-enumerator.sh.in : - support common NUT_CONFPATH envvar * Add upsdrvsvcctl.txt manpage - and references to upsdrvsvcctl in other docs * upsdrvsvcctl.txt - manpage : refer to service management system logs * upsdrvsvcctl : - support "list upsname" CLI action to help troubleshooting * - upsdrvsvcctl : add handling for "shutdown" command * Docs about - upsdrvsvcctl - clarify that it may not be preinstalled with non- - SMF/non-systemd OS packages * Pass spellcheck for upsdrvsvcctl doc - updates * Solaris packaging of nut-driver-enumerator.sh : deliver - into libexecdir same as in Linux * Move nut-driver- - enumerator.sh.in and upsdrvsvcctl.in into scripts/upsdrvsvcctl to - share on par between Linux and Solaris (for starters) * Use - @NUT_LIBEXECDIR@ for nut-driver-enumerator.sh * Introduce nut- - driver-enumerator.path.in for systemd * nut-driver- - enumerator.service.in : be part of nut.target, not common multi- - user * Systemd services : be PartOf=nut.target to propagate - service stops * postinstall.in : use NUT_DATADIR * nut- - monitor.xml.in : depend on nut-server (if locally running) * - nut.xml.in : fix path (use pre-eval-ed version) * nut-driver- - enumerator.sh.in : add a way to print out just an instance suffix - name * nut-driver-enumerator.sh.in : when printing full instance - name, do not add stuff if the argument is already a full name * - nut-driver-enumerator.sh.in : implement --get-device-for-service * - nut-driver (systemd/SMF) : use "nut-driver-enumerator.sh --get- - device-for-service" for current service instance name * nut.xml.in - : this service is transient * upsdrvsvcctl.in : fix parameter - passing * upsdrvsvcctl.in : "clear" the SMF service state when - stopping/starting, just in case it was failed * nut-driver- - enumerator.sh.in : restart upsd IFF the set of known-device - mappings was changed * Revise and relax some dependencies for - Solaris SMF services * nut-driver-enumerator.sh.in : info messages - go to stderr; reply for request only goes to stdout * nut-driver- - enumerator.sh.in : complete the upslist_equals() method * - nut.xml.in : never fail on stop (if component services did not - stop, it is their problem) * Solaris preremove.in SMF : clear - sevices before stopping them, just in case * upsdrvsvcctl.in : - post-process clearing of SMF service instances if any have failed - * nut.xml.in : never fail on stop (if component services did not - stop, it is their problem) * Solaris preremove.in SMF : remove nut - before services it depends on * main.c upsdrvctl.c : make debug - messages a bit more useful * Solaris preremove.in SMF : do not - block stopping NUT driver services, but follow up with - upsdrv(svc)ctl stop of everything * Solaris preremove.in SMF : - sleep after stopping drivers before removing their services * - Solaris preremove.in SMF : force-remove services of drivers * nut- - driver.xml.in : rename a dependency to avoid conflicts * Solaris - nut.xml.in : add a refresh action handler * Solaris postinstall.in - SMF : first use nut-driver-enumerator.sh.in to just register the - mappings, no autostarts * Solaris preremove.in SMF : stop drivers - with common method (and use NUT_SBINDIR) before going one by one * - Solaris postinstall.in SMF : start the drivers via upsdrvsvcctl - after registering (so the mapping is stable) * Solaris - postinstall.in preremove.in : NUT_SBINDIR => SBINDIR * Add manpage - for nut-driver-enumerator[8] * Handle EXTRA_DIST of - scripts/upsdrvsvcctl/ with their own Makefile * nut-driver- - enumerator.txt : change to be more like other page sources * - Spellcheck nut-driver-enumerator.txt * Add - scripts/upsdrvsvcctl/README * Update gitignores * List new - manpages upsdrvsvcctl nut-driver-enumerator in index * Add - upsdrvsvcctl do scripts/Makefile.am SUBDIRS * upsdrvsvcctl.in nut- - driver-enumerator.sh.in : Add a way to show configs per device * - nut-driver-enumerator.sh.in : fix upsconf_getValue() to return - success if key was found, or report an error if not * nut-driver- - enumerator.sh.in : expose upsconf_getValue() as --show-device- - config-value * nut-driver-enumerator.sh.in : NOTE on top about the - choice of simplified shell * nut-driver-enumerator.sh.in : in - upsconf_getSection() stop after printing out the section contents - * nut-driver-enumerator.sh.in : refactor upsconf_getValue() to use - upsconf_getSection() * nut-driver-enumerator.sh.in : update - comment in header * nut-driver-enumerator.service.in : do not fail - the systemd unit, it cannot restart * Fix references for - configure.in to point to configure.ac nowadays * nut-driver- - enumerator.sh.in : use fully-pathed SMF svccfg in all parts of code - consistently * nut-driver-enumerator.sh.in : comment about not- - detecting reconfigurations of existing sections currently - * docs/man/Makefile.am, scripts/subdriver/gen-snmp-subdriver.sh: - Upstream smaller fixes from 42ity NUT (#587) * gen-snmp- - subdriver.sh : replace multiline "echo" with questional tabbing by - a single-string "printf" * docs/man/Makefile.am : fix merge error - that broke manpage packaging - -2018-07-31 Daniele Pezzini - - * tools/nut-scanner/nut-scanner.c: nutscanner: get debug level early - (for nutscan_init()) and restore options (#541) * Revert "Problem: - nutscan_init() called before debug is enabled" This reverts commit - f613d45f78c96c290a1d63d4a2c3f28385d90d42. When parsing the command - line (or showing help), many options rely on a nutscan_avail_* var - already initialized by nutscan_init() -- moving that call after the - parsing of opts renders those options unavailable. * nutscanner: - parse debug level opts separately before anything else In order to - have early the value of the desired debug level (needed to - correctly debug nutscan_init()), split the parsing of command line - options into two loops: - the first one, before the call to - nutscan_init(), will only care about debug level, - the second one, - after the call to nutscan_init(), will consider the remaining (and - possibly depending on a nutscan_avail_* var already initialized by - nutscan_init()) arguments (and moan in case of errors). Closes - https://github.com/networkupstools/nut/issues/500 - -2018-07-28 Daniele Pezzini - - * drivers/nutdrv_qx.c: nutdrv_qx: support USB devices that don't - close their replies with a CR Since some devices, when - communicating via USB, don't close their replies to our - commands/queries with the expected (and mandated by the specs) CR, - rendering the driver almost useless as protocols get one less - character than they expect, update the various USB subdrivers - (leaving out the ones that rely on a CR to stop reading from the - device) to add the missing terminating CR in such cases (as long as - we get anything usable). This is a bit of a cheat, but, at least - for now, it will do -- not to mention the fact that it is way less - invasive than touching all the places of the driver that expect a - closing CR and all the qx2nut tables of the various protocols. - Close https://github.com/networkupstools/nut/issues/441 - -2018-07-25 mbastiaan <35669404+mbastiaan@users.noreply.github.com> - - * drivers/tripplite_usb.c: input_voltage_nominal, added case 6 - SMX500RT1U 230V requires case 6. - * drivers/tripplite_usb.c: Update tripplite_usb.c Incremented driver - version for pull request #584 - * data/driver.list.in: Update driver.list.in Added new line for - SMX500RT1U with product ID 0001. Updated line for other product IDs - -2018-07-24 mbastiaan <35669404+mbastiaan@users.noreply.github.com> - - * drivers/tripplite_usb.c: Update tripplite_usb.c Added - battery.charge status for 3005 protocol. Tested on SMX500RT1U, - charge level seems ok-ish considering how it's calculated and the - voltage jumping up and down. - -2018-06-17 Links - - * drivers/mge-hid.c: get PowerWalker VFI 2000 TGS working, read - values correctly - -2018-03-17 Steve Gilbert - - * drivers/libhid.c: In HIDGetEvents.c call to get_interrupt, increase - timeout from 250 to 750 ms to allow more time for UPS response - (cherry picked from commit 5cea18c04a79cd873347efeffb6bb869edd8643e - --@clepple) Closes: - https://github.com/networkupstools/nut/pull/543 Closes: - https://github.com/networkupstools/nut/issues/542 - -2018-05-24 Charles Lepple - - * drivers/tripplite-hid.c: usbhid-ups: Add support for - Delta/Minuteman UPS - https://github.com/networkupstools/nut/issues/555 - -2018-05-22 Jim Klimov - - * .travis.yml, ci_build.sh: Change the Travis test-case for - NO_PKG_CONFIG==true - -2018-05-18 Arnaud Quette - - * scripts/subdriver/gen-snmp-subdriver.sh: Improve the SNMP subdriver - generation script Provide a 3rd mode to allow an offline creation - for a complete MIB walk. In this mode, we get data from 1 file - (numeric snmpwalk dump of the whole SNMP tree). The sysOID is - extracted from the dump, and only the pointed subtree is used. A - MIB file MUST be provided, and is used to produce the string SNMP - walk. Also reformatted the whole script using tab only, and - reconciled with the DMF version. - -2018-05-15 Bernhard M. Wiedemann - - * tools/nut-snmpinfo.py, tools/nut-usbinfo.pl: Sort input file list - (#528) so that nut builds in a reproducible way in spite of - indeterministic filesystem readdir order and - http://bugs.python.org/issue30461 See https://reproducible- - builds.org/ for why this is good. - -2018-05-02 Daniele Pezzini - - * drivers/nutdrv_qx.c: nutdrv_qx: in 'sgs' USB subdriver, use - #define'd value for USB timeouts - -2018-03-15 Daniele Pezzini - - * tools/nut-scanner/scan_usb.c: nutscanner: in scan_usb.c, nullify - free()'d pointers that are later reused We assign 'device_name', - 'serialnumber' and 'vendor_name' only if the analyzed device - provides that data and, since we use these pointers also to check - if those items are available so that we can store and free() them, - after free()'ing them we must make them NULL, or the next device, - if it does not provide that data, will inherit the old (now - free()'d) pointer and will attempt to access it and re-free() it. - * drivers/libusb1.c: libusb1: don't use the same var to iterate both - devices and interface descriptor From our old libusb.c, libusb1.c - inherited a for loop that iterates over the interface descriptor in - order to try and find the HID descriptor among its 'extra' bytes. - Unluckily, it uses the same var (i) that's now used, at the same - time, for the iteration through the device list, in which it - happens to be nested. Since this obviously spells disaster, make - these vars unique (and add a bit of debugging info). - -2018-03-14 Daniele Pezzini - - * data/cmdvartab, docs/nut-names.txt: libusb: update example of - driver.version.usb and add it to cmdvartab - * drivers/libusb1.c: libusb1: publish actual libusb version - * tools/nut-scanner/scan_usb.c: libusb: in nutscanner, free busname - also on nutscan_new_device() errors or when done with it - * drivers/bcmxcp_usb.c, drivers/libusb0.c, drivers/libusb1.c, - drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, tools/nut- - scanner/scan_usb.c: libusb: improve handling of errors when - allocating new memory - libusb 0.1 (when not shared with libusb - 1.0): prefer our xstrdup() function -- on errors, it'll - automatically call fatal*(), - libusb 1.0 (and nutscanner): don't - use our x{malloc,strdup,...}() functions, so that we can free the - list of devices (and close the device and call libusb_exit() in - nutscanner) before exiting. - * drivers/libusb1.c: libusb1: publish the interface we are actually - using - * drivers/richcomm_usb.c: richcomm_usb: use the local USB device - handle in usb_device_open() Although at that point of - usb_device_open(), both the local (handle) and the global (udev) - device handles point to the same thing, prefer the local one to - make things clearer. - * drivers/bcmxcp_usb.c, drivers/libusb0.c, drivers/libusb1.c, - drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c, tools/nut- - scanner/scan_usb.c: libusb: clean up after ourselves libusb 1.0: - - a device list allocated with libusb_get_device_list() must be - deallocated with a call to libusb_free_device_list(), - ditto for - the config descriptor. libusb 0.1 and 1.0: - release (commented- - out) interfaces when done with them, - remove unnecessary goto's - after calls to fatal*() functions, - nutscanner: also close the USB - device handle (and libusb_exit() for libusb 1.0) on errors. - -2018-03-13 Daniele Pezzini - - * drivers/bcmxcp_usb.c, drivers/tripplite_usb.c: usb drivers: free - USBDevice_t's dynamically allocated items when cleaning - -2018-03-13 Georg Altmann - - * docs/nut.dict: doc: update nut.dict - * INSTALL.nut: doc: Update installation instructions for FreeBSD - Details usb device permissions. Also pkg and new port config style. - -2018-03-10 Patrik Dufresne - - * drivers/powerp-txt.c: Fix tabs - * drivers/powerp-txt.c: Change status line parsing for CyberPower - OR1500LCDRTXL2U Add a new way to parse the status line in - powerpanel text driver to support CyberPower model OR1500LCDRTXL2U - with serial cable. This model doesn't provide temperature, but does - provide runtime. - -2018-03-09 Jim Klimov - - * drivers/main.c, drivers/upsdrvctl.c: main.c upsdrvctl.c : make - debug messages a bit more useful - -2018-03-05 Daniele Pezzini - - * drivers/richcomm_usb.c: richcomm_usb: don't libusb_exit() when - closing a previously opened device - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: don't libusb_exit() - when closing a previously opened device - * drivers/libusb1.c: libusb1: don't libusb_exit() when closing a - previously opened device - * drivers/riello_usb.c: riello_usb: use libusb_bulk_transfer() for - bulk operations - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: add missing 'inline' - keyword - -2018-03-04 Charles Lepple - - * drivers/usbhid-ups.c: usbhid-ups: fix instcmd logging before - fallback check The hidups_item pointer needs to be checked for - NULL before dereferencing. - -2018-02-28 Jim Klimov - - * drivers/snmp-ups.c: Fix the recently added update for Avocent - support (#532) * Problem: snmp-ups segfaults Solution: - base_snmp_template_index() prevented from processing empty argument - * Problem: index has to be counted for any device not just for - daisychain Solution: counted for both * Problem: debug info - needs improvement Solution: added * drivers/snmp-ups.c : bump - the version for public-release driver fix * snmp-ups.c : Fix - indentation for recent fixes - -2018-02-20 Bernhard M. Wiedemann - - * tools/nut-usbinfo.pl: Cleanup usbinfo code to reduce code - duplication and solve an associated FIXME - -2018-02-16 Arnaud Quette - - * data/driver.list.in, drivers/Makefile.am, drivers/emerson-avocent- - pdu-mib.c, drivers/emerson-avocent-pdu-mib.h, drivers/snmp-ups.c: - snmp-ups: Add support for Emerson Avocent PM3000 PDU - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: various - improvements This prepares the addition of newer devices - -2018-01-11 Daniele Pezzini - - * m4/nut_check_libusb.m4: autoconf: support libusb 0.1 - implementations identified as 'libusb-0.1' Make NUT_CHECK_LIBUSB - macro aware of those libusb 0.1 implementations named in their pkg- - config files as 'libusb-0.1', instead of just 'libusb' (e.g. on - FreeBSD). - -2018-01-10 Daniele Pezzini - - * drivers/nutdrv_qx.c: nutdrv_qx: update USB errors handling to - support both libusb 0.1 and 1.0 - -2018-01-02 Charles Lepple - - * configure.ac: Fix AC_MSG_*() quoting The autoconf quote characters - are `[` and `]` - no need for `"`. - -2018-01-01 Charles Lepple - - * m4/nut_check_libusb.m4: Add autoconf check for libusb_strerror() - Closes: https://github.com/networkupstools/nut/issues/509 - * docs/man/nutdrv_qx.txt, docs/man/snmp-ups.txt, - docs/man/ups.conf.txt, docs/man/usbhid-ups.txt: doc: Clean up - description of `pollfreq` and USB interrupts Closes: - https://github.com/networkupstools/nut/issues/476 - -2017-12-05 Jim Klimov - - * .travis.yml: .travis.yml : add a test-case for builds in absence of - pkg-config in the OS - -2017-11-29 Arnaud Quette - - * docs/configure.txt, docs/man/nutupsdrv.txt, docs/man/upsd.txt: doc: - missing documentation for NUT_* env vars Complete documentation - for upsd and drivers related to the environment variables - NUT_CONFPATH, NUT_STATEPATH and NUT_ALTPIDPATH - -2017-04-08 Sam Varshavchik - - * docs/man/Makefile.am: Fix creation of documentation from - libnutclient_misc.txt A simple .txt.3 rule doesn't understand that - libnutclient_misc.txt creates a bunch of .3. A parallel build, say - 'make -j 10' results in make trying to figure out how to build - nutclient_authenticate.3 before building libnutclient_misc.3, and - without a corresponding .txt in sight it gives up. Rebased onto - master by Charles Lepple clepple+nut@gmail.com Closes: - https://github.com/networkupstools/nut/pull/418 - -2017-11-28 Arnaud Quette - - * docs/man/usbhid-ups.txt: doc: minor formatting in usbhid-ups man - page - -2017-11-27 Arnaud Quette - - * docs/man/nutupsdrv.txt: doc: reword nutupsdrv man page Reference: - https://github.com/networkupstools/nut/issues/476 - -2017-11-27 Jim Klimov - - * tools/nut-scanner/nut-scanner.c: Problem: nutscan_init() called - before debug is enabled Solution: Move the call to this stateless - function to the point after we parse arguments and just before we'd - start the actual scans. Later this can be extended to also consider - which scans were requested and so which libs to load. Thanks to - @clepple for research in - https://github.com/networkupstools/nut/issues/500 - -2017-11-26 Charles Lepple - - * docs/man/usbhid-ups.txt: doc: reword other parts of usbhid-ups man - page - * docs/man/usbhid-ups.txt: doc: mention CPS delay quirks in usbhid- - ups man page Closes: - https://github.com/networkupstools/nut/issues/432 - * tools/nut-scanner/scan_usb.c: nut-scanner: update - usb_get_string_simple() for libusb-1.0 API Closes: - https://github.com/networkupstools/nut/issues/499 - * drivers/libusb1.c: libusb1: const-ify the USB interface number - Remove a few "magic numbers" from USB/HID-related calls. - * drivers/libusb1.c: libusb1: LBYL approach to - libusb_set_auto_detach_kernel_driver() Switch to look-before-you- - leap (LBYL) approach to calling - libusb_set_auto_detach_kernel_driver(), since FreeBSD (11.0 and - 11.1; probably others) requires root privileges to attempt the - kernel driver detach (even if no detach operation is needed). - * m4/nut_check_libusb.m4: libusb1: check for - libusb_kernel_driver_active() - -2017-11-21 Charles Lepple - - * data/driver.list.in: HCL: Change Riello IDG/IPG support level to 4 - The IDG and IPG models were not included in the protocol - documentation provided to the NUT project. Some values are also - returned as 0xFF/0xFFF/0xFFFF - see the HCL for details. Source: - http://lists.alioth.debian.org/pipermail/nut- - upsdev/2017-November/007357.html - -2017-11-17 Arnaud Quette - - * docs/man/nutupsdrv.txt, docs/man/usbhid-ups.txt: man pages: - clarification on polling parameters Explain difference between - pollfreq and pollinterval in usbhid-ups, and highlight the - pollinterval parameter use from ups.conf in nutupsdrv Closes: - https://github.com/networkupstools/nut/issues/476 - * data/driver.list.in: HCL: Eaton 9PX supported by mge-shut, usbhid- - ups and netxml-ups - * data/driver.list.in: HCL: Eaton ATS 30 supported by snmp-ups - * drivers/Makefile.am, drivers/mge-hid.c: mge-shut/usbhid-ups: - compute Output load for Eaton UPS When HID data - UPS.PowerConverter.Output.ActivePower is not present, compute a - realpower approximation using available data. This is needed for - Eaton 5E and some other units Closes: - https://github.com/networkupstools/nut/issues/484 - -2017-10-30 Michal Marek - - * Makefile.am, configure.ac, scripts/systemd/Makefile.am: - configure.ac: Fix systemd shutdown directory detection The - configure script assumes that systemd is installed below ${libdir}, - which is not true on many biarch Linux distros with /lib64. Instead - of guessing, use pkg-config to find the path and provide a --with- - systemdshutdowndir option so that make distcheck can override it. - Also, rename the internal varable to systemdshutdowndir to rhyme - with the respective systemd.pc variable. - -2017-10-20 Jim Klimov - - * configure.ac: Problem: configure fails on system without pkg-config - Solution: detect presence and usability of pkg-config program and - autotools macros (they end up as unexpanded tokens if pkg-config is - not installed), and use this knowledge to proceed with search for - libcppunit - or not. When the test is optional, we should not kill - the build if we can not make it due to missing tools. - -2017-10-11 Jim Klimov - - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : line- - breaks for readability and 80-col standard - pass 2 - * drivers/eaton-pdu-marlin-mib.c: eaton-pdu-marlin-mib.c : line- - breaks for readability and 80-col standard - -2017-10-08 Charles Lepple - - * docs/hid-subdrivers.txt: hid-subdrivers.txt: fix explore command - line Also reformat some surrounding text. Closes: - https://github.com/networkupstools/nut/issues/436 - * docs/hid-subdrivers.txt: hid-subdrivers.txt: clarify Tripp-Lite USB - reference Closes: - https://github.com/networkupstools/nut/issues/452 - * docs/man/powerpanel.txt: powerpanel: emphasize that this driver is - serial-only Apparently, the PowerPanel Plus vendor tool also has - USB support. - * docs/man/belkin.txt, docs/man/belkinunv.txt: belkin/belkinunv: add - links to man pages for other Belkin drivers - * docs/man/tripplite_usb.txt: tripplite_usb: update man page * Fix - link to tripplitesu(8) * Add 3005 protocol * Update protocol - variable name - * docs/man/dummy-ups.txt: dummy-ups: last state should be "OB LB" to - match text Also corrected a typo. - -2017-10-03 Arnaud Quette - - * docs/configure.txt: Update configure documentation for libusb - Document the possibility to override the auto-detection choice - -2017-10-04 Daniele Pezzini - - * configure.ac, m4/nut_check_libusb.m4: libusb 1.0 port: directly use - `--with-usb` to choose the library - -2017-10-03 Arnaud Quette - - * docs/configure.txt: Remove an extraneous point - * docs/configure.txt: Update configure documentation for libusb - Document the possibility to override the auto-detection choice, - even though the implementation of this override is not yet - currently working - -2017-10-02 Daniele Pezzini - - * docs/configure.txt, m4/nut_check_libusb.m4: libusb 1.0 port: - support libusb 0.1/-compat even when 1.0 is available Since libusb - 1.0 can happily coexist with libusb 0.1/libusb-compat, rework our - NUT_CHECK_LIBUSB macro so that, if both are available, libusb 1.0 - precedence can be overridden passing to `configure` appropriate - values for `--with-usb-includes` and `--with-usb-libs` (i.e. libusb - 0.1/libusb-compat-only settings). - * m4/nut_check_libusb.m4: libusb 1.0 port: expand a bit the - introductory comment of libusb ac macro - * m4/nut_check_libusb.m4: libusb 1.0 port: use only one AC_DEFINE'd - variable for libusb 0.1/-compat Libusb 0.1/libusb-compat can be - found with both pkg-config and with its own libusb-config, but, - regardless of how we found it, we need to use the same AC_DEFINE'd - variable to signal its presence. - * m4/nut_check_libusb.m4: libusb 1.0 port: don't check if libusb is - usable, if it's not available Since LIBUSB_VERSION is always non- - empty ('none', if libusb is not found), testing for non-emptiness - will always fail and libusb 0.1/libusb-compat checks will always be - performed. So, test instead that it is not 'none'. - -2017-03-22 Arnaud Quette - - * drivers/libusb1.c, drivers/nut_libusb.h, tools/nut- - scanner/scan_usb.c: Fix spacers - -2016-11-09 Charles Lepple - - * docs/nut-names.txt, drivers/libusb0.c, drivers/libusb1.c: Add - `driver.version.usb` variable Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-09-25 Charles Lepple - - * drivers/libusb1.c: libusb1: use return code from libusb_open() Per - , the handle is only populated when the return code - is 0. This fixes a crash during device detection where more than - one HID UPS is available, and the driver needs to skip the first - one. - -2016-09-02 Arnaud Quette - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/libusb1.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c: libusb 1.0 port: fix - return code for interrupt ops libusb 1.0 returns on success, the - number of bytes actually transferred or otherwise an error code, - except for interrupt transfers, where the actual transfer size is - stored in a separate variable. The libusb 1.0 implementation in NUT - thus needed to be fixed to behave the same way than the libusb 0.1 - implementation Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-31 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0 port: remove the check on USB device - count With the port to libusb 1.0, a sanity check was done on the - available number of USB devices to try. This however caused a - behavior regression, since the only device that NUT may have access - to can be the only UPS connected. In this case, the driver may exit - upon trying to reconnect if the device is transiently not available - Reference: https://github.com/networkupstools/nut/issues/300 - * drivers/libusb1.c, drivers/richcomm_usb.c: libusb 1.0 port: - complete usb_set_altinterface code usb_set_altinterface allows to - force the USB code to call `libusb_set_interface_alt_setting (0, - 0)` (equivalent to `libusb_set_altinterface(0)` in libusb 0.1), as - was done in NUT 2.7.2 and earlier. However, the libusb 1.0 - implementation was still missing the related code Reference: - https://github.com/networkupstools/nut/issues/300 - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: libusb 1.0 port: - fix kernel driver detachment Following the recent modification for - the kernel driver detachment, and the related functions - availability depending on the platforms, nutdrv_atcl_usb and - richcomm_usb were using the wrong macro for - libusb_set_auto_detach_kernel_driver and were missing the libusb - 1.0 code for explicit kernel driver detachment Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-17 Arnaud Quette - - * drivers/libusb1.c, m4/nut_check_libusb.m4: libusb 1.0 port: rework - the kernel driver detachment libusb 1.0 has introduced a new - function (libusb_set_auto_detach_kernel_driver), beside from the - explicit kernel driver detachment request - (libusb_detach_kernel_driver). However, the former is not available - on all systems. As an example, FreeBSD 10.1-10.3 does not have - this. The detachment and interface claiming has been reworked to - handle this case (reported by Charles Lepple) Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-12 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0: remove unused typesafe_control_msg() - workaround For libusb 0.1 implementation, we had to workaround a - libusb API goofs, by wrapping the base function usb_control_msg(), - and casting the variables to the right type. This is not needed for - libusb 1.0 implementation, but was wrongly left in the code - (reported by Charles Lepple) - -2016-08-11 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: fix a warning on unused variable - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: simplify bus publication - bus publication was wrongly listing both the bus and the portname, - instead of the bus only. This may have caused some issue when - trying to match the port - * drivers/usbhid-ups.c: usbhid-ups/mge-shut: forgotten version bump - * drivers/usbhid-ups.c: usbhid-ups/mge-shut: rework errno/errors - handling libusb 1.0 has its own set of return codes, and error - interface. Rework the common HID core (shared between usbhid-ups - and mge-shut) so that error handling can work with both, and using - either libusb 0.1 or 1.0 for usbhid-ups - * tools/nut-scanner/scan_usb.c: nut-scanner: missing symbols lookup - for libusb 1.0 A few symbols from libusb 1.0 were wrongly used - directly, instead of being looked up and loaded at init time - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: add missing libusb_exit() - calls - * tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_usb.c, - tools/nut-usbinfo.pl: nut-scanner: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: Remove redundant - variable - * drivers/tripplite_usb.c: tripplite_usb: remove extraneous comment - char - * drivers/nut_libusb.h: permute typedef order of usb_dev_handle - * drivers/nutdrv_qx.c: nutdrv_qx: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/richcomm_usb.c: richcomm_usb: missing function remap for - libusb 0.1 usb_strerror was not remapped for libusb 0.1 - implementation - * drivers/tripplite_usb.c: tripplite_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/riello_usb.c: riello_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - -2016-08-10 Arnaud Quette - - * drivers/richcomm_usb.c: richcomm_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: add the missing detach - call libusb 1.0 provide its own routine for detaching kernel - driver - * drivers/Makefile.am, drivers/libhid.c, drivers/nut_libusb.h: - Forgotten occurences of libusb.h renaming NUT internal header - "libusb.h" was renamed, since it collides with the libusb 1.0 - header, which has the same name. A few occurences of reference and - documentation were however missing - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: initial port to libusb - 1.0 The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/blazer_usb.c: blazer_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/bcmxcp_usb.c: bcmxcp_usb: code cleanup - -2016-08-09 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * docs/configure.txt, drivers/Makefile.am, drivers/libhid.c, - drivers/libhid.h, drivers/{libusb.c => libusb0.c}, - drivers/libusb1.c, drivers/{libusb.h => nut_libusb.h}, drivers/usb- - common.h, drivers/usbhid-ups.c: ushid-ups: complete the port to - libusb 1.0 The port to libusb 1.0 is now complete for usbhid-ups. - Other USB drivers (bcmxcp_usb, blazer_usb, nutdrv_atcl_usb, - richcomm_usb, riello_usb, tripplite_usb, nutdrv_qx) have still to - be addressed - -2016-08-01 Arnaud Quette - - * configure.ac, m4/nut_check_libusb.m4: Initial port to libusb 1.0 - Starting with the configure checks, to detect if libusb 1.0 if - available, and otherwise fall back to the libusb 0.1 backend - -2017-09-17 Jim Klimov - - * configure.ac, tests/Makefile.am: Improve configure script and - recipe for CPPUNIT and C++11 detection * Detect C++11 support and - its use for CPPUNIT tests through configure.ac - should address - issue #472 * Report after detecting C++11 support, presence of - libcppunit, and request for valgrind, whether we'd build the - cppunit tests * Update relevant comments in configure.ac - * drivers/libusb0.c, drivers/libusb1.c: libusb0.c / libusb1.c : - report more visibly if we encountered errors accessing the device - (issue #477) - * drivers/libusb0.c, drivers/libusb1.c: libusb0.c / libusb1.c : - sanitize indentation and break up long-lines - -2017-09-21 Spiros Ioannou - - * drivers/phoenixcontact_modbus.c: phoenixcontact_modbus: fix stale - data detection Also mark driver as DRV_BETA Source: - http://lists.alioth.debian.org/pipermail/nut- - upsdev/2017-September/007331.html - -2017-09-17 Jim Klimov - - * configure.ac: configure.ac : look for CPPUNIT after detecting pkg- - config presence, can help vs. issue #478 - -2017-09-06 Jim Klimov - - * common/common.c: common.c : dflt_statepath() / altpidpath() : - support defined-but-empty envvars to have same effect as not- - defined - * common/common.c: common.c : altpidpath() : support priority of an - envvar, like statepath does - -2017-09-05 Jim Klimov - - * drivers/main.c: main.c : update usage message with hints about - running as unprivileged user - -2017-08-28 Jim Klimov - - * .travis.yml, clients/upsclient.c, drivers/dstate.h, drivers/eaton- - pdu-marlin-mib.c, tests/Makefile.am: A few small fixes for cleaner - codebase and compilations (#466) * dstate.h : use our timehead.h - to have "struct timeval" defined * eaton-marlin : cosmetic - whitespace fixes * tests/Makefile.am : cppunit should build with - C++11 * .travis.yml : make sure to use "docker" env with its - gcc-4.8+ for support of C++11 in cppunit tests - -2017-08-24 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am : fix up access rights for other - files in docs too (some PNGs end up inaccessible otherwise) - -2017-08-23 Arnaud Quette - - * docs/nut-names.txt, docs/nut.dict, drivers/eaton-ats16-mib.c: 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 * Make spellchecker happy about - "dephasing" - -2017-08-23 Christian Ehrhardt - - * drivers/Makefile.am: 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 - -2017-08-23 Jim Klimov - - * docs/snmp-subdrivers.txt, drivers/Makefile.am, drivers/eaton-mib.h, - drivers/eaton-pdu-genesis2-mib.c, drivers/eaton-pdu-genesis2-mib.h, - drivers/{eaton-mib.c => eaton-pdu-marlin-mib.c}, drivers/eaton-pdu- - marlin-mib.h, drivers/eaton-pdu-pulizzi-mib.c, drivers/eaton-pdu- - pulizzi-mib.h, drivers/eaton-pdu-revelation-mib.c, drivers/eaton- - pdu-revelation-mib.h, drivers/snmp-ups.c: 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 - -2017-08-16 Arnaud Quette - - * drivers/snmp-ups.c: 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 - -2017-08-07 Tobby - - * drivers/apcupsd-ups.c: 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 - -2017-08-10 Arnaud Quette - - * drivers/apc-ats-mib.c, drivers/apc-ats-mib.h: Remove exec bits on - SNMP subdrivers - -2017-08-02 Charles Lepple - - * drivers/cps-hid.c: 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 - -2017-08-04 Arnaud Quette - - * docs/nut-names.txt: NUT namespace: fix an extraneous character - insertion A character was wrongly inserted during the previous - commit, triggering a spellcheck error - * drivers/eaton-mib.c: snmp-ups: Publish outlet.n.name for Eaton ePDU - * docs/nut-names.txt: Extend namespace for iPDU and outlets Extend - NUT namespace to also publish the name of an outlet, using - "outlet.n.name", beside from the existing "outlet.n.desc" - -2017-08-03 Arnaud Quette - - * drivers/eaton-mib.c: snmp-ups: Fix the phase of outlet groups for - Eaton PDU Compute the phase to which an outlet group is connected - WRT the total number of phase(s) and the considered outlet group - number. - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: Introduce values - lookup functions As already used in other drivers, such as usbhid- - ups, introduce optional values lookup functions, beside from values - lookup mapping. This allows to have a more powerful and generic - values processing before publication - -2017-07-22 Charles Lepple - - * drivers/openups-hid.c: usbhid-ups: only check iOEMInformation once - for openups2 This prevents the 'libusb_get_string: invalid - argument' message from being logged continously. Patch provided by - Alphonse - http://lists.alioth.debian.org/pipermail/nut- - upsdev/2017-July/007314.html - -2017-02-02 Daniel Schaal - - * drivers/main.c: Add foreground option to drivers - * docs/man/upsd.txt, scripts/systemd/nut-server.service.in, - server/upsd.c: Add foreground option to upsd - -2016-12-17 Daniel Schaal - - * clients/upsmon.c, docs/man/upsmon.txt, scripts/systemd/nut- - monitor.service.in: Add option to run upsmon in foreground - -2017-06-26 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am : Suffice to have - prebuilt docs in dist-ed sources only if DOC_INSTALL_DISTED_MANS is - enabled - * docs/man/Makefile.am: docs/man/Makefile.am : Fix up dist-ed manpage - source timestamps regardless of DOC_INSTALL_DISTED_MANS value - * docs/man/Makefile.am: docs/man/Makefile.am : Fix up manpage source - timestamps when dist-ing - * docs/Makefile.am: docs/Makefile.am : make sure the builddir copy of - docbook-xsl.css is writeable (file is copied from OS, some distros - have it 444 and not 644) - * docs/man/Makefile.am: docs/man/Makefile.am : do not rebuild docs - and do not error out if a prebuilt copy is among sources (not only - in builddir as before) - * configure.ac, docs/man/Makefile.am: configure.ac - docs/man/Makefile.am : track DOC_INSTALL_DISTED_MANS fallback - behavior - * configure.ac, m4/nut_check_asciidoc.m4: m4/nut_check_asciidoc.m4 - configure.ac : parametrize the required minimum versions - (asciidoc/a2x, dblatex) - * configure.ac: configure.ac : refer to detailed doc from --with-doc - help text; preset explicit nut_with_doc=man=auto value - * docs/man/Makefile.am: docs/man/Makefile.am : small typo in comment - * configure.ac: configure.ac : move comment to a more relevant line - -2017-06-25 Charles Lepple - - * tools/gitlog2changelog.py: gitlog2changelog: log parse errors for - Author and Date Suggested by Jim Klimov. - * tools/gitlog2changelog.py: gitlog2changelog: Date header only - occurs at start of line Alternative to - https://github.com/networkupstools/nut/pull/427 - -2017-06-13 Arnaud Quette - - * drivers/main.c: all drivers: update inline help for '-d ' - -2017-06-12 Arnaud Quette - - * drivers/powerware-mib.c: snmp-ups: add input.bypass.frequency for - Eaton 3ph - -2017-06-12 EVER-PowerSystems - - * drivers/ever-hid.c: fixed status names, added comments, fixed - duplicates - * drivers/ever-hid.c: fixed NUT names - -2017-06-12 Arnaud Quette - - * docs/man/nutupsdrv.txt, drivers/main.c: all drivers: change - dump_data from flag to variable The new option '-d dump_data' can - now accept the number of update loops requested as its value - -2017-06-09 Arnaud Quette - - * drivers/main.c: all drivers: add '-d' data dump option Add '-d' - option to the driver-core, which causes the driver to dump the data - tree in upsc-like format to stdout, and exit - -2017-06-09 Arnaud Quette - - * docs/man/nutupsdrv.txt, drivers/dstate.c, drivers/dstate.h, - drivers/main.c: all drivers: add '-d' data dump option Add '-d' - option to the driver-core, which causes the driver to dump the data - tree in upsc-like format to stdout, and exit - -2017-06-12 Emilien Kia (Eaton) - - * docs/man/nutupsdrv.txt, drivers/main.c: Add option to run driver on - standalone mode. (#423) When a driver is launched with '-s ' - instead of '-a ', the driver does not read ups.conf and only - looks for parameters on command line arguments (-x =). At - least, 'port' parameter shall be specified. - -2017-06-03 Charles Lepple - - * drivers/belkin-hid.c: usbhid-ups: add Liebert GXT4 USB VID:PID - [10AF:0000] Source: http://lists.alioth.debian.org/pipermail/nut- - upsuser/2017-June/010682.html Voltage and ConfigVoltage appear to - be scaled improperly per the debug output. - -2017-05-24 Arnaud Quette - - * docs/nut-names.txt, drivers/eaton-mib.c, drivers/snmp-ups.c: snmp- - ups: add support for outlet.group phase (#422) * snmp-ups: fix - oid2info value lookup When oid2info returns NULL, don't publish - the variable. Previously, this was returning "UNKNOWN" which was - not suitable * snmp-ups: add support for outlet.group phase - Outlets groups can now publish the electrical phase to which the - physical outlets group (Gang) is connected to. This is useful for - 3ph ePDU - -2017-05-21 Charles Lepple - - * data/driver.list.in: HCL: CPS EC750G Source: - http://lists.alioth.debian.org/pipermail/nut- - upsuser/2016-December/010461.html - * data/driver.list.in: HCL: CPS PR2200LCDRT2U (SNMP) - -2017-05-20 Charles Lepple - - * data/driver.list.in: HCL: Add APC Back-UPS CS; edit other APC USB - entries Closes: https://github.com/networkupstools/nut/issues/365 - * data/driver.list.in: HCL: CyberPower EC350G supported by usbhid-ups - (v2.7.3) Per @aurimasv on GitHub: > Test results: Tested on - FreeNAS 9.10.1. Unplugged the UPS and the system > shutdown after - 30 seconds. Closes: - https://github.com/networkupstools/nut/issues/347 Also sorted CPS - entries. - * data/driver.list.in: HCL: Powercool 350VA to 1600VA USB (v2.7.2+) - Closes: https://github.com/networkupstools/nut/issues/203 - * data/driver.list.in: HCL: Numeric Digital 800 plus works with - nutdrv_qx Closes: - https://github.com/networkupstools/nut/issues/115 (~ 2.7.4) - -2017-05-08 EVER-PowerSystems - - * drivers/Makefile.am: fixed errors in makefile - * drivers/Makefile.am, drivers/ever-hid.c, drivers/ever-hid.h, - drivers/usbhid-ups.c, scripts/upower/95-upower-hid.rules: add EVER - hid ups - -2017-04-21 Jim Klimov - - * docs/Makefile.am: docs: build cables html documentation Don't skip - cables from html documentation. - -2017-04-09 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am : typo fix not-building - FAQ.chunked - -2017-04-21 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am : make the working directory - contents writable before running a2x, so it can manage files copied - as read-only in earlier steps - -2017-04-10 Jim Klimov - - * docs/Makefile.am, docs/man/Makefile.am: Some systems detect html- - pages as "XML" - please them too - * docs/man/Makefile.am: Some systems detect man-pages as "ASCII text" - - please them - -2017-04-10 Jim Klimov - - * docs/man/Makefile.am: Update Makefile.am Some systems detect text - sources as "ISO-8859 English" text - please them. - -2017-04-09 Jim Klimov - - * docs/man/Makefile.am: docs/man/Makefile.am : fix check-man-html for - distcheck - * docs/man/Makefile.am: docs/man/Makefile.am : fix check-man-pages - for distcheck - * docs/man/Makefile.am: docs/man/Makefile.am : fix check-man-txt for - distcheck - * configure.ac, docs/Makefile.am, docs/man/Makefile.am: Add "make - check" for generated (or "released" pre-built) docs - * docs/Makefile.am: docs/Makefile.am : typo fix not-building - FAQ.chunked - * configure.ac: configure.ac : add --with- - doc(s)=all={yes,no,skip,auto} to manch e.g. man=skip etc. syntax - -2017-04-05 Arnaud Quette - - * data/driver.list.in: Add support for Eaton 9PX Split Phase 6/8/10 - kVA Using netxml-ups, usbhid-ups and mge-shut - * drivers/netxml-ups.c: netxml-ups: bump driver version In order to - reflect update for 2phases, bump driver version - * drivers/dstate.c: dstate_detect_phasecount: update for 2phases - Update the code to be able to handle 2phases devices, also known as - "split phases" - -2017-04-04 Arnaud Quette - - * MAINTAINERS, data/driver.list.in, docs/man/nutupsdrv.txt, - drivers/Makefile.am, drivers/mge-shut.c, drivers/mge-shut.h: - oldmge-shut: final deprecation and removal oldmge-shut is not - anymore part of the distribution, and is replaced by mge-shut - -2017-04-04 Arnaud Quette - - * clients/upsclient.c, drivers/gamatronic.c, drivers/openups-hid.c, - drivers/snmp-ups.c, server/netssl.c, tools/nut-scanner/nutscan- - ip.c, tools/nut-scanner/nutscan-serial.c, tools/nut- - scanner/scan_eaton_serial.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_xml_http.c: - Cppcheck improvements (#405) Fix all Cppcheck errors, using - standard c89: * Uninitialized variables, * Memory leak, * Brackets - balancing, * Common realloc mistake, * Possible null pointer - dereference, * Array index out of bounds, * Not null-terminated - string - -2017-03-31 Nash Kaminski - - * docs/man/liebert-esp2.txt, docs/nut.dict, drivers/liebert-esp2.c: - liebert-esp2 changes: Correct battery V scaling, update docs, - implement split-phase unit support (#412) * Update liebert-esp2 - documentation, include note that port on GXT2 series does not fully - follow RS-232 specs. * Refactor output format of liebert-esp2 - driver to follow that of other drivers to fix the nut-cgi interface - as well as for overall consistency. Implement support for 2 phase - i.e. split phase input Liebert GXT2 series units. Correct battery - voltage scaling for GXT2 series units as well. * Update nut.dict - * Update nut.dict - -2017-03-30 Jim Klimov - - * .travis.yml: Problem: NUT tests in Travis CI often wait for - default-withdoc Solution in .travis.yml : since Travis cloud - starts the jobs as soon as it has resources, move the bulk of - quicker matrix jobs to start after the longest withdocs build. - Experimental note: we still need one job defined in the simple - matrix for default environment, but can keep others in a single - explicitly ordered list. Now the "Running for" time got cut from - 8-9 to 5.5-6 minutes. - -2017-03-29 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am : update comment about - spellcheck-sortdict post-processing, to make it more relevant - * docs/man/upsd.conf.txt, docs/nut.dict: Fix some more typos and add - nut.dict exceptions - -2017-03-29 Arnaud Quette - - * docs/man/upsd.conf.txt: upsd.conf.txt: fix a typo from the previous - commit - * conf/upsd.conf.sample, docs/man/upsd.conf.txt: upsd.conf: - clarification on the LISTEN directive - -2017-03-22 Arnaud Quette - - * drivers/libusb1.c, drivers/nut_libusb.h, tools/nut- - scanner/scan_usb.c: Fix spacers - -2016-11-09 Charles Lepple - - * docs/nut-names.txt, drivers/libusb0.c, drivers/libusb1.c: Add - `driver.version.usb` variable Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-09-25 Charles Lepple - - * drivers/libusb1.c: libusb1: use return code from libusb_open() Per - , the handle is only populated when the return code - is 0. This fixes a crash during device detection where more than - one HID UPS is available, and the driver needs to skip the first - one. - -2016-09-02 Arnaud Quette - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/libusb1.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c: libusb 1.0 port: fix - return code for interrupt ops libusb 1.0 returns on success, the - number of bytes actually transferred or otherwise an error code, - except for interrupt transfers, where the actual transfer size is - stored in a separate variable. The libusb 1.0 implementation in NUT - thus needed to be fixed to behave the same way than the libusb 0.1 - implementation Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-31 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0 port: remove the check on USB device - count With the port to libusb 1.0, a sanity check was done on the - available number of USB devices to try. This however caused a - behavior regression, since the only device that NUT may have access - to can be the only UPS connected. In this case, the driver may exit - upon trying to reconnect if the device is transiently not available - Reference: https://github.com/networkupstools/nut/issues/300 - * drivers/libusb1.c, drivers/richcomm_usb.c: libusb 1.0 port: - complete usb_set_altinterface code usb_set_altinterface allows to - force the USB code to call `libusb_set_interface_alt_setting (0, - 0)` (equivalent to `libusb_set_altinterface(0)` in libusb 0.1), as - was done in NUT 2.7.2 and earlier. However, the libusb 1.0 - implementation was still missing the related code Reference: - https://github.com/networkupstools/nut/issues/300 - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: libusb 1.0 port: - fix kernel driver detachment Following the recent modification for - the kernel driver detachment, and the related functions - availability depending on the platforms, nutdrv_atcl_usb and - richcomm_usb were using the wrong macro for - libusb_set_auto_detach_kernel_driver and were missing the libusb - 1.0 code for explicit kernel driver detachment Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-17 Arnaud Quette - - * drivers/libusb1.c, m4/nut_check_libusb.m4: libusb 1.0 port: rework - the kernel driver detachment libusb 1.0 has introduced a new - function (libusb_set_auto_detach_kernel_driver), beside from the - explicit kernel driver detachment request - (libusb_detach_kernel_driver). However, the former is not available - on all systems. As an example, FreeBSD 10.1-10.3 does not have - this. The detachment and interface claiming has been reworked to - handle this case (reported by Charles Lepple) Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-12 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0: remove unused typesafe_control_msg() - workaround For libusb 0.1 implementation, we had to workaround a - libusb API goofs, by wrapping the base function usb_control_msg(), - and casting the variables to the right type. This is not needed for - libusb 1.0 implementation, but was wrongly left in the code - (reported by Charles Lepple) - -2016-08-11 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: fix a warning on unused variable - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: simplify bus publication - bus publication was wrongly listing both the bus and the portname, - instead of the bus only. This may have caused some issue when - trying to match the port - * drivers/usbhid-ups.c: usbhid-ups/mge-shut: rework errno/errors - handling libusb 1.0 has its own set of return codes, and error - interface. Rework the common HID core (shared between usbhid-ups - and mge-shut) so that error handling can work with both, and using - either libusb 0.1 or 1.0 for usbhid-ups - * tools/nut-scanner/scan_usb.c: nut-scanner: missing symbols lookup - for libusb 1.0 A few symbols from libusb 1.0 were wrongly used - directly, instead of being looked up and loaded at init time - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: add missing libusb_exit() - calls - * tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_usb.c, - tools/nut-usbinfo.pl: nut-scanner: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: Remove redundant - variable - * drivers/tripplite_usb.c: tripplite_usb: remove extraneous comment - char - * drivers/nut_libusb.h: permute typedef order of usb_dev_handle - * drivers/nutdrv_qx.c: nutdrv_qx: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/richcomm_usb.c: richcomm_usb: missing function remap for - libusb 0.1 usb_strerror was not remapped for libusb 0.1 - implementation - * drivers/tripplite_usb.c: tripplite_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/riello_usb.c: riello_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - -2016-08-10 Arnaud Quette - - * drivers/richcomm_usb.c: richcomm_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: add the missing detach - call libusb 1.0 provide its own routine for detaching kernel - driver - * drivers/Makefile.am, drivers/libhid.c, drivers/nut_libusb.h: - Forgotten occurences of libusb.h renaming NUT internal header - "libusb.h" was renamed, since it collides with the libusb 1.0 - header, which has the same name. A few occurences of reference and - documentation were however missing - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: initial port to libusb - 1.0 The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/blazer_usb.c: blazer_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/bcmxcp_usb.c: bcmxcp_usb: code cleanup - -2016-08-09 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * docs/configure.txt, drivers/Makefile.am, drivers/libhid.c, - drivers/libhid.h, drivers/{libusb.c => libusb0.c}, - drivers/libusb1.c, drivers/{libusb.h => nut_libusb.h}, drivers/usb- - common.h, drivers/usbhid-ups.c: ushid-ups: complete the port to - libusb 1.0 The port to libusb 1.0 is now complete for usbhid-ups. - Other USB drivers (bcmxcp_usb, blazer_usb, nutdrv_atcl_usb, - richcomm_usb, riello_usb, tripplite_usb, nutdrv_qx) have still to - be addressed - -2016-08-01 Arnaud Quette - - * configure.ac, m4/nut_check_libusb.m4: Initial port to libusb 1.0 - Starting with the configure checks, to detect if libusb 1.0 if - available, and otherwise fall back to the libusb 0.1 backend - -2017-03-22 Arnaud Quette - - * clients/upssched-cmd, conf/upssched.conf.sample.in: upssched: align - documentation and sample files Align documentation and sample - configuration and script, so that the whole is more coherent - -2017-03-21 Arnaud Quette - - * docs/scheduling.txt: upssched: some clarification on TIMER - -2017-03-20 Charles Lepple - - * docs/nut.dict: Re-sort nut.dict (#406) * Re-sort nut.dict * - nut.dict header line - -2017-03-13 Spiros Ioannou - - * configure.ac, data/driver.list.in, docs/man/Makefile.am, - docs/man/index.txt, docs/man/phoenixcontact_modbus.txt, - docs/nut.dict, drivers/Makefile.am, - drivers/phoenixcontact_modbus.c, m4/nut_check_libmodbus.m4: - phoenixcontact_modbus driver Closes: - https://github.com/networkupstools/nut/pull/404 - -2017-03-14 Spiros Ioannou - - * .travis.yml: added libmodbus-dev to travis configuration - -2017-03-15 Jim Klimov - - * docs/config-notes.txt: config-notes.txt : small clarifications in - the text - * docs/developers.txt: developers.txt : small clarifications in the - text and line-wrapping and backticks - * docs/config-notes.txt: config-notes.txt : small clarifications in - the text and line-wrapping - * docs/cables.txt: cables.txt : line-wrapping - * docs/asciidoc.txt: asciidoc.txt : line-wrapping - * docs/acknowledgements.txt: acknowledgements.txt : line-wrapping - * docs/support.txt: support.txt : small clarifications in the text - and line-wrapping - * docs/security.txt: security.txt : small clarifications in the text - and line-wrapping - * docs/outlets.txt: outlets.txt : line-wrapping - * docs/new-drivers.txt: new-drivers.txt : line-wrapping - * docs/net-protocol.txt: net-protocol.txt : line-wrapping - * docs/maintainer-guide.txt: maintainer-guide.txt : small - clarifications in the text and line-wrapping and backticks - * docs/macros.txt: macros.txt : line-wrapping - * docs/history.txt: history.txt : line-wrapping - * docs/features.txt: features.txt : small clarifications in the text - and line-wrapping and backticks - * docs/download.txt: download.txt : line-wrapping - * docs/developers.txt: developers.txt : small clarifications in the - text and line-wrapping and backticks - * docs/daisychain.txt: daisychain.txt : small clarifications in the - text and line-wrapping - * docs/configure.txt: configure.txt : small clarifications in the - text - * docs/config-notes.txt: config-notes.txt : small clarifications in - the text - * docs/acknowledgements.txt: acknowledgements.txt : small - clarifications in the text - * docs/FAQ.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx- - subdrivers.txt : small clarifications in the text - -2017-03-13 Jim Klimov - - * docs/nut.dict: nut.dict : add "distros" slangey - * docs/configure.txt, docs/contact-closure.txt, docs/daisychain.txt, - docs/developers.txt, docs/features.txt, docs/history.txt, docs/net- - protocol.txt, docs/new-drivers.txt, docs/nut-names.txt, docs/nut- - qa.txt, docs/nutdrv_qx-subdrivers.txt, docs/outlets.txt, docs/sock- - protocol.txt: docs/*.txt : cleanup long-dash (use double-minus) - * docs/acknowledgements.txt, docs/cables.txt, docs/configure.txt, - docs/contact-closure.txt, docs/design.txt, docs/developer- - guide.txt, docs/developers.txt, docs/documentation.txt, - docs/download.txt, docs/features.txt, docs/hid-subdrivers.txt, - docs/history.txt, docs/macros.txt, docs/maintainer-guide.txt, - docs/net-protocol.txt, docs/new-clients.txt, docs/new-drivers.txt, - docs/nut-names.txt, docs/nut-qa.txt, docs/outlets.txt, - docs/packager-guide.txt, docs/snmp-subdrivers.txt, docs/snmp.txt, - docs/sock-protocol.txt, docs/support.txt, docs/user-manual.txt: - docs/*.txt : cleanup trailing whitespace - -2017-03-13 Arnaud Quette - - * scripts/systemd/nutshutdown.in: Prefer @CONFPATH@ over @sysconfdir@ - Otherwise, the generated nutshutdown script can end up with a non - fully expanded path like "${prefix}/etc/nut.conf" when not - specifying --sysconfdir and using default flags - -2017-01-28 Laurent Bigonville - - * scripts/systemd/nutshutdown.in: Add support for POWEROFF_WAIT - parameter Use "systemctl reboot --force --force" to reboot the - machine has not been shutdown after the POWEROFF_WAIT delay. - Closes: #382 - -2017-03-04 Jim Klimov - - * drivers/snmp-ups.c: snmp-ups.c : presumed typo fix : NUT var for - bypass mapping is "input.bypass" (fix the caller too) - -2017-03-15 Jim Klimov - - * docs/nut.dict: nut.dict : know of "nowait" - -2017-01-28 Jim Klimov - - * docs/man/ups.conf.txt, docs/man/upsdrvctl.txt, drivers/upsdrvctl.c: - From: Arnaud Quette Date: Sat, 7 Jun 2014 - 02:27:15 +0200 Subject: [PATCH] Add 'nowait' option for upsdrvctl - in ups.conf The nowait flag allow to tell upsdrvctl to not wait at - all for the driver(s) to execute the request command. The default - behavior, when this variable is omitted, is to wait 'maxstartdelay' - seconds - -2017-03-13 Arnaud Quette - - * scripts/systemd/nutshutdown.in: Prefer @CONFPATH@ over @sysconfdir@ - Otherwise, the generated nutshutdown script can end up with a non - fully expanded path like "${prefix}/etc/nut.conf" when not - specifying --sysconfdir and using default flags - * docs/scheduling.txt: Disambiguate FHS - Filesystem Hierarchy - Standard - * docs/security.txt: Missing space - -2017-03-13 Jim Klimov - - * docs/FAQ.txt, docs/config-notes.txt, docs/scheduling.txt, - docs/security.txt: Some docs/ files revised to backtick pathnames, - clean up trailing whitespace, and use double-minuses for long-dash - in sentences - * docs/nut.dict: docs/nut.dict : add "FHS" - -2017-03-04 Arnaud Quette - - * docs/FAQ.txt, docs/config-notes.txt, docs/scheduling.txt, - docs/security.txt: Try to adapt paths in documentation - Documentation still widely uses the default paths source when - compiled from source. While it is feasible to adapt some at - compilation time, it is not desirable since, for example, the - online documentation on networkupstools.org has to be generic. So - try to make these paths more generic when possible, and otherwise - make a note - -2017-03-04 Jim Klimov - - * docs/hid-subdrivers.txt, docs/nut.dict: spellcheck: "futher" is a - mistaken exception in custom dictionary - * docs/nut.dict: nut.dict bumped to support nut-website documents - with words that Travis does not know - * drivers/snmp-ups.c: snmp-ups.c : presumed typo fix : NUT var for - bypass mapping is "input.bypass" (fix the caller too) - * docs/nut.dict: nut.dict bumped to support nut-website documents - with words that Travis does not know - * docs/nut.dict: nut.dict bumped to support nut-website documents - -2017-03-02 Arnaud Quette - - * tools/nut-ddl-dump.sh: nut-ddl-dump.sh: various improvements - Improve the script to generate NUT device dumps by adding: * a - header line that mentions the generation source (automatic) and - date * add upsrw dump as comments * add upscmd dump as comments - * drivers/eaton-ats16-mib.c: snmp-ups: ATS16 fixes for ambient sensor - values Values for the attached ambient sensor to an ATS16 were - erroneously multiplied by 10 - -2017-03-01 Jim Klimov - - * drivers/mge-xml.c: Update mge-xml.c Include drivers/main.h to get - testvar() declared properly - -2017-03-01 Jim Klimov - - * docs/man/upscli_init.txt: docs/man/upscli_init.txt : rephrase the - text to pass spellcheck (and human readability) and wrap some long - lines - * drivers/snmp-ups.c: snmp-ups.c : presumed typo fix : NUT var for - bypass mapping is "input.bypass" - * drivers/snmp-ups.c: snmp-ups.c : added comments about some - daisychain global vars - -2017-02-28 Jim Klimov - - * drivers/snmp-ups.c: drivers/snmp-ups.c : in snmp_ups_walk(), report - in log if aborting because of exit_flag - * drivers/snmp-ups.c: drivers/snmp-ups.c : in snmp_ups_walk(), update - some comments - * drivers/snmp-ups.c: drivers/snmp-ups.c : presumed typo fix in - comment about daisy (should be "1..N" not "2..N" in final code) - * drivers/snmp-ups.c: drivers/snmp-ups.c : comment in snmp_ups_walk() - about daisychains vs unitary devices - * drivers/snmp-ups.c: drivers/snmp-ups.c : comment in snmp_ups_walk() - about daisychains vs unitary devices - * drivers/snmp-ups.c: drivers/snmp-ups.c : fix trailing whitespace - * drivers/dstate.c, drivers/dstate.h, drivers/usbhid-ups.h: - drivers/dstate.c : in dstate_detect_phasecount() do not hardcode a - buf[] size but use a macro - * drivers/dstate.c: drivers/dstate.c : extend a comment about 2-phase - devices into dstate_detect_phasecount() - -2017-02-12 Jim Klimov - - * drivers/dstate.c: dstate.c : catch a few more zero value - representation and comment about others - -2017-02-10 Jim Klimov - - * drivers/dstate.c: dstate.c : refactor dstate_detect_phasecount() : - change the report about calculated values to use common format with - __func__ - * drivers/dstate.c: dstate.c : refactor dstate_detect_phasecount() : - change the no-longer-sexy overgrown one-liners with a readable - macro - * drivers/dstate.c: dstate.c : important typo fixed for - dstate_detect_phasecount() - * drivers/dstate.c: dstate.c : revise comment for - dstate_detect_phasecount() - * drivers/dstate.c: dstate.c : address code style (move var - declarations to top of scope) - * drivers/dstate.c: dstate.c : address some nit-picks - -2017-02-09 Jim Klimov - - * drivers/dstate.c, drivers/dstate.h, drivers/mge-xml.c: Refactor - dstate_detect_phasecount(), adding a read-only mode (so the caller - can query the guesswork logic without changing active dstates) - * drivers/dstate.c, drivers/dstate.h, drivers/mge-xml.c: Refactor the - dstate guesswork and setting for 1/3 phases, move it to common - dstate.c/.h and rename to dstate_detect_phasecount() - * drivers/mge-xml.c: Refactor recent logic into a common - set_phasecount() - * drivers/mge-xml.c: Drop an empty line - * drivers/mge-xml.c: mge-xml.c : calculate - (input|bypass|output).phases number (1 or 3) based on available - non-zero measurements - typo fix for "INPUT.bypass." - * drivers/mge-xml.c: mge-xml.c : calculate - (input|bypass|output).phases number (1 or 3) based on available - non-zero measurements - consider absence of Lx values for 1-phase - case - * drivers/mge-xml.c: mge-xml.c : calculate - (input|bypass|output).phases number (1 or 3) based on available - non-zero measurements - also consider current (amps) - * drivers/mge-xml.c: mge-xml.c : calculate - (input|bypass|output).phases number (1 or 3) based on available - non-zero measurements - -2017-02-28 Jim Klimov - - * docs/man/netxml-ups.txt, drivers/mge-xml.c, drivers/netxml-ups.c: - mge-xml / netxml-ups : reimplement do_convert_deci as a simple - VAR_FLAG setting - -2017-02-27 Jim Klimov - - * drivers/mge-xml.c: mge-xml.c : add debug logging of values which - were converted - * docs/man/netxml-ups.txt, docs/nut.dict, drivers/mge-xml.c, - drivers/netxml-ups.c: netxml-ups and mge-xml : allow users to - reenable legacy convert_deci() behavior at run-time, with a - configuration toggle (documented) - * drivers/mge-xml.c: mge-xml.c : updated comment about convert_deci() - pre-history - -2017-02-21 Jim Klimov - - * drivers/mge-xml.c: drivers/mge-xml.c : when reporting deprecation - of convert_deci(), do it once visibly with details like issue - tracker URL, and in regular debug messages refer to that line - -2017-02-20 Jim Klimov - - * drivers/mge-xml.c: drivers/mge-xml.c : in convert_deci() now report - it is deprecated (with debug level 5) so we get reports if - deprecation bites anyone in reality - * drivers/mge-xml.c: drivers/mge-xml.c : bump subdriver version - * drivers/mge-xml.c: drivers/mge-xml.c : bump copyrights - -2017-02-18 Jim Klimov - - * drivers/mge-xml.c: Disable convert_deci() that was needed a decade - ago Left the old code in place, commented away. If devices with - old NetXML pop up (those which served in XML 10x the measured - value), fixes can be applied based on voltage and amps and power - (order of magnitude comparison), or perhaps model names and/or - firmware versions or release dates, if we get those. - -2017-02-27 Jim Klimov - - * drivers/netxml-ups.c: netxml-ups.c : typo fix (shutdwon => - shutdown) - * docs/man/netxml-ups.txt: docs/man/netxml-ups.txt : trailing - whitespace fixes - -2017-02-28 Jim Klimov - - * data/Makefile.am: data/Makefile.am : did not link back to - "spellcheck-sortdict" - -2017-02-04 Steven Bell - - * docs/nut.dict: Removed line left over from merge conflict. Ooops! - -2017-01-28 Laurent Bigonville - - * scripts/systemd/nutshutdown.in: Add support for POWEROFF_WAIT - parameter Use "systemctl reboot --force --force" to reboot the - machine has not been shutdown after the POWEROFF_WAIT delay. - Closes: #382 - -2017-01-28 Jim Klimov - - * drivers/eaton-ats30-mib.c: drivers/eaton-ats30-mib.c : fix - whitespace - * drivers/snmp-ups.c: drivers/snmp-ups.c : fix trailing whitespaces - * docs/nut.dict: nut.dict : know of "nowait" - * docs/Makefile.am: docs/Makefile.am : after spellcheck-interactive, - advise how to review the dictionary changes and avoid regressions - * conf/upsd.conf.sample, conf/upsmon.conf.sample.in, - conf/upssched.conf.sample.in, docs/nut.dict: Spellchecked the conf/ - sample files - * Makefile.am, conf/Makefile.am: Spellcheck the conf/ directory - * conf/upsd.users.sample, conf/upsmon.conf.sample.in: - upsmon.conf.sample.in : clarify nuances of master/slave systems, - and special use-cases of SHUTDOWNCMD and powervalue==0 - * conf/hosts.conf.sample, conf/nut.conf.sample, conf/ups.conf.sample, - conf/upsd.conf.sample, conf/upsd.users.sample, - conf/upsmon.conf.sample.in, conf/upssched.conf.sample.in, - conf/upsset.conf.sample, conf/upsstats.html.sample: Sample - configuration files : fix leading and trailing whitespace (mix of - tab/space) - * conf/ups.conf.sample: ups.conf.sample : move maxretry example - higher in the file so it is before driver-block examples - * drivers/apc-pdu-mib.c: Date: Fri Aug 19 02:43:44 2016 +0200 apc- - pdu-mib.c fixes : * added trailing NULLs for proper structure size; - * fixed some items' flags; * fixed whitespace; * bumped MIBmap - version - * data/driver.list.in, drivers/Makefile.am, drivers/apc-pdu-mib.c, - drivers/apc-pdu-mib.h, drivers/snmp-ups.c: From: Arnaud Quette - Date: Fri, 8 Apr 2016 14:40:00 +0200 - Subject: [PATCH] snmp-ups: support APC PDU Based on initial work - and data from Opengear, using SNMP subdriver creation script, add - support for the more recent APC PDU. This was tested with a - AP8958, but should cover other models - * docs/man/ups.conf.txt, docs/man/upsdrvctl.txt, drivers/upsdrvctl.c: - From: Arnaud Quette Date: Sat, 7 Jun 2014 - 02:27:15 +0200 Subject: [PATCH] Add 'nowait' option for upsdrvctl - in ups.conf The nowait flag allow to tell upsdrvctl to not wait at - all for the driver(s) to execute the request command. The default - behavior, when this variable is omitted, is to wait 'maxstartdelay' - seconds - * conf/ups.conf.sample: Document and pre-set the "maxretry" option in - ups.conf.sample - -2017-01-27 Jim Klimov - - * drivers/eaton-ats16-mib.c, drivers/eaton-ats30-mib.c: Prefix - structures in eaton-atsXY-mib.c files with an eaton_atsXY rather - than just atsXY - * README: README: not asciidoc, and redistributed - do not link to - volatile build status - -2017-01-27 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: Fix counter OID matching In case of - multiple similar sysOID (i.e. same sysOID in different subdrivers), - there is a counter matching OID (generally using the model OID). - However, the matching was causing a crash of snmp-ups in case where - it was not the right MIB mapping and the OID for model entry was - not available - -2017-01-27 Steven Bell - - * docs/man/upscli_connect.txt, docs/nut.dict: Fixed issues with - documentation for automated spellcheck during CI check. - -2017-01-27 Jim Klimov - - * docs/nut.dict: docs/nut.dict : sorted to facilitate further - maintenance - -2017-01-27 Arnaud Quette - - * Makefile.am, data/Makefile.am, data/cmdvartab: Integrate cmdvartab - to the spellcheck target This also includes 2 spelling fixes - -2017-01-27 Jim Klimov - - * NEWS, docs/nut.dict: Spellcheck : Fixed typo in Tore O*r*petveit's - name - * README: README : embed a Travis status image link for NUT Master - branch - * Makefile.am, docs/.gitignore, docs/Makefile.am, - docs/man/Makefile.am: Spellcheck : add a recipe to keep nut.dict - sorted so git diffs are clearer - * Makefile.am: Makefile.am : when calling spellcheck or spellcheck- - interactive for several subdirs, do not stop after the first failed - sub-make - -2017-01-27 Steven Bell - - * docs/man/upscli_add_host_cert.txt, docs/man/upscli_connect.txt, - docs/man/upscli_init.txt: Updated and corrected documentation. - -2017-01-27 Arnaud Quette - - * drivers/Makefile.am, drivers/eaton-ats16-mib.c, drivers/eaton- - ats16-mib.h, drivers/snmp-ups.c: snmp-ups: rename Eaton ATS16 - resources Rename the subdriver files along with the structure and - entries, to make a clear difference with the newly added - eaton_ats30. This completes the previous commit, where some files - was erroneously committed - * drivers/{eaton-ats-mib.c => eaton-ats16-mib.c}, drivers/{eaton-ats- - mib.h => eaton-ats16-mib.h}, drivers/eaton-ats30-mib.c: Fix - unterminated comment, from previous commit - * tools/nut-scanner/scan_snmp.c: nut-scanner: force numeric - resolution of OIDs As done in snmp-ups, force the numeric - resolution of OIDs, to ensure correct OID matching in all cases - * drivers/snmp-ups.c: Only free variable when needed in - su_setvar/su_setOID Previously, we tried to free temporary - pointers in all cases. However, this pointer may ever point at the - static structure, in case we do not need to instantiate variable - (outlet.* collection), and which causes a crash of the driver - * drivers/eaton-ats30-mib.c: Add a comment on the unused OIDs - * drivers/snmp-ups.c: Fix spacing - * drivers/eaton-ats30-mib.c, drivers/eaton-ats30-mib.h: Fix legal - information - -2017-01-26 Tomas Halman - - * drivers/Makefile.am, drivers/eaton-ats30-mib.c, drivers/eaton- - ats30-mib.h, drivers/snmp-ups.c: snmp-ups: support Eaton Automatic - Transfer Switch ATS30 ATS30 MIB differs from previously integrated - EATON ATS driver. - -2016-09-14 Jim Klimov - - * common/common.c: common.c : revised upsdebugx() and upslogx() calls - to not trail an extra newline - * common/common.c, configure.ac: Add support for system library - directories with names based on short target/build/host OS spec too - -2017-01-24 Jim Klimov - - * common/common.c, configure.ac: Add support for system library - directories with names based on target/build/host OS spec (for GCC - at least) - -2016-09-14 Jim Klimov - - * common/common.c: common.c : added logging and small optimizations - during get_libname() - * common/common.c: common.c : add /usr/local/lib64 to search path - -2017-01-19 Jim Klimov - - * tools/nut-scanner/nutscan-init.c: nutscan-init.c : We can also use - libusb-compat from newer libusb-1.0 releases (issue #361) - -2016-09-14 Jim Klimov - - * tools/nut-scanner/nutscan-init.c: nut-scanner : support libneon- - gnutls.so as an alternative name - -2016-07-12 Carlos Dominguez - - * common/common.c, include/common.h, tools/nut-scanner/nutscan- - init.c: Arnaud's patch applied, dynamic library bug fixed, tested! - -2016-07-04 Arnaud Quette - - * common/common.c, include/common.h, tools/nut-scanner/nutscan- - init.c: Move get_libname() to common This function, originally - created for nut-scanner, to be able to lookup for libraries loaded - using libtool loader, is now also useful for the DMF support. This - last loads libneon at runtime, to load DMF structure (including the - one for nut-scanner) and unload it once the file were read - -2017-01-23 Jim Klimov - - * drivers/mge-hid.c, drivers/nutdrv_qx.h, - drivers/nutdrv_qx_bestups.c: Fix the non-ASCII quote character away - from C sources - * docs/daisychain.txt, docs/man/al175.txt, docs/man/apcsmart.txt, - docs/man/apcupsd-ups.txt, docs/man/bcmxcp_usb.txt, - docs/man/bestups.txt, docs/man/blazer-common.txt, - docs/man/clone.txt, docs/man/libnutclient_commands.txt, - docs/man/libnutclient_misc.txt, docs/man/libnutclient_tcp.txt, - docs/man/libnutclient_variables.txt, docs/man/macosx-ups.txt, - docs/man/mge-shut.txt, docs/man/nut-scanner.txt, - docs/man/nutdrv_qx.txt, docs/man/nutscan_add_device_to_device.txt, - docs/man/nutscan_add_option_to_device.txt, - docs/man/nutscan_cidr_to_ip.txt, - docs/man/nutscan_get_serial_ports_list.txt, docs/man/nutupsdrv.txt, - docs/man/skel.txt, docs/man/snmp-ups.txt, docs/man/solis.txt, - docs/man/ups.conf.txt, docs/man/upscode2.txt, - docs/man/upsd.conf.txt, docs/man/upsd.txt, - docs/man/upsmon.conf.txt, docs/man/upsmon.txt, docs/man/upsrw.txt, - docs/man/upssched.conf.txt, docs/man/upsstats.html.txt, - docs/man/usbhid-ups.txt, docs/nut.dict: Update nut.dict and manpage - sources after initial spellchecking integration - * Makefile.am, ci_build.sh, docs/man/Makefile.am: - docs/man/Makefile.am : track all manpage sources in a separate - variable and use that for spellchecker - * docs/Makefile.am: docs/Makefile.am : add daisychain to ALL_TXT_SRC - * docs/Makefile.am: docs/Makefile.am : revised TODOs for spellchecker - -2017-01-20 Jim Klimov - - * .travis.yml: Enable valgrind in travis matrix - -2017-01-21 Jim Klimov - - * indent.sh: Initial commit of indent.sh helper - -2017-01-20 Jim Klimov - - * Makefile.am, tests/Makefile.am: VALGRIND: abuse distcheck to run - tested programs in debug mode under valgrind - * configure.ac: valgrind config fix - * ci_build.sh: Travis : make spellcheck failures fatal now - * docs/nut.dict: docs/nut.dict : add another word missed by earlier - private dict - * docs/nut.dict: docs/nut.dict : try to enable UTF8 contributor names - * docs/Makefile.am: docs/Makefile.am : try to enable UTF8 in args and - env - * .travis.yml, ci_build.sh: Travis : enable i2c tests - * .travis.yml: .travis.yml : rearrange apt deps and special case for - doc/spell tests in the matrix - * .travis.yml, ci_build.sh: Travis: port the test-script structure - from DMF brach (better case than if) - -2017-01-19 Jim Klimov - - * docs/nut.dict: docs/nut.dict : add some words not in dictionaries - available to Travis CI; add some developer names to the dictionary - * NEWS, TODO, UPGRADING, common/parseconf.c, docs/FAQ.txt, - docs/acknowledgements.txt, docs/cables/sms.txt, docs/config- - notes.txt, docs/download.txt, docs/hid-subdrivers.txt, docs/new- - drivers.txt, docs/nut-qa.txt, docs/nut.dict, docs/nutdrv_qx- - subdrivers.txt, docs/packager-guide.txt, docs/snmp-subdrivers.txt, - lib/README, scripts/augeas/README: Spellchecker : Fix or rephrase - issues found by spellchecker, and update the NUT custom dictionary - * docs/developers.txt: docs/developers.txt : fix non-ASCII tick - character - * docs/acknowledgements.txt, docs/packager-guide.txt: Added myself to - docs/acknowledgements.txt docs/packager-guide.txt - * docs/nut-qa.txt: docs/nut-qa.txt : rearranged the paragraph with CI - (to fit in 80 cols) and added link to Travis CI dashboard for NUT - branches - * docs/packager-guide.txt: docs/packager-guide.txt : rearranged the - paragraph with recommended package description (to fit in 80 cols) - * docs/developers.txt: docs/developers.txt : mention the recently - added Travis CI integration - * docs/developers.txt: docs/developers.txt : reformat the paragraph - on distcheck-light, and mention the recently added option to skip - building docs - * Makefile.am: Makefile.am : allow to call from workspace root the - docs/Makefile for targets: spellcheck spellcheck-interactive doc - -2017-01-19 Jim Klimov - - * docs/Makefile.am: docs/Makefile.am : parametrize aspell common - args; add togglable debugging of aspell setup - -2017-01-19 Jim Klimov - - * ci_build.sh, docs/Makefile.am: docs/Makefile.am + Travis : support - a SPELLCHECK_ERROR_FATAL toggle, and use it from Travis for now * - docs/Makefile.am : also report if the build succeeds despite - spellcheck errors (due to this setting) - * docs/Makefile.am: docs/Makefile.am : name the en lang explicitly - * docs/Makefile.am: docs/Makefile.am : big reorganization of - spellcheck * spellcheck targets should fail the build not only if - the last document failed the test * make sure to use custom - spellcheck dictionary from NUT source tree; revise erroring out if - automatic aspell finds issues * also set LC_ALL=C for aspell * - revised spellcheck failure message to suggest next steps for the - human * comment the spellcheck test; use more portable shell test - (instead of bracket); do not fail on empty aspell outputs - -2016-09-07 Jim Klimov - - * configure.ac: configure.ac : add potential usage of valgrind, - optional and configurable/detectable - -2017-01-19 Jim Klimov - - * .travis.yml, ci_build.sh: Travis CI should call spellcheck as a - separate spellchecking job (parallelize, optimize for speed, - separate error causes/reports) - * .travis.yml: .travis.yml : add libcppunit to travis env, so tests - in NUT will be enabled - -2017-01-11 Jim Klimov - - * .travis.yml: .travis.yml : drop comment for PR #354 - -2016-11-21 Jim Klimov - - * common/snprintf.c: common/snprintf.c : avoid a few compilation - warnings and a possible crash due to padded ints in variadic - functions - * common/snprintf.c, configure.ac: common/snprintf.c and configure.ac - : avoid a few compilation warnings - -2017-01-06 Daniele Pezzini - - * common/state.c: state: consider also ST_FLAG_NUMBER flags - * drivers/dstate.c: dstate: report ST_FLAG_NUMBERs also in response - to a DUMPALL request - * drivers/dstate.c: dstate: when dealing with ranges, don't lose - already-set flags Ranges are now explicitly flagged as numbers, - but the use of dstate_setflags() means that we substitute any - previously-set flag with the ones we pass to that function, losing, - for example, an already-set r/w status, with the result of making - an affected var unchangeable. Use instead the newly added - dstate_addflags() function, which preserves already-set flags. - * drivers/dstate.c, drivers/dstate.h: dstate: add a couple of - functions to ease the manipulation of flags - -2017-01-10 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix device.type setting in daisychain - mode device.type was not set due to a coding error, but pushed to - device.model (reported by Evgeny "Jim" Klimov from Eaton) - * drivers/main.c: drivers: set the default device.type even earlier - device.type default setting to "ups" has to be done prior to the - initups() call, otherwise some devices (such as daisychained PDUs) - will not be able to override it - -2017-01-04 Jim Klimov - - * ci_build.sh: ci_build.sh : list contents of installation directory - * ci_build.sh: ci_build.sh : fix installation directories for /etc - and udev, devd and hotplug (not hardcoded root paths) - * ci_build.sh: ci_build.sh : list contents of installation directory - * ci_build.sh: ci_build.sh : fix installation directories for /etc - and udev, devd and hotplug (not hardcoded root paths) - * .travis.yml, ci_build.sh: Travis : take advantage of "--with- - doc=skip" support recently added in configure and Makefiles - -2016-09-13 Jim Klimov - - * configure.ac, docs/man/Makefile.am: configure.ac, - docs/man/Makefile.am - support SKIP_MANS as an explicit non-fatal - situation - -2017-01-04 Jim Klimov - - * ci_build.sh: ci_build.sh : comment about missing i2c - * ci_build.sh: ci_build.sh : generalize the skipping of distcheck and - make it more comprehensible in script code - * .travis.yml: .travis.yml : include the headers needed for i2c - * .travis.yml: .travis.yml : use specific libgd - * .travis.yml: .travis.yml : add graphics pkgs for CGI builds - * ci_build.sh: .travis.yml / ci_build.sh : speed up with parallel - build (fall back to sequential if this fails) - * .travis.yml, ci_build.sh: .travis.yml / ci_build.sh : current NUT - does not skip docs safely, so enable just manpages in default build - * .travis.yml: .travis.yml : add libipmimonitoring packages too - * .travis.yml: .travis.yml : older freeipmi in Travis Ubuntu 12.04.5 - * ci_build.sh: ci_build.sh : fix the doc-skipping option - * .travis.yml: .travis.yml : apparently, libfreeipmi16 pkg requires - extra invitation - * .travis.yml, ci_build.sh: Travis : require docs tools only for - "default-withdoc" builds; change "default" to skip the docs (and - try to pass distcheck) - * .travis.yml: .travis.yml : only define default-alldrv once - * .travis.yml, ci_build.sh: Initial integration of a travis matrix - build (different scenarios) - * .gitignore, .travis.yml, ci_build.sh, docs/Makefile.am: Initial - commits of config and script files for Travis CI automatic - validation (simply do a compile and distcheck) - -2017-01-04 Arnaud Quette - - * m4/nut_check_asciidoc.m4: Minor typo fixes - -2017-01-04 Jim Klimov - - * configure.ac: configure.ac : switch default option to "--with- - doc=man=auto" so ordinary builds succeed by default on any system - * configure.ac: configure.ac alias - * configure.ac: configure.ac : add the "--with-docs" as alias to "-- - with-doc" - * configure.ac, m4/ax_compare_version.m4, m4/nut_check_asciidoc.m4: - Refactor nut_check_asciidoc.m4 and configure.ac to check all doc- - tools in one place (and also only once), and fix comments and some - coding issues - -2016-12-29 Charles Lepple - - * docs/new-drivers.txt: docs: reword/reformat new-drivers.txt - Distinguish HID PDC from Q*, etc. - -2016-11-29 Florian Bruhin - - * tools/gitlog2changelog.py: Fix gitlog2changelog.py on python 3 - * scripts/augeas/gen-nutupsconf-aug.py: Make gen-nutupsconf-aug.py - work with Python 3 This makes the script work with Python 2.6+. - Fixes #345. - -2016-11-28 Daniele Pezzini - - * configure.ac: configure: fix checks for a2x-built docs Since, - starting from commit d4a55ed, we now check that documents are - buildable in an 'external' directory, we need to call a2x with '-- - destination-dir' pointing to that directory, otherwise a2x will put - the generated documents in the same directory where source files - are and then testing the non-existent files under our 'external' - directory will always fail, meaning that we will never pass these - checks. - -2016-11-21 Jim Klimov - - * docs/Makefile.am: EXTRA_DIST the docs/asciidoc.txt as used in - configure script checks - * configure.ac: configure.ac : avoid nonportable "mktemp --tmpdir" - option - -2016-11-17 Michal Soltys - - * autogen.sh: autogen.sh: minor script fixup In case any of the perl - / python parts fails (for example if system default is python3, the - script will complain about print), cd ../.. won't be executed. - Furthermore - if any of those scripts fail, there's no point in - continuing as both files are mandatory. - * docs/man/apcsmart.txt, drivers/apcsmart.c, drivers/apcsmart.h: - apcsmart: CS "hack" updates This patch adds cshdelay option (with - default set to 3.5s) between "simulate power failure" and "soft - hibernate" commands. - -2016-11-16 Arnaud Quette - - * drivers/mge-hid.c: sbhid-ups: fix Eaton/MGE mapping for beeper - handling Two HID Paths exists for handling beeper status and - commands. However, only one historic was implement, which was not - actually suitable for issuing the commands on newer units (such as - 3S, 5P*, ...) (reported by Sergey Talchuk) Closes: - https://github.com/networkupstools/nut/issues/9 - * drivers/usbhid-ups.c: usbhid-ups: adjust debuging info - -2016-11-09 Charles Lepple - - * docs/nut-names.txt, drivers/libusb0.c, drivers/libusb1.c: Add - `driver.version.usb` variable Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-11-03 Charles Lepple - - * data/driver.list.in: HCL: CP1500EPFCLCD Source: - https://github.com/networkupstools/nut/issues/337 - -2016-11-02 Charles Lepple - - * data/driver.list.in: HCL: Eaton 5E2200VA Reference: - https://github.com/networkupstools/nut/issues/335 - * data/driver.list.in: HCL: Eaton Ellipse PRO 650 VA (USB) supported - by usbhid-ups Closes: - https://github.com/networkupstools/nut/issues/255 - -2016-10-21 Charles Lepple - - * docs/download.txt: download.txt: Add Slackware link - -2016-10-12 Kirill Ovchinnikov - - * drivers/apc-mib.c, drivers/snmp-ups.c: apc-mib.c modified for - ups.delay.{start,shutdown} to include SU_TYPE_TIME - -2016-10-11 Yann E. MORIN - - * clients/upsclient.c: client/ups: add missing include struct - timeval is declared in sys/time.h, so we need to #include it. - -2016-10-11 Arnaud Quette - - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c: - Remove unimplement nut-scanner option The -F --fingerprints-file - option, used to provide an additional list of SNMP fingerprints, - was never implemented, but made its way into the code. Remove it, - at least while waiting for an actual implementation - * docs/man/nut-scanner.txt: Update nut-scanner manual page - * tools/nut-scanner/nutscan-device.c, tools/nut- - scanner/scan_xml_http.c: Fix c++ style comments - -2016-04-03 Alica - - * conf/upsstats.html.sample: upsstats.html: Conform to HTML 4.01 - Strict Closes: https://github.com/networkupstools/nut/pull/278 - * conf/upsstats-single.html.sample: upsstats-single.html: Conform to - HTML 4.01 Strict - -2016-10-05 Arnaud Quette - - * common/common.c: Fix c++ style comments - * drivers/snmp-ups.c: Fix exit code for --list - -2016-09-28 Jim Klimov - - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/scan_xml_http.c: nut-scanner : implement single- - IP and IP-range UDP NetXML device discovery - * tools/nut-scanner/scan_snmp.c: scan_xml_http.c : fix leading - whitespaces (SPACE vs TABs mixed in code) - * tools/nut-scanner/scan_snmp.c: scan_xml_http.c : replace some - fprintf with upsdebugx - * tools/nut-scanner/nut-scanner.c: nut-scanner.c : increased debug- - tracing messages of nut-scanner progress - * tools/nut-scanner/nut-scanner.c: nut-scanner.c : replaced printq() - with standard upsdebugx(), added "-D" option to increase debug - verbosity as common in NUT, moved the help text printout to its own - function - -2016-09-27 Jim Klimov - - * common/common.c, include/common.h: common.c/.h : simplify the - upsdebugx() enhancement (no need to fight with warnings/pragmas) - -2016-09-26 Arnaud Quette - - * scripts/systemd/nut-server.service.in: systemd: add reload support - for nut-server / upsd Add ExecReload entry to execute a - configuration reload of upsd, using the available 'upsd -c reload' - -2016-09-25 Charles Lepple - - * drivers/libusb1.c: libusb1: use return code from libusb_open() Per - , the handle is only populated when the return code - is 0. This fixes a crash during device detection where more than - one HID UPS is available, and the driver needs to skip the first - one. - -2016-09-21 Jim Klimov - - * include/common.h: common.h : rearranged the - ENABLE_WARNING/DISABLE_WARNING macro definitions so they are only - called for supported compilers and generate empty macros (no-op) - for others - -2016-09-20 Jim Klimov - - * common/common.c: common.c : move anti-warning macros out of the - function body, some compilers do not like that - -2016-09-19 Jim Klimov - - * tools/nut-scanner/scan_xml_http.c: scan_xml_http.c : do not suggest - NetXML support for ePDUs (almost exclusively they are XMLv4 and do - not work with current NUT) - -2016-09-18 Jim Klimov - - * common/common.c: common.c : in upsdebugx() added "[Dx]" prefix : do - not add it for level 0 - -2016-09-17 Jim Klimov - - * common/common.c, include/common.h: common.c : augment upsdebugx() - and upsdebug_with_errno() by prepending the debug-level to logged - messages - * common/common.c: common.c : fix whitespaces - -2016-09-17 Jim Klimov - - * configure.ac: configure.ac : do not fail configuration if a doctype - picked with "auto" can not be built on this system - just skip it - -2016-09-15 Jim Klimov - - * drivers/snmp-ups.c: Added and documented an snmp-ups argument to - list currently loaded MIB-to-NUT mappings (typo fix) - * docs/man/snmp-ups.txt, drivers/snmp-ups.c: Added and documented an - snmp-ups argument to list currently loaded MIB-to-NUT mappings - * drivers/snmp-ups.c: snmp-ups.c : small typo fix - * docs/man/snmp-ups.txt, drivers/ietf-mib.c: Mention tripplite - mapping in snmp-ups manpage; updated some comments about it in - ietf-mib.c - * configure.ac: configure.ac : when verifying ability to build docs, - consider out-of-tree builds too - -2016-09-14 Jim Klimov - - * configure.ac: configure.ac : verify that we can actually build a - simple or chunked HTML document, beside having nominal versions of - software - * configure.ac: configure.ac : verify that we can actually build a - manpage document, beside having nominal versions of software - * configure.ac: configure.ac : verify that we can actually build a - simple PDF document, beside having nominal versions of software - -2016-09-13 Jim Klimov - - * drivers/ietf-mib.c: Give the Tripplite SNMP MIB a name, do not - duplicate "ietf" entries - -2016-09-02 Arnaud Quette - - * drivers/bcmxcp_usb.c, drivers/blazer_usb.c, drivers/libusb1.c, - drivers/nutdrv_atcl_usb.c, drivers/nutdrv_qx.c, - drivers/richcomm_usb.c, drivers/riello_usb.c: libusb 1.0 port: fix - return code for interrupt ops libusb 1.0 returns on success, the - number of bytes actually transferred or otherwise an error code, - except for interrupt transfers, where the actual transfer size is - stored in a separate variable. The libusb 1.0 implementation in NUT - thus needed to be fixed to behave the same way than the libusb 0.1 - implementation Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-31 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0 port: remove the check on USB device - count With the port to libusb 1.0, a sanity check was done on the - available number of USB devices to try. This however caused a - behavior regression, since the only device that NUT may have access - to can be the only UPS connected. In this case, the driver may exit - upon trying to reconnect if the device is transiently not available - Reference: https://github.com/networkupstools/nut/issues/300 - * drivers/libusb1.c, drivers/richcomm_usb.c: libusb 1.0 port: - complete usb_set_altinterface code usb_set_altinterface allows to - force the USB code to call `libusb_set_interface_alt_setting (0, - 0)` (equivalent to `libusb_set_altinterface(0)` in libusb 0.1), as - was done in NUT 2.7.2 and earlier. However, the libusb 1.0 - implementation was still missing the related code Reference: - https://github.com/networkupstools/nut/issues/300 - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: libusb 1.0 port: - fix kernel driver detachment Following the recent modification for - the kernel driver detachment, and the related functions - availability depending on the platforms, nutdrv_atcl_usb and - richcomm_usb were using the wrong macro for - libusb_set_auto_detach_kernel_driver and were missing the libusb - 1.0 code for explicit kernel driver detachment Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-17 Arnaud Quette - - * drivers/libusb1.c, m4/nut_check_libusb.m4: libusb 1.0 port: rework - the kernel driver detachment libusb 1.0 has introduced a new - function (libusb_set_auto_detach_kernel_driver), beside from the - explicit kernel driver detachment request - (libusb_detach_kernel_driver). However, the former is not available - on all systems. As an example, FreeBSD 10.1-10.3 does not have - this. The detachment and interface claiming has been reworked to - handle this case (reported by Charles Lepple) Reference: - https://github.com/networkupstools/nut/issues/300 - -2016-08-16 Arnaud Quette - - * clients/upsrw.c: upsrw: display the variable type beside ENUM / - RANGE upsrw now displays more information, beside the ENUM and - RANGE, such as the variable type (NUMBER or STRING), and the - maximum length for STRING Closes: - https://github.com/networkupstools/nut/issues/267 - * include/extstate.h: Add an explicit type NONE (ST_FLAG_NONE) - Reference: https://github.com/networkupstools/nut/issues/267 - * server/netget.c: Modify server side publication for variable type - ENUM can be either NUMBER or STRING, which was previously not - published. Reference: - https://github.com/networkupstools/nut/issues/267 - * drivers/dstate.c: Automatically set the "NUMBER" flag for ranges - Ranges, added through dstate_addrange(), only support numeric - ranges. So automatically add the ST_FLAG_NUMBER flag to range - Reference: https://github.com/networkupstools/nut/issues/267 - * drivers/dstate.c: Support ST_FLAG_NUMBER in dstate_setflags() - Allow the drivers to explicitly use ST_FLAG_NUMBER through - dstate_setflags() Reference: - https://github.com/networkupstools/nut/issues/267 - * include/extstate.h: Add an explicit type NUMBER (ST_FLAG_NUMBER) - Beside from the existing ST_FLAG_STRING, a need has arise to have - an explicit type NUMBER, and thus a flag for this type, can be used - generally, and more specifically with the driver primitive - dstate_setflags() Reference: - https://github.com/networkupstools/nut/issues/267 - -2016-08-12 Arnaud Quette - - * drivers/libusb1.c: libusb 1.0: remove unused typesafe_control_msg() - workaround For libusb 0.1 implementation, we had to workaround a - libusb API goofs, by wrapping the base function usb_control_msg(), - and casting the variables to the right type. This is not needed for - libusb 1.0 implementation, but was wrongly left in the code - (reported by Charles Lepple) - * clients/upsrw.c: upsrw: display current values of NUMBER variables - References: https://github.com/networkupstools/nut/issues/267 - * drivers/snmp-ups.c: snmp-ups: discard decimals when set to "0" - Publish values as integer when decimals are set to "0". This at - least makes sense for some values that are real integers (phases - and outlets counts for example), but also with many other values - that have not sufficient precision to provide decimals - -2016-08-11 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: fix a warning on unused variable - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: simplify bus publication - bus publication was wrongly listing both the bus and the portname, - instead of the bus only. This may have caused some issue when - trying to match the port - * drivers/usbhid-ups.c: usbhid-ups/mge-shut: forgotten version bump - * drivers/usbhid-ups.c: usbhid-ups/mge-shut: rework errno/errors - handling libusb 1.0 has its own set of return codes, and error - interface. Rework the common HID core (shared between usbhid-ups - and mge-shut) so that error handling can work with both, and using - either libusb 0.1 or 1.0 for usbhid-ups - * tools/nut-scanner/scan_usb.c: nut-scanner: missing symbols lookup - for libusb 1.0 A few symbols from libusb 1.0 were wrongly used - directly, instead of being looked up and loaded at init time - * drivers/bcmxcp_usb.c, drivers/libusb1.c, drivers/nutdrv_atcl_usb.c, - drivers/richcomm_usb.c: libusb 1.0 port: add missing libusb_exit() - calls - * tools/nut-scanner/nutscan-init.c, tools/nut-scanner/scan_usb.c, - tools/nut-usbinfo.pl: nut-scanner: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c, drivers/richcomm_usb.c: Remove redundant - variable - * drivers/tripplite_usb.c: tripplite_usb: remove extraneous comment - char - * drivers/nut_libusb.h: permute typedef order of usb_dev_handle - * drivers/nutdrv_qx.c: nutdrv_qx: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/richcomm_usb.c: richcomm_usb: missing function remap for - libusb 0.1 usb_strerror was not remapped for libusb 0.1 - implementation - * drivers/tripplite_usb.c: tripplite_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/riello_usb.c: riello_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - -2016-08-10 Arnaud Quette - - * drivers/richcomm_usb.c: richcomm_usb: initial port to libusb 1.0 - The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: add the missing detach - call libusb 1.0 provide its own routine for detaching kernel - driver - * drivers/Makefile.am, drivers/libhid.c, drivers/nut_libusb.h: - Forgotten occurences of libusb.h renaming NUT internal header - "libusb.h" was renamed, since it collides with the libusb 1.0 - header, which has the same name. A few occurences of reference and - documentation were however missing - * drivers/nutdrv_atcl_usb.c: nutdrv_atcl_usb: initial port to libusb - 1.0 The port to libusb 1.0 is complete, at least from a build - perspective. This now needs to be tested with devices - * drivers/blazer_usb.c: blazer_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * drivers/bcmxcp_usb.c: bcmxcp_usb: code cleanup - -2016-08-09 Arnaud Quette - - * drivers/bcmxcp_usb.c: bcmxcp_usb: initial port to libusb 1.0 The - port to libusb 1.0 is complete, at least from a build perspective. - This now needs to be tested with devices - * docs/configure.txt, drivers/Makefile.am, drivers/libhid.c, - drivers/libhid.h, drivers/{libusb.c => libusb0.c}, - drivers/libusb1.c, drivers/{libusb.h => nut_libusb.h}, drivers/usb- - common.h, drivers/usbhid-ups.c: ushid-ups: complete the port to - libusb 1.0 The port to libusb 1.0 is now complete for usbhid-ups. - Other USB drivers (bcmxcp_usb, blazer_usb, nutdrv_atcl_usb, - richcomm_usb, riello_usb, tripplite_usb, nutdrv_qx) have still to - be addressed - -2016-08-06 Jim Klimov - - * docs/man/dummy-ups.txt: dummy-ups.txt : noted the sleep between - loops - * docs/man/dummy-ups.txt: dummy-ups.txt : text and formatting revised - to be clearer to the uninitiated - -2016-08-04 Arnaud Quette - - * docs/man/snmp-ups.txt: snmp-ups: document the use of non-standard - port SNMP agent may publish data over a non-standard port, i.e. - not 161. This feature is supported since the origin, but was not - explicitly documented nor usable - -2016-08-01 Arnaud Quette - - * configure.ac, m4/nut_check_libusb.m4: Initial port to libusb 1.0 - Starting with the configure checks, to detect if libusb 1.0 if - available, and otherwise fall back to the libusb 0.1 backend - -2016-07-11 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix device.type publication In - daisychain mode at least, device.type was not set to its actual - value, using the current mapping structure, but defaulting to "ups" - (reported by Tomas Halman, from Eaton) - * drivers/snmp-ups.c: snmp-ups: fix and improve match_sysoid The - function was returning FALSE instead of NULL in one case. Also - retry at most 3 times to get the sysOID - -2016-07-07 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix instant commands publication - With non-daisychain setup, there was a bug that created an infinite - test loop when trying to add instant commands - -2016-06-30 Tomas Halman - - * clients/nutclient.cpp: nutclient: fix library segmentation fault if - device name doesn't exists. If device doesn't exist, getClient() - returns NULL. Then calling the method like - getClient()->getDeviceDescription(getName()) causes segfault. We - rather check the status and throw an exception in this case. - -2016-06-25 Charles Lepple - - * docs/acknowledgements.txt: doc: fix acknowledgements link to GitHub - -2016-06-23 Timothy Pearson - - * drivers/libhid.c, drivers/tripplite-hid.c, drivers/usbhid-ups.c, - scripts/upower/95-upower-hid.rules: Add support for SU3000LCD2UHV - Note that protocol 1330 does not respond to requests for - UPS.OutletSystem.Outlet.DelayBeforeReboot, therefore those requests - needed to be bypassed in the driver. - -2016-06-23 Arnaud Quette - - * drivers/mge-xml.c: netxml-ups: detect the unsupported XML v4 - protocol The XML/PDC protocol had an update with version 4, for - ePDU. However, this version is not supported by netxml-ups. We now - detect this version, and explicitly exit with an "XML v4 protocol - is not supported!" message - * drivers/netxml-ups.c: netxml-ups: fix a segmentation fault - netxml_get_page() was not checking if page is NULL, hence resulting - in a segmentation fault with Eaton ePDU, which use the unsupported - version 4 of the XML/PDC protocol. Bump the driver version to 0.41 - -2016-06-13 Tomas Halman - - * clients/nutclient.cpp: NUT client library: internal::Socket class - must close socket in destructor. - -2016-04-16 Charles Lepple - - * data/driver.list.in, drivers/mge-hid.c, scripts/upower/95-upower- - hid.rules: usbhid-ups: add IBM USB VID Reference: - http://article.gmane.org/gmane.comp.monitoring.nut.user/7721 and - http://news.gmane.org/find- - root.php?message_id=5712AB29.6040001%40delphinidae.org.uk - -2016-06-09 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: 2nd pass on fixing memory leaks Fix - some remaining memory leaks reported by Coverity scan - * drivers/snmp-ups.c: snmp-ups: fix memory leaks and incorrect - expression Following the registration of NUT in Coverity scan, a - number of issues were identified. This is the very first set of QA - fixes related to this static code analysis - -2016-06-08 Arnaud Quette - - * Makefile.am: AIX package: reference the exact tarball version - -2016-06-07 Charles Lepple - - * docs/download.txt: Update VMware ESXi package link (from René - Garcia) - -2016-06-07 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix some regression due to daisychain - A few issues were remaining, following the daisychain support - addition. Issues were related to, at least, 3ph initialization and - data not being published, and identified with Eaton 3ph units, - using the "pw" MIB (reported by Yves Clauzel, from Eaton) - -2016-06-05 Timothy Pearson - - * drivers/powerp-txt.c: Add deep battery test for CyberPower - OL3000RMXL2U - -2016-05-31 Arnaud Quette - - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: support - daisychain commands and settings Daisychain commands and settings - on subdevices are now supported. Since 95% of the code of these two - functions was similar, a new function called su_setOID() was - created, and is now called by su_setvar and su_instcmd. This new - function is also daisychain-aware - * drivers/dstate.c: dstate: adapt daisychain devices functions For - daisychain devices, we increase the counter when alarms are present - on a subdevice, but don't decrease the count when the buffer is - empty. Otherwise, we may not get the ALARM flag in ups.status, - while there are some alarms present on device.X - * drivers/eaton-mib.c: snmp-ups: fix input.L2.voltage on Eaton G2/G3 - PDU This data entry was missing the daisychain formatting - directive, which resulted in this data not being published - (reported by Vyskocil Michal from Eaton) - -2016-05-27 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix regression related to daisychain - Fix a few regression with unitary devices, related to the - daisychain changes of the SNMP core engine - * drivers/dstate.c: dstate: enforce underflow to not generate false - alarm The newly introduced daisychain mechanism, with alarm - counters (not just boolean) introduced a potential underflow on - alarm_commit, which resulted in false positive "ALARM" flag - publication in ups.status - * drivers/snmp-ups.c: snmp-ups: update for daisychain Update the - daisychain implementation, as per the latest specification, - including considerations on "device.0". Alarms are also handled for - the daisychain devices. Initial code for settings and commands is - also present, but will be completed in subsequent commits, along - with a final cleanup and potential composite settings and commands - on "device.0" (that are then applied to all daisychain devices) - * drivers/eaton-mib.c: snmp-ups: fix some daisychain data for Eaton - PDU Some data (outlet.%i.current, outlet.%i.power, - outlet.%i.load.{off,on,cycle} and - outlet.group.%i.load.{off,on,cycle}) were missing the daisychain - formatting string, and were hence not published - * docs/daisychain.txt, drivers/dstate.c, drivers/dstate.h: dstate: - add functions to address daisychain alarms Add 2 new functions, - device_alarm_init() and device_alarm_commit(), to address - daisychain devices: these acts as the standard alarm_{init,commit}, - but only clearing / committing the alarm buffer, and not - reinitializing the main alarm counter. Hence, the "device.0" (whole - daisychain) knows if it has to publish the "ALARM" flag in - ups.status - -2016-05-25 Arnaud Quette - - * docs/new-drivers.txt: daisychain: add a reference for drivers and - alarms - * docs/daisychain.txt: daisychain: update specification for alarms - handling - * drivers/eaton-mib.c, drivers/snmp-ups.c, drivers/snmp-ups.h: snmp- - ups: daisychain update, fix and completion Following the - specification update on "device.0" consideration, adapt the current - implementation. For now, the whole daisychain will only publish - device.{mfr,model,count}. Initial support for settings and commands - was also added, and will be expanded to "device.0" - * docs/daisychain.txt: daisychain: update and fix specification - * docs/daisychain.txt: daisychain: update specification as per - discussion - -2016-05-23 Arnaud Quette - - * docs/Makefile.am, docs/daisychain.txt, docs/developer-guide.txt, - docs/user-manual.txt: daisychain documentation: fix documentation - building The daisychain documentation was missing from the build - rules, and from the documentation integration, which resulted in - documentation build being broken (reported by Charles Lepple). As a - side note, the documentation (both user and developer) will need - some update and cleanup, now that there is more content Closes: - https://github.com/networkupstools/nut/issues/291 - * drivers/eaton-mib.c: snmp-ups: Eaton Aphel Revelation updates - Update Eaton Aphel Revelation MIB mapping, by fixing outlets - switchability publication and adding "device.revision". This last - data still has to be submitted as an RFC for extending NUT - variables namespace - -2016-05-19 Arnaud Quette - - * drivers/snmp-ups.c: snmp-ups: fix daisychain regression A bug was - discovered with the new daisychain code and non-daisychained - device, resulting in data not being published - -2016-05-18 Arnaud Quette - - * drivers/compaq-mib.c, drivers/ietf-mib.c, drivers/mge-mib.c, - drivers/netvision-mib.c, drivers/powerware-mib.c, drivers/snmp- - ups.c, drivers/snmp-ups.h: snmp-ups: daisychain handling of 1ph / - 3ph phases Per device phases management is now available in - daisychain mode, for input, output and bypass. The overall - mechanism for phase determination has also changed to something - more generic, and not requiring the SU_FLAG_SETINT flag - * drivers/eaton-mib.c: snmp-ups: fix input.phases for Eaton G2 / G3 - ePDU The current implementation was using the number of input, not - the number of phase(s) - -2016-05-17 Arnaud Quette - - * drivers/eaton-mib.c: snmp-ups: initial daisychain support for Eaton - PDU Following the base implementation for daisychain support in - the SNMP driver core (snmp-ups), add support for daisychain for - Eaton PDU. Commands definitions are disabled for now, and will be - addressed in a subsequent commit - * drivers/snmp-ups.c, drivers/snmp-ups.h: snmp-ups: base daisychain - support This commit includes the initial support for daisychain. - There are however a number of limitations that still need to be - addressed, such as: * {input,output,bypass}.phase handling: for - now, mixed / hybrid daisychains are not supported * All devices - alarms are pushed to "ups.alarm" without discriminant (i.e. not - "device.X" appended to the alarm) * commands and settings are not - yet handled * non-regression testing on unitary devices have to be - done - * README, docs/outlets.txt, docs/user-manual.txt: Documentation - adjustments - * docs/daisychain.txt, docs/nut-names.txt: daisychain: initial - specification and documentation - * drivers/mge-hid.c: mge-shut/usbhid-ups: list AEG PROTECT NAS vendor - 06da AEG PROTECT NAS were previously using VendorID / ProductID - 0x2b2d / 0xffff, and are now using 0x06da / 0xffff. Also bump the - mge-hid subdriver version to 1.40 - -2016-05-13 Arnaud Quette - - * docs/man/nutupsdrv.txt: Mention explicitly the default pollinterval - As in ups.conf manual page, mention the default poll interval, to - make it clear - -2016-05-10 Arnaud Quette - - * docs/nut-qa.txt: NUT QA: add Coverity static code analysis - information NUT is now a registered Coverity project, and can thus - get static code analysis from it. This is just a first step, and - actions are needed to address the actual defects and complete the - project configuration. Due thanks to Synopsys, Inc., mother firm of - Coverity, for providing this service to Opensource project - -2016-05-09 Arnaud Quette - - * drivers/apc-mib.c, drivers/snmp-ups.h: snmp-ups: remove the - redundant SU_TYPE_STRING define SU_TYPE_STRING was originally - created to expose a required cast to string. However, it is - redundant with ST_FLAG_STRING, and not useful in the end. The only - subdriver that was using it is apc-mib (UPS support) and this was a - no-op - * README: Fix wrong link reference The "NUT outlets management and - PDU notes" were wrongly referred to as "Configuring automatic UPS - shutdowns - -2016-05-04 Jim Klimov - - * .gitignore, docs/.gitignore: GitIgnore some built documents - -2016-05-03 Jim Klimov - - * configure.ac: configure.ac : prefer "/usr/share/augeas/lenses/dist" - over "/usr/share/augeas/lenses" if present - -2016-05-03 Arnaud Quette - - * docs/configure.txt: Document Augeas lenses configure option Add - documentation on the new configure option --with-augeas-lenses- - dir=PATH - -2016-05-03 Jim Klimov - - * docs/Makefile.am, docs/man/Makefile.am: Follow-up to NUT PR#281 - - notice for the future - * docs/Makefile.am, docs/man/Makefile.am: Revert toxic commit: "a2x - says "--destination-dir" is only valid for HTML... so let us reduce - complaints reported in build" This reverts commit - fe17861c4ea12679b3ebfefa8a6d692d79d99f2d because in fact asciidoc - (8.6.9) lies about not supporting the flag, and it is reqired for - `ASCIIDOC_VERBOSE=-v make distcheck-light` to pass. So let's keep - it complaining but working. - * Makefile.am, configure.ac, scripts/augeas/Makefile.am: Allow "make - install" to deliver Augeas lenses into the path defined by - configure (defaults to /usr/share/augeas/lenses) - -2016-05-02 Jim Klimov - - * docs/Makefile.am, docs/man/Makefile.am: a2x says "--destination- - dir" is only valid for HTML... so let us reduce complaints reported - in build - * configure.ac: configure.ac : by default, "--with-doc=man=yes" to - match legacy expectations, and permit "make dist" out of the box - -2016-04-26 Arnaud Quette - - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c: nut- - scanner: Force numeric OIDs resolution Force numeric OIDs - resolution (ie, do not resolve to textual names) and disable MIB - loading. This is mostly for the convenience of debug and results - output - * scripts/subdriver/gen-snmp-subdriver.sh: SNMP subdriver generator: - add a FIXME - -2016-04-11 Michal Vyskocil - - * drivers/netvision-mib.c: netvision-mib: uses 0 as dfl Change to - NULL as other subdrivers does - -2016-04-11 Arnaud Quette - - * tools/nut-scanner/nutscan-init.c: nut-scanner: additional search - path Prepend "/usr/" to the provided --libdir, in case this one - points at "/lib/..." or similar, and not to "/usr/lib/..." - -2016-04-09 Émilien Kia - - * clients/nutclient.cpp: Correctly increment pointer in - stringset_to_strarr and stringvector_to_strarr. Fix bug #232 - * tests/Makefile.am, tests/nutclienttest.cpp: Create unit test - (failing for now) to test bug #232 (nutclient: - stringset_to_strarr() and stringvector_to_strarr() only work for - one element). - * clients/nutclient.cpp: Make string[set|vector]_to_strarr public to - be accessible to unit tests. - * clients/nutclient.h: Make nut::Client::~Client virtual. Prevent - compilation warning [-Wdelete-non-virtual-dtor]. - -2016-03-23 Jim Klimov - - * configure.ac, docs/configure.txt, docs/man/Makefile.am: Added - WITH_MANS support (to toggle generation of manpages) and revised - other documentation formats - -2016-04-08 Jim Klimov - - * configure.ac, docs/configure.txt: configure.ac : do not inspect - systemdunitdir with pkg-info if we asked not to use it at all - -2016-04-07 Arnaud Quette - - * drivers/raritan-px2-mib.c: snmp-ups: fix a missing field in - raritan_px2 mapping The default value (dfl field) was missing, and - thus producing a compilation warning - -2016-04-07 Jim Klimov - - * docs/configure.txt, m4/nut_check_libgd.m4, - m4/nut_check_libnetsnmp.m4: Allow to customize path to gdlib-config - and net-snmp-config programs - -2016-04-06 Arnaud Quette - - * data/driver.list.in, docs/man/snmp-ups.txt, drivers/Makefile.am, - drivers/raritan-px2-mib.c, drivers/raritan-px2-mib.h, drivers/snmp- - ups.c: snmp-ups: support Raritan Dominion PX2 PDU Based on initial - work and data from Opengear, using SNMP subdriver creation script, - add support for the more recent Raritan PDU, model PX2. This was - tested with a PX2-1486 (Metered Input), but should cover all PX2 - models - * scripts/subdriver/gen-snmp-subdriver.sh: SNMP subdriver creation - script: minor updates - -2016-03-23 Jim Klimov - - * configure.ac: Fix "--with-doc=auto" to use present doc-gens * - configure.ac : when using "--with-doc" do actually proceed if some - supported methods are found and some are not... build what we can - on this platform * configure.ac : revised upon peer review : - yes==all, default(empty)==no as documented in --help, auto guesser - must be explicit - -2016-03-24 Kirill Ovchinnikov - - * drivers/snmp-ups.c, drivers/snmp-ups.h: Added a feature of power on - and power off delay time writing to UPS configuration; Added - support of writing "timeticks" values to su_setvar() routine - -2016-03-23 Michal Vyskocil - - * drivers/eaton-mib.c: Bumb version of eaton-mib - -2016-03-23 Arnaud Quette - - * docs/man/snmp-ups.txt, docs/snmp.txt: Fix references to the SNMP - section of protocols - -2016-03-22 Michal Vyskocil - - * drivers/snmp-ups.h: snmp-ups: mark SU_FLAG_OK as internal to the - driver - * drivers/eaton-mib.c: snmp-ups: add outlet type to Eaton Marlin MIB - -2016-03-22 Arnaud Quette - - * configure.ac: Remove the extraneous GNU in front of FreeIPMI - Messages are now more homogeneous - * docs/configure.txt: Clarify multiple specifier for --with-doc - * docs/configure.txt: Update FreeIPMI requirements The documented - requirements were out of date, compared to the tests done at - configure time - -2016-03-22 Michal Vyskocil - - * drivers/snmp-ups.h: snmp-ups: enhance documentation of some flags - Mark SU_FLAG_OK as deprecated and SU_FLAG_STALE as internal to - driver. This helps new developers to write or extend snmp - subdrivers. - * docs/nut-names.txt: Document outlet.n.type Add and document - outlet.n.type variable, which provides information about physical - outlet type. - -2016-03-19 Charles Lepple - - * configure.ac: Version to 2.7.4.1 for snapshots - -2016-03-18 Marty R - - * docs/download.txt: Update OpenWRT package information The previous - link is over 5 years old, nut is now maintained in the packages - repository on GitHub. - -2016-03-10 Arnaud Quette - - * tools/nut-scanner/Makefile.am: Fix nut-scanner compilation in some - environments Following the commits 5187dab (common: add some - string-related functions) and e767df5 (common: consolidate some - string-related functions), the build rules of nut-scanner were not - updated to also use str.c. Since the libcommon.la dependency was - still there, some environments managed to build cleanly, while - other are failing. Update build dependencies to fix this situation - * drivers/powerware-mib.c: snmp-ups: Eaton 3ph UPS improvements Fix - the battery test status reporting, and start to simplify the - mapping layout by getting rid of some #define. Also add the - following: - battery test result "Unknown" - last battery - replacement date (battery.date) - output.voltage thresholds (high - and low) and nominal value - * drivers/snmp-ups.c: snmp-ups: add a debug trace on - nut_snmp_get_int() - 2016-03-09 Arnaud Quette * configure.ac: Fix autoreconf on Debian For some reason, Automake @@ -15906,10 +56,10 @@ * drivers/baytech-mib.c, drivers/bestpower-mib.c, drivers/compaq- mib.c, drivers/cyberpower-mib.c, drivers/eaton-mib.c, drivers/mge- - mib.c, drivers/netvision-mib.c, drivers/powerware-mib.c, - drivers/raritan-pdu-mib.c: snmp-ups: fix mib2nut structures Non - existent OIDs, for testing MIB selection, must be expressed as NULL - and not as empty string ("") for the algorithm to work + mib.c, drivers/netvision-mib.c, drivers/powerware-mib.c, drivers + /raritan-pdu-mib.c: snmp-ups: fix mib2nut structures Non existent + OIDs, for testing MIB selection, must be expressed as NULL and not + as empty string ("") for the algorithm to work 2016-03-03 Daniele Pezzini @@ -16778,10 +928,10 @@ * drivers/hidtypes.h: Increase the maximum number of HID objects The previous value (300) was causing a trim of the remaining objects. Increase the value to 500, which should give a bit of time - * drivers/libshut.c, drivers/libshut.h, drivers/libusb.c, - drivers/usb-common.h, drivers/usbhid-ups.c: Add support for Eaton - dual HID report descriptor All devices use HID descriptor at index - 0. However, some newer Eaton units have a light HID descriptor at + * drivers/libshut.c, drivers/libshut.h, drivers/libusb.c, drivers + /usb-common.h, drivers/usbhid-ups.c: Add support for Eaton dual HID + report descriptor All devices use HID descriptor at index 0. + However, some newer Eaton units have a light HID descriptor at index 0, and the full version is at index 1 (in which case, bcdDevice == 0x0202). This dual report descriptor approach is due to the fact that the main report descriptor is now too heavy, and @@ -16882,26 +1032,25 @@ * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- - device.h, tools/nut-scanner/nutscan-display.c, tools/nut- - scanner/nutscan-init.c, tools/nut-scanner/nutscan-init.h, - tools/nut-scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, - tools/nut-scanner/nutscan-serial.c, tools/nut-scanner/nutscan- - serial.h, tools/nut-scanner/scan_avahi.c, tools/nut- - scanner/scan_eaton_serial.c, tools/nut-scanner/scan_ipmi.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: - Fix legal information on source-code headers Copyright and author - were not mentioned as it should be. Most of the nut-scanner - copyright belongs to EATON, apart from few parts. Files - descriptions are now also in Doxygen format + device.h, tools/nut-scanner/nutscan-display.c, tools/nut-scanner + /nutscan-init.c, tools/nut-scanner/nutscan-init.h, tools/nut- + scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, tools/nut- + scanner/nutscan-serial.c, tools/nut-scanner/nutscan-serial.h, tools + /nut-scanner/scan_avahi.c, tools/nut-scanner/scan_eaton_serial.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: Fix legal information on source-code + headers Copyright and author were not mentioned as it should be. + Most of the nut-scanner copyright belongs to EATON, apart from few + parts. Files descriptions are now also in Doxygen format 2015-05-18 Daniele Pezzini * docs/nutdrv_qx-subdrivers.txt, drivers/nutdrv_qx.c, - drivers/nutdrv_qx.h, drivers/nutdrv_qx_bestups.c, - drivers/nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer- - common.h, drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec- - old.c, drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx.h, drivers/nutdrv_qx_bestups.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_voltronic.c, drivers/nutdrv_qx_zinto.c: nutdrv_qx: make preprocessed value's @@ -17085,11 +1234,11 @@ 2015-03-26 Stuart Henderson * data/driver.list.in, docs/man/snmp-ups.txt, docs/snmp- - subdrivers.txt, drivers/Makefile.am, drivers/huawei-mib.c, - drivers/huawei-mib.h, drivers/snmp-ups.c: snmp-ups: new subdriver - for Huawei "Hi, the [commit] below adds a new subdriver for snmp- - ups to support Huawei UPS, based on an observed walk from a - UPS5000-E with a few bits filled in from the MIBs (copy at + subdrivers.txt, drivers/Makefile.am, drivers/huawei-mib.c, drivers + /huawei-mib.h, drivers/snmp-ups.c: snmp-ups: new subdriver for + Huawei "Hi, the [commit] below adds a new subdriver for snmp-ups + to support Huawei UPS, based on an observed walk from a UPS5000-E + with a few bits filled in from the MIBs (copy at http://junkpile.org/HUAWEI_UPS_MIB/)." http://news.gmane.org/find- root.php?message_id=slrnmh6npf.tg7.stu%40naiad.spacehopper.org @@ -17115,10 +1264,10 @@ user @nickma82 * docs/man/nutdrv_qx.txt, docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: document 'voltronic-qs-hex' subdriver in man pages - * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx_bestups.c, - drivers/nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer- - common.h, drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec- - old.c, drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, + * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx_bestups.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_megatec-old.c, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_mustek.c, drivers/nutdrv_qx_q1.c, drivers/nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_zinto.c: nutdrv_qx: add 'ignoresab' flag to support bogus devices Some @@ -17128,9 +1277,8 @@ always contains FSD). To workaround this issue, add a new 'ignoresab' flag that makes the driver do just what its name tells (IGNORE Status Active Bit) skipping the relative item in qx2nut - tables. References: - - http://lists.alioth.debian.org/pipermail/nut- - upsdev/2015-March/006896.html - + tables. References: - http://lists.alioth.debian.org/pipermail + /nut-upsdev/2015-March/006896.html - https://github.com/networkupstools/nut/issues/195 2015-03-11 Arnaud Quette @@ -17370,9 +1518,9 @@ 2015-01-02 Charles Lepple * docs/cables.txt, docs/config-notes.txt, docs/configure.txt, - docs/features.txt, docs/history.txt, docs/man/nutdrv_qx.txt, - docs/nut-names.txt, docs/scheduling.txt, docs/security.txt: docs: - typo fixes + docs/features.txt, docs/history.txt, docs/man/nutdrv_qx.txt, docs + /nut-names.txt, docs/scheduling.txt, docs/security.txt: docs: typo + fixes 2015-01-01 Charles Lepple @@ -17393,9 +1541,8 @@ 2014-12-12 Andy Juniper * clients/upslog.c, docs/man/upslog.txt: upslog: break out of sleep - on SIGUSR1 and log immediately Reference: - http://news.gmane.org/find- - root.php?message_id=54863D44.3000902%40freeuk.com + on SIGUSR1 and log immediately Reference: http://news.gmane.org + /find-root.php?message_id=54863D44.3000902%40freeuk.com 2014-11-25 Charles Lepple @@ -17637,12 +1784,12 @@ 2014-09-03 Daniele Pezzini - * drivers/Makefile.am, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic- - qs-hex.h: nutdrv_qx: add Voltronic-QS-Hex subdriver - (protocol=voltronic-qs-hex) A subdriver using a protocol, specific - to UPSes manufactured by Voltronic Power, partially Hex-encoded - (e.g. 'QS' reply) and supporting some megatec commands. + * drivers/Makefile.am, drivers/nutdrv_qx.c, drivers + /nutdrv_qx_voltronic-qs-hex.c, drivers/nutdrv_qx_voltronic-qs- + hex.h: nutdrv_qx: add Voltronic-QS-Hex subdriver (protocol + =voltronic-qs-hex) A subdriver using a protocol, specific to UPSes + manufactured by Voltronic Power, partially Hex-encoded (e.g. 'QS' + reply) and supporting some megatec commands. * docs/nutdrv_qx-subdrivers.txt: nutdrv_qx: update docs about added support for more complex UPS answers * drivers/nutdrv_qx.c, drivers/nutdrv_qx.h, @@ -17881,9 +2028,9 @@ (0.62) Patch suggested by Bruno Salvador for BZ1200-BR, and also tested by Douglas A. Augusto on BZ2200BI-BR. Reference: * http://forums.freenas.org/index.php?threads/nobreak-bz1200-br-back- - ups-rs-1200va-600w-bivolt-115-nt.20247/ * - http://news.gmane.org/find-root.php?message_id=CACu22%2d3Nn2R%3dQQe - 9uy%5fPXHRduaPaFgCp2Sw4ra57Ow2qDQcOJQ%40mail.gmail.com + ups-rs-1200va-600w-bivolt-115-nt.20247/ * http://news.gmane.org + /find-root.php?message_id=CACu22%2d3Nn2R%3dQQe9uy%5fPXHRduaPaFgCp2S + w4ra57Ow2qDQcOJQ%40mail.gmail.com 2014-06-08 Arnaud Quette @@ -17925,8 +2072,8 @@ Pedantic, to be sure, but someone might try the driver with a protocol not listed, and sure enough, bv_12V won't be initialized. * docs/man/tripplite_usb.txt, drivers/tripplite_usb.c: tripplite_usb: - expose battery_min/_max as variables (0.22) - http://news.gmane.org/find- + expose battery_min/_max as variables (0.22) http://news.gmane.org + /find- root.php?message_id=21370.36829.817425.464627%40godel.bruda.ca 2014-05-27 Charles Lepple @@ -17984,17 +2131,16 @@ * drivers/powercom-hid.c, drivers/usbhid-ups.c: Bump versions. * data/driver.list.in, docs/man/usbhid-ups.txt: Update documentation. * drivers/usbhid-ups.c: Reconnect on interrupt read error. - * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, - drivers/usbhid-ups.c: Reading from the interrupt pipe implies that - you use INPUT flagged objects. + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Reading from the interrupt pipe implies that you use + INPUT flagged objects. * drivers/powercom-hid.c: Remove erroneous status. * drivers/powercom-hid.c: Comment non-compliant variables. 2014-04-17 Andrew Burdo - * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, - drivers/usbhid-ups.c: Add support for 0d9f:0001 (USB HID, - Powercom). + * drivers/libhid.c, drivers/libhid.h, drivers/powercom-hid.c, drivers + /usbhid-ups.c: Add support for 0d9f:0001 (USB HID, Powercom). 2014-04-17 Arnaud Quette @@ -18060,11 +2206,10 @@ 2014-03-18 Charles Lepple * data/driver.list.in: [HCL] Digitus DN-170014 supported by - richcomm_usb Reference: - http://lists.alioth.debian.org/pipermail/nut- - upsdev/2014-March/006695.html -or- http://news.gmane.org/find-root. - php?message_id=CADq9dvWMx0xBz9XXkVKXCre4ox%2d2kSeHtD7LW39eEDH1RCY8s - Q%40mail.gmail.com + richcomm_usb Reference: http://lists.alioth.debian.org/pipermail + /nut-upsdev/2014-March/006695.html -or- http://news.gmane.org/find- + root.php?message_id=CADq9dvWMx0xBz9XXkVKXCre4ox%2d2kSeHtD7LW39eEDH1 + RCY8sQ%40mail.gmail.com 2014-03-05 Charles Lepple @@ -18150,8 +2295,8 @@ * http://lists.alioth.debian.org/pipermail/nut- upsdev/2013-November/006564.html * http://news.gmane.org/find- root.php?message_id=50D9D460.1080408%40gmail.com - * http://news.gmane.org/find-root.php?message_id=CA%2b4duQ%3dppW%2b - Pz%2bRVPVXJyFLj0HErh1ZOtm5tk8b6n5Nd5kSk0g%40mail.gmail.com * + * http://news.gmane.org/find-root.php?message_id=CA%2b4duQ%3dppW%2 + bPz%2bRVPVXJyFLj0HErh1ZOtm5tk8b6n5Nd5kSk0g%40mail.gmail.com * http://news.gmane.org/find- root.php?message_id=528EC53C.9000801%40me.com * docs/nut-qa.txt: NUT QA document: updated and reworded @@ -18173,8 +2318,8 @@ * UPGRADING: Add a note on Hardware Abstraction Layer removal * INSTALL.nut, autogen.sh, configure.ac, docs/Makefile.am, docs/configure.txt, docs/developers.txt, docs/features.txt, - docs/macros.txt, docs/new-drivers.txt, docs/nut-hal.txt, - docs/packager-guide.txt, drivers/Makefile.am, drivers/dstate-hal.c, + docs/macros.txt, docs/new-drivers.txt, docs/nut-hal.txt, docs + /packager-guide.txt, drivers/Makefile.am, drivers/dstate-hal.c, drivers/dstate-hal.h, drivers/main-hal.c, drivers/main-hal.h, m4/nut_check_libhal.m4, m4/nut_config_libhal.m4: Remove the remaining HAL files and references Remove the remaining build @@ -18224,13 +2369,11 @@ (docbook) Add HTML tag to not auto-create telephone number links on mobile browsers also in docbook processed documents. Reference: https://github.com/networkupstools/nut/issues/78 XSL - files source: - + files source: - https://github.com/asciidoc/asciidoc/blob/master + /docbook-xsl/common.xsl - https://github.com/asciidoc/asciidoc/blob/master/docbook- - xsl/common.xsl - - https://github.com/asciidoc/asciidoc/blob/master/docbook- - xsl/xhtml.xsl - - https://github.com/asciidoc/asciidoc/blob/master/docbook- - xsl/chunked.xsl + xsl/xhtml.xsl - https://github.com/asciidoc/asciidoc/blob/master + /docbook-xsl/chunked.xsl * docs/man/asciidoc.conf: docs: prevent smartphones from being too smart Add HTML tag to not auto-create telephone number links on mobile browsers. Reference: @@ -18273,11 +2416,12 @@ 2014-02-14 Arnaud Quette - * docs/acknowledgements.txt: Update NUT team membership for Frédéric - Bohe Frederic Bohe, NUT senior developer and Eaton contractor from - 2009 to 2013, is now a retired member. Thanks for all the hard work - on the Windows port, nut-scanner, Unix packaging, support, ... Also - update the developers membership page, from Alioth to GitHub + * docs/acknowledgements.txt: Update NUT team membership for + Frédéric Bohe Frederic Bohe, NUT senior developer and Eaton + contractor from 2009 to 2013, is now a retired member. Thanks for + all the hard work on the Windows port, nut-scanner, Unix packaging, + support, ... Also update the developers membership page, from + Alioth to GitHub 2013-02-24 Charles Lepple @@ -18419,12 +2563,12 @@ 2013-12-05 Daniele Pezzini - * drivers/Makefile.am, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_voltronic-qs.h: - nutdrv_qx: add Voltronic-QS subdriver (nutdrv_qx - protocol=voltronic-qs) A subdriver using a protocol, specific to - UPSes manufactured by Voltronic Power, based on the 'mustek' one - (i.e. 'QS'). + * drivers/Makefile.am, drivers/nutdrv_qx.c, drivers + /nutdrv_qx_voltronic-qs.c, drivers/nutdrv_qx_voltronic-qs.h: + nutdrv_qx: add Voltronic-QS subdriver (nutdrv_qx protocol + =voltronic-qs) A subdriver using a protocol, specific to UPSes + manufactured by Voltronic Power, based on the 'mustek' one (i.e. + 'QS'). 2014-01-01 Charles Lepple @@ -18445,9 +2589,9 @@ 2013-12-31 Laurent Bigonville - * .gitignore, INSTALL => INSTALL.nut, Makefile.am, docs/FAQ.txt, - docs/Makefile.am, docs/configure.txt, docs/packager-guide.txt, - docs/user-manual.txt: Rename INSTALL to INSTALL.nut Rename it to + * .gitignore, INSTALL, INSTALL.nut, Makefile.am, docs/FAQ.txt, + docs/Makefile.am, docs/configure.txt, docs/packager-guide.txt, docs + /user-manual.txt: Rename INSTALL to INSTALL.nut Rename it to INSTALL.nut so autoreconf will not try to overwrite it. In Debian tools like dh_autoreconf calls autoreconf with -f which overwrite the INSTALL file. @@ -18472,19 +2616,19 @@ 2013-11-30 Daniele Pezzini - * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx.c, - drivers/nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer- - common.h, drivers/nutdrv_qx_megatec-old.c, - drivers/nutdrv_qx_mustek.c, drivers/nutdrv_qx_q1.c: nutdrv_qx: fix - 'megatec/old' and 'mustek' subdrivers' claim functions Address, - for 'megatec/old' and 'mustek' subdrivers, the same problem fixed - in commit 720975f4de910b270ba705a7f2981c2ee33ca2eb for Q1-based - ones: - Make the claim function of 'megatec/old' and 'mustek' - subdrivers not poll the UPS for 'vendor' informations as they are - not really needed to set these protocols apart from the other ones - (i.e. the 'status' poll is specific enough, at the time of - writing). - Move common 'light' claim function to nutdrv_qx_blazer- - common.{c,h}. - Update manual. - Versioning. + * docs/man/nutdrv_qx.txt, drivers/nutdrv_qx.c, drivers + /nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer-common.h, + drivers/nutdrv_qx_megatec-old.c, drivers/nutdrv_qx_mustek.c, + drivers/nutdrv_qx_q1.c: nutdrv_qx: fix 'megatec/old' and 'mustek' + subdrivers' claim functions Address, for 'megatec/old' and + 'mustek' subdrivers, the same problem fixed in commit + 720975f4de910b270ba705a7f2981c2ee33ca2eb for Q1-based ones: - Make + the claim function of 'megatec/old' and 'mustek' subdrivers not + poll the UPS for 'vendor' informations as they are not really + needed to set these protocols apart from the other ones (i.e. the + 'status' poll is specific enough, at the time of writing). - Move + common 'light' claim function to nutdrv_qx_blazer-common.{c,h}. - + Update manual. - Versioning. 2013-11-24 Daniele Pezzini @@ -18521,7 +2665,7 @@ 2013-11-23 Charles Lepple - * configure.in => configure.ac: Rename configure.in to configure.ac + * configure.ac, configure.in: Rename configure.in to configure.ac autoconf has been warning about this for a while - let's fix it before too many branches get created with the old name. * configure.in: configure.in: bump version to 2.7.1.5 Some packaging @@ -18601,8 +2745,8 @@ environment on ships (and we don't need shutdown there -- in critical situations the system has to operate as long as possible, untill the battery is empty) Also, all of the previous issues - listed below are now fixed in this al175 version: - ‘return’ with - a value, in function returning void (2x) - anonymous variadic + listed below are now fixed in this al175 version: - ‘return’ + with a value, in function returning void (2x) - anonymous variadic macros were introduced in C99 - C++ style comments are not allowed in ISO C90 - ISO C forbids braced-groups within expressions (5x) - ISO C90 forbids specifying subobject to initialize (16x) - ISO C99 @@ -18699,26 +2843,27 @@ revert of the voltronic merge * data/driver.list.in: nutdrv_qx: remove superfluous indications from the HCL - * data/driver.list.in, docs/Makefile.am, docs/man/Makefile.am, - docs/man/index.txt, docs/man/{blzr.txt => nutdrv_qx.txt}, - docs/man/nutupsdrv.txt, docs/new-drivers.txt, ...lzr-subdrivers.txt - => nutdrv_qx-subdrivers.txt}, drivers/Makefile.am, drivers/{blzr.c - => nutdrv_qx.c}, drivers/{blzr.h => nutdrv_qx.h}, ...r_blazer- - common.c => nutdrv_qx_blazer-common.c}, ...r_blazer-common.h => - nutdrv_qx_blazer-common.h}, drivers/{blzr_mecer.c => - nutdrv_qx_mecer.c}, drivers/{blzr_mecer.h => nutdrv_qx_mecer.h}, - ...{blzr_megatec-old.c => nutdrv_qx_megatec-old.c}, - ...{blzr_megatec-old.h => nutdrv_qx_megatec-old.h}, - drivers/{blzr_megatec.c => nutdrv_qx_megatec.c}, - drivers/{blzr_megatec.h => nutdrv_qx_megatec.h}, - drivers/{blzr_mustek.c => nutdrv_qx_mustek.c}, - drivers/{blzr_mustek.h => nutdrv_qx_mustek.h}, - .../{blzr_voltronic.c => nutdrv_qx_voltronic.c}, - .../{blzr_voltronic.h => nutdrv_qx_voltronic.h}, - drivers/{blzr_zinto.c => nutdrv_qx_zinto.c}, drivers/{blzr_zinto.h - => nutdrv_qx_zinto.h}, tools/nut-usbinfo.pl: nutdrv_qx: rename - 'blzr' driver to 'nutdrv_qx' Reference: - http://lists.alioth.debian.org/pipermail/nut- + * data/driver.list.in, docs/Makefile.am, docs/blzr-subdrivers.txt, + docs/man/Makefile.am, docs/man/blzr.txt, docs/man/index.txt, + docs/man/nutdrv_qx.txt, docs/man/nutupsdrv.txt, docs/new- + drivers.txt, docs/nutdrv_qx-subdrivers.txt, drivers/Makefile.am, + drivers/blzr.c, drivers/blzr.h, drivers/blzr_blazer-common.c, + drivers/blzr_blazer-common.h, drivers/blzr_mecer.c, + drivers/blzr_mecer.h, drivers/blzr_megatec-old.c, drivers + /blzr_megatec-old.h, drivers/blzr_megatec.c, + drivers/blzr_megatec.h, drivers/blzr_mustek.c, + drivers/blzr_mustek.h, drivers/blzr_voltronic.c, + drivers/blzr_voltronic.h, drivers/blzr_zinto.c, + drivers/blzr_zinto.h, drivers/nutdrv_qx.c, drivers/nutdrv_qx.h, + drivers/nutdrv_qx_blazer-common.c, drivers/nutdrv_qx_blazer- + common.h, drivers/nutdrv_qx_mecer.c, drivers/nutdrv_qx_mecer.h, + drivers/nutdrv_qx_megatec-old.c, drivers/nutdrv_qx_megatec-old.h, + drivers/nutdrv_qx_megatec.c, drivers/nutdrv_qx_megatec.h, + drivers/nutdrv_qx_mustek.c, drivers/nutdrv_qx_mustek.h, + drivers/nutdrv_qx_voltronic.c, drivers/nutdrv_qx_voltronic.h, + drivers/nutdrv_qx_zinto.c, drivers/nutdrv_qx_zinto.h, tools/nut- + usbinfo.pl: nutdrv_qx: rename 'blzr' driver to 'nutdrv_qx' + Reference: http://lists.alioth.debian.org/pipermail/nut- upsdev/2013-November/006555.html * docs/stable-hcl.txt, docs/website/css/web-layout.css: Address Issue #48 (text-based browsers) Reference: https://github.com/networkups @@ -18749,11 +2894,12 @@ 2013-10-16 Daniele Pezzini - * docs/man/Makefile.am, docs/man/{blazer.txt => blazer-common.txt}, - docs/man/blazer_ser.txt, docs/man/blazer_usb.txt, - docs/man/index.txt, docs/man/nutupsdrv.txt: blazer: Fix {usb,ser} - manual Split the old blazer manual in two manuals named after - their executables with a common source. + * docs/man/Makefile.am, docs/man/blazer-common.txt, + docs/man/blazer.txt, docs/man/blazer_ser.txt, + docs/man/blazer_usb.txt, docs/man/index.txt, + docs/man/nutupsdrv.txt: blazer: Fix {usb,ser} manual Split the old + blazer manual in two manuals named after their executables with a + common source. * docs/man/blazer.txt: blazer: Fix user manual Fix minor errors Add ranges Fix test.battery.start (i.e. minutes instead of seconds) * drivers/blazer.c: blazer: Fix shutdown sequence Split stop pending @@ -18828,8 +2974,8 @@ docs/man/Makefile.am, docs/man/blzr.txt, docs/man/index.txt, docs/man/nutupsdrv.txt, docs/new-drivers.txt, drivers/Makefile.am, drivers/blzr.c, drivers/blzr.h, drivers/blzr_blazer-common.c, - drivers/blzr_blazer-common.h, drivers/blzr_megatec-old.c, - drivers/blzr_megatec-old.h, drivers/blzr_megatec.c, + drivers/blzr_blazer-common.h, drivers/blzr_megatec-old.c, drivers + /blzr_megatec-old.h, drivers/blzr_megatec.c, drivers/blzr_megatec.h, drivers/blzr_mustek.c, drivers/blzr_mustek.h, drivers/blzr_voltronic.c, drivers/blzr_voltronic.h, drivers/blzr_zinto.c, @@ -19124,10 +3270,10 @@ Solaris * tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- device.h, tools/nut-scanner/scan_avahi.c, tools/nut- - scanner/scan_eaton_serial.c, tools/nut-scanner/scan_ipmi.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: - [nut-scanner] Make sure to return the first device of the list. + scanner/scan_eaton_serial.c, tools/nut-scanner/scan_ipmi.c, tools + /nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: [nut- + scanner] Make sure to return the first device of the list. 2013-07-22 Charles Lepple @@ -19489,10 +3635,10 @@ scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, .../jnutwebapi/NutRestProvider.java, .../jnutwebapi/RestWSApplication.java, - .../jnutwebapi/ScannerProvider.java, - .../jNutWebAPI/src/main/webapp/WEB-INF/web.xml: Remove java related - files (jNut) which will be moved to a separated repository. See - issues: - https://github.com/networkupstools/nut/issues/2 - + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml: Remove java related files (jNut) which will be + moved to a separated repository. See issues: - + https://github.com/networkupstools/nut/issues/2 - https://github.com/networkupstools/nut/issues/22 2013-03-26 Alex Lov @@ -19704,17 +3850,17 @@ docs/man/nutscan_scan_eaton_serial.txt, docs/man/nutscan_scan_ipmi.txt, docs/man/nutscan_scan_nut.txt, docs/man/nutscan_scan_snmp.txt, docs/man/nutscan_scan_usb.txt, - docs/man/nutscan_scan_xml_http.txt, include/nut_platform.h, - tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, - tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan- - device.h, tools/nut-scanner/nutscan-display.c, tools/nut- - scanner/nutscan-serial.c, tools/nut-scanner/nutscan-serial.h, - tools/nut-scanner/scan_eaton_serial.c, tools/nut- - scanner/scan_nut.c: Add nut-scanner support for Eaton serial units - nut-scanner and libnutscan now provides respectively an option and - functions to detect Eaton serial devices. The following protocols - are supported: SHUT, XCP and Q1 (patch from Frederic Bohe, with - parts from Arnaud Quette, both for Eaton) + docs/man/nutscan_scan_xml_http.txt, include/nut_platform.h, tools + /nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools/nut- + scanner/nut-scanner.c, tools/nut-scanner/nutscan-device.h, tools + /nut-scanner/nutscan-display.c, tools/nut-scanner/nutscan-serial.c, + tools/nut-scanner/nutscan-serial.h, tools/nut- + scanner/scan_eaton_serial.c, tools/nut-scanner/scan_nut.c: Add nut- + scanner support for Eaton serial units nut-scanner and libnutscan + now provides respectively an option and functions to detect Eaton + serial devices. The following protocols are supported: SHUT, XCP + and Q1 (patch from Frederic Bohe, with parts from Arnaud Quette, + both for Eaton) * configure.in: Fix for pthread on HP-UX pthread is compiled on a stub when -lpthread is not explicitly added. This commit is a duplicate of [[SVN:3801]], from Frederic Bohe (for Eaton) @@ -19885,11 +4031,11 @@ * conf/.gitignore: Subversion ignored files completion Mark upsmon.conf.sample as Subversion ignored, since it is now generated from a .in template file (no functional changes) - * conf/Makefile.am, conf/{upsmon.conf.sample => - upsmon.conf.sample.in}, configure.in: Adapt upsmon.conf sample to - use configured values The sample upsmon.conf provided now adapts - RUN_AS_USER value, and NOTIFYCMD / POWERDOWNFLAG base path to the - user configured values + * conf/Makefile.am, conf/upsmon.conf.sample, + conf/upsmon.conf.sample.in, configure.in: Adapt upsmon.conf sample + to use configured values The sample upsmon.conf provided now + adapts RUN_AS_USER value, and NOTIFYCMD / POWERDOWNFLAG base path + to the user configured values 2012-11-28 Arnaud Quette @@ -19899,11 +4045,11 @@ device.mfr was also changed in both drivers, and revisions were bumped to 0.02 (patch from Elio Parisi, Riello) * data/driver.list.in, drivers/Makefile.am, drivers/openups-hid.c, - drivers/openups-hid.h, drivers/usbhid-ups.c, - scripts/upower/95-upower-hid.rules: Official support for Minibox - openUPS Intelligent UPS Add a new usbhid-ups subdriver to handle - Minibox openUPS Intelligent UPS (USB ID 0x04d8:0xd004) (patch from - Nicu Pavel, Mini-Box.Com) + drivers/openups-hid.h, drivers/usbhid-ups.c, scripts/upower/95 + -upower-hid.rules: Official support for Minibox openUPS Intelligent + UPS Add a new usbhid-ups subdriver to handle Minibox openUPS + Intelligent UPS (USB ID 0x04d8:0xd004) (patch from Nicu Pavel, + Mini-Box.Com) 2012-11-28 Charles Lepple @@ -19935,12 +4081,12 @@ * data/driver.list.in, docs/man/.gitignore, docs/man/Makefile.am, docs/man/riello_ser.txt, docs/man/riello_usb.txt, drivers/.gitignore, drivers/Makefile.am, drivers/riello.c, - drivers/riello.h, drivers/riello_ser.c, drivers/riello_usb.c, - tools/nut-usbinfo.pl: Official support for Riello serial and USB - devices Add two new drivers, riello_ser and riello_usb, to support - the whole ranges of Riello devices: IDG, IPG, WPG, NPW, NDG, DVT, - DVR, DVD, VST, VSD, SEP, SDH, SDL, SPW, SPT, MCT, MST, MCM, MCT, - MHT, MPT and MPM. This completes the official Riello protocols + drivers/riello.h, drivers/riello_ser.c, drivers/riello_usb.c, tools + /nut-usbinfo.pl: Official support for Riello serial and USB devices + Add two new drivers, riello_ser and riello_usb, to support the + whole ranges of Riello devices: IDG, IPG, WPG, NPW, NDG, DVT, DVR, + DVD, VST, VSD, SEP, SDH, SDL, SPW, SPT, MCT, MST, MCM, MCT, MHT, + MPT and MPM. This completes the official Riello protocols publication, that happened in May 2012 (developed by Elio Parisi, from Riello) @@ -20044,8 +4190,8 @@ * drivers/cps-hid.c, drivers/idowell-hid.c, scripts/subdriver/gen- usbhid-subdriver.sh: Replace missing occurrences in previous commit * docs/hid-subdrivers.txt, drivers/libhid.c, scripts/Makefile.am, - scripts/subdriver/{path-to-subdriver.sh => gen-usbhid- - subdriver.sh}: Rename usbhid subdriver generation script This + scripts/subdriver/gen-usbhid-subdriver.sh, scripts/subdriver/path- + to-subdriver.sh: Rename usbhid subdriver generation script This script was previously named path-to-subdriver.sh, which was not enough meaningful. The renaming to gen-usbhid-subdriver.sh also makes sense with a potential gen-snmp-subdriver.sh @@ -20086,14 +4232,14 @@ 2012-10-10 Arnaud Quette * README: Spell check fix (test) - * .gitignore, configure.in, docs/.gitignore, docs/Makefile.am, - docs/nut-qa.txt, docs/nut.dict: Spell checking framework - implementation Implement a framework to spell check documentation - source files, using Aspell. This includes an interactive build - target (make spellcheck-interactive), and an automated one (make - spellcheck), mainly for QA / Buildbot purpose. Note that a base NUT - dictionnary is also available (docs/nut.dict), providing a glossary - of terms related to power devices and management + * .gitignore, configure.in, docs/.gitignore, docs/Makefile.am, docs + /nut-qa.txt, docs/nut.dict: Spell checking framework implementation + Implement a framework to spell check documentation source files, + using Aspell. This includes an interactive build target (make + spellcheck-interactive), and an automated one (make spellcheck), + mainly for QA / Buildbot purpose. Note that a base NUT dictionnary + is also available (docs/nut.dict), providing a glossary of terms + related to power devices and management * drivers/tripplite_usb.c: Remove POD ("Plain Old Documentation") With the approval of the author (Charles Lepple), remove POD ("Plain Old Documentation"). This embedded documentation was @@ -20109,8 +4255,8 @@ 2012-10-04 Arnaud Quette - * docs/man/nut-scanner.txt, drivers/nut-ipmipsu.c, tools/nut- - scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- + * docs/man/nut-scanner.txt, drivers/nut-ipmipsu.c, tools/nut-scanner + /nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- scanner/scan_ipmi.c: Support power supplies scan over the network nut-scanner can now scan for power supplies with IPMI over LAN. This is currently limited to IPMI 1.5 only @@ -20194,14 +4340,13 @@ docs/man/macosx-ups.txt, docs/man/mge-shut.txt, docs/man/nutscan.txt, docs/man/nutscan_scan_avahi.txt, docs/man/powercom.txt, docs/man/skel.txt, docs/nut-names.txt, - docs/website/.gitignore, docs/website/Makefile.am, - docs/website/css/web-layout.css, docs/website/news.txt, - docs/website/old-news.txt, docs/website/projects.txt, - docs/website/web-layout.conf, drivers/.gitignore, - drivers/Makefile.am, drivers/macosx-ups.c, drivers/mge-hid.c, - drivers/powercom-hid.c, drivers/skel.c, drivers/usbhid-ups.c, - drivers/usbhid-ups.h, m4/nut_check_libltdl.m4: Merge from trunk - [[SVN:3679]] to [[SVN:3718]] to ssl-nss-port + docs/website/.gitignore, docs/website/Makefile.am, docs/website/css + /web-layout.css, docs/website/news.txt, docs/website/old-news.txt, + docs/website/projects.txt, docs/website/web-layout.conf, + drivers/.gitignore, drivers/Makefile.am, drivers/macosx-ups.c, + drivers/mge-hid.c, drivers/powercom-hid.c, drivers/skel.c, drivers + /usbhid-ups.c, drivers/usbhid-ups.h, m4/nut_check_libltdl.m4: Merge + from trunk [[SVN:3679]] to [[SVN:3718]] to ssl-nss-port 2012-08-09 Arnaud Quette @@ -20339,10 +4484,10 @@ 2012-07-19 Emilien Kia - * server/Makefile.am, server/conf.c, server/netcmds.h, server/{ssl.c - => netssl.c}, server/{ssl.h => netssl.h}, server/upsd.c: Replace - server/ssl.[h|c] by server/netssl.[h|c] in order to prepare nss - branch merging. + * server/Makefile.am, server/conf.c, server/netcmds.h, + server/netssl.c, server/netssl.h, server/ssl.c, server/ssl.h, + server/upsd.c: Replace server/ssl.[h|c] by server/netssl.[h|c] in + order to prepare nss branch merging. 2012-07-18 Emilien Kia @@ -20360,14 +4505,14 @@ docs/documentation.txt, docs/download.txt, docs/features.txt, docs/images/advanced.png, docs/images/bigbox.png, docs/images/bizarre.png, docs/images/nut-logo.png, - docs/images/nut.svg, docs/images/simple.png, docs/macros.txt, - docs/maintainer-guide.txt, docs/man/.gitignore, - docs/man/Makefile.am, docs/man/apcsmart-old.txt, - docs/man/apcsmart.txt, docs/man/bcmxcp.txt, docs/man/belkinunv.txt, - docs/man/blazer.txt, docs/man/dummy-ups.txt, docs/man/index.txt, - docs/man/metasys.txt, docs/man/nut-ipmipsu.txt, docs/man/nut- - recorder.txt, docs/man/nut-scanner.txt, docs/man/nut.conf.txt, - docs/man/nutscan.txt, docs/man/nutscan_add_device_to_device.txt, + docs/images/nut.svg, docs/images/simple.png, docs/macros.txt, docs + /maintainer-guide.txt, docs/man/.gitignore, docs/man/Makefile.am, + docs/man/apcsmart-old.txt, docs/man/apcsmart.txt, + docs/man/bcmxcp.txt, docs/man/belkinunv.txt, docs/man/blazer.txt, + docs/man/dummy-ups.txt, docs/man/index.txt, docs/man/metasys.txt, + docs/man/nut-ipmipsu.txt, docs/man/nut-recorder.txt, docs/man/nut- + scanner.txt, docs/man/nut.conf.txt, docs/man/nutscan.txt, + docs/man/nutscan_add_device_to_device.txt, docs/man/nutscan_add_option_to_device.txt, docs/man/nutscan_cidr_to_ip.txt, docs/man/nutscan_display_parsable.txt, @@ -20387,8 +4532,8 @@ layout.css, docs/website/faviconut.ico, docs/website/faviconut.png, docs/website/news.txt, docs/website/projects.txt, docs/website/ups- protocols.txt, docs/website/web-layout.conf, drivers/.gitignore, - drivers/Makefile.am, drivers/apc-hid.c, drivers/apc-mib.c, - drivers/apcsmart-old.c, drivers/apcsmart-old.h, drivers/apcsmart.c, + drivers/Makefile.am, drivers/apc-hid.c, drivers/apc-mib.c, drivers + /apcsmart-old.c, drivers/apcsmart-old.h, drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, drivers/apcsmart_tabs.h, drivers/bcmxcp.c, drivers/bcmxcp.h, drivers/bcmxcp_ser.c, drivers/bcmxcp_usb.c, drivers/belkin-hid.c, @@ -20401,28 +4546,27 @@ drivers/etapro.c, drivers/gamatronic.c, drivers/genericups.c, drivers/ietf-mib.c, drivers/isbmex.c, drivers/libhid.c, drivers/libshut.c, drivers/liebert-esp2.c, drivers/liebert-hid.c, - drivers/main.c, drivers/masterguard.c, drivers/metasys.c, - drivers/mge-hid.c, drivers/mge-mib.c, drivers/mge-shut.c, - drivers/mge-utalk.c, drivers/microdowell.c, drivers/netvision- - mib.c, drivers/netxml-ups.c, drivers/nut-ipmi.h, drivers/nut- - ipmipsu.c, drivers/nut-libfreeipmi.c, drivers/oneac.c, - drivers/oneac.h, drivers/powercom-hid.c, drivers/powercom.c, - drivers/powercom.h, drivers/powerware-mib.c, drivers/raritan-pdu- - mib.c, drivers/rhino.c, drivers/safenet.c, drivers/snmp-ups.c, - drivers/snmp-ups.h, drivers/solis.c, drivers/tripplite-hid.c, - drivers/tripplite_usb.c, drivers/tripplitesu.c, drivers/upscode2.c, - drivers/upshandler.h, drivers/usb-common.c, drivers/usbhid-ups.c, - include/.gitignore, include/Makefile.am, include/common.h, - include/extstate.h, include/nut_stdint.h, include/parseconf.h, - include/state.h, lib/.gitignore, lib/Makefile.am, lib/README, - lib/libnutscan.pc.in, lib/libupsclient-config.in, - lib/libupsclient.pc.in, m4/ax_create_stdint_h.m4, - m4/nut_check_libavahi.m4, m4/nut_check_libfreeipmi.m4, - m4/nut_check_libltdl.m4, m4/nut_check_libwrap.m4, - m4/nut_check_os.m4, m4/nut_report_feature.m4, scripts/HP- - UX/.gitignore, scripts/HP-UX/makedepot.sh, scripts/HP- - UX/nut.psf.in, scripts/Makefile.am, scripts/README, - scripts/augeas/Makefile.am, scripts/augeas/README, + drivers/main.c, drivers/masterguard.c, drivers/metasys.c, drivers + /mge-hid.c, drivers/mge-mib.c, drivers/mge-shut.c, drivers/mge- + utalk.c, drivers/microdowell.c, drivers/netvision-mib.c, drivers + /netxml-ups.c, drivers/nut-ipmi.h, drivers/nut-ipmipsu.c, drivers + /nut-libfreeipmi.c, drivers/oneac.c, drivers/oneac.h, drivers + /powercom-hid.c, drivers/powercom.c, drivers/powercom.h, drivers + /powerware-mib.c, drivers/raritan-pdu-mib.c, drivers/rhino.c, + drivers/safenet.c, drivers/snmp-ups.c, drivers/snmp-ups.h, + drivers/solis.c, drivers/tripplite-hid.c, drivers/tripplite_usb.c, + drivers/tripplitesu.c, drivers/upscode2.c, drivers/upshandler.h, + drivers/usb-common.c, drivers/usbhid-ups.c, include/.gitignore, + include/Makefile.am, include/common.h, include/extstate.h, + include/nut_stdint.h, include/parseconf.h, include/state.h, + lib/.gitignore, lib/Makefile.am, lib/README, lib/libnutscan.pc.in, + lib/libupsclient-config.in, lib/libupsclient.pc.in, + m4/ax_create_stdint_h.m4, m4/nut_check_libavahi.m4, + m4/nut_check_libfreeipmi.m4, m4/nut_check_libltdl.m4, + m4/nut_check_libwrap.m4, m4/nut_check_os.m4, + m4/nut_report_feature.m4, scripts/HP-UX/.gitignore, scripts/HP- + UX/makedepot.sh, scripts/HP-UX/nut.psf.in, scripts/Makefile.am, + scripts/README, scripts/augeas/Makefile.am, scripts/augeas/README, scripts/avahi/nut.service.in, scripts/java/Makefile.am, scripts/java/README, scripts/java/jNut/README, scripts/java/jNut/pom.xml, @@ -20440,41 +4584,40 @@ scripts/java/jNutWebAPI/README, scripts/java/jNutWebAPI/pom.xml, .../jnutwebapi/NutRestProvider.java, .../jnutwebapi/RestWSApplication.java, - .../jnutwebapi/ScannerProvider.java, - .../jNutWebAPI/src/main/webapp/WEB-INF/web.xml, - scripts/logrotate/nutlogd, scripts/python/module/PyNUT.py, - scripts/systemd/Makefile.am, scripts/systemd/README, - scripts/systemd/nut-driver.service.in, scripts/systemd/nut- - monitor.service.in, scripts/systemd/nut-server.service.in, - scripts/systemd/nutshutdown.in, scripts/udev/.gitignore, - scripts/udev/Makefile.am, scripts/udev/README, scripts/udev/nut- - ipmipsu.rules.in, scripts/ufw/README, - scripts/ufw/nut.ufw.profile.in, scripts/upower/95-upower-hid.rules, - server/Makefile.am, server/netcmds.h, server/netget.c, - server/netget.h, server/netinstcmd.c, server/netinstcmd.h, - server/netlist.c, server/netlist.h, server/netmisc.c, - server/netmisc.h, server/netset.c, server/netset.h, - server/netssl.c, server/netssl.h, server/netuser.c, - server/netuser.h, server/{ctype.h => nut_ctype.h}, server/sstate.c, - server/sstate.h, server/upsd.c, server/upsd.h, server/user.c, - tests/Makefile.am, tests/cpputest.cpp, tests/example.cpp, - tools/Makefile.am, tools/git-svn.authors, tools/nut-hclinfo.py, - tools/{device-recorder.sh => nut-recorder.sh}, tools/nut- - scanner/Makefile.am, tools/nut-scanner/README, tools/nut- + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml, scripts/logrotate/nutlogd, + scripts/python/module/PyNUT.py, scripts/systemd/Makefile.am, + scripts/systemd/README, scripts/systemd/nut-driver.service.in, + scripts/systemd/nut-monitor.service.in, scripts/systemd/nut- + server.service.in, scripts/systemd/nutshutdown.in, + scripts/udev/.gitignore, scripts/udev/Makefile.am, + scripts/udev/README, scripts/udev/nut-ipmipsu.rules.in, + scripts/ufw/README, scripts/ufw/nut.ufw.profile.in, + scripts/upower/95-upower-hid.rules, server/Makefile.am, + server/ctype.h, server/netcmds.h, server/netget.c, server/netget.h, + server/netinstcmd.c, server/netinstcmd.h, server/netlist.c, + server/netlist.h, server/netmisc.c, server/netmisc.h, + server/netset.c, server/netset.h, server/netssl.c, server/netssl.h, + server/netuser.c, server/netuser.h, server/nut_ctype.h, + server/sstate.c, server/sstate.h, server/upsd.c, server/upsd.h, + server/user.c, tests/Makefile.am, tests/cpputest.cpp, + tests/example.cpp, tools/Makefile.am, tools/device-recorder.sh, + tools/git-svn.authors, tools/nut-hclinfo.py, tools/nut-recorder.sh, + tools/nut-scanner/Makefile.am, tools/nut-scanner/README, tools/nut- scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/nutscan-device.c, tools/nut-scanner/nutscan-device.h, - tools/nut-scanner/nutscan-display.c, tools/nut-scanner/nutscan- - init.c, tools/nut-scanner/nutscan-init.h, tools/nut- - scanner/nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, tools/nut- - scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, tools/nut- - scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- - scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c, tools/nut- - snmpinfo.py, tools/nut-usbinfo.pl, tools/svn2cl.authors: Merge from - trunk [[SVN:2848]] to [[SVN:3679]] to ssl-nss-port. Note: a - problem is occurring for server/ssl.[h|c]: they have been moved to - server/netssl.[h|c] but consider them as removed. For the branch - merging to trunk, consider paying attention to the case of these - files (removing them by hand). + scanner/nutscan-device.c, tools/nut-scanner/nutscan-device.h, tools + /nut-scanner/nutscan-display.c, tools/nut-scanner/nutscan-init.c, + tools/nut-scanner/nutscan-init.h, tools/nut-scanner/nutscan-ip.c, + tools/nut-scanner/nutscan-ip.h, tools/nut-scanner/scan_avahi.c, + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c, tools/nut-snmpinfo.py, tools/nut- + usbinfo.pl, tools/svn2cl.authors: Merge from trunk [[SVN:2848]] to + [[SVN:3679]] to ssl-nss-port. Note: a problem is occurring for + server/ssl.[h|c]: they have been moved to server/netssl.[h|c] but + consider them as removed. For the branch merging to trunk, + consider paying attention to the case of these files (removing them + by hand). 2012-07-17 Arnaud Quette @@ -20498,8 +4641,8 @@ 2012-07-16 Arnaud Quette * drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, - m4/nut_check_libfreeipmi.m4, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and 1.2.x + m4/nut_check_libfreeipmi.m4, tools/nut-scanner/nut-scanner.c, tools + /nut-scanner/scan_ipmi.c: Support for FreeIPMI 1.1.x and 1.2.x Prepare for supporting API changes in FreeIPMI 1.1.x and 1.2.x. This is mostly related to SDR API simplifications. A 2nd iteration will probably address code redundancy, whenever possible @@ -20678,11 +4821,11 @@ 2012-05-29 Prachi Gandhi - * Makefile.am, configure.in, tools/nut-scanner/Makefile.am, - tools/nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-init.c, - tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_snmp.c: - Changes in nut-scanner to remove Sparc 'usmAESPrivProtocol' error - while creating package + * Makefile.am, configure.in, tools/nut-scanner/Makefile.am, tools + /nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-init.c, tools + /nut-scanner/nutscan-init.h, tools/nut-scanner/scan_snmp.c: Changes + in nut-scanner to remove Sparc 'usmAESPrivProtocol' error while + creating package 2012-05-29 Arnaud Quette @@ -20993,16 +5136,16 @@ * tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c, tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, - tools/nut-scanner/scan_xml_http.c: Cleaner exit for nut-scanner + tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: Cleaner exit for nut-scanner 2012-04-23 Frederic Bohe * tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Be - more verbose when failing to dynamically load a library + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools + /nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Be more + verbose when failing to dynamically load a library 2012-04-14 Arnaud Quette @@ -21016,8 +5159,8 @@ in Kelvin Check if raw value is in the Kelvin range, to detect buggy values that are already expressed in Celsius degrees, as found on some HP devices - * docs/developer-guide.txt, tools/Makefile.am, tools/{device- - recorder.sh => nut-recorder.sh}: Rename device-recorder to nut- + * docs/developer-guide.txt, tools/Makefile.am, tools/device- + recorder.sh, tools/nut-recorder.sh: Rename device-recorder to nut- recorder * data/driver.list.in: HCL: Reorder Dell devices by connection type @@ -21523,18 +5666,18 @@ docs/man/nutscan_scan_usb.txt, docs/man/nutscan_scan_xml_http.txt: Update documentation * tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: - Make sure not to call any non-initialized function pointers. - * tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, - tools/nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c, - tools/nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: - Keep the same API whatever the library are at compile time... - ...(so some scan functions may be stub only) Add an init function + - variable to know the available scan method at run time. Update - nut-scanner accordingly. + tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools + /nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Make + sure not to call any non-initialized function pointers. + * tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools + /nut-scanner/nut-scanner.c, tools/nut-scanner/nutscan-init.c, tools + /nut-scanner/nutscan-init.h, tools/nut-scanner/scan_avahi.c, tools + /nut-scanner/scan_ipmi.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: Keep the + same API whatever the library are at compile time... ...(so some + scan functions may be stub only) Add an init function + variable to + know the available scan method at run time. Update nut-scanner + accordingly. 2011-12-09 Arnaud Quette @@ -21602,11 +5745,11 @@ libltdl/m4/argz.m4, libltdl/m4/autobuild.m4, libltdl/m4/libtool.m4, libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4, libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in, libltdl/m4/ltversion.m4, - libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libltdl/stamp-mk, - tools/nut-scanner/Makefile.am, tools/nut-scanner/scan_avahi.c, - tools/nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, - tools/nut-scanner/scan_xml_http.c: First set of modification to - include libltdl + libltdl/m4/lt~obsolete.m4, libltdl/slist.c, libltdl/stamp-mk, tools + /nut-scanner/Makefile.am, tools/nut-scanner/scan_avahi.c, tools + /nut-scanner/scan_snmp.c, tools/nut-scanner/scan_usb.c, tools/nut- + scanner/scan_xml_http.c: First set of modification to include + libltdl 2011-12-05 Arnaud Quette @@ -21719,9 +5862,8 @@ scripts/java/jNutWebAPI/pom.xml, .../jnutwebapi/NutRestProvider.java, .../jnutwebapi/RestWSApplication.java, - .../jnutwebapi/ScannerProvider.java, - .../jNutWebAPI/src/main/webapp/WEB-INF/web.xml: Initial commit of - jNutWebAPI. + .../jnutwebapi/ScannerProvider.java, .../jNutWebAPI/src/main/webapp + /WEB-INF/web.xml: Initial commit of jNutWebAPI. * scripts/java/jNut/.gitignore, scripts/java/jNut/src/main/java/org/n etworkupstools/jnut/Scanner.java: Fix a little bug with function namming (get instead of set). @@ -21817,15 +5959,15 @@ * docs/configure.txt: Add missing --with-avahi documentation * docs/Makefile.am, docs/developer-guide.txt, tools/nut- - scanner/.gitignore, tools/nut-scanner/README, tools/nut- - scanner/nut-scan.h: Add a 'NUT device discovery' chapter to the - developer guide, ... ...to document libnutscan + scanner/.gitignore, tools/nut-scanner/README, tools/nut-scanner + /nut-scan.h: Add a 'NUT device discovery' chapter to the developer + guide, ... ...to document libnutscan * configure.in: Enable Avahi automatic support, upon detection * docs/man/.gitignore, docs/man/Makefile.am, docs/man/index.txt, docs/man/nutscan.txt: Add an overview manpage for libnutscan - * configure.in, docs/Makefile.am, docs/{download.txt.in => - download.txt}: Revert [[SVN:3272]], which breaks distribution - check, ... ...while waiting for a suitable solution + * configure.in, docs/Makefile.am, docs/download.txt, + docs/download.txt.in: Revert [[SVN:3272]], which breaks + distribution check, ... ...while waiting for a suitable solution 2011-10-13 Charles Lepple @@ -21842,8 +5984,8 @@ 2011-10-11 Arnaud Quette - * configure.in, docs/Makefile.am, docs/{download.txt => - download.txt.in}: Automate generation of the stable release + * configure.in, docs/Makefile.am, docs/download.txt, + docs/download.txt.in: Automate generation of the stable release information, in the Download section 2011-10-10 Arnaud Quette @@ -21938,12 +6080,12 @@ 2011-09-20 Arnaud Quette - * server/Makefile.am, server/netcmds.h, server/netget.c, - server/netget.h, server/netinstcmd.c, server/netinstcmd.h, - server/netlist.c, server/netlist.h, server/netmisc.c, - server/netmisc.h, server/netset.c, server/netset.h, - server/netuser.c, server/netuser.h, server/{ctype.h => - nut_ctype.h}, server/ssl.c, server/ssl.h, server/upsd.c, + * server/Makefile.am, server/ctype.h, server/netcmds.h, + server/netget.c, server/netget.h, server/netinstcmd.c, + server/netinstcmd.h, server/netlist.c, server/netlist.h, + server/netmisc.c, server/netmisc.h, server/netset.c, + server/netset.h, server/netuser.c, server/netuser.h, + server/nut_ctype.h, server/ssl.c, server/ssl.h, server/upsd.c, server/upsd.h: Rename upsd internal client structure and header from ctype_t to nut_ctype_t. This avoids namespace conflict on AIX, and is more suitable in general @@ -22065,8 +6207,8 @@ * docs/FAQ.txt, docs/config-notes.txt, docs/download.txt, docs/man/Makefile.am, docs/man/apcsmart-old.txt, docs/man/apcsmart.txt, docs/stable-hcl.txt, docs/website/web- - layout.conf, drivers/Makefile.am, drivers/apcsmart-old.c, - drivers/apcsmart-old.h, drivers/apcsmart.c, drivers/apcsmart.h, + layout.conf, drivers/Makefile.am, drivers/apcsmart-old.c, drivers + /apcsmart-old.h, drivers/apcsmart.c, drivers/apcsmart.h, drivers/apcsmart_tabs.c, drivers/apcsmart_tabs.h, drivers/eaton- mib.c, drivers/eaton-mib.h, drivers/snmp-ups.c: Merge with trunk from [[SVN:3196]] @@ -22147,8 +6289,8 @@ docs/website/news.txt, docs/website/projects.txt, drivers/apc- mib.c, drivers/bestpower-mib.c, drivers/eaton-mib.c, drivers/ietf- mib.c, drivers/mge-hid.c, drivers/mge-mib.c, drivers/netvision- - mib.c, drivers/powerware-mib.c, drivers/raritan-pdu-mib.c, - drivers/snmp-ups.c, drivers/snmp-ups.h, scripts/Makefile.am, + mib.c, drivers/powerware-mib.c, drivers/raritan-pdu-mib.c, drivers + /snmp-ups.c, drivers/snmp-ups.h, scripts/Makefile.am, scripts/README, scripts/java/Makefile.am, scripts/java/README, scripts/java/jNut/README, scripts/java/jNut/pom.xml, .../main/java/org/networkupstools/jnut/Client.java, @@ -22258,8 +6400,8 @@ drivers/microdowell.c, drivers/nut-ipmi.h, drivers/nut-ipmipsu.c, drivers/nut-libfreeipmi.c, drivers/powercom.c, drivers/powercom.h, drivers/rhino.c, drivers/snmp-ups.c, drivers/solis.c, drivers/usb- - common.c, drivers/usb-common.h, include/Makefile.am, - lib/libupsclient-config.in, lib/libupsclient.pc.in, + common.c, drivers/usb-common.h, include/Makefile.am, lib + /libupsclient-config.in, lib/libupsclient.pc.in, m4/ax_create_stdint_h.m4, m4/nut_check_libfreeipmi.m4, m4/nut_report_feature.m4, scripts/Makefile.am, scripts/augeas/README, scripts/avahi/nut.service.in, @@ -22286,9 +6428,9 @@ * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, tools/nut-scanner/scan_snmp.c: More API cleaning - * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-ip.c, - tools/nut-scanner/nutscan-ip.h, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c: Consolidating API + * tools/nut-scanner/nut-scan.h, tools/nut-scanner/nutscan-ip.c, tools + /nut-scanner/nutscan-ip.h, tools/nut-scanner/scan_nut.c, tools/nut- + scanner/scan_snmp.c: Consolidating API * configure.in, m4/nut_check_libavahi.m4, tools/nut- scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools/nut- scanner/nut-scanner.c, tools/nut-scanner/scan_avahi.c: Add avahi @@ -22343,16 +6485,17 @@ 2011-08-16 Frederic Bohe - * tools/nut-scanner/.gitignore, tools/nut-scanner/Makefile.am, + * tools/nut-scanner/.gitignore, tools/nut-scanner/Makefile.am, tools + /nut-scanner/device.c, tools/nut-scanner/device.h, tools/nut- + scanner/display.c, tools/nut-scanner/ip.c, tools/nut-scanner/ip.h, tools/nut-scanner/nut-scan.h, tools/nut-scanner/nut-scanner.c, - tools/nut-scanner/{device.c => nutscan-device.c}, tools/nut- - scanner/{device.h => nutscan-device.h}, tools/nut- - scanner/{display.c => nutscan-display.c}, tools/nut-scanner/{ip.c - => nutscan-ip.c}, tools/nut-scanner/{ip.h => nutscan-ip.h}, - tools/nut-scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, - tools/nut-scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, - tools/nut-scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: - More consistent API naming + tools/nut-scanner/nutscan-device.c, tools/nut-scanner/nutscan- + device.h, tools/nut-scanner/nutscan-display.c, tools/nut-scanner + /nutscan-ip.c, tools/nut-scanner/nutscan-ip.h, tools/nut- + scanner/scan_avahi.c, tools/nut-scanner/scan_ipmi.c, tools/nut- + scanner/scan_nut.c, tools/nut-scanner/scan_snmp.c, tools/nut- + scanner/scan_usb.c, tools/nut-scanner/scan_xml_http.c: More + consistent API naming 2011-08-05 Charles Lepple @@ -22443,9 +6586,8 @@ 2011-07-08 Frederic Bohe - * tools/nut-scanner/ip.c, tools/nut-scanner/ip.h, tools/nut- - scanner/nut-scanner.c: Add an helper function to decode CIDR - notation. + * tools/nut-scanner/ip.c, tools/nut-scanner/ip.h, tools/nut-scanner + /nut-scanner.c: Add an helper function to decode CIDR notation. 2011-07-08 Charles Lepple @@ -22592,9 +6734,9 @@ 2011-06-27 Frederic Bohe - * tools/nut-scanner/device.h, tools/nut-scanner/nut-scan.h, - tools/nut-scanner/nut-scanner.c, tools/nut-scanner/scan_nut.c, - tools/nut-scanner/scan_snmp.c: Add NUT server scan. + * tools/nut-scanner/device.h, tools/nut-scanner/nut-scan.h, tools + /nut-scanner/nut-scanner.c, tools/nut-scanner/scan_nut.c, tools + /nut-scanner/scan_snmp.c: Add NUT server scan. 2011-06-22 Frederic Bohe @@ -22607,8 +6749,8 @@ * tools/nut-scanner/scan_xml_http.c: Use NUT const * tools/nut-scanner/ip.c, tools/nut-scanner/ip.h: Forgot to commit the new files for iterator - * tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, - tools/nut-scanner/scan_snmp.c: Factorize IP iterator + * tools/nut-scanner/Makefile.am, tools/nut-scanner/nut-scan.h, tools + /nut-scanner/scan_snmp.c: Factorize IP iterator * tools/nut-scanner/Makefile.am: Remove unneeded reference to *.h files * tools/Makefile.am, tools/nut-scanner/nutscan-snmp.h, tools/nut- @@ -22680,10 +6822,10 @@ scanner/display.c, tools/nut-scanner/scan_usb.c, tools/nut- scanner/scan_xml_http.c: More flexible way to manage optional parameter of each devices... ...via a simple linked list - * tools/nut-scanner/display.h, tools/nut-scanner/{scan_usb.h => nut- - scan.h}, tools/nut-scanner/nut-scanner.c, tools/nut- - scanner/scan_avahi.h, tools/nut-scanner/scan_ipmi.h, tools/nut- - scanner/scan_nut.h, tools/nut-scanner/scan_snmp.h, tools/nut- + * tools/nut-scanner/display.h, tools/nut-scanner/nut-scan.h, tools + /nut-scanner/nut-scanner.c, tools/nut-scanner/scan_avahi.h, tools + /nut-scanner/scan_ipmi.h, tools/nut-scanner/scan_nut.h, tools/nut- + scanner/scan_snmp.h, tools/nut-scanner/scan_usb.h, tools/nut- scanner/scan_xml_http.h: Keep only one file for nut-scan library interface * tools/nut-scanner/display.h: typo @@ -22695,8 +6837,8 @@ 2011-06-03 Arnaud Quette - * tools/nut-scanner/Makefile.am, tools/nut-scanner/device.c, - tools/nut-scanner/device.h, tools/nut-scanner/display.c, tools/nut- + * tools/nut-scanner/Makefile.am, tools/nut-scanner/device.c, tools + /nut-scanner/device.h, tools/nut-scanner/display.c, tools/nut- scanner/display.h, tools/nut-scanner/nut-scanner.c, tools/nut- scanner/scan_avahi.c, tools/nut-scanner/scan_avahi.h, tools/nut- scanner/scan_ipmi.c, tools/nut-scanner/scan_ipmi.h, tools/nut- @@ -23101,13 +7243,13 @@ * COPYING, INSTALL, Makefile.am, NEWS, README, UPGRADING, autogen.sh, clients/Makefile.am, configure.in, data/.gitignore, data/Makefile.am, data/driver.list.in, data/epdu-managed.dev, - data/{evolution500.dev => evolution500.seq}, docs/.gitignore, - docs/Makefile.am, docs/config-notes.txt, docs/configure.txt, - docs/developer-guide.txt, docs/docinfo.xml, docs/documentation.txt, + data/evolution500.dev, data/evolution500.seq, docs/.gitignore, + docs/Makefile.am, docs/config-notes.txt, docs/configure.txt, docs + /developer-guide.txt, docs/docinfo.xml, docs/documentation.txt, docs/download.txt, docs/history.txt, docs/images/old-cgi.png, - docs/man/.gitignore, docs/nut-names.txt, docs/{website => }/stable- - hcl.txt, docs/support.txt, docs/user-manual.txt, - docs/website/Makefile.am, docs/website/news.txt, + docs/man/.gitignore, docs/nut-names.txt, docs/stable-hcl.txt, + docs/support.txt, docs/user-manual.txt, docs/website/Makefile.am, + docs/website/news.txt, docs/website/stable-hcl.txt, docs/website/website.txt, drivers/.gitignore, drivers/Makefile.am, drivers/idowell-hid.c, drivers/idowell-hid.h, drivers/usbhid-ups.c, m4/nut_check_libhal.m4, m4/nut_check_libneon.m4, @@ -23227,55 +7369,49 @@ 2010-12-21 Emilien Kia - * INSTALL, Makefile.am, README, docs/ideas.txt => TODO, UPGRADING, - clients/upsclient.c, clients/upsclient.h, clients/upscmd.c, - clients/upsrw.c, conf/upsd.conf.sample, conf/upsd.users.sample, - configure.in, data/Makefile.am, data/driver.list, - data/driver.list.in, docs/.gitignore, docs/FAQ, docs/FAQ.txt, - docs/Makefile.am, docs/README, docs/acknowledgements.txt, - docs/acpi.txt, docs/asciidoc.txt, docs/big-servers.txt, - docs/cables.txt, docs/chroot.txt, docs/commands.txt, docs/config- - files.txt, docs/config-notes.txt, docs/configure.txt, docs/contact- - closure.txt, docs/data-room.txt, docs/design.txt, docs/developer- - guide.txt, docs/developers.txt, docs/documentation.txt, - docs/download.txt, docs/features.txt, docs/hid-subdrivers.txt, - docs/history.txt, docs/images/advanced.png, - docs/images/asciidoc.png, docs/images/bigbox.png, - docs/images/bizarre.png, docs/images/blue-arrow.png, - docs/images/cables/73-0724.png, docs/images/cables/940-0024C.jpg, + * INSTALL, Makefile.am, README, TODO, UPGRADING, clients/upsclient.c, + clients/upsclient.h, clients/upscmd.c, clients/upsrw.c, + conf/upsd.conf.sample, conf/upsd.users.sample, configure.in, + data/Makefile.am, data/driver.list, data/driver.list.in, + docs/.gitignore, docs/FAQ, docs/FAQ.txt, docs/Makefile.am, + docs/README, docs/acknowledgements.txt, docs/acpi.txt, + docs/asciidoc.txt, docs/big-servers.txt, docs/cables.txt, + docs/chroot.txt, docs/commands.txt, docs/config-files.txt, docs + /config-notes.txt, docs/configure.txt, docs/contact-closure.txt, + docs/data-room.txt, docs/design.txt, docs/developer-guide.txt, + docs/developers.txt, docs/documentation.txt, docs/download.txt, + docs/features.txt, docs/hid-subdrivers.txt, docs/history.txt, + docs/ideas.txt, docs/images/advanced.png, docs/images/asciidoc.png, + docs/images/bigbox.png, docs/images/bizarre.png, docs/images/blue- + arrow.png, docs/images/cables/73-0724.png, + docs/images/cables/940-0024C.jpg, docs/images/cables/Lansafecable.jpg, docs/images/cables/SOLA-330.png, docs/images/cables/belkin-f6cx- rkm-xu-cable.jpg, docs/images/cables/mac-940-0024C.png, docs/images/cables/mge-66049.png, docs/images/cables/mge- - db9-rj12.jpg, docs/images/cables/mge-db9-rj45.jpg, - docs/images/eaton-logo.png, docs/images/note.png, docs/images/nut- - banner.png, docs/images/nut_layering.png, - docs/images/nut_layering.svg, docs/images/simple.png, - docs/images/warning.png, docs/macros.txt, docs/man/Makefile.am, - man/apcsmart.8 => docs/man/apcsmart.txt, docs/man/asciidoc.conf, - docs/man/bcmxcp.txt, man/bcmxcp_usb.8 => docs/man/bcmxcp_usb.txt, - man/belkin.8 => docs/man/belkin.txt, docs/man/belkinunv.txt, - man/bestfcom.8 => docs/man/bestfcom.txt, docs/man/bestfortress.txt, - docs/man/bestuferrups.txt, man/bestups.8 => docs/man/bestups.txt, - man/blazer.8 => docs/man/blazer.txt, man/clone.8 => - docs/man/clone.txt, man/dummy-ups.8 => docs/man/dummy-ups.txt, - docs/man/etapro.txt, docs/man/everups.txt, man/gamatronic.8 => - docs/man/gamatronic.txt, man/genericups.8 => - docs/man/genericups.txt, man/hosts.conf.5 => + db9-rj12.jpg, docs/images/cables/mge-db9-rj45.jpg, docs/images + /eaton-logo.png, docs/images/note.png, docs/images/nut-banner.png, + docs/images/nut_layering.png, docs/images/nut_layering.svg, + docs/images/simple.png, docs/images/warning.png, docs/macros.txt, + docs/man/Makefile.am, docs/man/apcsmart.txt, + docs/man/asciidoc.conf, docs/man/bcmxcp.txt, + docs/man/bcmxcp_usb.txt, docs/man/belkin.txt, + docs/man/belkinunv.txt, docs/man/bestfcom.txt, + docs/man/bestfortress.txt, docs/man/bestuferrups.txt, + docs/man/bestups.txt, docs/man/blazer.txt, docs/man/clone.txt, + docs/man/dummy-ups.txt, docs/man/etapro.txt, docs/man/everups.txt, + docs/man/gamatronic.txt, docs/man/genericups.txt, docs/man/hosts.conf.txt, docs/man/index.txt, docs/man/isbmex.txt, - docs/man/ivtscd.txt, docs/man/libupsclient-config.txt, - docs/man/liebert-esp2.txt, docs/man/liebert.txt, - docs/man/masterguard.txt, man/megatec.8 => docs/man/megatec.txt, - docs/man/megatec_usb.txt, man/metasys.8 => docs/man/metasys.txt, - docs/man/mge-shut.txt, docs/man/mge-utalk.txt, - docs/man/microdowell.txt, docs/man/netxml-ups.txt, man/nut.conf.5 - => docs/man/nut.conf.txt, docs/man/nutupsdrv.txt, man/oneac.8 => - docs/man/oneac.txt, docs/man/optiups.txt, docs/man/powercom.txt, - docs/man/powerman-pdu.txt, man/powerpanel.8 => - docs/man/powerpanel.txt, docs/man/rhino.txt, + docs/man/ivtscd.txt, docs/man/libupsclient-config.txt, docs/man + /liebert-esp2.txt, docs/man/liebert.txt, docs/man/masterguard.txt, + docs/man/megatec.txt, docs/man/megatec_usb.txt, + docs/man/metasys.txt, docs/man/mge-shut.txt, docs/man/mge- + utalk.txt, docs/man/microdowell.txt, docs/man/netxml-ups.txt, + docs/man/nut.conf.txt, docs/man/nutupsdrv.txt, docs/man/oneac.txt, + docs/man/optiups.txt, docs/man/powercom.txt, docs/man/powerman- + pdu.txt, docs/man/powerpanel.txt, docs/man/rhino.txt, docs/man/richcomm_usb.txt, docs/man/safenet.txt, docs/man/skel.txt, - man/snmp-ups.8 => docs/man/snmp-ups.txt, docs/man/solis.txt, - man/tripplite.8 => docs/man/tripplite.txt, + docs/man/snmp-ups.txt, docs/man/solis.txt, docs/man/tripplite.txt, docs/man/tripplite_usb.txt, docs/man/tripplitesu.txt, docs/man/ups.conf.txt, docs/man/upsc.txt, docs/man/upscli_connect.txt, docs/man/upscli_disconnect.txt, @@ -23284,61 +7420,67 @@ docs/man/upscli_readline.txt, docs/man/upscli_sendline.txt, docs/man/upscli_splitaddr.txt, docs/man/upscli_splitname.txt, docs/man/upscli_ssl.txt, docs/man/upscli_strerror.txt, - docs/man/upscli_upserror.txt, docs/man/upsclient.txt, man/upscmd.8 - => docs/man/upscmd.txt, docs/man/upscode2.txt, man/upsd.conf.5 => - docs/man/upsd.conf.txt, docs/man/upsd.txt, man/upsd.users.5 => - docs/man/upsd.users.txt, man/upsdrvctl.8 => docs/man/upsdrvctl.txt, - docs/man/upsimage.cgi.txt, docs/man/upslog.txt, man/upsmon.conf.5 - => docs/man/upsmon.conf.txt, man/upsmon.8 => docs/man/upsmon.txt, - man/upsrw.8 => docs/man/upsrw.txt, docs/man/upssched.conf.txt, - man/upssched.8 => docs/man/upssched.txt, man/upsset.cgi.8 => - docs/man/upsset.cgi.txt, man/upsset.conf.5 => - docs/man/upsset.conf.txt, man/upsstats.cgi.8 => - docs/man/upsstats.cgi.txt, docs/man/upsstats.html.txt, man/usbhid- - ups.8 => docs/man/usbhid-ups.txt, docs/man/victronups.txt, - docs/megatec.txt, docs/net-protocol.txt, docs/new-clients.txt, - docs/new-drivers.txt, docs/new-names.txt, docs/nut-names.txt, - docs/nut-qa.txt, docs/osd-notify.txt, docs/outlets.txt, - docs/packager-guide.txt, docs/pager.txt, docs/powersaving.txt, - docs/protocol.txt, docs/{upssched.txt => scheduling.txt}, - docs/security.txt, docs/shutdown.txt, docs/sock-protocol.txt, - docs/ssl.txt, docs/support.txt, docs/suspend-to-disk.txt, - docs/user-manual.txt, docs/website/Makefile.am, - docs/website/css/ie-overrides.css, docs/website/css/web-layout.css, + docs/man/upscli_upserror.txt, docs/man/upsclient.txt, + docs/man/upscmd.txt, docs/man/upscode2.txt, docs/man/upsd.conf.txt, + docs/man/upsd.txt, docs/man/upsd.users.txt, docs/man/upsdrvctl.txt, + docs/man/upsimage.cgi.txt, docs/man/upslog.txt, + docs/man/upsmon.conf.txt, docs/man/upsmon.txt, docs/man/upsrw.txt, + docs/man/upssched.conf.txt, docs/man/upssched.txt, + docs/man/upsset.cgi.txt, docs/man/upsset.conf.txt, + docs/man/upsstats.cgi.txt, docs/man/upsstats.html.txt, docs/man + /usbhid-ups.txt, docs/man/victronups.txt, docs/megatec.txt, docs + /net-protocol.txt, docs/new-clients.txt, docs/new-drivers.txt, docs + /new-names.txt, docs/nut-names.txt, docs/nut-qa.txt, docs/osd- + notify.txt, docs/outlets.txt, docs/packager-guide.txt, + docs/pager.txt, docs/powersaving.txt, docs/protocol.txt, + docs/scheduling.txt, docs/security.txt, docs/shutdown.txt, docs + /sock-protocol.txt, docs/ssl.txt, docs/support.txt, docs/suspend- + to-disk.txt, docs/upssched.txt, docs/user-manual.txt, + docs/website/Makefile.am, docs/website/css/ie-overrides.css, + docs/website/css/web-layout.css, docs/website/css/xhtml11-quirks.css, docs/website/css/xhtml11.css, docs/website/faviconut.ico, docs/website/faviconut.png, docs/website/news.txt, docs/website/projects.txt, docs/website/scripts/filter_png.js, docs/website/scripts/jquery.js, docs/website/scripts/nut_jquery.js, docs/website/scripts/toc.js, docs/website/stable-hcl.txt, docs/website/ups-protocols.txt, - docs/website/web-layout.conf, docs/website/website.txt, - drivers/apc-hid.c, drivers/belkin.c, drivers/belkin.h, - drivers/ietf-mib.c, drivers/libhid.c, drivers/mge-utalk.c, - drivers/powerp-bin.c, drivers/powerware-mib.c, drivers/skel.c, - drivers/snmp-ups.c, drivers/snmp-ups.h, m4/ax_compare_version.m4, + docs/website/web-layout.conf, docs/website/website.txt, drivers + /apc-hid.c, drivers/belkin.c, drivers/belkin.h, drivers/ietf-mib.c, + drivers/libhid.c, drivers/mge-utalk.c, drivers/powerp-bin.c, + drivers/powerware-mib.c, drivers/skel.c, drivers/snmp-ups.c, + drivers/snmp-ups.h, m4/ax_compare_version.m4, m4/nut_check_asciidoc.m4, m4/nut_check_libnss.m4, m4/nut_check_libopenssl.m4, m4/nut_check_libssl.m4, - m4/nut_report_feature.m4, man/Makefile.am, man/bcmxcp.8, - man/belkinunv.8, man/bestfortress.8, man/bestuferrups.8, - man/etapro.8, man/everups.8, man/isbmex.8, man/ivtscd.8, - man/libupsclient-config.1, man/liebert-esp2.8, man/liebert.8, - man/masterguard.8, man/megatec_usb.8, man/mge-shut.8, man/mge- - utalk.8, man/microdowell.8, man/netxml-ups.8, man/nutupsdrv.8, - man/optiups.8, man/powercom.8, man/powerman-pdu.8, man/rhino.8, - man/richcomm_usb.8, man/safenet.8, man/skel.8, man/solis.8, - man/tripplite_usb.8, man/tripplitesu.8, man/ups.conf.5, man/upsc.8, + m4/nut_report_feature.m4, man/Makefile.am, man/apcsmart.8, + man/bcmxcp.8, man/bcmxcp_usb.8, man/belkin.8, man/belkinunv.8, + man/bestfcom.8, man/bestfortress.8, man/bestuferrups.8, + man/bestups.8, man/blazer.8, man/clone.8, man/dummy-ups.8, + man/etapro.8, man/everups.8, man/gamatronic.8, man/genericups.8, + man/hosts.conf.5, man/isbmex.8, man/ivtscd.8, man/libupsclient- + config.1, man/liebert-esp2.8, man/liebert.8, man/masterguard.8, + man/megatec.8, man/megatec_usb.8, man/metasys.8, man/mge-shut.8, + man/mge-utalk.8, man/microdowell.8, man/netxml-ups.8, + man/nut.conf.5, man/nutupsdrv.8, man/oneac.8, man/optiups.8, + man/powercom.8, man/powerman-pdu.8, man/powerpanel.8, man/rhino.8, + man/richcomm_usb.8, man/safenet.8, man/skel.8, man/snmp-ups.8, + man/solis.8, man/tripplite.8, man/tripplite_usb.8, + man/tripplitesu.8, man/ups.conf.5, man/upsc.8, man/upscli_connect.3, man/upscli_disconnect.3, man/upscli_fd.3, man/upscli_get.3, man/upscli_list_next.3, man/upscli_list_start.3, man/upscli_readline.3, man/upscli_sendline.3, man/upscli_splitaddr.3, man/upscli_splitname.3, man/upscli_ssl.3, man/upscli_strerror.3, man/upscli_upserror.3, man/upsclient.3, - man/upscode2.8, man/upsd.8, man/upsimage.cgi.8, man/upslog.8, - man/upssched.conf.5, man/upsstats.html.5, man/victronups.8, - scripts/upower/95-upower-hid.rules, server/Makefile.am, - server/conf.c, server/ctype.h, server/netcmds.h, server/{netssl.c - => ssl.c}, server/{netssl.h => ssl.h}, server/upsd.c, - tools/Makefile.am, tools/nut-hclinfo.py, tools/nut-usbinfo.pl, - tools/svn2cl.authors: Merge from trunk ([[SVN:2761]]) + man/upscmd.8, man/upscode2.8, man/upsd.8, man/upsd.conf.5, + man/upsd.users.5, man/upsdrvctl.8, man/upsimage.cgi.8, + man/upslog.8, man/upsmon.8, man/upsmon.conf.5, man/upsrw.8, + man/upssched.8, man/upssched.conf.5, man/upsset.cgi.8, + man/upsset.conf.5, man/upsstats.cgi.8, man/upsstats.html.5, man + /usbhid-ups.8, man/victronups.8, scripts/upower/95-upower- + hid.rules, server/Makefile.am, server/conf.c, server/ctype.h, + server/netcmds.h, server/netssl.c, server/netssl.h, server/ssl.c, + server/ssl.h, server/upsd.c, tools/Makefile.am, tools/nut- + hclinfo.py, tools/nut-usbinfo.pl, tools/svn2cl.authors: Merge from + trunk ([[SVN:2761]]) 2010-11-30 Arnaud Quette @@ -23348,9 +7490,9 @@ 2010-11-29 Arjen de Korte - * server/Makefile.am, server/conf.c, server/netcmds.h, server/{ssl.c - => netssl.c}, server/{ssl.h => netssl.h}, server/upsd.c: Resolve - namespace conflict with nss_compat_ossl + * server/Makefile.am, server/conf.c, server/netcmds.h, + server/netssl.c, server/netssl.h, server/ssl.c, server/ssl.h, + server/upsd.c: Resolve namespace conflict with nss_compat_ossl 2010-11-28 Arjen de Korte diff --git a/INSTALL b/INSTALL index 8865734..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -12,96 +12,97 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell command './configure && make && make install' + Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following -more-detailed instructions are generic; see the 'README' file for +more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this -'INSTALL' file but do not implement all of the features documented +`INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. - The 'configure' shell script attempts to guess correct values for + The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses -those values to create a 'Makefile' in each directory of the package. -It may also create one or more '.h' files containing system-dependent -definitions. Finally, it creates a shell script 'config.status' that +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a -file 'config.log' containing compiler output (useful mainly for -debugging 'configure'). +file `config.log' containing compiler output (useful mainly for +debugging `configure'). - It can also use an optional file (typically called 'config.cache' and -enabled with '--cache-file=config.cache' or simply '-C') that saves the -results of its tests to speed up reconfiguring. Caching is disabled by -default to prevent problems with accidental use of stale cache files. + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. If you need to do unusual things to compile the package, please try -to figure out how 'configure' could check whether to do them, and mail -diffs or instructions to the address given in the 'README' so they can +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at -some point 'config.cache' contains results you don't want to keep, you +some point `config.cache' contains results you don't want to keep, you may remove or edit it. - The file 'configure.ac' (or 'configure.in') is used to create -'configure' by a program called 'autoconf'. You need 'configure.ac' if -you want to change it or regenerate 'configure' using a newer version of -'autoconf'. + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: - 1. 'cd' to the directory containing the package's source code and type - './configure' to configure the package for your system. + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. - Running 'configure' might take a while. While running, it prints + Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. - 2. Type 'make' to compile the package. + 2. Type `make' to compile the package. - 3. Optionally, type 'make check' to run any self-tests that come with + 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. - 4. Type 'make install' to install the programs and any data files and + 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular - user, and only the 'make install' phase executed with root + user, and only the `make install' phase executed with root privileges. - 5. Optionally, type 'make installcheck' to repeat any self-tests, but + 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a - regular user, particularly if the prior 'make install' required + regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the - source code directory by typing 'make clean'. To also remove the - files that 'configure' created (so you can compile the package for - a different kind of computer), type 'make distclean'. There is - also a 'make maintainer-clean' target, but that is intended mainly + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. - 7. Often, you can also type 'make uninstall' to remove the installed + 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. - 8. Some packages, particularly those that use Automake, provide 'make + 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other - targets like 'make install' and 'make uninstall' work correctly. + targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that -the 'configure' script does not know about. Run './configure --help' +the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. - You can give 'configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here is -an example: + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix @@ -112,21 +113,21 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU 'make'. 'cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run -the 'configure' script. 'configure' automatically checks for the source -code in the directory that 'configure' is in and in '..'. This is known -as a "VPATH" build. +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. - With a non-GNU 'make', it is safer to compile the package for one + With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have -installed the package for one architecture, use 'make distclean' before +installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple '-arch' options to the -compiler but only a single '-arch' option to the preprocessor. Like +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ @@ -135,104 +136,105 @@ this: This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results -using the 'lipo' tool if you have problems. +using the `lipo' tool if you have problems. Installation Names ================== - By default, 'make install' installs the package's commands under -'/usr/local/bin', include files under '/usr/local/include', etc. You -can specify an installation prefix other than '/usr/local' by giving -'configure' the option '--prefix=PREFIX', where PREFIX must be an + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -pass the option '--exec-prefix=PREFIX' to 'configure', the package uses +pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give -options like '--bindir=DIR' to specify different values for particular -kinds of files. Run 'configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the default -for these options is expressed in terms of '${prefix}', so that -specifying just '--prefix' will affect all of the other directory +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the -correct locations to 'configure'; however, many packages provide one or +correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the -'make install' command line to change installation locations without +`make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each -affected directory. For example, 'make install +affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of -'${prefix}'. Any directories that were specified during 'configure', -but not in terms of '${prefix}', must each be overridden at install time -for the entire installation to be relocated. The approach of makefile -variable overrides for each directory variable is required by the GNU -Coding Standards, and ideally causes no recompilation. However, some -platforms have known limitations with the semantics of shared libraries -that end up requiring recompilation when using this method, particularly -noticeable in packages that use GNU Libtool. +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. - The second method involves providing the 'DESTDIR' variable. For -example, 'make install DESTDIR=/alternate/directory' will prepend -'/alternate/directory' before all installation names. The approach of -'DESTDIR' overrides is not required by the GNU Coding Standards, and + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of '${prefix}' -at 'configure' time. +when some directory options were not specified in terms of `${prefix}' +at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving 'configure' the -option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - Some packages pay attention to '--enable-FEATURE' options to -'configure', where FEATURE indicates an optional part of the package. -They may also pay attention to '--with-PACKAGE' options, where PACKAGE -is something like 'gnu-as' or 'x' (for the X Window System). The -'README' should mention any '--enable-' and '--with-' options that the + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the package recognizes. - For packages that use the X Window System, 'configure' can usually + For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, -you can use the 'configure' options '--x-includes=DIR' and -'--x-libraries=DIR' to specify their locations. +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the -execution of 'make' will be. For these packages, running './configure +execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be -overridden with 'make V=1'; while running './configure +overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be -overridden with 'make V=0'. +overridden with `make V=0'. Particular systems ================== - On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC -is not installed, it is recommended to use the following options in + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their -prerequisites, which makes it generally unusable when shipped generated -files such as 'configure' are involved. Use GNU 'make' instead. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its '' header file. The option '-nodtk' can be used as a -workaround. If GNU CC is not installed, it is therefore recommended to -try +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try ./configure CC="cc" @@ -240,26 +242,26 @@ and if that doesn't work, try ./configure CC="cc -nodtk" - On Solaris, don't put '/usr/ucb' early in your 'PATH'. This + On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of -these programs are available in '/usr/bin'. So, if you need '/usr/ucb' -in your 'PATH', put it _after_ '/usr/bin'. +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. - On Haiku, software installed for all users goes in '/boot/common', -not '/usr/local'. It is recommended to use the following options: + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== - There may be some features 'configure' cannot figure out + There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the -_same_ architectures, 'configure' can figure that out, but if it prints +_same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the -'--build=TYPE' option. TYPE can either be a short name for the system -type, such as 'sun4', or a canonical name which has the form: +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM @@ -268,101 +270,101 @@ where SYSTEM can have one of these forms: OS KERNEL-OS - See the file 'config.sub' for the possible values of each field. If -'config.sub' isn't included in this package, then this package doesn't + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the option '--target=TYPE' to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will -eventually be run) with '--host=TYPE'. +eventually be run) with `--host=TYPE'. Sharing Defaults ================ - If you want to set default values for 'configure' scripts to share, -you can create a site shell script called 'config.site' that gives -default values for variables like 'CC', 'cache_file', and 'prefix'. -'configure' looks for 'PREFIX/share/config.site' if it exists, then -'PREFIX/etc/config.site' if it exists. Or, you can set the -'CONFIG_SITE' environment variable to the location of the site script. -A warning: not all 'configure' scripts look for a site script. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the -environment passed to 'configure'. However, some packages may run +environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set -them in the 'configure' command line, using 'VAR=value'. For example: +them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc -causes the specified 'gcc' to be used as the C compiler (unless it is +causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). -Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an -Autoconf limitation. Until the limitation is lifted, you can use this -workaround: +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash -'configure' Invocation +`configure' Invocation ====================== - 'configure' recognizes the following options to control how it + `configure' recognizes the following options to control how it operates. -'--help' -'-h' - Print a summary of all of the options to 'configure', and exit. +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. -'--help=short' -'--help=recursive' +`--help=short' +`--help=recursive' Print a summary of the options unique to this package's - 'configure', and exit. The 'short' variant lists options used only - in the top level, while the 'recursive' variant lists options also - present in any nested packages. + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. -'--version' -'-V' - Print the version of Autoconf used to generate the 'configure' +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' script, and exit. -'--cache-file=FILE' +`--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, - traditionally 'config.cache'. FILE defaults to '/dev/null' to + traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. -'--config-cache' -'-C' - Alias for '--cache-file=config.cache'. +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. -'--quiet' -'--silent' -'-q' +`--quiet' +`--silent' +`-q' Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to '/dev/null' (any error + suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). -'--srcdir=DIR' +`--srcdir=DIR' Look for the package's source code in directory DIR. Usually - 'configure' can determine that directory automatically. + `configure' can determine that directory automatically. -'--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: for - more details, including other options available for fine-tuning the - installation locations. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. -'--no-create' -'-n' +`--no-create' +`-n' Run the configure checks, but stop before creating any output files. -'configure' also accepts some other, not widely useful, options. Run -'configure --help' for more details. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff --git a/INSTALL.nut b/INSTALL.nut index cd8ce6b..202d1af 100644 --- a/INSTALL.nut +++ b/INSTALL.nut @@ -1,13 +1,11 @@ Installation instructions ========================= -This chapter describes the various methods for installing Network UPS Tools. +This chapter describe the various methods for installing Network UPS Tools. Whenever it is possible, prefer <>. Packagers have done an excellent and hard work at improving NUT integration into -their system. On the other hand, distributions and appliances tend to package -"official releases" of projects such as NUT, and so do not deliver latest and -greatest fixes, new drivers, bugs and other features. +their system. [[Installing_source]] Installing from source @@ -18,13 +16,6 @@ These are the essential steps for compiling and installing this software. The NUT linkdoc:packager-guide[Packager Guide], which presents the best practices for installing and integrating NUT, is also a good reading. -The link:config-prereqs.txt[Prerequisites for building NUT on different OSes] -document suggests prerequisite packages with tools and dependencies -available and needed to build and test as much as possible of NUT on -numerous platforms, written from perspective of CI testing (if you -are interested in getting updated drivers for a particular device, -you might select a sub-set of those suggestions). - [NOTE] .Keep in mind that... ================================================================================ @@ -61,7 +52,7 @@ long as you are consistent. The process for doing this varies from one system to the next, and explaining how to add users is beyond the scope of this document. -For the purposes of this document, the user name and group name +For the purposes of this document, the user name and group name will be 'ups' and 'nut' respectively. Be sure the new user is a member of the new group! If you forget to @@ -96,7 +87,7 @@ docs/configure.txt or './configure --help' for all the available options. If you alter paths with additional switches, be sure to use those -new paths while reading the rest of the steps. +new paths while reading the rest of the steps. Reference: <> from the User Manual. @@ -109,7 +100,7 @@ Build the programs This will build the NUT client and server programs and the selected drivers. It will also build any other features that were -selected during <> step above. +selected during <> step above. Installation @@ -184,7 +175,7 @@ permissions for the USB device, you may need to set up (operating system dependent) hotplugging scripts. Sample scripts and information are provided in the scripts/hotplug and scripts/udev directories. For most users, the hotplugging scripts -will be installed automatically by "make install". +will be installed automatically by "make install". (If you want to try if a driver works without setting up hotplugging, you can add the "-u root" option to upsd, upsmon, and @@ -301,47 +292,25 @@ You can either install NUT as a binary package or as a port. Binary package ^^^^^^^^^^^^^^ -To install NUT as a package execute: +To install the main component, use the following command: - # pkg install nut + # pkg_add -r nut Port ^^^^ -The port is located under +sysutils/nut+. -Use +make config+ to select configuration options, e.g. to build the optional CGI scripts. -To install it, use: +The port is located under /usr/ports/sysutils/nut. +To install it, use the following command: - # make install clean + # cd /usr/ports/sysutils/nut/ && make install clean -USB UPS on FreeBSD -^^^^^^^^^^^^^^^^^^ +You have to define WITH_NUT_CGI to build the optional CGI scripts. -For USB UPS devices the NUT package/port installs devd rules in +/usr/local/etc/devd/nut-usb.conf+ to set USB device permissions. 'devd' needs to be restarted for these rules to apply: +Optionally, you can also install the following ports: - # service devd restart - -(Re-)connect the device after restarting 'devd' and check that the USB device has the proper -permissions. Check the last entries of the system message buffer. You should -find an entry like - - # dmesg | tail - [...] - ugen0.2: at usbus0 - -The device file must be owned by group +uucp+ and must be group -read-/writable. In the example from above this would be - - # ls -Ll /dev/ugen0.2 - crw-rw---- 1 root uucp 0xa5 Mar 12 10:33 /dev/ugen0.2 - -If the permissions are not correct, verify that your device is registered in -+/usr/local/etc/devd/nut-usb.conf+. The vendor and product id can be found -using: - - # usbconfig -u 0 -a 2 dump_device_desc - -where +-u+ specifies the USB bus number and +-a+ specifies the USB device index. +- sysutils/nut-snmp, for the SNMP driver, +- sysutils/nut-usb, for the USB drivers, +- sysutils/nut-libupsclient, for the upsclient library. You are now ready to configure NUT, and start testing and using it. diff --git a/MAINTAINERS b/MAINTAINERS index b2fcaf8..b86fd4b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -38,7 +38,7 @@ S: Maintained: apcsmart, belkin, bestups, cyberpower, dummycons, P: Arnaud Quette M: aquette.dev@gmail.com M: ArnaudQuette@eaton.com -S: Maintained or Supported: dummy-ups, usbhid-ups, mge-shut +S: Maintained or Supported: dummy-ups, usbhid-ups, mge-shut, newmge-shut mge-utalk, snmp-ups, ... P: Fabio Di Niro diff --git a/Makefile.am b/Makefile.am index 2ea7d7f..dd9ec33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,33 +5,23 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" or tools being built first -SUBDIRS = include common clients conf data docs drivers tools \ +SUBDIRS = include common clients conf data tools docs drivers \ lib scripts server tests -# Automatically update the libtool script if it becomes out-of-date -# See https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status libtool - # COPYING is included automatically. EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING # ---------------------------------------------------------------------- # flags to pass to ./configure when calling "make distcheck" and "make # distcheck-light". Try to check as many features as possible! Also -# need to give augeas-lenses-dir, hotplug-dir and udev-dir, so that -# staged install does not fail. +# need to give hotplug-dir and udev-dir, so that staged install does +# not fail. DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto -DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='$(CXXFLAGS) -g' CFLAGS='$(CFLAGS) -g' DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ - --with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \ - --with-systemdtmpfilesdir='$${prefix}/usr/lib/tmpfiles.d' \ - --with-augeas-lenses-dir='$${prefix}/usr/share/augeas/lenses' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' @@ -39,10 +29,6 @@ DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck -# Make a distcheck (and check in particular) with enabled valgrind and debug info -memcheck distcheck-valgrind: - $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck - # workaround the dist generated files that are also part of the distribution # Note that distcleancheck is disabled for now, while waiting for a proper # solution, that do not break older unix systems @@ -51,150 +37,9 @@ memcheck distcheck-valgrind: distcleancheck: @: -# Quick alias for root dir recipe: -realclean: maintainer-clean - -# Files made by our targets: -CLEANFILES = *-spellchecked cppcheck*.xml -DISTCLEANFILES = ChangeLog - -# Most of the files generated by custom rules in the configure script -# or by autogen.sh are cleaned by the Makefile.am in their directories. -# Files below are re-created by running `configure` script and may be -# wiped by a `make distclean`: -DISTCLEANFILES += config.log configure~ -#???# configure.ac~ -DISTCLEANFILES += include/config.h.in~ - -# Files made by autotools and common rituals of the configure script, -# these are needed to run the configure script itself so are not wiped -# by a mere `make distclean`; most of these are copied by autotools -# from their installation, or made by `automake` etc. on the system -# which generates `configure`; rebuilding NUT after deleting these -# requires `autogen.sh` script to be re-run (and tools available): -MAINTAINERCLEANFILES = INSTALL -MAINTAINERCLEANFILES += aclocal.m4 config.guess config.sub -MAINTAINERCLEANFILES += configure -MAINTAINERCLEANFILES += depcomp install-sh ltmain.sh test-driver -MAINTAINERCLEANFILES += m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -MAINTAINERCLEANFILES += Makefile.in .dirstamp include/config.h.in - -# Executed after default rules -maintainer-clean-local: - rm -f missing || true - -# Do not let $SUBDIRS/Makefile rules delete their local .deps because -# this breaks our ability to clean up (e.g. some common/.../*.Plo files -# are included by generated Makefiles from other subdirectories, so they -# should be available during their clean-up). Just in case, we make sure -# here that their sub-distcleans complete first. -distclean-local: - @for DIR in $(SUBDIRS) ; do \ - if test -f "$${DIR}/Makefile" ; then \ - echo " DISTCLEAN in $${DIR}" >&2 ; \ - ( cd "$${DIR}" && $(MAKE) -s distclean ) || exit ; \ - fi ; \ - done - rm -rf .inst tmp autom4te.cache - find "$(builddir)" -type d -name '.deps' | while read DIR ; do rm -rf "$${DIR}" ; done - -# Hook the documentation building and validating recipes -# Note: these are optionally available (as determined during configure runs) -spellcheck spellcheck-interactive: - @RES=0; \ - (cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/data && $(MAKE) -s $@) || RES=$$? ; \ - exit $$RES - -# Note: the "all-docs" and "check-docs" targets may require tools not -# found by `configure` script (and so avoided by conventional recipes) -# such as PDF generators, so it should only be called at developer's -# discretion, choice and risk. The "check-man" targets covers source -# texts, man pages and HTML rendering of man pages, as enabled by tools. -doc spellcheck-sortdict \ -all-docs check-docs \ -man all-man man-man check-man man-html all-html: - cd $(builddir)/docs && $(MAKE) $@ - -check-NIT check-NIT-devel: - cd $(builddir)/tests/NIT && $(MAKE) $@ - -# This target adds syntax-checking for committed shell script files, -# to avoid surprises and delays in finding fatal typos after packaging -### -### Note: currently, shellcheck target calls check-scripts-syntax -### so when both are invoked at once, in the end the check is only -### executed once. Later it is anticipated that shellcheck would -### be implemented by requiring, configuring and calling the tool -### named "shellcheck" for even more code inspection and details. -### Still, there remains value in also checking the script syntax -### by the very version of the shell interpreter that would run -### these scripts in production usage of the resulting packages. -### -check-scripts-syntax: - @echo 'NOTE: modern bash complains about scripts using backticks (warning not error), which we ignore in NUT codebase for portability reasons: `...` obsolete, use $$(...)' - @RUNBASH=bash; if [ -x /bin/bash ]; then RUNBASH=/bin/bash ; else if [ -x /usr/bin/env ] ; then RUNBASH="/usr/bin/env bash"; fi; fi ; \ - for F in `git ls-files || find . -type f` ; do \ - case "`file "$$F"`" in \ - *"Bourne-Again shell script"*) ( set -x ; $$RUNBASH -n "$$F" ; ) ;; \ - *"POSIX shell script"*|*"shell script"*) ( set -x ; /bin/sh -n "$$F" ; ) ;; \ - esac || { RES=$$? ; echo "ERROR: Syntax check failed for script file: $$F" >&2 ; exit $$RES ; } ; \ - done - @echo 'SUCCESS: Shell scripts syntax is acceptable, no fatal issues were found' - -shellcheck-disclaimer: - @echo "===============================================================================" - @echo "NOTICE: 'make shellcheck' is currently an alias for 'make check-scripts-syntax'" - @echo "Later it may become a call to the real shellcheck tool (if available on the" - @echo "build system during the configure phase)" - @echo "===============================================================================" - -# Note: currently not part of shellcheck target, because the script below -# can test the logic with numerous SHELL_PROGS in a CI setting, and because -# check-scripts-syntax probably has checked the basic syntax above already. -shellcheck-nde: - cd $(srcdir)/tests && SERVICE_FRAMEWORK="selftest" ./nut-driver-enumerator-test.sh - -shellcheck: shellcheck-disclaimer check-scripts-syntax - -CPPCHECK = @CPPCHECK@ -if HAVE_CPPCHECK -cppcheck: cppcheck-cxx11.xml cppcheck-c99.xml - -# Let the analysis get regenerated due to any change in source; -# but note that with our different make implementations to support, -# we can not either $(shell find ...) nor blindly say e.g. *.cpp -# for each FS structure layer because e.g. there are no ./*.cpp -# in the root dir of the codebase (and so make complains there is -# `No rule to make target `*.cpp', needed by `cppcheck-cxx11.xml'`) -# -# Note that the actual `cppcheck` scan finds all files it likes -# (so if CPPCHECK_SRC_* misses something, it just won't trigger -# automagically a rebuild of the XML in developer working cycles). -CPPCHECK_SRC_H = $(top_srcdir)/*/*.h $(top_srcdir)/*/*/*.h -# CPPCHECK_SRC_H += $(top_srcdir)/*.h - -CPPCHECK_SRC_C = $(top_srcdir)/*/*.c $(top_srcdir)/*/*/*.c -# CPPCHECK_SRC_C += $(top_srcdir)/*.cpp - -CPPCHECK_SRC_CXX = $(top_srcdir)/*/*.cpp -# CPPCHECK_SRC_CXX += $(top_srcdir)/*.cpp $(top_srcdir)/*/*/*.cpp - -cppcheck-cxx11.xml: $(CPPCHECK_SRC_CXX) $(CPPCHECK_SRC_H) - $(CPPCHECK) --std=c++11 --enable=all --inconclusive --xml --xml-version=2 . 2>$@ - -cppcheck-c99.xml: $(CPPCHECK_SRC_C) $(CPPCHECK_SRC_H) - $(CPPCHECK) --std=c99 --enable=all --inconclusive --xml --xml-version=2 . 2>$@ -else !HAVE_CPPCHECK -cppcheck: - @echo "CPPCHECK analysis not available since 'cppcheck' was not found." -endif !HAVE_CPPCHECK - # ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: -MAINTAINERCLEANFILES += ChangeLog +MAINTAINERCLEAN_FILES = ChangeLog # Older boundary of the ChangeLog commits range # It can be a tag ('v2.2.0'), a commit hash, a date, ... @@ -203,30 +48,18 @@ GITLOG_START_POINT=v2.6.0 # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously -# Note that the script is hard-coded to generate "ChangeLog" in the current dir dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - cd $(top_builddir) && \ - ./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ - { echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; } - -nut_version.h include/nut_version.h: - cd $(abs_top_builddir)/include && $(MAKE) nut_version.h - -tools/gitlog2changelog.py: tools/gitlog2changelog.py.in - cd $(@D) && $(MAKE) -s $(@F) + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ + echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ # ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes -nut-@PACKAGE_VERSION@.tar.gz: dist -nut-@PACKAGE_VERSION@.tar.gz.sig: dist-sig -nut-@PACKAGE_VERSION@.tar.gz.md5 nut-@PACKAGE_VERSION@.tar.gz.sha256: dist-hash - -dist-sig: nut-@PACKAGE_VERSION@.tar.gz +dist-sig: rm -f nut-@PACKAGE_VERSION@.tar.gz.sig gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz -dist-hash: nut-@PACKAGE_VERSION@.tar.gz +dist-hash: md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5 sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256 @@ -268,7 +101,7 @@ install-dirs: @echo "Warning: 'make install-dirs' is deprecated." @echo "Use 'make installdirs' instead." @echo $(WARN) - $(MAKE) installdirs + make installdirs cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \ install-cgi-man install-cgi-conf install-cgi-html: @echo "Error: 'make $@' no longer exists." @@ -284,65 +117,23 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man: @echo "Use './configure --with-snmp' instead." setver: @echo "Error: 'make setver' no longer exists." - @echo "Edit configure.ac to set version number." - -# Clean the dist tarball and packages -MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz -# HP-UX: -MAINTAINERCLEANFILES_PACKAGES = NUT_HPUX_package@PACKAGE_VERSION@.depot -# AIX as below, and RedHat-compatible (cover binary and source packages): -MAINTAINERCLEANFILES_PACKAGES += nut*rpm -# Debian-compatible (cover binary and source packages): -MAINTAINERCLEANFILES_PACKAGES += nut*deb -# Solaris SVR4 package archives: -MAINTAINERCLEANFILES_PACKAGES += NUT_solaris_*_package@PACKAGE_VERSION@.local.gz -# Newer Solaris IPS (aka "pkg(5)" format archives) -MAINTAINERCLEANFILES_PACKAGES += *.p5p - -MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_DISTBALL) -MAINTAINERCLEANFILES += $(MAINTAINERCLEANFILES_PACKAGES) - -package: dist - DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \ - rm -rf "$$DESTDIR"; \ - case "`uname -s`" in \ - "HP-UX") \ - ( cd scripts/HP-UX && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \ - mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \ - "SunOS") \ - $(MAKE) $(AM_MAKEFLAGS) && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \ - ( cd scripts/Solaris && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package ) && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" uninstall && \ - rm -rf "$$DESTDIR" || \ - { echo "FAILED to produce SunOS packages, inspect '$$DESTDIR' for clues" >&2 ; exit 1; } ;; \ - "AIX") \ - if test -d /usr/src/packages/SPECS -a -w /usr/src/packages/SPECS ; then : ; else echo "Can not write to /usr/src/packages/SPECS" >&2 ; exit 1; fi ; \ - if test -d /usr/src/packages/SOURCES -a -w /usr/src/packages/SOURCES ; then : ; else echo "Can not write to /usr/src/packages/SOURCES" >&2 ; exit 1; fi ; \ - $(MAKE) $(AM_MAKEFLAGS) dist && \ - cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS && \ - cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES && \ - rpm -ba /usr/src/packages/SPECS/nut-aix.spec && \ - mv /usr/src/packages/RPMS/nut*rpm $(abs_top_builddir)/ ;; \ - *) echo "Unsupported OS for 'make $@' (no recipe bound)" >&2; exit 1;; \ - esac - -print-MAINTAINERCLEANFILES print-REALCLEANFILES: - @echo $(MAINTAINERCLEANFILES) - -print-DISTCLEANFILES: - @echo $(DISTCLEANFILES) - -# TODO: Recursive mode to consider patterns defined in sub-dir makefiles -git-realclean-check: - @if test -e .git && (command -v git); then \ - git status --ignored || while read F ; do \ - for P in $(MAINTAINERCLEANFILES) ; do \ - case "$$F" in \ - */$$P) exit 1 ;; \ - esac ; \ - done; \ - done ; \ - fi + @echo "Edit configure.in to set version number." +package: + if test `uname -s` = "HP-UX"; then \ + cd scripts/HP-UX; \ + make package; \ + mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ + fi; diff --git a/Makefile.in b/Makefile.in index 2919b26..6b39990 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,17 +16,7 @@ # top-level Makefile for NUT VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -91,24 +81,27 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(top_srcdir)/scripts/Aix/nut-aix.spec.in \ + $(top_srcdir)/scripts/avahi/nut.service.in \ + $(top_srcdir)/scripts/HP-UX/nut.psf.in \ + $(top_srcdir)/scripts/HP-UX/postinstall.in \ + $(top_srcdir)/scripts/ufw/nut.ufw.profile.in COPYING TODO \ + compile config.guess config.sub depcomp install-sh missing \ + ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -117,29 +110,18 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = scripts/Aix/nut-aix.spec \ scripts/avahi/nut.service scripts/HP-UX/nut.psf \ - scripts/python/module/PyNUT.py scripts/Aix/nut.init \ - scripts/HP-UX/postinstall \ - scripts/python/app/NUT-Monitor-py2gtk2 \ - scripts/python/app/NUT-Monitor-py3qt5 \ - scripts/python/module/test_nutclient.py + scripts/HP-UX/postinstall scripts/ufw/nut.ufw.profile CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -175,7 +157,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir distdir-am dist dist-all distcheck + cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -197,18 +179,6 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(top_srcdir)/scripts/Aix/nut-aix.spec.in \ - $(top_srcdir)/scripts/Aix/nut.init.in \ - $(top_srcdir)/scripts/HP-UX/nut.psf.in \ - $(top_srcdir)/scripts/HP-UX/postinstall.in \ - $(top_srcdir)/scripts/avahi/nut.service.in \ - $(top_srcdir)/scripts/python/app/NUT-Monitor-py2gtk2.in \ - $(top_srcdir)/scripts/python/app/NUT-Monitor-py3qt5.in \ - $(top_srcdir)/scripts/python/module/PyNUT.py.in \ - $(top_srcdir)/scripts/python/module/test_nutclient.py.in \ - AUTHORS COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -247,8 +217,6 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip -# Exists only to be overridden by the user if desired. -AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -260,7 +228,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -271,7 +238,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -285,7 +251,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -298,7 +263,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -316,8 +280,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -328,32 +290,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ - -# Automatically update the libtool script if it becomes out-of-date -# See https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -373,9 +324,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -389,7 +337,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -407,7 +354,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -421,9 +367,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -449,14 +392,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -472,7 +413,7 @@ ACLOCAL_AMFLAGS = -I m4 # subdirectories to build and distribute. The order matters, as # several subdirectories depend on stuff in "common" or tools being built first -SUBDIRS = include common clients conf data docs drivers tools \ +SUBDIRS = include common clients conf data tools docs drivers \ lib scripts server tests @@ -482,62 +423,20 @@ EXTRA_DIST = INSTALL.nut LICENSE-GPL2 LICENSE-GPL3 MAINTAINERS UPGRADING # ---------------------------------------------------------------------- # flags to pass to ./configure when calling "make distcheck" and "make # distcheck-light". Try to check as many features as possible! Also -# need to give augeas-lenses-dir, hotplug-dir and udev-dir, so that -# staged install does not fail. +# need to give hotplug-dir and udev-dir, so that staged install does +# not fail. DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto -DISTCHECK_VALGRIND_FLAGS = --with-all=auto --with-ssl=auto --with-doc=skip --with-valgrind CXXFLAGS='$(CXXFLAGS) -g' CFLAGS='$(CFLAGS) -g' DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \ --with-systemdsystemunitdir='$${prefix}/lib/systemd/system' \ - --with-systemdshutdowndir='$${prefix}/lib/systemd/system-shutdown' \ - --with-systemdtmpfilesdir='$${prefix}/usr/lib/tmpfiles.d' \ - --with-augeas-lenses-dir='$${prefix}/usr/share/augeas/lenses' \ --with-hotplug-dir='$${prefix}/etc/hotplug' \ --with-udev-dir='$${prefix}/etc/udev' \ --with-devd-dir='$${prefix}/etc/devd' -# Files made by our targets: -CLEANFILES = *-spellchecked cppcheck*.xml - -# Most of the files generated by custom rules in the configure script -# or by autogen.sh are cleaned by the Makefile.am in their directories. -# Files below are re-created by running `configure` script and may be -# wiped by a `make distclean`: -#???# configure.ac~ -DISTCLEANFILES = ChangeLog config.log configure~ include/config.h.in~ - -# Files made by autotools and common rituals of the configure script, -# these are needed to run the configure script itself so are not wiped -# by a mere `make distclean`; most of these are copied by autotools -# from their installation, or made by `automake` etc. on the system -# which generates `configure`; rebuilding NUT after deleting these -# requires `autogen.sh` script to be re-run (and tools available): - # ---------------------------------------------------------------------- # Automatically generate the ChangeLog from Git logs: -MAINTAINERCLEANFILES = INSTALL aclocal.m4 config.guess config.sub \ - configure depcomp install-sh ltmain.sh test-driver \ - m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \ - m4/lt~obsolete.m4 Makefile.in .dirstamp include/config.h.in \ - ChangeLog $(MAINTAINERCLEANFILES_DISTBALL) \ - $(MAINTAINERCLEANFILES_PACKAGES) - -# Let the analysis get regenerated due to any change in source; -# but note that with our different make implementations to support, -# we can not either $(shell find ...) nor blindly say e.g. *.cpp -# for each FS structure layer because e.g. there are no ./*.cpp -# in the root dir of the codebase (and so make complains there is -# `No rule to make target `*.cpp', needed by `cppcheck-cxx11.xml'`) -# -# Note that the actual `cppcheck` scan finds all files it likes -# (so if CPPCHECK_SRC_* misses something, it just won't trigger -# automagically a rebuild of the XML in developer working cycles). -@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_H = $(top_srcdir)/*/*.h $(top_srcdir)/*/*/*.h -# CPPCHECK_SRC_H += $(top_srcdir)/*.h -@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_C = $(top_srcdir)/*/*.c $(top_srcdir)/*/*/*.c -# CPPCHECK_SRC_C += $(top_srcdir)/*.cpp -@HAVE_CPPCHECK_TRUE@CPPCHECK_SRC_CXX = $(top_srcdir)/*/*.cpp +MAINTAINERCLEAN_FILES = ChangeLog # Older boundary of the ChangeLog commits range # It can be a tag ('v2.2.0'), a commit hash, a date, ... @@ -548,17 +447,6 @@ GITLOG_START_POINT = v2.6.0 # targets from old build system (pre-automake). # supported for a period of time for backward "compatibility". WARN = "----------------------------------------------------------------------" - -# Clean the dist tarball and packages -MAINTAINERCLEANFILES_DISTBALL = nut-*.tar.gz -# HP-UX: -# AIX as below, and RedHat-compatible (cover binary and source packages): -# Debian-compatible (cover binary and source packages): -# Solaris SVR4 package archives: -# Newer Solaris IPS (aka "pkg(5)" format archives) -MAINTAINERCLEANFILES_PACKAGES = \ - NUT_HPUX_package@PACKAGE_VERSION@.depot nut*rpm nut*deb \ - NUT_solaris_*_package@PACKAGE_VERSION@.local.gz *.p5p all: all-recursive .SUFFIXES: @@ -577,14 +465,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -601,17 +490,9 @@ scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/a cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in cd $(top_builddir) && $(SHELL) ./config.status $@ -scripts/python/module/PyNUT.py: $(top_builddir)/config.status $(top_srcdir)/scripts/python/module/PyNUT.py.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -scripts/Aix/nut.init: $(top_builddir)/config.status $(top_srcdir)/scripts/Aix/nut.init.in - cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/HP-UX/postinstall: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/postinstall.in cd $(top_builddir) && $(SHELL) ./config.status $@ -scripts/python/app/NUT-Monitor-py2gtk2: $(top_builddir)/config.status $(top_srcdir)/scripts/python/app/NUT-Monitor-py2gtk2.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -scripts/python/app/NUT-Monitor-py3qt5: $(top_builddir)/config.status $(top_srcdir)/scripts/python/app/NUT-Monitor-py3qt5.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -scripts/python/module/test_nutclient.py: $(top_builddir)/config.status $(top_srcdir)/scripts/python/module/test_nutclient.py.in +scripts/ufw/nut.ufw.profile: $(top_builddir)/config.status $(top_srcdir)/scripts/ufw/nut.ufw.profile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: @@ -729,10 +610,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -797,7 +675,7 @@ distdir-am: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -812,22 +690,18 @@ dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) -dist-zstd: distdir - tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst - $(am__post_remove_distdir) - dist-tarZ: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -845,7 +719,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -855,27 +729,25 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ - *.tar.zst*) \ - zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) - mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build/sub \ - && ../../configure \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=../.. --prefix="$$dc_install_base" \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -944,17 +816,14 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -963,7 +832,7 @@ distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-local distclean-tags + distclean-tags dvi: dvi-recursive @@ -1007,8 +876,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local +maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive @@ -1030,32 +898,22 @@ uninstall-am: am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip dist-zstd distcheck distclean \ - distclean-generic distclean-libtool distclean-local \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-libtool distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am -.PRECIOUS: Makefile - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status libtool distcheck-light: $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck -# Make a distcheck (and check in particular) with enabled valgrind and debug info -memcheck distcheck-valgrind: - $(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_VALGRIND_FLAGS)" distcheck - # workaround the dist generated files that are also part of the distribution # Note that distcleancheck is disabled for now, while waiting for a proper # solution, that do not break older unix systems @@ -1064,125 +922,20 @@ memcheck distcheck-valgrind: distcleancheck: @: -# Quick alias for root dir recipe: -realclean: maintainer-clean - -# Executed after default rules -maintainer-clean-local: - rm -f missing || true - -# Do not let $SUBDIRS/Makefile rules delete their local .deps because -# this breaks our ability to clean up (e.g. some common/.../*.Plo files -# are included by generated Makefiles from other subdirectories, so they -# should be available during their clean-up). Just in case, we make sure -# here that their sub-distcleans complete first. -distclean-local: - @for DIR in $(SUBDIRS) ; do \ - if test -f "$${DIR}/Makefile" ; then \ - echo " DISTCLEAN in $${DIR}" >&2 ; \ - ( cd "$${DIR}" && $(MAKE) -s distclean ) || exit ; \ - fi ; \ - done - rm -rf .inst tmp autom4te.cache - find "$(builddir)" -type d -name '.deps' | while read DIR ; do rm -rf "$${DIR}" ; done - -# Hook the documentation building and validating recipes -# Note: these are optionally available (as determined during configure runs) -spellcheck spellcheck-interactive: - @RES=0; \ - (cd $(builddir)/docs && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/docs/man && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/conf && $(MAKE) -s $@) || RES=$$? ; \ - (cd $(builddir)/data && $(MAKE) -s $@) || RES=$$? ; \ - exit $$RES - -# Note: the "all-docs" and "check-docs" targets may require tools not -# found by `configure` script (and so avoided by conventional recipes) -# such as PDF generators, so it should only be called at developer's -# discretion, choice and risk. The "check-man" targets covers source -# texts, man pages and HTML rendering of man pages, as enabled by tools. -doc spellcheck-sortdict \ -all-docs check-docs \ -man all-man man-man check-man man-html all-html: - cd $(builddir)/docs && $(MAKE) $@ - -check-NIT check-NIT-devel: - cd $(builddir)/tests/NIT && $(MAKE) $@ - -# This target adds syntax-checking for committed shell script files, -# to avoid surprises and delays in finding fatal typos after packaging -### -### Note: currently, shellcheck target calls check-scripts-syntax -### so when both are invoked at once, in the end the check is only -### executed once. Later it is anticipated that shellcheck would -### be implemented by requiring, configuring and calling the tool -### named "shellcheck" for even more code inspection and details. -### Still, there remains value in also checking the script syntax -### by the very version of the shell interpreter that would run -### these scripts in production usage of the resulting packages. -### -check-scripts-syntax: - @echo 'NOTE: modern bash complains about scripts using backticks (warning not error), which we ignore in NUT codebase for portability reasons: `...` obsolete, use $$(...)' - @RUNBASH=bash; if [ -x /bin/bash ]; then RUNBASH=/bin/bash ; else if [ -x /usr/bin/env ] ; then RUNBASH="/usr/bin/env bash"; fi; fi ; \ - for F in `git ls-files || find . -type f` ; do \ - case "`file "$$F"`" in \ - *"Bourne-Again shell script"*) ( set -x ; $$RUNBASH -n "$$F" ; ) ;; \ - *"POSIX shell script"*|*"shell script"*) ( set -x ; /bin/sh -n "$$F" ; ) ;; \ - esac || { RES=$$? ; echo "ERROR: Syntax check failed for script file: $$F" >&2 ; exit $$RES ; } ; \ - done - @echo 'SUCCESS: Shell scripts syntax is acceptable, no fatal issues were found' - -shellcheck-disclaimer: - @echo "===============================================================================" - @echo "NOTICE: 'make shellcheck' is currently an alias for 'make check-scripts-syntax'" - @echo "Later it may become a call to the real shellcheck tool (if available on the" - @echo "build system during the configure phase)" - @echo "===============================================================================" - -# Note: currently not part of shellcheck target, because the script below -# can test the logic with numerous SHELL_PROGS in a CI setting, and because -# check-scripts-syntax probably has checked the basic syntax above already. -shellcheck-nde: - cd $(srcdir)/tests && SERVICE_FRAMEWORK="selftest" ./nut-driver-enumerator-test.sh - -shellcheck: shellcheck-disclaimer check-scripts-syntax -@HAVE_CPPCHECK_TRUE@cppcheck: cppcheck-cxx11.xml cppcheck-c99.xml -# CPPCHECK_SRC_CXX += $(top_srcdir)/*.cpp $(top_srcdir)/*/*/*.cpp - -@HAVE_CPPCHECK_TRUE@cppcheck-cxx11.xml: $(CPPCHECK_SRC_CXX) $(CPPCHECK_SRC_H) -@HAVE_CPPCHECK_TRUE@ $(CPPCHECK) --std=c++11 --enable=all --inconclusive --xml --xml-version=2 . 2>$@ - -@HAVE_CPPCHECK_TRUE@cppcheck-c99.xml: $(CPPCHECK_SRC_C) $(CPPCHECK_SRC_H) -@HAVE_CPPCHECK_TRUE@ $(CPPCHECK) --std=c99 --enable=all --inconclusive --xml --xml-version=2 . 2>$@ -@HAVE_CPPCHECK_FALSE@cppcheck: -@HAVE_CPPCHECK_FALSE@ @echo "CPPCHECK analysis not available since 'cppcheck' was not found." - # Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'), # in case it has already been generated previously -# Note that the script is hard-coded to generate "ChangeLog" in the current dir dummy-stamp: ChangeLog: tools/gitlog2changelog.py dummy-stamp - cd $(top_builddir) && \ - ./tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ - { echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ ; } - -nut_version.h include/nut_version.h: - cd $(abs_top_builddir)/include && $(MAKE) nut_version.h - -tools/gitlog2changelog.py: tools/gitlog2changelog.py.in - cd $(@D) && $(MAKE) -s $(@F) + $(top_srcdir)/tools/gitlog2changelog.py $(GITLOG_START_POINT) || \ + echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@ # ---------------------------------------------------------------------- # Maintainers targets: distribution signature and hashes -nut-@PACKAGE_VERSION@.tar.gz: dist -nut-@PACKAGE_VERSION@.tar.gz.sig: dist-sig -nut-@PACKAGE_VERSION@.tar.gz.md5 nut-@PACKAGE_VERSION@.tar.gz.sha256: dist-hash - -dist-sig: nut-@PACKAGE_VERSION@.tar.gz +dist-sig: rm -f nut-@PACKAGE_VERSION@.tar.gz.sig gpg --detach-sign nut-@PACKAGE_VERSION@.tar.gz -dist-hash: nut-@PACKAGE_VERSION@.tar.gz +dist-hash: md5sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.md5 sha256sum nut-@PACKAGE_VERSION@.tar.gz > nut-@PACKAGE_VERSION@.tar.gz.sha256 @@ -1218,7 +971,7 @@ install-dirs: @echo "Warning: 'make install-dirs' is deprecated." @echo "Use 'make installdirs' instead." @echo $(WARN) - $(MAKE) installdirs + make installdirs cgi build-cgi install-cgi install-cgi-dir install-cgi-bin \ install-cgi-man install-cgi-conf install-cgi-html: @echo "Error: 'make $@' no longer exists." @@ -1234,52 +987,26 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man: @echo "Use './configure --with-snmp' instead." setver: @echo "Error: 'make setver' no longer exists." - @echo "Edit configure.ac to set version number." - -package: dist - DESTDIR="$(abs_builddir)/_install_pkgprotodir" ; export DESTDIR; \ - rm -rf "$$DESTDIR"; \ - case "`uname -s`" in \ - "HP-UX") \ - ( cd scripts/HP-UX && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package && \ - mv NUT_HPUX_package.depot $(abs_top_builddir)/NUT_HPUX_package@PACKAGE_VERSION@.depot ) ;; \ - "SunOS") \ - $(MAKE) $(AM_MAKEFLAGS) && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" install && \ - ( cd scripts/Solaris && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" package ) && \ - $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$DESTDIR" uninstall && \ - rm -rf "$$DESTDIR" || \ - { echo "FAILED to produce SunOS packages, inspect '$$DESTDIR' for clues" >&2 ; exit 1; } ;; \ - "AIX") \ - if test -d /usr/src/packages/SPECS -a -w /usr/src/packages/SPECS ; then : ; else echo "Can not write to /usr/src/packages/SPECS" >&2 ; exit 1; fi ; \ - if test -d /usr/src/packages/SOURCES -a -w /usr/src/packages/SOURCES ; then : ; else echo "Can not write to /usr/src/packages/SOURCES" >&2 ; exit 1; fi ; \ - $(MAKE) $(AM_MAKEFLAGS) dist && \ - cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS && \ - cp scripts/Aix/nut.init nut-@PACKAGE_VERSION@.tar.gz /usr/src/packages/SOURCES && \ - rpm -ba /usr/src/packages/SPECS/nut-aix.spec && \ - mv /usr/src/packages/RPMS/nut*rpm $(abs_top_builddir)/ ;; \ - *) echo "Unsupported OS for 'make $@' (no recipe bound)" >&2; exit 1;; \ - esac - -print-MAINTAINERCLEANFILES print-REALCLEANFILES: - @echo $(MAINTAINERCLEANFILES) - -print-DISTCLEANFILES: - @echo $(DISTCLEANFILES) - -# TODO: Recursive mode to consider patterns defined in sub-dir makefiles -git-realclean-check: - @if test -e .git && (command -v git); then \ - git status --ignored || while read F ; do \ - for P in $(MAINTAINERCLEANFILES) ; do \ - case "$$F" in \ - */$$P) exit 1 ;; \ - esac ; \ - done; \ - done ; \ - fi + @echo "Edit configure.in to set version number." +package: + if test `uname -s` = "HP-UX"; then \ + cd scripts/HP-UX; \ + make package; \ + mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \ + elif test `uname -s` = "SunOS"; then \ + make; \ + rm -rf @prefix@; \ + make install; \ + cd scripts/Solaris; \ + make package; \ + make uninstall; \ + rm -rf @prefix@; \ + elif test `uname -s` = "AIX"; then \ + make dist; \ + cp scripts/Aix/nut-aix.spec /usr/src/packages/SPECS; \ + cp scripts/Aix/nut.init nut-*.tar.gz /usr/src/packages/SOURCES; \ + rpm -ba /usr/src/packages/SPECS/nut-aix.spec; \ + fi; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/NEWS b/NEWS index 895b2ed..216c835 100644 --- a/NEWS +++ b/NEWS @@ -1,413 +1,7 @@ If you're upgrading from an earlier version, see the UPGRADING file. For a complete and more detailed list of changes, please refer to the -ChangeLog file (generated for release archives), or to the Git version -control history for "live" codebase. - ---------------------------------------------------------------------------- -Release notes for NUT 2.8.0 - what's new since 2.7.4: - -NOTE: Earlier discussions (mailing list threads, GitHub issues, etc.) could -refer to this change set (too long in the making) as NUT 2.7.5. - - - New (optional) keywords for configuration files were added, - so existing NUT 2.7.x builds would not accept them if some - deployments switch versions back and forth -- due to this, - semantically the version was bumped to NUT 2.8.x. - - - Add support for openssl-1.1.0 (Arjen de Korte) - - - libusb-1.0 API support in addition to libusb-0.1 API [#300] - - - Add support for `DISABLE_WEAK_SSL=true` in upsd.conf to disable older/weaker - SSL/TLS protocols and ciphers: when NUT is built against relatively recent - versions of OpenSSL or NSS it will be restricted to TLSv1.2 or better. - For least-surprise, currently defaults to `false` and complains in log - [PR #1043] - - - Add support for `ALLOW_NO_DEVICE=true` (as an upsd.conf flag or environment - variable passed from caller of the program), to allow starting the data - server initially without any device configurations and reloading it later - to apply config changes on the fly [PR #766] - - - Add support for `debug_min=NUM` setting (ups.conf, upsd.conf, upsmon.conf) - to specify the minimum debug verbosity for daemons. This allows "in-vivo" - troubleshooting of service daemons without editing init scripts or service - unit definitions. - - - Improve support for upsdrvctl for managing of numerous device configs, - including default "maxretry=3" and a "nowait" option to complete the - "start of everything" mode after triggering the drivers and not waiting - for them to complete initializing. This matters on systems that monitor - from dozens to hundreds of devices. - - - Drivers support a new value for `synchronous` setting, which is the - new default now: `auto`. Initially after driver start-up this mode - acts as the older default `off`, but would fall back to `on` in case - the driver fails to send reports to `upsd` by overflowing the socket - buffer in async mode -- so the next connections of this driver uptime - would be synchronized (potentially slower, but safer -- blocking on - writes to the data server). This adaptation would primarily impact - and benefit devices with many (hundreds of) data points, such as - ePDUs and daisy chains. [issue #1309, PR #1315] - - - Daemons such as upsd, upsmon, upslog, and device drivers previously - implied that enabled debugging (or upslog to stdout) means foreground - running, otherwise the daemon was always sent to the background. - Now there are explicit options for this (`-F`/`-B`), although default - behavior is retained. This change is used for simplified service unit - definitions. - - - Improvements for device discovery or driver "lock-picking", including - general support for: - * "Standalone" mode (`-s` option), to monitor a device which is not - detailed or mentioned in ups.conf - * `NUT_ALTPIDPATH` and `NUT_STATEPATH` environment variables to override - the paths built into the driver binary [PR #473 and #507] - * "Driver data dump" mode (`-d` option), to poll a device for one or - few ('update_count' ) loops, report discovered values (dump the data - tree in upsc-like format), and exit. This complements the `nut-scanner` - for finding and identifying devices. - - - support for new devices: - * IBM 6000 VA LCD 4U Rack UPS; 5396-1Kx (USB) - * Phoenix Contact QUINT-UPS model 2320461 (Modbus) - * Tripp-Lite SU3000LCD2UHV (USB; protocol 1330) - * Emerson Avocent PM3000 PDU (SNMP) - * HPE ePDU (SNMP) - - - nutdrv_qx: enhanced estimation of remaining battery runtime based - on speed of voltage drop, which varies as they age [PR #1027] - - - nutdrv_qx: several subdrivers added or improved, including: - * "snr" subdriver with USB connection, for SNR-UPS-LID-XXXX [PR #1008]. - Note that end-users should reference explicitly the `snr` subdriver - in their `ups.conf` settings because of USB chip using the same - values of VendorID/ProductID as fabula_subdriver, fuji_subdriver, - and krauler_subdriver. - * "hunnox" subdriver, as a dialect of earlier "fabula" [PR #638] - adds support for Hunnox HNX-850 with USB connection and reported to work - for Powercool, Iron Guardian, ARES devices and possibly many others from - discussions linking to the pull request which introduced the driver. - * "phoenixtec" subdriver for Masterguard A and E series, device series - A700/1000/2000/3000(-19) and E40/60/100(-19). [PR #975] - * "ablerex" subdriver provided by the OEM vendor, note that it replaces - "krauler_subdriver" as default handler for VID:PID 0xffff:0x0000 - [PR #1135] - * Legrand HID defined and handled by "krauler_subdriver" by default - [PR #1075, issue #616] - * add new "armac" subdriver, tested with Armac R/2000I/PSW, but should - support other UPSes that work with "PowerManagerII" software from - Richcomm Technologies from around 2004-2005 [PR #1239, issue #1238] - - - microsol-apc (starting at version 0.68 as derived from solis 0.67): - adding support for newer APC Back-UPS BR hardware, such as - APC Back-UPS BZ1500, BZ2200BI and BZ2200I [PR #994] - - - pijuice: added new i2c bus driver for PiJuice HAT, a battery UPS module - for the Raspberry Pi systems [PR #730] - - - huawei-ups2000: added new driver for USB (Linux 5.12+ so far) and Serial - RS-232 Modbus device support of Huawei UPS2000/2000A (1kVA-3kVA) series, - and possibly some related FSP UPS models. [PR #954] - - - socomec_jbus: added new driver for modbus-based JBUS protocol over serial - RS-232 for Socomec UPS (tested with a DIGYS 3/3 15kVA model, working - on Linux x86-64 and Raspberry Pi 3 ARM). [PR #1313] - - - adelsystem_cbi: added new driver for ADELSYSTEM CBI2801224A, an all-in-one - 12/24Vdc DC-UPS, which supports the modbus RTU communication protocol - [PR #1282] - - - generic_modbus: added new driver for TCP and Serial Modbus device support. - The driver has been tested against PULS UPS (model UB40.241) via - MOXA ioLogikR1212 (RS485) and ioLogikE1212 (TCP/IP), and configuration - allows to map custom registers and addresses to NUT events [PR #1052] - - - genericups: added support for FTTx battery backup devices, and new signal - type mappings for the contact closure pins interpretation (RB for replace - battery, BYPASS for disconnected battery, and "none" or NULL for signals - to ignore) [PR #1061] - - - add devices to HCL/DDL: - * APC Back-UPS CS (USB) - * CPS CP1500EPFCLCD (USB) - * CPS EC350G, EC750G (USB) - * CPS PR2200LCDRT2U (SNMP) - * Eaton ATS 16 and 30 (SNMP) - * Eaton 5E2200VA (USB) - * Eaton 9PX Split Phase 6/8/10 kVA (XML/USB/SHUT) - * Eaton 9PX (XML/USB/SHUT) - * Eaton Ellipse PRO 650 VA (USB) - * Ippon Back Comfo Pro II 650/850/1050 (USB) - * Numeric Digital 800 (USB) - * Opti-UPS PS1500E (USB) - * Powercool 350VA to 1600VA (USB) - - - C++11 support in nutclient library and cppunit tests - - - Added C++ testing mock for TcpClient class (nutclientmem/MemClientStub: - data stored in local memory) [PR #1034] - - - Dual Python 2 and 3 compatibility in development scripts; ability to - run build activities and resulting built NUT programs on systems that - do not have a binary named "python" [PR #1115 and some before it] - - - Added Russian translation for NUT-Monitor GUI client [PR #806] - - - Separated NUT-Monitor UI into two applications, NUT-Monitor-py2gtk2 and - NUT-Monitor-py3qt5, suitable for two generations of Python ecosystem - with their great differences; `NUT-Monitor` name is retained for wrapper - script which calls one of these, such that the current system can execute - [PRs #1310, #1354] - - - Various USB driver families: expanded device-matching with "device" in - addition to "bus" and generic USB fields. This is needed to support - multiple attached devices that seem identical by other fields (e.g. - same vendor, same model, same USB bus, and no serial number) [PR #974] - - - Various USB driver families: Improved HID parsing for byte-stream to - number conversions on different CPU architectures [PR #1024] - - - Various USB HID driver families: added support for composite devices - utilizing interface greater than 0 for the UPS interface [PR #1044] - - - usbhid-ups: - * added generic framework for fixing Report Descriptors which can be - used for different manufacturers by adding code to the appropriate - subdriver rather than polluting the main code with UPS specific - exceptions, and applied fixes for known mistakes in (some releases - of firmware for) CyberPower CPS*EPFCLCD [issue #439, PR #1245] - * added `onlinedischarge` option for UPSes that report `OL+DISCHRG` - when wall power is lost [PR #811] - * changed detection of VendorID 0x06da handling of which is claimed - by Liebert/Phoenixtec HID historically, and MGE HID (for AEG PROTECT - NAS UPSes) since NUT 2.7.4, so that the higher-priority MGE subdriver - would not grab each and all of the devices exposing that ID [PR #1357] - * CPS HID: add input.frequency and output.frequency - * OpenUPS2: only check OEM Information string once (fewer log messages) - * Liebert GXT4 USB VID:PID [10AF:0000] - * add battery voltage and input/output transfer voltage and frequency - in Liebert/Phoenixtec HID mapping, to support PowerWalker VFI 2000 TGS - better [PR #564, issue #560] - * add a little delay between multicommands [PR #1228] - * fix Eaton/MGE mapping for beeper handling - * add IBM USB VID - * add deep battery test for CyberPower OL3000RMXL2U - * report the libusb version used - * fixed CPU architecture dependent bitmask math issues, causing wrong - numbers interpreted from wire protocol data in Big-Endian LP64 builds - (SPARC64, s390x, etc.) [issue #1023, PRs #1024, #1040, #1055, #1226] - * add Delta UPS Amplon R Series, tested on R1K and R3K model [PR #987] - * add Delta Minuteman UPS VID/PID [PR #1230, issues #555 and #1227] - * add AMETEK Powervar UPM [PR #733] - * add Tripplite AVR750U (ProductID 0x3024) [PR #963] - * add Arduino HID device support with new arduino-hid subdriver [PR #1044] - * add new salicru-hid subdriver, tested with Salicru SPS Home 850 VA - [PR #1199, issue #732] - * add new ever-hid subdriver to support EVER UPS devices (Sinline RT Series, - Sinline RT XL Series, ECO PRO AVR CDS Series) [PR #431] - * add ability to set `battery.mfr.date` for APC HID UPS [PR #1318] - - - usbhid-ups / mge-shut: compute a realpower output load approximation for - Eaton UPS when the needed data is not present - - - snmp-ups: - * APC ePDU MIB support - * add `input.phase.shift` variable - * add configurable write-able `ondelay` (`ups.delay.start`) and `offdelay` - (`ups.delay.shutdown`) as timeticks support [PR #276] - * outlet groups - * fix the rounding / truncation of some values - * add outlet.N.name for Eaton ePDU - * add input.bypass.frequency for Eaton 3ph - * fix support for Eaton 2-phase ("split phase") UPS - * add flag to list currently loaded MIB-to-NUT mappings - * fix input.L2.voltage on Eaton G2/G3 PDU - * update Eaton Aphel Revelation MIB - * support Raritan Dominion PX2 PDU - * support Emerson Avocent PM3000 PDU - * improve ALARM flag handling - * add firmware version for new HPE Network card - * add ups.load, battery.charge, input.{voltage,frequency} and output.voltage - for CyberPower, as well as shutdown and other instant commands - * several rounds of updates for Eaton devices, including new ATS and ePDU - hardware families - * fixed bit mask values for flags to surely use different numbers behind - logical items (inevitably changing some of those macro symbols) [PR #1180] - - - snmp-ups and nut-scanner should now support more SNMPv3 Auth and Priv - protocols, as available at NUT build time [PRs #1165, #1172] - - - nut-scanner: various improvements, including: - * detection of libraries at runtime - * tracing information - * limiting parallelism (thread count) [PRs #1158, #1164] - - - nut-ipmipsu: improve FreeIPMI support to build cleanly against older and - newer FreeIPMI versions [PR #1179] - - - the powerpanel driver now also supports CyberPower OR1500LCDRTXL2U with - serial cable [PR #538] - - - powercom driver: implement `nobt` config parameter to skip battery check - on initialization/startup [PR #1256] - - - netxml-ups: - * Report calibration status - * Fix for erroneous battery info (MGEXML/0.30) [PR #1069] - - - solis: various improvements and fixes - - - liebert-esp2: Correct battery V scaling, update docs, implement split-phase - unit support [PR #412] - - - tripplite: the "Tripp-Lite SmartUPS driver" as tested with SMART2200NET - learned to discover the firmware generation and some device features, - and in particular to manage power separately on one or two outlet groups - [PR #1048] - - - tripplite_usb: updated to recognize the "3005" protocol [PR #584] - - - libnutclient: introduce getDevicesVariableValues() to improve performances - when querying many devices (up to 15 times faster) - - - nut-driver-enumerator: introduced a script for Linux systemd and - Solaris/illumos SMF to inspect current NUT configuration in ups.conf - file and generate service management instances for each currently - tracked power device. Also introduced services to monitor the NUT - configuration and react to editions of this file, mostly intended - for deployments that do massive monitoring of dynamically changing - farms of power devices. - - - Fix File descriptors leaks by upsmon and upssched (SELinux errors) - - - systemd support improvements: - * POWEROFF_WAIT - * reload support for upsd - * Deliver systemd-tmpfiles config to pre-create runtime locations - [PR #1037 for Issue #1030] - * Update units with SyslogIdentifier=%N for better logging [PR #1054] - - - upsrw: display the variable type beside ENUM / RANGE - - - Added `PROTVER` as alias to `NETVER` to report the protocol version in use. - Note that NUT codebase itself does not use this value and handles commands - and reported errors individually [issue #1347] - - - Implement status tracking for instant commands (instcmd) and variables - settings (setvar): this allows to get the actual execution status from the - driver, and is available in libraries and upscmd / upsrw [PR #659] - - - Add support for extra parameter for instant commands, both in library and - in upscmd - - - dummy-ups can now specify `mode` as a driver argument, and separates the - notion of `dummy-once` (new default for `*.dev` files that do not change) - vs. `dummy-loop` (legacy default for `*.seq` and others) [issue #1385] - - - new protocol variables: - * `input.phase.shift` - * `outlet.N.name` - * `outlet.N.type` - * `battery.voltage.cell.max`, `battery.voltage.cell.min` - * `battery.temperature.cell.max`, `battery.temperature.cell.min` - * `battery.status` - * `battery.capacity.nominal` - * `battery.date.maintenance` (and clarified purpose of `battery.date`) - * `battery.packs.external` (and clarified purpose of `battery.packs`) - * `experimental.*` namespace introduced [PR #1046] to facilitate - introduction of NUT drivers and their data points for which we do - not yet have concepts, or which the original driver contributors - did not map well per suitable NUT standards: this allows to balance - having those drivers available in the project vs. least surprise - for when the explicitly experimental names are changed to something - stable and standardized. - * Proposed to track Date and Time values (still as "opaque strings") - preferably in representations compatible to ISO-8601/RFC-3339 [PR #1076] - (standards update; changes to actual codebase to be applied in the future) - ** New routine to convert a US formatted date string "MM/DD/YYYY" to an - ISO 8601 Calendar date "YYYY-MM-DD" was added to snmp-ups.c [PR #1078] - - - Master/Slave terminology was deprecated in favor of Primary/Secondary - modes of `upsmon` client: - * Respective keywords in the configuration files (`upsd.users` and - `upsmon.conf`) are supported as backwards-compatible settings, - but the obsoleted values are no longer documented. - * Protocol keyword support was similarly updated, with `upsmon` now - first trying to elevate privileges with `PRIMARY ` request, - and falling back to `MASTER ` just in case it talks to an - older build of an `upsd` server. - * For the principle of least surprise, NUT codebase still exposes the - `net_master()` (as handler for `MASTER` net command) in header and - C code for the sake of existing linked binaries, and returns the - `OK MASTER-GRANTED` line to the older client that invoked it. - * Newly introduced `net_primary()` (as handler for `PRIMARY` net command) - calls the exact same application logic, but returns `OK PRIMARY-GRANTED` - line to the client. - * Python binding updated to handle both cases, as the only found in-tree - protocol consumer of the full-line text. - * For more details see issue #840 and several pull requests referenced - from it, and discussions on NUT mailing lists. - - - Build fixes: - * In general, numerous fixes were applied to ensure portability and avoid - warnings (fixing a number of real bugs that caused them); CI was extended - to keep the codebase free of those types of warnings which we have got - rid of, requiring builds to succeed cleanly in several dozen combinations - of compiler versions, C standard revisions (C99 upwards, though on many - OSes with GNU99+ extensions), operating systems and CPU architectures. - * Public CI introduced to automatically test every contribution (PR) and - resulting increment of main NUT codebase, including Travis CI and LGTM.com - services, and a Jenkins farm on virtual hardware donated by Fosshost.org; - this augments testing earlier provided for some branches by Buildbot. - * Added cppunit testing with valgrind for the C++ client library - * Make targets added for shell script syntax checks for helper and service - scripts - * Make targets added for spellcheck and for maintenance of the dictionary, - including incremental spellcheck to only parse recently edited text files - * The AsciiDoc detection has been reworked to allow NUT to be built from - source without requiring asciidoc/a2x (using pre-built man pages from - the distribution tarball, for instance) - * Makefile contents rearranged for more resilient out-of-tree and in-tree - builds beside those made from the root workspace directory - * Makefiles are tested with GNU Make and BSD Make to ensure portable recipes - * More use of `pkg-config` to detect dependencies at configure time, as - well as fail-safe detection of presence of pkg-config (and its macros) - to survive and build without it too - * "slibtool" pedantic nuances now supported, allowing an alternative to - GNU libtool - * Build scripts updated to remove obsoleted calls to cleanly work with - autoconf-2.70 releases in 2020 (also works with 2.69 which was the - earlier release since 2012) - * Dynamic library loading used in certain programs and use-cases improved, - especially for 64-bit vs 32-bit builds on multiple-bitness OSes - * Logging routines like `upsdebugx()` were refactored as macros so there - is slightly less overhead when logging is disabled [PRs #685 and #1100] - * Numerous classes of compilation warnings eradicated, many of those being - potential issues with implicit data type conversions and varied numeric - type width, signedness, string buffer size, uninitialized variables or - structure fields; some more in progress - * Several logical errors found and fixed during this walk over codebase. - * Cases where compilers were overly zealous and particular code was written - the way wit was intentionally, including some comparisons that help with - different-bitness builds but indeed seem superfluous in a certain single - bitness, were commented and encased in pragmas to disable the warnings - * Basic coding style (indentations, lack of trailing white space) applied - per developer guide, but not automatically enforced/checked yet. - - - Due to changes needed to resolve build warnings, mostly about mismatching - data types for some variables, some structure definitions and API signatures - of several routines had to be changed for argument types, return types, - or both. Primarily this change concerns internal implementation details - (may impact update of NUT forks with custom drivers using those), but a - few changes also happened in header files installed for builds configured - `--with-dev` and so may impact `upsclient` and `nutclient` (C++) consumers. - At the very least, binaries for those consumers should be rebuilt to remain - stable with NUT 2.8.0 and not mismatch int-type sizes and other arguments. - - - As usual, more bugfixes, cleanup and improvements, on both source code - and documentation. +ChangeLog file. --------------------------------------------------------------------------- Release notes for NUT 2.7.4 - what's new since 2.7.3: @@ -570,7 +164,7 @@ Release notes for NUT 2.7.3 - what's new since 2.7.2: - all drivers: a new 'synchronous' driver flag is available for very verbose units, such as some ePDUs - - Eaton: + - Eaton: * Add support for EnergySaving features for Eaton UPSs (HID USB/SHUT and XCP USB/serial) * Fix and complete Eaton ePDUs G2/G3 support @@ -594,7 +188,7 @@ Release notes for NUT 2.7.3 - what's new since 2.7.2: NHS Sistemas de Energia Expert S Online 6000/8000/10000 Powercom BNT-xxxAP (USB product id: 0001) Rucelf UPOII-3000-96-EL - Tripp Lite OMNIVSINT800 + Tripp Lite OMNIVSINT800 Voltronic Power Apex 1KVA and Imperial 1KVA --------------------------------------------------------------------------- @@ -624,7 +218,7 @@ Release notes for NUT 2.7.2 - what's new since 2.7.1: - snmp-ups: add support for XPPC-MIB and Tripp Lite SU10KRT3/1X. Also fix erroneous status in HP/Compaq SNMP MIB (with the most recent HP - firmware (1.76) ; improved various MIBs (APC, HP/Compaq, ...) + firmware (1.76) ; improved various MIBs (APC, HP/Compaq, ...) - nutdrv_qx: add new 'fallback' Q1 subdriver, with minimal 'Q1' support. General improvements on all subdrivers. @@ -691,7 +285,7 @@ Release notes for NUT 2.7.1 - what's new since 2.6.5: - libnutclient has been added as a C++ alternative to libupsclient. - Packaging files for Solaris and HP-UX (sponsored by Eaton) - + - Fix shutdown of Eaton HID, using usbhid-ups and mge-shut - usbhid-ups: final fix for APC Back UPS ES. APC Back UPS ES devices have @@ -714,11 +308,11 @@ Release notes for NUT 2.7.1 - what's new since 2.6.5: related to power devices and management - Improve systemd integration - + - snmp-ups: Fixed a crash on outlet management, and added delta_ups MIB support. Also fixed mappings for upsBypassVoltage, upsBypassCurrent, and upsBypassPower in three-phase IETF MIB. - + --------------------------------------------------------------------------- Release notes for NUT 2.6.5 - what's new since 2.6.4: @@ -755,7 +349,7 @@ Release notes for NUT 2.6.5 - what's new since 2.6.4: VMware ESXI 5.0, through a native VIB package. This is, for the time being, an external effort from René Garcia (refer to the Download section on NUT website). But work is underway to improve this integration, and - include it in the NUT source tree + include it in the NUT source tree - IPMI support (nut-ipmipsu driver and nut-scanner): prepare for supporting API changes in upcoming FreeIPMI versions 1.1.x and 1.2.x. @@ -780,7 +374,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3: especially from the network. Non printable characters were missed from strings operation (such as strlen), but still copied to the buffer, causing an overflow. - Thus, fix NUT parser, to only allow the subset of ASCII charset from + Thus, fix NUT parser, to only allow the subset Ascii charset from Space to ~ (Reported by Sebastian Pohle, Alioth bug #313636, CVE-2012-2944) @@ -830,7 +424,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3: PowerShield Defender 1200VA PowerWalker Online VFI LCD, Line-Interactive VI LCD and Line-Interactive VI Riello Netman Plus 102 SNMP Card - Tripp-Lite OMNISMART500 + Tripp-Lite OMNISMART500 - apcsmart has received some fixes to work better on Mac OS X, and in general @@ -842,7 +436,7 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3: - blazer_ser and blazer_usb now try to automatically estimate high and low voltages, to be able to calculate battery charge ; support for online Innova UPS (T, RT and 3/1 T) has been added ; Best UPS support has been - improved, to prepare for superseding bestups driver + improved, to prepare for superseeding bestups driver - bestups has also received some care, though users are encouraged to switch to blazer_ser, since bestups will soon be deprecated. @@ -874,19 +468,19 @@ Release notes for NUT 2.6.4 - what's new since 2.6.3: - Riello protocols have been officially published in NUT protocols library: http://www.networkupstools.org/ups-protocols.html#_riello - + - Duplicate instances of upsd / upsmon are now detected upon startup - NUT variables namespace has been completed with missing variables and commands that are already known and standard - - upslog now comes with a companion file, for logrotate configuration + - upslog now comes with a companion file, for logrotate configuration - more devices embed NUT for power protection, now including Thecus NAS range - more bugfixes, cleanup and improvements, on both source code and documentation, with a good bunch from Greg A. Woods. - + --------------------------------------------------------------------------- Release notes for NUT 2.6.3 - what's new since 2.6.2: @@ -933,7 +527,7 @@ Release notes for NUT 2.6.3 - what's new since 2.6.2: - Base files for HPUX packaging have been added. This is still a work in progress. - - Compilation on IBM AIX has been fixed (namespace conflict with ctypes). + - Compilation on IBM Aix has been fixed (namespace conflict with ctypes). - more bugfixes, cleanup and improvements, on both source code and documentation. @@ -956,7 +550,7 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1: * SNMP, * XML/HTTP (from Eaton), * NUT servers, using the classic connect or Avahi / mDNS methods. - + IPMI support will be added in the next release. A separate library, called 'libnutscan', is also available to provide these feature. Future NUT releases will provides binding for the supported @@ -968,10 +562,10 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1: the future. For more info, refer to nut/scripts/java/README, or the developer guide (chapter 'Creating new client'). Javadoc documentation is also provided, - along with Java archives (.jar) in the Download section. + along with Java archives (.jar) in the Download section. - - support for new devices: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ; - various APC models equipped with APC AP9618 management card, including APC + - support for new devices: Eaton 3S ; Cyber Power Systems CP1000AVRLCD ; + various APC models equiped with APC AP9618 management card, including APC Smart-UPS RT XL ; Orvaldi 750 / 900SP ; POWEREX VI 1000 LED ; PowerWalker VI 850 LCD ; SVEN Power Pro+ series (USB ID ffff:0000). @@ -996,9 +590,9 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1: the default 3 seconds. - snmp-ups.c has a new initialization method, that uses sysObjectID, which is - a pointer to the preferred MIB of the device, to detect supported devices. + a pointer to the prefered MIB of the device, to detect supported devices. This speeds up even more init stage and should render void the use of 'mib' - option. SNMP v3 session initialization has also been fixed, and Eaton PDU + option. SNMP v3 session initialisation has also been fixed, and Eaton PDU support has been completed. - Initial support has been added for systemd, the System and Service Manager @@ -1010,7 +604,7 @@ Release notes for NUT 2.6.2 - what's new since 2.6.1: - Finally, after years of dedication to NUT, Arjen de Korte is now retired. Sincere thanks to you Arjen from us all. - + --------------------------------------------------------------------------- Release notes for NUT 2.6.1 - what's new since 2.6.0: @@ -1041,9 +635,9 @@ Release notes for NUT 2.6.1 - what's new since 2.6.0: - usbhid-ups has completed a bit supported variables for APC and Eaton / MGE. - - on the quality assurance side, Eaton has worked on fixing a few - non-conformance issues, like C++ style comments and warnings, using - a newly developed verification tool (Prachi Gandhi). + - on the quality assurance side, Eaton has worked on fixing a few non + conformances, like C++ style comments and warnings, using a newly developed + verification tool (Prachi Gandhi). - fix remaining references to LIBSSL_LDFLAGS, instead of LIBSSL_LIBS, which cause unresolved symbol on libupsclient users (Fabrice Coutadeur). @@ -1102,7 +696,7 @@ Release notes for NUT 2.6.0 - what's new since 2.4.3: - improve configure time dependencies checking and processing. - - improve older Unix systems support (HP-UX, AIX, ...) for missing functions. + - improve older Unix systems support (HP-UX, Aix, ...) for missing functions. - refresh and improve USB helper files (udev and UPower). @@ -1173,8 +767,8 @@ Release notes for NUT 2.4.1 - what's new since 2.4.0: version 1.1. - the situation of the build toolchain has been fixed, with regard to the - "make clean" target and the wrongly removed generated USB files. This broke - further configure call. + "make clean" target and the wrongly removed generated USB files. This brokes + further configure call. --------------------------------------------------------------------------- Release notes for NUT 2.4.0 - what's new since 2.2.2: @@ -1185,7 +779,7 @@ Release notes for NUT 2.4.0 - what's new since 2.2.2: including: Eaton ePDUs (Managed and Monitored), some Aphel models, some Raritan PDUs, and the whole list of Powerman supported devices: http://powerman.sourceforge.net/supported.html - + - support for new devices: the various PDUs cited above, Chloride Desk Power 650, Cyber Power Systems Value 400E/600E/800E (USB models), Delta GES602N, Digitus DN-170020, the whole Eaton ranges (mostly composed of MGE Office @@ -1215,8 +809,8 @@ Release notes for NUT 2.4.0 - what's new since 2.2.2: - NUT now ships a bash completion function for 'upsc' command (scripts/misc/nut.bash_completion). Simply copy it to /etc/bash_completion.d - - - many internal changes to improve maintainability, while lowering the + + - many internal changes to improve maintenability, while lowering the maintenance cost (thus allowing developers to focus on what matters: the code!). Examples of this are: - the USB information automatic extraction to generate the various USB helper @@ -1233,7 +827,7 @@ Release notes for NUT 2.2.2 - what's new since 2.2.1: - support for new devices: APC BACK-UPS XS LCD, Atlantis Land, Mustek Powermust Office 650, Oneac XAU models, Powerware PW5115 and PW9120 (USB), Nitram Elite 2005 - + - Integrated Power Management (NUT HAL integration) has reached a major milestone: it is now the most advanced UPS integration into Power Management layer known in existing OSs. It has received many @@ -1252,15 +846,15 @@ Release notes for NUT 2.2.2 - what's new since 2.2.1: - the netxml-ups driver has appeared to support MGE* network HTTP/XML cards. - + - NUT now distributes by default the shared version of libupsclient (version 1.0.0), and use this for the provided clients (upsmon, upsc, upsrw, upscmd). This is part of an effort to reduce NUT's footprint, both on disk and in memory. - + - powerpanel has reach a new step toward the replacement of nitram and cpsups drivers. The final step is scheduled for NUT 2.4. - + - many changes, cleanup and fixes to the NUT core and various drivers. --------------------------------------------------------------------------- @@ -1280,7 +874,7 @@ Release notes for NUT 2.2.1 - what's new since 2.2.0: - the megatec and megatec_usb drivers have also been backported from the development (trunk) version. - + - the client development files have also received some care: the upsclient pkg-config file has been fixed, and the upsclient.h file allows older NUT clients to continue using the UPSCONN structure. @@ -1332,7 +926,7 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4: This release is a backport of the development version. Many changes have already been backported previously. Thus it is more a - synchronization release, though it includes many bugfixes and support + synchronisation release, though it includes many bugfixes and support for new models. - support for new devices: APC Smart-UPS with 6TI firmware; Belkin @@ -1355,7 +949,7 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4: - solis: shutdown programming, support new cables, Solaris support - - tripplite_usb: updated SMARTPRO support, fixed OL/OB reporting, + - tripplite_usb: updated SMARTPRO support, fixed OL/OB reporting, better error handling, some memory bugs - new dummy-ups driver simulator @@ -1366,12 +960,12 @@ Release notes for NUT 2.0.5 - what's new since 2.0.4: Release notes for NUT 2.0.4 - what's new since 2.0.3: - The newhidups critical bug (segmentation fault) has been fixed. It has - also received some more care, like bugfixes and new models support and + also received some more care, like buxfixes and new models support and enhancement for Solaris. [Peter Selinger and Arnaud Quette] - A bug has been fixed in NUT core to support resuming from suspend-to-disk. - This should also fix other similar issues, like time synchronization + This should also fix other similar issues, like time synchronisation through the NTP - Network Time Protocol. [Arjen de Korte] @@ -1394,7 +988,7 @@ Release notes for NUT 2.0.4 - what's new since 2.0.3: [Carlos Rodrigues] - The new rhino driver was added to support Microsol Rhino UPS hardware - The solis has also been improved for Solaris compatibility, and + The solis has also been improved for solaris compatibility, and internal / external shutdown programming. solis can now save external shutdown programming to ups, and support new cables for solis 3 [Silvino B. Magalhães] @@ -1434,7 +1028,7 @@ Release notes for NUT 2.0.3 - what's new since 2.0.2: ups.model retrieval for some specific case (release 0.65) - The drivers don't change to the "statepath" directory anymore at - initialization time if called using -k. This avoid unneeded + initialisation time if called using -k. This avoid unneeded failure to poweroff the UPS if /var is already unmounted. [Gaspar Bakos] @@ -1454,7 +1048,7 @@ Release notes for NUT 2.0.3 - what's new since 2.0.2: - The packaging files for Red Hat have received various fixes [Thomas Jarosch] - - The solis driver has been fixed to avoid a naming collision and + - The solis driver has been fixed to avoid a naming colision and compile on Solaris [Paweł Kierdelewicz] @@ -1496,7 +1090,7 @@ Release notes for NUT 2.0.2 - what's new since 2.0.1: [Thanos Chatziathanassiou, Olli Salvia] - The bcmxcp driver is back with support for Powerware UPSs. - [Tore Ørpetveit, Kjell Claesson] + [Tore Øpetveit, Kjell Claesson] - The cyberpower driver now supports CyberPower 1000AVR. [Dave Huang] @@ -1507,7 +1101,7 @@ Release notes for NUT 2.0.2 - what's new since 2.0.1: - The apcsmart driver has fixed APC600 support. - - The etapro driver fixes brokenness due to ser_get_line use + - The etapro driver fixes brokeness due to ser_get_line use [Marek Michalkiewicz] - The new upscode2 driver supports Fiskars, Compaq and Powerware @@ -1546,7 +1140,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0: - The everups driver now supports types 73-76 (NET 700/1000/1400/500-DPC) [hunter] - - The new metasys driver supports Meta System models: Line, + - The new metasys driver supports Meta System models: Line, HF Millennium, HF Top Line, ECO Network, ECO, Ally HF, Megaline [BlaXwan] @@ -1559,7 +1153,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0: and bypass control. [Gert Lynge] - - The tripplite driver has received a major overhaul to bring it up to + - The tripplite driver has recieved a major overhaul to bring it up to working condition for the 2.0 tree, including code cleanups, several new variables, commands, and user-definable parameters. See ChangeLog for more. @@ -1598,7 +1192,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0: [Arnaud Quette] - The fentonups driver now recognizes several more Megatec protocol - units: + units: SuperPower HP360, Hope-550 [Denis Zaika] Unitek Alpha 1000is [Antoine Cuvellard] @@ -1612,7 +1206,7 @@ Release notes for NUT 2.0.1 - what's new since 2.0.0: - upssched's CANCEL events were broken following the change to text-based socket messages in 1.5 and have been fixed. - [Steven Schoch] + [Steven Schoch] - Calls to varargs functions with raw strings from the config files without an intervening "%s" have been fixed in upsmon, upssched, @@ -1631,8 +1225,8 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x: interim compatibility hacks have been removed. - New serial handling code has been added, with greatly simplified - operations. The old mess involving repeated calls to sigaction, - alarm, and read has been condensed to a select-read loop. + operations. The old mess involving repeated calls to sigaction, + alarm, and read has been condensed to a select-read loop. This change allows drivers which don't do any serial communications at all (hidups, snmp-ups) to drop that baggage, so they are a bit @@ -1683,13 +1277,13 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x: [Viktor T. Toth] - The newhidups driver has been merged as the first step towards - portable USB UPS support. This will eventually replace the old + portable USB UPS support. This will eventually replace the old Linux-only hidups driver. The newhidups driver is tagged experimental since it is under active development. [Arnaud Quette, Charles Lepple] - The newapc driver has been renamed to apcsmart, replacing the old - driver with that name. If you used the newapc driver, be sure to + driver with that name. If you used the newapc driver, be sure to delete the old binary and fix your ups.conf. - The apcsmart driver now supports asynchronous notification data @@ -1718,7 +1312,7 @@ Release notes for NUT 2.0.0 - what's new since 1.4.x: instcmds. - Effekta MT 2000 RM hardware is now supported by the fentonups driver. - [Christoph Moar] + [christoph moar] - The new safenet driver supports UPS hardware that uses the protocol of the same name. This includes models from many manufacturers, @@ -1782,20 +1376,20 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: - upssched now explicitly confirms reception of timer commands before exiting. This was done to avoid a race where one process would - exit right when another one was starting. The second one would - believe its command had been handled when it had been lost. + exit right when another one was starting. The second one would + believe its command had been handled when it had been lost. - upslog has been reworked to use standard getopt parsing to provide the monitoring settings. The old way of specifying arguments is still supported for backwards compatibility. upslog has also been changed to only parse the format string once, - rather than doing it every time through the loop. This should - provide a minuscule drop in CPU utilization. + rather than doing it every time through the loop. This should + provide a minuscule drop in CPU utilization. - Usernames are now required in upsmon and upsd. This means that you must add a username to your MONITOR lines in upsmon.conf and then - create a matching user in upsd.users. + create a matching user in upsd.users. Installations from the 1.2 era probably already use usernames, so this mostly affects those from 1.0 and before. @@ -1832,14 +1426,14 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: - Signal handlers no longer do any significant amount of work. Some of the programs used to do numerous things in there, raising concerns - about reentrancy. They now set flags and allow the main loop to do + about reentrancy. They now set flags and allow the main loop to do the actual work from there. - A bug in upsmon where NOTIFYFLAG settings could be ignored was fixed. - Group handling has been changed. configure no longer accepts --with-group, and the programs no longer setgid() to a hardcoded - value. They now setgid() to the primary group of whatever the + value. They now setgid() to the primary group of whatever the user value may be. This may be compiled in with --with-user as before, and many programs @@ -1866,7 +1460,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: battery tests were also added. - The dummyups testing driver has been removed. The dummycons testing - driver can do everything that dummyups once did and much more. + driver can do everything that dummyups once did and much more. dummycons is also now built by default for easier testing. - The newapc driver has been reworked to take advantage of the new @@ -1881,7 +1475,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: a shutdown sequence, and more. [Arnaud Quette] - - The mge-utalk driver had trouble establishing communications in + - The mge-utalk driver had trouble establishing communications in some cases due to the RTS line being set. This has been fixed. The mge-shut driver has been added to the tree, and has replaced @@ -1897,7 +1491,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: others before long. [Arnaud Quette] - - KIN-2200AP hardware is now recognized by the powercom driver. + - KIN-2200AP hardware is now recognized by the powercom driver. This change may also support other KIN-xxxxAP equipment. [Preston A. Elder] @@ -1975,7 +1569,7 @@ Release notes for NUT 1.4.0 - what's new since 1.2.x: - The inline keyword is now handled properly on systems which do not support it or have it specified as another name. This was breaking compiles on some systems. - [Petter Reinholdtsen] + [Petter Reinholdtsen] --------------------------------------------------------------------------- Release notes for NUT 1.2.2 - what's new since 1.2.1: @@ -2013,7 +1607,7 @@ Release notes for NUT 1.2.2 - what's new since 1.2.1: [Alex Cichowski] - The liebert driver also now uses debouncing logic on the status - lines. It was possible to get false readings that would start a + lines. It was possible to get false readings that would start a shutdown or just annoy users with excessive onbatt/online notify messages. The new code forces the status to settle down for 3 polls before accepting the new value. @@ -2060,7 +1654,7 @@ Release notes for NUT 1.2.2 - what's new since 1.2.1: - upsd no longer tries to reference a deleted client structure if the client disconnects at the wrong time. Previously, it tried to use - that pointer after the sendback() function had already failed on + that pointer after the sendback() function had already failed on write and deleted the client. This could cause upsd to segfault depending on what areas were accessed. [Patrik Schindler] @@ -2082,7 +1676,7 @@ Release notes for NUT 1.2.1 - what's new since 1.2.0: - The old multilink driver is back with a new name: liebert. It supports Liebert UPStation GXE hardware with the contact-closure cable. This is currently an experimental driver as there is no - way to power down the load. + way to power down the load. - configure now picks up the right flags for gd automatically if gd 2.0.8 or higher is installed. This greatly simplifies the CGI build diff --git a/README b/README index c57dd89..1b44663 100644 --- a/README +++ b/README @@ -102,7 +102,7 @@ This package is broken down into several categories: - *clients* - They talk to upsd and do things with the status data. - *cgi-bin* - Special class of clients that you can use with your web server. - *scripts* - Contains various scripts, like the Perl and Python binding, -integration bits and applications. +integration bits and applications. Drivers ------- @@ -120,9 +120,8 @@ The entry in `ups.conf` looks like this: driver = apcsmart port = /dev/ttyS1 -To start and stop drivers, use upsdrvctl of upsdrvsvcctl (installed on -operating systems with a service management framework supported by NUT). -By default, it will start or stop every UPS in the config file: +To start and stop drivers, use upsdrvctl. By default, it will start or +stop every UPS in the config file: /usr/local/ups/sbin/upsdrvctl start /usr/local/ups/sbin/upsdrvctl stop @@ -132,17 +131,6 @@ However, you can also just start or stop one by adding its name: /usr/local/ups/sbin/upsdrvctl start sparky /usr/local/ups/sbin/upsdrvctl stop sparky -On operating systems with a supported service management framework, -you might wrap your NUT drivers into individual services instances -with: - - /usr/local/ups/sbin/upsdrvsvcctl resync - -and then manage those service instances with commands like: - - /usr/local/ups/sbin/upsdrvsvcctl start sparky - /usr/local/ups/sbin/upsdrvsvcctl stop sparky - To find the driver name for your device, refer to the section below called "HARDWARE SUPPORT TABLE". @@ -248,8 +236,8 @@ Power distribution unit management NUT also provides an advanced support for power distribution units. -You should read the <> -chapter to learn more about when to use this feature. +You should read the <> +chapter to learn more about when to use this feature. Network Server -------------- @@ -273,52 +261,32 @@ separate section in the documentation since it is so important. You configure it by telling it about UPSes that you want to monitor in upsmon.conf. Each UPS can be defined as one of two possible types: -a "primary" or "secondary". -Primary -~~~~~~~ +Master +~~~~~~ -The monitored UPS possibly supplies power to this system running `upsmon`, -but more importantly -- this system can manage the UPS (typically, this -instance of `upsmon` runs on the same system as the `upsd` and driver(s)): -it is capable and responsible for shutting it down when the battery is -depleted (or in another approach, lingering to deplete it or to tell the -UPS to reboot its load after too much time has elapsed and this system -is still alive -- meaning wall power returned at a "wrong" moment). +This UPS supplies power to the system running `upsmon`, and this system is also +responsible for shutting it down when the battery is depleted. This occurs +after any slave systems have disconnected safely. -The shutdown of this (primary) system itself, as well as eventually an -UPS shutdown, occurs after any secondary systems ordered to shut down -first have disconnected, or a critical urgency threshold was passed. - -If your UPS is plugged directly into a system's serial or USB port, the -`upsmon` process on that system should define its relation to that UPS -as a primary. It may be more complicated for higher-end UPSes with a -shared network management capability (typically via SNMP) or several -serial/USB ports that can be used simultaneously, and depends on what -vendors and drivers implement. Setups with several competing primaries -(for redundancy) are technically possible, if each one runs its own -full stack of NUT, but results can be random (currently NUT does not -provide a way to coordinate several entities managing the same device). +If your UPS is plugged directly into a system's serial port, the `upsmon` +process on that system should define that UPS as a master. For a typical home user, there's one computer connected to one UPS. -That means you would run on the same computer the whole NUT stack -- -a suitable driver, `upsd`, and `upsmon` in primary mode. +That means you run a driver, `upsd`, and `upsmon` in master mode. -Secondary -~~~~~~~~~ +Slave +~~~~~ -The monitored UPS may supply power to the system running `upsmon` (or -alternatively, it may be a monitoring station with zero PSUs fed by -that UPS), but more importantly, this system can't manage the UPS -- -e.g. shut it down directly (through a locally running NUT driver). +This UPS may supply power to the system running `upsmon`, but this system can't +shut it down directly. -Use this mode when you run multiple computers on the same UPS. -Obviously, only one can be connected to the serial or USB port -on a typical UPS, and that system is the primary. Everything -else is a secondary. +Use this mode when you run multiple computers on the same UPS. Obviously, only +one can be connected to the serial port on the UPS, and that system is the +master. Everything else is a slave. For a typical home user, there's one computer connected to one UPS. -That means you run a driver, `upsd`, and `upsmon` in primary mode. +That means you run a driver, upsd, and upsmon in master mode. Additional Information ~~~~~~~~~~~~~~~~~~~~~~ @@ -508,11 +476,7 @@ The past stable trees were 1.0, 1.2, 1.4, 2.0, 2.2 and 2.4, with the latest stable tree designated 2.6. The development trees were 1.1, 1.3, 1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development branch anymore since the code is available through a revision control -system (namely Subversion) and snapshots. Since 2.7 line of releases, -sources are tracked in Git revision control system, with the project -ecosystem being hosted on GitHub, and improvements or other contributions -merged through common pull request approach and custom NUT CI testing -on multiple platforms. +system (namely Subversion) and snapshots. Major release jumps are mostly due to large changes to the features list. There have also been a number of architectural changes which @@ -522,11 +486,11 @@ may not be noticeable to most users, but which can impact developers. Backwards and Forwards Compatibility ------------------------------------ -The old network code spans a range from about 0.41.1 when TCP support +The old network code spans a range from about 0.41.1 when TCP support was introduced up to the recent 1.4 series. It used variable names like STATUS, UTILITY, and LOADPCT. Many of these names go back to the earliest prototypes of this software from 1997. At that point there -was no way to know that so many drivers would come along and introduce +was no way to know that so many drivers would come along and introduce so many new variables and commands. The resulting mess grew out of control over the years. @@ -558,9 +522,9 @@ Here's a table to make it easier to visualize: |============================================= Version 2.0, and more recent, do not contain backwards compatibility for -the old protocol and variable/command names. As a result, 2.0 clients can't -talk to anything older than a 1.4 server. If you ask a 2.0 client to -fetch "STATUS", it will fail. You'll have to ask for "ups.status" +the old protocol and variable/command names. As a result, 2.0 clients can't +talk to anything older than a 1.4 server. If you ask a 2.0 client to +fetch "STATUS", it will fail. You'll have to ask for "ups.status" instead. Authors of separate monitoring programs should have used the 1.4 series diff --git a/TODO b/TODO index 81a601f..1c45636 100644 --- a/TODO +++ b/TODO @@ -13,7 +13,7 @@ Roadmap ^^^ This release is focused on the website and documentation rewrite, using -the excellent link:https://asciidoc.org/[AsciiDoc]. +the excellent link:http://www.methods.co.nz/asciidoc[AsciiDoc]. 2.8 ^^^ @@ -113,6 +113,6 @@ and https://alioth.debian.org/tracker/?atid=411545&group_id=30602&func=browse[fe solar panel driver, and the powerman internal approach of a generic engine with a scripting interface is a cool idea. Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup -- integrate the (future) new powerman LUA engine (maybe/must-be used for the driver above?) +- integrate the (future) new powerman LUA engine (maybe/mustbe used for the driver above?) for native PDU support - see how we can help and collaborate with DeviceKit-power diff --git a/UPGRADING b/UPGRADING index 1584e92..03cf410 100644 --- a/UPGRADING +++ b/UPGRADING @@ -7,132 +7,6 @@ This file lists changes that affect users who installed older versions of this software. When upgrading from an older version, be sure to check this file to see if you need to make changes to your system. -Changes from 2.7.4 to 2.8.0 ---------------------------- - -- Note to distribution packagers: this version hopefully learns from many - past mistakes, so many custom patches may be no longer needed. If some - remain, please consider making pull requests for upstream NUT codebase - to share the fixes consistently across the ecosystem. Also note that - some new types of drivers (so package groups with unique dependencies) - could have appeared since your packaging was written (e.g. with modbus), - as well as new features in systemd integration (`nut-driver@instances` - and the `nut-driver-enumerator` to manage their population), as well as - updated Python 2 and Python 3 support (again, maybe dictating different - package groups) as detailed below. - -- Due to changes needed to resolve build warnings, mostly about mismatching - data types for some variables, some structure definitions and API signatures - of several routines had to be changed for argument types, return types, - or both. Primarily this change concerns internal implementation details - (may impact update of NUT forks with custom drivers using those), but a - few changes also happened in header files installed for builds configured - `--with-dev` and so may impact `upsclient` and `nutclient` (C++) consumers. - At the very least, binaries for those consumers should be rebuilt to remain - stable with NUT 2.8.0 and not mismatch int-type sizes and other arguments. - -- libusb-1.0: NUT now defaults to building against libusb-1.0 API version - if the configure script finds the development headers, falling back to - libusb-0.1 if not. Please report any regressions. - -- apcupsd-ups: When monitoring a remote apcupsd server, interpret "SHUTTING - DOWN" as a NUT "LB" status. If you were relying on the previous behavior - (for instance, in a monitor-only situation), please adjust your upsmon - settings. Reference: https://github.com/networkupstools/nut/issues/460 - -- Packagers: the AsciiDoc detection has been reworked to allow NUT to be built - from source without requiring asciidoc/a2x (using pre-built man pages from - the distribution tarball, for instance). Please double-check that we did not - break anything (see docs/configure.txt for options). - -- Driver core: options added for standalone mode (scanning for devices without - requiring ups.conf) - see docs/man/nutupsdrv.txt for details. - -- oldmge-shut has been removed, and replaced by mge-shut. - -- New drivers for devices with "Qx" (also known as "Megatec Q*") family of - protocols should be developed as sub-drivers in the `nutdrv_qx` framework - for USB and Serial connected devices, not as updates/clones of older e.g. - `blazer` family and `bestups`. Sources, man pages and start-up messages - of such older drivers were marked with "OBSOLETION WARNING". - -- liebert-esp2: some multi-phase variable names have been updated to match the - rest of NUT. - -- netxml-ups: if you have old firmware, or were relying on values being off by - a factor of 10, consider the `do_convert_deci` flag. See - docs/man/netxml-ups.txt for details. - -- snmp-ups: detection of Net-SNMP has been updated to use `pkg-config` by - default (if present), rather than `net-snmp-config(-32|-64)` script(s) as - the only option available previously. The scripts tend to specify a lot - of options (sometimes platform-specific) in suggested `CFLAGS` and `LIBS` - compared to the packaged `pkg-config` information which also works and is - more portable. If this change bites your distribution, please bring it up - in https://github.com/networkupstools/nut/issues or better yet, post a PR. - Also note that `./configure --with-netsnmp-config(=yes)` should set up the - preference of the detected script over `pkg-config` information, if both - are available, and `--with-netsnmp-config=/path/name` would as well. - -- snmp-ups: bit mask values for flags in earlier codebase were defined in a - way that caused logically different items to have same numeric values. - This was fixed to surely use different definitions (so changing numbers - behind some of those macro symbols), and testing with UPS, ePDU and ATS - hardware which was available did not expose any practical differences. - -- usbhid-ups: numeric data conversion from wire protocol to CPU representation - in GetValue() was completely reworked, aiming to be correct on all CPU types. - That said, regressions are possible and feedback is welcome. - -- nut-scanner: Packagers, take note of the changes to the library - search code in common/common.c. Please file an issue if this does not work - with your platform. - -- dummy-ups can now specify `mode` as a driver argument, and separates the - notion of `dummy-once` (new default for `*.dev` files that do not change) - vs. `dummy-loop` (legacy default for `*.seq` and others) [issue #1385] - - * Note this can break third-party test scripts which expected `*.dev` - files to work as a looping sequence with a `TIMER` keywords to change - values slowly; now such files should get processed to the end once. - Specify `mode=dummy-loop` driver option or rename the data file used - in the `port` option for legacy behavior. - Use/Test-cases which modified such files content externally should - not be impacted. - -- Python: scripts have been updated to work with Python 3 as well as 2. - - * PyNUT module (protocol binding) supports both Python generations. - - * NUT-Monitor (desktop UI client) got separated into two projects: - one with support for Python2 and GTK2, and another for Python3 and Qt5. - On operating systems that serve both environments, either of these - implementation should be usable. For distributions that deprecated - and removed Python2 support, it is a point to consider in NUT packages - and their build-time and installation dependencies. - The historic filenames for desktop integration (`NUT-Monitor` script - and `nut-monitor.desktop`) are still delivered, but now cover a wrapper - script which detects the environment capabilities and launches the best - suitable UI implementation (if both are available). - -- apcsmart: updates to CS "hack" (see docs/man/apcsmart.txt for details) - -- upsdebugx(): added `[D#]` prefix to log entries with level > 0 - so if any scripts or other tools relied on parsing those messages - making some assumptions, they should be updated - -- upsdebugx() and related methods are now macros, optionally calling similarly - named implementations like s_upsdebugx() as a slight optimization; this may - show up in linking of binaries for some customized build scenarios - -- libraries, tools and protocol now support a `TRACKING` ID to be used with - an `INSTCMD` or `SET VAR` requests; for details see docs/net-protocol.txt - and docs/sock-protocol.txt - -- upsrw: display the variable type beside ENUM / RANGE - -- Augeas: new `--with-augeas-lenses-dir` configure option. - Changes from 2.7.3 to 2.7.4 --------------------------- @@ -297,7 +171,7 @@ Changes from 2.2.1 to 2.2.2 This enable the additional build and distribution of the static version of libupsclient, along with the pkg-config helper and manual pages. The default configure option is to distribute only the shared -version of libupsclient. This can be overridden by using the +version of libupsclient. This can be overriden by using the "--disable-shared" configure option (distribute static only binaries). - The UPS poweroff handling of the usbhid-ups driver has been reworked. Though regression is not expected, users of this driver are @@ -308,7 +182,7 @@ Changes from 2.2.0 to 2.2.1 --------------------------- - nothing that affects upgraded systems. -(The below message is repeated due to previous omission) +(The below message is repetead due to previous omission) - Developers of external client application using libupsclient are encouraged to rename their "UPSCONN" client structure to "UPSCONN_t" since the former will disappear by the release of NUT 2.4. diff --git a/aclocal.m4 b/aclocal.m4 index ee7ee0a..709a8d0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,63 +20,146 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 12 (pkg-config-0.29.2) +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2014 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. -dnl Copyright © 2004 Scott James Remnant . -dnl Copyright © 2012-2015 Dan Nicholson -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. +dnl From Paul Eggert. -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.2]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ +# Define HAVE_LONG_LONG_INT if 'long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. +# Note: If the type 'long long int' exists but is only 32 bits large +# (as on some very old compilers), HAVE_LONG_LONG_INT will not be +# defined. In this case you can treat 'long long int' like 'long int'. + +AC_DEFUN([AC_TYPE_LONG_LONG_INT], +[ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) + AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) + if test $ac_cv_type_long_long_int = yes; then + AC_DEFINE([HAVE_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'long long int'.]) + fi +]) + +# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. + +# Note: If the type 'unsigned long long int' exists but is only 32 bits +# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT +# will not be defined. In this case you can treat 'unsigned long long int' +# like 'unsigned long int'. + +AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], +[ + AC_CACHE_CHECK([for unsigned long long int], + [ac_cv_type_unsigned_long_long_int], + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) + if test $ac_cv_type_unsigned_long_long_int = yes; then + AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], + [Define to 1 if the system has the type 'unsigned long long int'.]) + fi +]) + +# Expands to a C program that can be used to test for simultaneous support +# of 'long long' and 'unsigned long long'. We don't want to say that +# 'long long' is available if 'unsigned long long' is not, or vice versa, +# because too many programs rely on the symmetry between signed and unsigned +# integer types (excluding 'bool'). +AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], +[ + AC_LANG_PROGRAM( + [[/* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ + /* Test literals. */ + long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + unsigned long long int ull = 18446744073709551615ULL; + /* Test constant expressions. */ + typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) + ? 1 : -1)]; + typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63;]], + [[/* Test availability of runtime routines for shift and division. */ + long long int llmax = 9223372036854775807ll; + unsigned long long int ullmax = 18446744073709551615ull; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull));]]) +]) + +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) @@ -98,19 +181,18 @@ if test -n "$PKG_CONFIG"; then PKG_CONFIG="" fi fi[]dnl -])dnl PKG_PROG_PKG_CONFIG +])# PKG_PROG_PKG_CONFIG -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl have to call PKG_CHECK_EXISTS manually +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ @@ -120,10 +202,8 @@ m4_ifvaln([$3], [else $3])dnl fi]) -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" @@ -135,11 +215,10 @@ m4_define([_PKG_CONFIG], else pkg_failed=untried fi[]dnl -])dnl _PKG_CONFIG +])# _PKG_CONFIG -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -147,24 +226,26 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then else _pkg_short_errors_supported=no fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED +])# _PKG_SHORT_ERRORS_SUPPORTED -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $2]) +AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -174,11 +255,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -195,7 +276,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -211,40 +292,16 @@ else AC_MSG_RESULT([yes]) $3 fi[]dnl -])dnl PKG_CHECK_MODULES +])# PKG_CHECK_MODULES -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -255,18 +312,16 @@ AC_ARG_WITH([pkgconfigdir], AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR +]) dnl PKG_INSTALLDIR -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], @@ -277,15 +332,13 @@ AC_ARG_WITH([noarch-pkgconfigdir], AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR +]) dnl PKG_NOARCH_INSTALLDIR -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl @@ -294,9 +347,9 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR +])# PKG_CHECK_VAR -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -308,10 +361,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.16' +[am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.3], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -327,14 +380,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.3])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -386,7 +439,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -417,7 +470,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -608,12 +661,13 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. + # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -621,43 +675,49 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - AS_CASE([$CONFIG_FILES], - [*\'*], [eval set x "$CONFIG_FILES"], - [*], [set x $CONFIG_FILES]) + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf + for mf do # Strip MF so we end up with the name of the file. - am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`AS_DIRNAME(["$am_mf"])` - am_filepart=`AS_BASENAME(["$am_mf"])` - AM_RUN_LOG([cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles]) || am_rc=$? + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done - if test $am_rc -ne 0; then - AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking).]) - fi - AS_UNSET([am_dirpart]) - AS_UNSET([am_filepart]) - AS_UNSET([am_mf]) - AS_UNSET([am_rc]) - rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -666,17 +726,18 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking is enabled. -# This creates each '.Po' and '.Plo' makefile fragment that we'll need in -# order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -763,11 +824,11 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -831,7 +892,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -841,9 +902,6 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi -dnl The trailing newline in this macro's definition is deliberate, for -dnl backward compatibility and to allow trailing 'dnl'-style comments -dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -873,7 +931,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -884,7 +942,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -894,7 +952,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -916,7 +974,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -951,7 +1009,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -959,42 +1017,49 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # AM_MAKE_INCLUDE() # ----------------- -# Check whether make has an 'include' directive that can support all -# the idioms we need for our automatic dependency tracking code. +# Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], -[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) -cat > confinc.mk << 'END' +[am_make=${MAKE-make} +cat > confinc << 'END' am__doit: - @echo this is the am__doit target >confinc.out + @echo this is the am__doit target .PHONY: am__doit END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) - AS_CASE([$?:`cat confinc.out 2>/dev/null`], - ['0:this is the am__doit target'], - [AS_CASE([$s], - [BSD], [am__include='.include' am__quote='"'], - [am__include='include' am__quote=''])]) - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -AC_MSG_RESULT([${_am_result}]) -AC_SUBST([am__include])]) -AC_SUBST([am__quote])]) +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1015,7 +1080,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -1028,7 +1098,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1057,7 +1127,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1104,7 +1174,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1123,7 +1193,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1204,7 +1274,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1264,7 +1334,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1292,7 +1362,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1311,7 +1381,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1442,11 +1512,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/ax_c___attribute__.m4]) -m4_include([m4/ax_c_pragmas.m4]) -m4_include([m4/ax_check_compile_flag.m4]) m4_include([m4/ax_compare_version.m4]) -m4_include([m4/ax_run_or_link_ifelse.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) @@ -1454,13 +1520,10 @@ m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nut_arg_with.m4]) m4_include([m4/nut_check_asciidoc.m4]) -m4_include([m4/nut_check_cppcheck.m4]) -m4_include([m4/nut_check_headers_windows.m4]) m4_include([m4/nut_check_libavahi.m4]) m4_include([m4/nut_check_libfreeipmi.m4]) m4_include([m4/nut_check_libgd.m4]) m4_include([m4/nut_check_libltdl.m4]) -m4_include([m4/nut_check_libmodbus.m4]) m4_include([m4/nut_check_libneon.m4]) m4_include([m4/nut_check_libnetsnmp.m4]) m4_include([m4/nut_check_libnss.m4]) @@ -1469,10 +1532,5 @@ m4_include([m4/nut_check_libpowerman.m4]) m4_include([m4/nut_check_libusb.m4]) m4_include([m4/nut_check_libwrap.m4]) m4_include([m4/nut_check_os.m4]) -m4_include([m4/nut_check_pkgconfig.m4]) -m4_include([m4/nut_check_python.m4]) -m4_include([m4/nut_compiler_family.m4]) -m4_include([m4/nut_func_getnameinfo_argtypes.m4]) m4_include([m4/nut_report_feature.m4]) -m4_include([m4/nut_stash_warnings.m4]) m4_include([m4/nut_type_socklen_t.m4]) diff --git a/clients/Makefile.am b/clients/Makefile.am index e9d7e3c..5c7abf9 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -1,19 +1,7 @@ # Network UPS Tools: clients -EXTRA_DIST = - -# nutclient.cpp for some legacy reason (maybe initial detached development?) -# optionally includes "common.h" with the NUT build setup - and this option -# was never triggered in fact, not until pushed through command line like this: -AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_srcdir)/include - -# Make sure out-of-dir dependencies exist (especially when dev-building parts): -$(top_builddir)/common/libcommon.la \ -$(top_builddir)/common/libcommonclient.la \ -$(top_builddir)/common/libparseconf.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) # by default, link programs in this directory with libcommon.a -LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) if WITH_SSL LDADD += $(LIBSSL_LIBS) endif @@ -32,13 +20,9 @@ endif bin_PROGRAMS = upsc upslog upsrw upscmd dist_bin_SCRIPTS = upssched-cmd sbin_PROGRAMS = upsmon upssched -lib_LTLIBRARIES = libupsclient.la -if HAVE_CXX11 - lib_LTLIBRARIES += libnutclient.la - lib_LTLIBRARIES += libnutclientstub.la -endif +lib_LTLIBRARIES = libupsclient.la libnutclient.la if WITH_DEV - include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h nutclientmem.h + include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h endif if WITH_CGI cgiexec_PROGRAMS = upsstats.cgi upsimage.cgi upsset.cgi @@ -51,7 +35,7 @@ upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = $(top_builddir)/common/libcommon.la $(top_builddir)/common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) @@ -62,44 +46,15 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \ # not LDADD. libupsclient_la_SOURCES = upsclient.c upsclient.h -libupsclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la +libupsclient_la_LIBADD = ../common/libcommonclient.la if WITH_SSL libupsclient_la_LIBADD += $(LIBSSL_LIBS) endif -# Below we set API versions of public libraries -# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -# Note that changes here may have to be reflected in packaging (the shared -# object .so names would differ) - # libupsclient version information -libupsclient_la_LDFLAGS = -version-info 6:0:0 -export-symbols-regex ^upscli_ +# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +libupsclient_la_LDFLAGS = -version-info 4:0:0 -if HAVE_CXX11 -# libnutclient version information and build libnutclient_la_SOURCES = nutclient.h nutclient.cpp -libnutclient_la_LDFLAGS = -version-info 2:0:0 -# Needed in not-standalone builds with -DHAVE_NUTCOMMON=1 -# which is defined for in-tree CXX builds above: -libnutclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la -else -EXTRA_DIST += nutclient.h nutclient.cpp -endif +libnutclient_la_LDFLAGS = -version-info 0:0:0 -if HAVE_CXX11 -# libnutclientstub version information and build -libnutclientstub_la_SOURCES = nutclientmem.h nutclientmem.cpp -libnutclientstub_la_LDFLAGS = -version-info 1:0:0 -libnutclientstub_la_LIBADD = libnutclient.la -else -EXTRA_DIST += nutclientmem.h nutclientmem.cpp -endif - -dummy: - -MAINTAINERCLEANFILES = Makefile.in .dirstamp - -# NOTE: Do not clean ".deps" in SUBDIRS of the main project, -# the root Makefile.am takes care of that! -#clean-local: -# rm -rf $(builddir)/.deps diff --git a/clients/Makefile.in b/clients/Makefile.in index e7cb07e..0a7949e 100644 --- a/clients/Makefile.in +++ b/clients/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,21 +14,13 @@ @SET_MAKE@ +# Network UPS Tools: clients + VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -98,31 +90,24 @@ target_triplet = @target@ bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \ upscmd$(EXEEXT) sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT) -@HAVE_CXX11_TRUE@am__append_4 = libnutclient.la libnutclientstub.la @WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \ @WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT) -@WITH_SSL_TRUE@am__append_5 = $(LIBSSL_LIBS) -@HAVE_CXX11_FALSE@am__append_6 = nutclient.h nutclient.cpp \ -@HAVE_CXX11_FALSE@ nutclientmem.h nutclientmem.cpp +@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS) subdir = clients +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) $(top_srcdir)/depcomp \ + $(am__include_HEADERS_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -131,26 +116,15 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(dist_bin_SCRIPTS) \ - $(am__include_HEADERS_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" \ - "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" -PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -178,11 +152,12 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) -@HAVE_CXX11_TRUE@libnutclient_la_DEPENDENCIES = \ -@HAVE_CXX11_TRUE@ $(top_builddir)/common/libcommonclient.la -am__libnutclient_la_SOURCES_DIST = nutclient.h nutclient.cpp -@HAVE_CXX11_TRUE@am_libnutclient_la_OBJECTS = nutclient.lo +libnutclient_la_LIBADD = +am_libnutclient_la_OBJECTS = nutclient.lo libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -192,20 +167,9 @@ libnutclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclient_la_LDFLAGS) \ $(LDFLAGS) -o $@ -@HAVE_CXX11_TRUE@am_libnutclient_la_rpath = -rpath $(libdir) -@HAVE_CXX11_TRUE@libnutclientstub_la_DEPENDENCIES = libnutclient.la -am__libnutclientstub_la_SOURCES_DIST = nutclientmem.h nutclientmem.cpp -@HAVE_CXX11_TRUE@am_libnutclientstub_la_OBJECTS = nutclientmem.lo -libnutclientstub_la_OBJECTS = $(am_libnutclientstub_la_OBJECTS) -libnutclientstub_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ - $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ - $(AM_CXXFLAGS) $(CXXFLAGS) $(libnutclientstub_la_LDFLAGS) \ - $(LDFLAGS) -o $@ -@HAVE_CXX11_TRUE@am_libnutclientstub_la_rpath = -rpath $(libdir) am__DEPENDENCIES_1 = @WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -libupsclient_la_DEPENDENCIES = \ - $(top_builddir)/common/libcommonclient.la \ +libupsclient_la_DEPENDENCIES = ../common/libcommonclient.la \ $(am__DEPENDENCIES_2) am_libupsclient_la_OBJECTS = upsclient.lo libupsclient_la_OBJECTS = $(am_libupsclient_la_OBJECTS) @@ -213,51 +177,52 @@ libupsclient_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libupsclient_la_LDFLAGS) $(LDFLAGS) \ -o $@ +PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS) am_upsc_OBJECTS = upsc.$(OBJEXT) upsc_OBJECTS = $(am_upsc_OBJECTS) upsc_LDADD = $(LDADD) -upsc_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upsc_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upscmd_OBJECTS = upscmd.$(OBJEXT) upscmd_OBJECTS = $(am_upscmd_OBJECTS) upscmd_LDADD = $(LDADD) -upscmd_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upscmd_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT) upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS) -am__DEPENDENCIES_3 = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +am__DEPENDENCIES_3 = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_1) am_upslog_OBJECTS = upslog.$(OBJEXT) upslog_OBJECTS = $(am_upslog_OBJECTS) upslog_LDADD = $(LDADD) -upslog_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upslog_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsmon_OBJECTS = upsmon.$(OBJEXT) upsmon_OBJECTS = $(am_upsmon_OBJECTS) upsmon_LDADD = $(LDADD) -upsmon_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upsmon_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsrw_OBJECTS = upsrw.$(OBJEXT) upsrw_OBJECTS = $(am_upsrw_OBJECTS) upsrw_LDADD = $(LDADD) -upsrw_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upsrw_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upssched_OBJECTS = upssched.$(OBJEXT) upssched_OBJECTS = $(am_upssched_OBJECTS) -upssched_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - $(top_builddir)/common/libparseconf.la $(am__DEPENDENCIES_1) +upssched_DEPENDENCIES = ../common/libcommon.la \ + ../common/libparseconf.la $(am__DEPENDENCIES_1) am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT) upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS) upsset_cgi_LDADD = $(LDADD) -upsset_cgi_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upsset_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT) upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS) upsstats_cgi_LDADD = $(LDADD) -upsstats_cgi_DEPENDENCIES = $(top_builddir)/common/libcommon.la \ - libupsclient.la $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) +upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) SCRIPTS = $(dist_bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -273,14 +238,7 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/cgilib.Po ./$(DEPDIR)/nutclient.Plo \ - ./$(DEPDIR)/nutclientmem.Plo ./$(DEPDIR)/upsc.Po \ - ./$(DEPDIR)/upsclient.Plo ./$(DEPDIR)/upscmd.Po \ - ./$(DEPDIR)/upsimage.Po ./$(DEPDIR)/upslog.Po \ - ./$(DEPDIR)/upsmon.Po ./$(DEPDIR)/upsrw.Po \ - ./$(DEPDIR)/upssched.Po ./$(DEPDIR)/upsset.Po \ - ./$(DEPDIR)/upsstats.Po +am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -318,16 +276,15 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -SOURCES = $(libnutclient_la_SOURCES) $(libnutclientstub_la_SOURCES) \ - $(libupsclient_la_SOURCES) $(upsc_SOURCES) $(upscmd_SOURCES) \ - $(upsimage_cgi_SOURCES) $(upslog_SOURCES) $(upsmon_SOURCES) \ - $(upsrw_SOURCES) $(upssched_SOURCES) $(upsset_cgi_SOURCES) \ +SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \ + $(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \ + $(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \ + $(upssched_SOURCES) $(upsset_cgi_SOURCES) \ $(upsstats_cgi_SOURCES) -DIST_SOURCES = $(am__libnutclient_la_SOURCES_DIST) \ - $(am__libnutclientstub_la_SOURCES_DIST) \ - $(libupsclient_la_SOURCES) $(upsc_SOURCES) $(upscmd_SOURCES) \ - $(upsimage_cgi_SOURCES) $(upslog_SOURCES) $(upsmon_SOURCES) \ - $(upsrw_SOURCES) $(upssched_SOURCES) $(upsset_cgi_SOURCES) \ +DIST_SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \ + $(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \ + $(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \ + $(upssched_SOURCES) $(upsset_cgi_SOURCES) \ $(upsstats_cgi_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -335,7 +292,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \ - nutclient.h nutclientmem.h + nutclient.h HEADERS = $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, @@ -356,7 +313,6 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -365,7 +321,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -376,7 +331,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -390,7 +344,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -403,7 +356,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -421,8 +373,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -433,29 +383,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -475,9 +417,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -491,7 +430,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -509,7 +447,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -523,9 +460,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -551,14 +485,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -569,16 +501,8 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -# Network UPS Tools: clients -EXTRA_DIST = $(am__append_6) - -# nutclient.cpp for some legacy reason (maybe initial detached development?) -# optionally includes "common.h" with the NUT build setup - and this option -# was never triggered in fact, not until pushed through command line like this: -AM_CXXFLAGS = -DHAVE_NUTCOMMON=1 -I$(top_srcdir)/include - # by default, link programs in this directory with libcommon.a -LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) \ +LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \ $(am__append_1) # Avoid per-target CFLAGS, because this will prevent re-use of object @@ -586,15 +510,15 @@ LDADD = $(top_builddir)/common/libcommon.la libupsclient.la $(NETLIBS) \ # but only add them if we really use the target. AM_CFLAGS = -I$(top_srcdir)/include $(am__append_2) $(am__append_3) dist_bin_SCRIPTS = upssched-cmd -lib_LTLIBRARIES = libupsclient.la $(am__append_4) -@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h nutclientmem.h +lib_LTLIBRARIES = libupsclient.la libnutclient.la +@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h upsc_SOURCES = upsc.c upsclient.h upscmd_SOURCES = upscmd.c upsclient.h upsrw_SOURCES = upsrw.c upsclient.h upslog_SOURCES = upslog.c upsclient.h upslog.h upsmon_SOURCES = upsmon.c upsmon.h upsclient.h upssched_SOURCES = upssched.c upssched.h -upssched_LDADD = $(top_builddir)/common/libcommon.la $(top_builddir)/common/libparseconf.la $(NETLIBS) +upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS) upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS) upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h @@ -604,29 +528,13 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \ # not LDADD. libupsclient_la_SOURCES = upsclient.c upsclient.h -libupsclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la \ - $(am__append_5) - -# Below we set API versions of public libraries -# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html -# Note that changes here may have to be reflected in packaging (the shared -# object .so names would differ) +libupsclient_la_LIBADD = ../common/libcommonclient.la $(am__append_4) # libupsclient version information -libupsclient_la_LDFLAGS = -version-info 6:0:0 -export-symbols-regex ^upscli_ - -# libnutclient version information and build -@HAVE_CXX11_TRUE@libnutclient_la_SOURCES = nutclient.h nutclient.cpp -@HAVE_CXX11_TRUE@libnutclient_la_LDFLAGS = -version-info 2:0:0 -# Needed in not-standalone builds with -DHAVE_NUTCOMMON=1 -# which is defined for in-tree CXX builds above: -@HAVE_CXX11_TRUE@libnutclient_la_LIBADD = $(top_builddir)/common/libcommonclient.la - -# libnutclientstub version information and build -@HAVE_CXX11_TRUE@libnutclientstub_la_SOURCES = nutclientmem.h nutclientmem.cpp -@HAVE_CXX11_TRUE@libnutclientstub_la_LDFLAGS = -version-info 1:0:0 -@HAVE_CXX11_TRUE@libnutclientstub_la_LIBADD = libnutclient.la -MAINTAINERCLEANFILES = Makefile.in .dirstamp +# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +libupsclient_la_LDFLAGS = -version-info 4:0:0 +libnutclient_la_SOURCES = nutclient.h nutclient.cpp +libnutclient_la_LDFLAGS = -version-info 0:0:0 all: all-am .SUFFIXES: @@ -643,13 +551,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu clients/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu clients/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -660,6 +569,47 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES) + $(AM_V_CXXLD)$(libnutclient_la_LINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS) + +libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES) + $(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -808,50 +758,6 @@ clean-sbinPROGRAMS: echo " rm -f" $$list; \ rm -f $$list -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - -libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES) - $(AM_V_CXXLD)$(libnutclient_la_LINK) $(am_libnutclient_la_rpath) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS) - -libnutclientstub.la: $(libnutclientstub_la_OBJECTS) $(libnutclientstub_la_DEPENDENCIES) $(EXTRA_libnutclientstub_la_DEPENDENCIES) - $(AM_V_CXXLD)$(libnutclientstub_la_LINK) $(am_libnutclientstub_la_rpath) $(libnutclientstub_la_OBJECTS) $(libnutclientstub_la_LIBADD) $(LIBS) - -libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES) - $(AM_V_CCLD)$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS) - upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES) $(EXTRA_upsc_DEPENDENCIES) @rm -f upsc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS) @@ -929,25 +835,18 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgilib.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclient.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclientmem.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsc.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsclient.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upscmd.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsimage.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upslog.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsmon.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsrw.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upssched.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsset.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.Po@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgilib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclient.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsclient.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upscmd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsimage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upslog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsmon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsrw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upssched.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsset.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsstats.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -1076,10 +975,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1111,11 +1007,11 @@ distdir-am: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1148,7 +1044,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \ @@ -1156,19 +1051,7 @@ clean-am: clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \ mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/cgilib.Po - -rm -f ./$(DEPDIR)/nutclient.Plo - -rm -f ./$(DEPDIR)/nutclientmem.Plo - -rm -f ./$(DEPDIR)/upsc.Po - -rm -f ./$(DEPDIR)/upsclient.Plo - -rm -f ./$(DEPDIR)/upscmd.Po - -rm -f ./$(DEPDIR)/upsimage.Po - -rm -f ./$(DEPDIR)/upslog.Po - -rm -f ./$(DEPDIR)/upsmon.Po - -rm -f ./$(DEPDIR)/upsrw.Po - -rm -f ./$(DEPDIR)/upssched.Po - -rm -f ./$(DEPDIR)/upsset.Po - -rm -f ./$(DEPDIR)/upsstats.Po + -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1216,19 +1099,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/cgilib.Po - -rm -f ./$(DEPDIR)/nutclient.Plo - -rm -f ./$(DEPDIR)/nutclientmem.Plo - -rm -f ./$(DEPDIR)/upsc.Po - -rm -f ./$(DEPDIR)/upsclient.Plo - -rm -f ./$(DEPDIR)/upscmd.Po - -rm -f ./$(DEPDIR)/upsimage.Po - -rm -f ./$(DEPDIR)/upslog.Po - -rm -f ./$(DEPDIR)/upsmon.Po - -rm -f ./$(DEPDIR)/upsrw.Po - -rm -f ./$(DEPDIR)/upssched.Po - -rm -f ./$(DEPDIR)/upsset.Po - -rm -f ./$(DEPDIR)/upsstats.Po + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1251,7 +1122,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-cgiexecPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool clean-sbinPROGRAMS \ cscopelist-am ctags ctags-am distclean distclean-compile \ @@ -1271,21 +1142,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-cgiexecPROGRAMS \ uninstall-dist_binSCRIPTS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-sbinPROGRAMS -.PRECIOUS: Makefile - - -# Make sure out-of-dir dependencies exist (especially when dev-building parts): -$(top_builddir)/common/libcommon.la \ -$(top_builddir)/common/libcommonclient.la \ -$(top_builddir)/common/libparseconf.la: dummy - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) - -dummy: - -# NOTE: Do not clean ".deps" in SUBDIRS of the main project, -# the root Makefile.am takes care of that! -#clean-local: -# rm -rf $(builddir)/.deps # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/clients/cgilib.c b/clients/cgilib.c index 88cebfa..2eb9ce8 100644 --- a/clients/cgilib.c +++ b/clients/cgilib.c @@ -46,12 +46,9 @@ static char *unescape(char *buf) hex[1] = buf[++i]; hex[2] = '\0'; if (!isxdigit((unsigned char) hex[0]) - || !isxdigit((unsigned char) hex[1])) + || !isxdigit((unsigned char) hex[0])) fatalx(EXIT_FAILURE, "bad escape char"); - long l = strtol(hex, NULL, 16); - assert(l>=0); - assert(l<=255); - ch = (char)l; /* FIXME: Loophole about non-ASCII symbols in top 128 values, or negatives for signed char... */ + ch = strtol(hex, NULL, 16); if ((ch == 10) || (ch == 13)) ch = ' '; @@ -92,7 +89,7 @@ void extractcgiargs(void) continue; } - + *eq = '\0'; value = eq + 1; amp = strchr(value, '&'); @@ -104,7 +101,7 @@ void extractcgiargs(void) ptr = NULL; cleanvar = unescape(varname); - cleanval = unescape(value); + cleanval = unescape(value); parsearg(cleanvar, cleanval); free(cleanvar); free(cleanval); @@ -202,4 +199,4 @@ int checkhost(const char *host, char **desc) pconf_finish(&ctx); return 0; /* not found: access denied */ -} +} diff --git a/clients/cgilib.h b/clients/cgilib.h index 32b6001..1b620c3 100644 --- a/clients/cgilib.h +++ b/clients/cgilib.h @@ -17,9 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NUT_CGILIB_H_SEEN -#define NUT_CGILIB_H_SEEN 1 - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { @@ -44,4 +41,3 @@ int checkhost(const char *host, char **desc); /* *INDENT-ON* */ #endif -#endif /* NUT_CGILIB_H_SEEN */ diff --git a/clients/nutclient.cpp b/clients/nutclient.cpp index 6dfbe3a..8304473 100644 --- a/clients/nutclient.cpp +++ b/clients/nutclient.cpp @@ -28,7 +28,7 @@ /* Windows/Linux Socket compatibility layer: */ /* Thanks to Benjamin Roux (http://broux.developpez.com/articles/c/sockets/) */ #ifdef WIN32 -# include +# include #else # include # include @@ -39,7 +39,7 @@ # include # define INVALID_SOCKET -1 # define SOCKET_ERROR -1 -# define closesocket(s) close(s) +# define closesocket(s) close(s) typedef int SOCKET; typedef struct sockaddr_in SOCKADDR_IN; typedef struct sockaddr SOCKADDR; @@ -60,23 +60,6 @@ static inline void *xrealloc(void *ptr, size_t size){return realloc(ptr, size);} static inline char *xstrdup(const char *string){return strdup(string);} #endif /* HAVE_NUTCOMMON */ -/* To stay in line with modern C++, we use nullptr (not numeric NULL - * or shim __null on some systems) which was defined after C++98. - * The NUT C++ interface is intended for C++11 and newer, so we - * quiesce these warnigns if possible. - * An idea might be to detect if we do build with old C++ standard versions - * and define a nullptr like https://stackoverflow.com/a/44517878/4715872 - * but again - currently we do not intend to support that officially. - */ -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_PEDANTIC -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT -#pragma GCC diagnostic ignored "-Wc++98-compat" -#endif namespace nut { @@ -98,23 +81,6 @@ std::string SystemException::err() } } -/* Implemented out-of-line to avoid "Weak vtables" warnings and related overheads - * But now with clang-9 C++11 linter (though not C++17) they complain with - * error: definition of implicit copy constructor for 'NutException' - * is deprecated because it has a user-declared destructor - * This is fixed in header with declarations like: - * NutException(const NutException&) = default; - * and assignment operator to accompany the copy constructor, per - * https://lgtm.com/rules/2165180572/ like: - * NutException& operator=(NutException& rhs) = default; - */ -NutException::~NutException() {} -SystemException::~SystemException() {} -IOException::~IOException() {} -UnknownHostException::~UnknownHostException() {} -NotConnectedException::~NotConnectedException() {} -TimeoutException::~TimeoutException() {} - namespace internal { @@ -122,27 +88,26 @@ namespace internal /** * Internal socket wrapper. * Provides only client socket functions. - * + * * Implemented as separate internal class to easily hide plateform specificities. */ class Socket { public: Socket(); - ~Socket(); - void connect(const std::string& host, uint16_t port); + void connect(const std::string& host, int port)throw(nut::IOException); void disconnect(); bool isConnected()const; - void setTimeout(time_t timeout); + void setTimeout(long timeout); bool hasTimeout()const{return _tv.tv_sec>=0;} - size_t read(void* buf, size_t sz); - size_t write(const void* buf, size_t sz); + size_t read(void* buf, size_t sz)throw(nut::IOException); + size_t write(const void* buf, size_t sz)throw(nut::IOException); - std::string read(); - void write(const std::string& str); + std::string read()throw(nut::IOException); + void write(const std::string& str)throw(nut::IOException); private: @@ -159,17 +124,12 @@ _tv() _tv.tv_usec = 0; } -Socket::~Socket() -{ - disconnect(); -} - -void Socket::setTimeout(time_t timeout) +void Socket::setTimeout(long timeout) { _tv.tv_sec = timeout; } -void Socket::connect(const std::string& host, uint16_t port) +void Socket::connect(const std::string& host, int port)throw(nut::IOException) { int sock_fd; struct addrinfo hints, *res, *ai; @@ -186,7 +146,7 @@ void Socket::connect(const std::string& host, uint16_t port) throw nut::UnknownHostException(); } - snprintf(sport, sizeof(sport), "%ju", static_cast(port)); + snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port); memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_UNSPEC; @@ -209,7 +169,7 @@ void Socket::connect(const std::string& host, uint16_t port) } } - for (ai = res; ai != nullptr; ai = ai->ai_next) { + for (ai = res; ai != NULL; ai = ai->ai_next) { sock_fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); @@ -218,7 +178,7 @@ void Socket::connect(const std::string& host, uint16_t port) { case EAFNOSUPPORT: case EINVAL: - break; + break; default: throw nut::SystemException(); } @@ -236,11 +196,11 @@ void Socket::connect(const std::string& host, uint16_t port) if(errno == EINPROGRESS) { FD_ZERO(&wfds); FD_SET(sock_fd, &wfds); - select(sock_fd+1, nullptr, &wfds, nullptr, hasTimeout() ? &_tv : nullptr); + select(sock_fd+1,NULL,&wfds,NULL, hasTimeout()?&_tv:NULL); if (FD_ISSET(sock_fd, &wfds)) { error_size = sizeof(error); - getsockopt(sock_fd, SOL_SOCKET, SO_ERROR, - &error, &error_size); + getsockopt(sock_fd,SOL_SOCKET,SO_ERROR, + &error,&error_size); if( error == 0) { /* connect successful */ v = 0; @@ -296,10 +256,10 @@ void Socket::connect(const std::string& host, uint16_t port) #ifdef OLD - struct hostent *hostinfo = nullptr; + struct hostent *hostinfo = NULL; SOCKADDR_IN sin = { 0 }; hostinfo = ::gethostbyname(host.c_str()); - if(hostinfo == nullptr) /* Host doesnt exist */ + if(hostinfo == NULL) /* Host doesnt exist */ { throw nut::UnknownHostException(); } @@ -338,7 +298,7 @@ bool Socket::isConnected()const return _sock!=INVALID_SOCKET; } -size_t Socket::read(void* buf, size_t sz) +size_t Socket::read(void* buf, size_t sz)throw(nut::IOException) { if(!isConnected()) { @@ -350,7 +310,7 @@ size_t Socket::read(void* buf, size_t sz) fd_set fds; FD_ZERO(&fds); FD_SET(_sock, &fds); - int ret = select(_sock+1, &fds, nullptr, nullptr, &_tv); + int ret = select(_sock+1, &fds, NULL, NULL, &_tv); if (ret < 1) { throw nut::TimeoutException(); } @@ -362,10 +322,10 @@ size_t Socket::read(void* buf, size_t sz) disconnect(); throw nut::IOException("Error while reading on socket"); } - return static_cast(res); + return (size_t) res; } -size_t Socket::write(const void* buf, size_t sz) +size_t Socket::write(const void* buf, size_t sz)throw(nut::IOException) { if(!isConnected()) { @@ -377,7 +337,7 @@ size_t Socket::write(const void* buf, size_t sz) fd_set fds; FD_ZERO(&fds); FD_SET(_sock, &fds); - int ret = select(_sock+1, nullptr, &fds, nullptr, &_tv); + int ret = select(_sock+1, NULL, &fds, NULL, &_tv); if (ret < 1) { throw nut::TimeoutException(); } @@ -389,10 +349,10 @@ size_t Socket::write(const void* buf, size_t sz) disconnect(); throw nut::IOException("Error while writing on socket"); } - return static_cast(res); + return (size_t) res; } -std::string Socket::read() +std::string Socket::read()throw(nut::IOException) { std::string res; char buff[256]; @@ -423,7 +383,7 @@ std::string Socket::read() } } -void Socket::write(const std::string& str) +void Socket::write(const std::string& str)throw(nut::IOException) { // write(str.c_str(), str.size()); // write("\n", 1); @@ -440,24 +400,6 @@ void Socket::write(const std::string& str) * */ -/* Pedantic builds complain about the static variable below... - * It is assumed safe to ignore since it is a std::string with - * no complex teardown at program exit. - */ -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS) -#pragma GCC diagnostic push -# ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS -# pragma GCC diagnostic ignored "-Wglobal-constructors" -# endif -# ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS -# pragma GCC diagnostic ignored "-Wexit-time-destructors" -# endif -#endif -const Feature Client::TRACKING = "TRACKING"; -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS || defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS) -#pragma GCC diagnostic pop -#endif - Client::Client() { } @@ -466,84 +408,59 @@ Client::~Client() { } -bool Client::hasDevice(const std::string& dev) +bool Client::hasDevice(const std::string& dev)throw(NutException) { std::set devs = getDeviceNames(); return devs.find(dev) != devs.end(); } -Device Client::getDevice(const std::string& name) +Device Client::getDevice(const std::string& name)throw(NutException) { if(hasDevice(name)) return Device(this, name); else - return Device(nullptr, ""); + return Device(NULL, ""); } -std::set Client::getDevices() +std::set Client::getDevices()throw(NutException) { std::set res; std::set devs = getDeviceNames(); for(std::set::iterator it=devs.begin(); it!=devs.end(); ++it) { - res.insert(Device(this, *it)); + res.insert(Device(this, *it)); } return res; } -bool Client::hasDeviceVariable(const std::string& dev, const std::string& name) +bool Client::hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException) { std::set names = getDeviceVariableNames(dev); return names.find(name) != names.end(); } -std::map > Client::getDeviceVariableValues(const std::string& dev) +std::map > Client::getDeviceVariableValues(const std::string& dev)throw(NutException) { - std::map > res; + std::map > res; - std::set names = getDeviceVariableNames(dev); - for(std::set::iterator it=names.begin(); it!=names.end(); ++it) - { - const std::string& name = *it; - res[name] = getDeviceVariableValue(dev, name); - } + std::set names = getDeviceVariableNames(dev); + for(std::set::iterator it=names.begin(); it!=names.end(); ++it) + { + const std::string& name = *it; + res[name] = getDeviceVariableValue(dev, name); + } - return res; + return res; } -std::map > > Client::getDevicesVariableValues(const std::set& devs) +bool Client::hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException) { - std::map > > res; - - for(std::set::const_iterator it=devs.cbegin(); it!=devs.cend(); ++it) - { - res[*it] = getDeviceVariableValues(*it); - } - - return res; + std::set names = getDeviceCommandNames(dev); + return names.find(name) != names.end(); } -bool Client::hasDeviceCommand(const std::string& dev, const std::string& name) -{ - std::set names = getDeviceCommandNames(dev); - return names.find(name) != names.end(); -} - -bool Client::hasFeature(const Feature& feature) -{ - try - { - // If feature is known, querying it won't throw an exception. - isFeatureEnabled(feature); - return true; - } - catch(...) - { - return false; - } -} /* * @@ -555,15 +472,13 @@ TcpClient::TcpClient(): Client(), _host("localhost"), _port(3493), -_timeout(0), _socket(new internal::Socket) { // Do not connect now } -TcpClient::TcpClient(const std::string& host, uint16_t port): +TcpClient::TcpClient(const std::string& host, int port)throw(IOException): Client(), -_timeout(0), _socket(new internal::Socket) { connect(host, port); @@ -574,14 +489,14 @@ TcpClient::~TcpClient() delete _socket; } -void TcpClient::connect(const std::string& host, uint16_t port) +void TcpClient::connect(const std::string& host, int port)throw(IOException) { _host = host; _port = port; connect(); } -void TcpClient::connect() +void TcpClient::connect()throw(nut::IOException) { _socket->connect(_host, _port); } @@ -591,7 +506,7 @@ std::string TcpClient::getHost()const return _host; } -uint16_t TcpClient::getPort()const +int TcpClient::getPort()const { return _port; } @@ -606,29 +521,30 @@ void TcpClient::disconnect() _socket->disconnect(); } -void TcpClient::setTimeout(time_t timeout) +void TcpClient::setTimeout(long timeout) { _timeout = timeout; } -time_t TcpClient::getTimeout()const +long TcpClient::getTimeout()const { return _timeout; } void TcpClient::authenticate(const std::string& user, const std::string& passwd) + throw(NutException) { detectError(sendQuery("USERNAME " + user)); detectError(sendQuery("PASSWORD " + passwd)); } -void TcpClient::logout() +void TcpClient::logout()throw(NutException) { detectError(sendQuery("LOGOUT")); _socket->disconnect(); } -Device TcpClient::getDevice(const std::string& name) +Device TcpClient::getDevice(const std::string& name)throw(NutException) { try { @@ -637,14 +553,14 @@ Device TcpClient::getDevice(const std::string& name) catch(NutException& ex) { if(ex.str()=="UNKNOWN-UPS") - return Device(nullptr, ""); + return Device(NULL, ""); else throw; } return Device(this, name); } -std::set TcpClient::getDeviceNames() +std::set TcpClient::getDeviceNames()throw(NutException) { std::set res; @@ -660,15 +576,15 @@ std::set TcpClient::getDeviceNames() return res; } -std::string TcpClient::getDeviceDescription(const std::string& name) +std::string TcpClient::getDeviceDescription(const std::string& name)throw(NutException) { - return get("UPSDESC", name)[0]; + return get("UPSDESC", name)[0]; } -std::set TcpClient::getDeviceVariableNames(const std::string& dev) +std::set TcpClient::getDeviceVariableNames(const std::string& dev)throw(NutException) { std::set set; - + std::vector > res = list("VAR", dev); for(size_t n=0; n TcpClient::getDeviceVariableNames(const std::string& dev) return set; } -std::set TcpClient::getDeviceRWVariableNames(const std::string& dev) +std::set TcpClient::getDeviceRWVariableNames(const std::string& dev)throw(NutException) { std::set set; - + std::vector > res = list("RW", dev); for(size_t n=0; n TcpClient::getDeviceRWVariableNames(const std::string& dev return set; } -std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name) +std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException) { return get("DESC", dev + " " + name)[0]; } -std::vector TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name) +std::vector TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException) { return get("VAR", dev + " " + name); } -std::map > TcpClient::getDeviceVariableValues(const std::string& dev) +std::map > TcpClient::getDeviceVariableValues(const std::string& dev)throw(NutException) { std::map > map; - + std::vector > res = list("VAR", dev); for(size_t n=0; n > TcpClient::getDeviceVariableValu return map; } -std::map > > TcpClient::getDevicesVariableValues(const std::set& devs) -{ - std::map > > map; - - if (devs.empty()) - { - // This request might come from processing the empty valid - // response of an upsd server which was allowed to start - // with no device sections in its ups.conf - return map; - } - - std::vector queries; - for (std::set::const_iterator it=devs.cbegin(); it!=devs.cend(); ++it) - { - queries.push_back("LIST VAR " + *it); - } - sendAsyncQueries(queries); - - for (std::set::const_iterator it=devs.cbegin(); it!=devs.cend(); ++it) - { - try - { - std::map > map2; - std::vector > res = parseList("VAR " + *it); - for (std::vector >::iterator it2=res.begin(); it2!=res.end(); ++it2) - { - std::vector& vals = *it2; - std::string var = vals[0]; - vals.erase(vals.begin()); - map2[var] = vals; - } - map[*it] = map2; - } - catch (NutException&) - { - // We sent a bunch of queries, we need to process them all to clear up the backlog. - } - } - - if (map.empty()) - { - // We may fail on some devices, but not on ALL devices. - throw NutException("Invalid device"); - } - - return map; -} - -TrackingID TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) +void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException) { std::string query = "SET VAR " + dev + " " + name + " " + escape(value); - return sendTrackingQuery(query); + detectError(sendQuery(query)); } -TrackingID TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values) +void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException) { std::string query = "SET VAR " + dev + " " + name; for(size_t n=0; n TcpClient::getDeviceCommandNames(const std::string& dev) +std::set TcpClient::getDeviceCommandNames(const std::string& dev)throw(NutException) { std::set cmds; @@ -796,122 +663,40 @@ std::set TcpClient::getDeviceCommandNames(const std::string& dev) return cmds; } -std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name) +std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException) { return get("CMDDESC", dev + " " + name)[0]; } -TrackingID TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param) +void TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException) { - return sendTrackingQuery("INSTCMD " + dev + " " + name + " " + param); + detectError(sendQuery("INSTCMD " + dev + " " + name)); } -void TcpClient::deviceLogin(const std::string& dev) +void TcpClient::deviceLogin(const std::string& dev)throw(NutException) { detectError(sendQuery("LOGIN " + dev)); } -/* NOTE: "master" is deprecated since NUT v2.8.0 in favor of "primary". - * For the sake of old/new server/client interoperability, - * practical implementations should try to use one and fall - * back to the other, and only fail if both return "ERR". - */ -void TcpClient::deviceMaster(const std::string& dev) +void TcpClient::deviceMaster(const std::string& dev)throw(NutException) { - try { - detectError(sendQuery("MASTER " + dev)); - } catch (NutException &exOrig) { - try { - detectError(sendQuery("PRIMARY " + dev)); - } catch (NutException &exRetry) { - NUT_UNUSED_VARIABLE(exRetry); - throw exOrig; - } - } + detectError(sendQuery("MASTER " + dev)); } -void TcpClient::devicePrimary(const std::string& dev) -{ - try { - detectError(sendQuery("PRIMARY " + dev)); - } catch (NutException &exOrig) { - try { - detectError(sendQuery("MASTER " + dev)); - } catch (NutException &exRetry) { - NUT_UNUSED_VARIABLE(exRetry); - throw exOrig; - } - } -} - -void TcpClient::deviceForcedShutdown(const std::string& dev) +void TcpClient::deviceForcedShutdown(const std::string& dev)throw(NutException) { detectError(sendQuery("FSD " + dev)); } -int TcpClient::deviceGetNumLogins(const std::string& dev) +int TcpClient::deviceGetNumLogins(const std::string& dev)throw(NutException) { std::string num = get("NUMLOGINS", dev)[0]; return atoi(num.c_str()); } -TrackingResult TcpClient::getTrackingResult(const TrackingID& id) -{ - if (id.empty()) - { - return TrackingResult::SUCCESS; - } - - std::string result = sendQuery("GET TRACKING " + id); - - if (result == "PENDING") - { - return TrackingResult::PENDING; - } - else if (result == "SUCCESS") - { - return TrackingResult::SUCCESS; - } - else if (result == "ERR UNKNOWN") - { - return TrackingResult::UNKNOWN; - } - else if (result == "ERR INVALID-ARGUMENT") - { - return TrackingResult::INVALID_ARGUMENT; - } - else - { - return TrackingResult::FAILURE; - } -} - -bool TcpClient::isFeatureEnabled(const Feature& feature) -{ - std::string result = sendQuery("GET " + feature); - detectError(result); - - if (result == "ON") - { - return true; - } - else if (result == "OFF") - { - return false; - } - else - { - throw NutException("Unknown feature result " + result); - } -} -void TcpClient::setFeature(const Feature& feature, bool status) -{ - std::string result = sendQuery("SET " + feature + " " + (status ? "ON" : "OFF")); - detectError(result); -} std::vector TcpClient::get - (const std::string& subcmd, const std::string& params) + (const std::string& subcmd, const std::string& params) throw(NutException) { std::string req = subcmd; if(!params.empty()) @@ -924,28 +709,19 @@ std::vector TcpClient::get { throw NutException("Invalid response"); } - + return explode(res, req.size()); } std::vector > TcpClient::list - (const std::string& subcmd, const std::string& params) + (const std::string& subcmd, const std::string& params) throw(NutException) { std::string req = subcmd; if(!params.empty()) { req += " " + params; } - std::vector query; - query.push_back("LIST " + req); - sendAsyncQueries(query); - return parseList(req); -} - -std::vector > TcpClient::parseList - (const std::string& req) -{ - std::string res = _socket->read(); + std::string res = sendQuery("LIST " + req); detectError(res); if(res != ("BEGIN LIST " + req)) { @@ -972,21 +748,13 @@ std::vector > TcpClient::parseList } } -std::string TcpClient::sendQuery(const std::string& req) +std::string TcpClient::sendQuery(const std::string& req)throw(IOException) { _socket->write(req); return _socket->read(); } -void TcpClient::sendAsyncQueries(const std::vector& req) -{ - for (std::vector::const_iterator it = req.cbegin(); it != req.cend(); ++it) - { - _socket->write(*it); - } -} - -void TcpClient::detectError(const std::string& req) +void TcpClient::detectError(const std::string& req)throw(NutException) { if(req.substr(0,3)=="ERR") { @@ -1053,7 +821,7 @@ std::vector TcpClient::explode(const std::string& str, size_t begin else { temp += c; - } + } break; case QUOTED_STRING: if(c=='\\') @@ -1108,7 +876,7 @@ std::vector TcpClient::explode(const std::string& str, size_t begin std::string TcpClient::escape(const std::string& str) { std::string res = "\""; - + for(size_t n=0; n res = explode(reply); - - if (res.size() == 1 && res[0] == "OK") - { - return TrackingID(""); - } - else if (res.size() == 3 && res[0] == "OK" && res[1] == "TRACKING") - { - return TrackingID(res[2]); - } - else - { - throw NutException("Unknown query result"); - } + return res; } /* @@ -1162,17 +910,6 @@ _name(dev._name) { } -Device& Device::operator=(const Device& dev) -{ - // Self assignment? - if (this==&dev) - return *this; - - _client = dev._client; - _name = dev._name; - return *this; -} - Device::~Device() { } @@ -1194,12 +931,12 @@ Client* Device::getClient() bool Device::isOk()const { - return _client!=nullptr && !_name.empty(); + return _client!=NULL && !_name.empty(); } Device::operator bool()const { - return isOk(); + return isOk(); } bool Device::operator!()const @@ -1214,97 +951,89 @@ bool Device::operator==(const Device& dev)const bool Device::operator<(const Device& dev)const { - return getName()getDeviceDescription(getName()); } std::vector Device::getVariableValue(const std::string& name) + throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); return getClient()->getDeviceVariableValue(getName(), name); } std::map > Device::getVariableValues() + throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); return getClient()->getDeviceVariableValues(getName()); } -std::set Device::getVariableNames() +std::set Device::getVariableNames()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - return getClient()->getDeviceVariableNames(getName()); + return getClient()->getDeviceVariableNames(getName()); } -std::set Device::getRWVariableNames() +std::set Device::getRWVariableNames()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - return getClient()->getDeviceRWVariableNames(getName()); + return getClient()->getDeviceRWVariableNames(getName()); } -void Device::setVariable(const std::string& name, const std::string& value) +void Device::setVariable(const std::string& name, const std::string& value)throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - getClient()->setDeviceVariable(getName(), name, value); + getClient()->setDeviceVariable(getName(), name, value); } void Device::setVariable(const std::string& name, const std::vector& values) + throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - getClient()->setDeviceVariable(getName(), name, values); + getClient()->setDeviceVariable(getName(), name, values); } -Variable Device::getVariable(const std::string& name) +Variable Device::getVariable(const std::string& name)throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - if(getClient()->hasDeviceVariable(getName(), name)) - return Variable(this, name); - else - return Variable(nullptr, ""); + if(getClient()->hasDeviceVariable(getName(), name)) + return Variable(this, name); + else + return Variable(NULL, ""); } -std::set Device::getVariables() +std::set Device::getVariables()throw(NutException) { std::set set; - if (!isOk()) throw NutException("Invalid device"); - std::set names = getClient()->getDeviceVariableNames(getName()); - for(std::set::iterator it=names.begin(); it!=names.end(); ++it) - { + std::set names = getClient()->getDeviceVariableNames(getName()); + for(std::set::iterator it=names.begin(); it!=names.end(); ++it) + { set.insert(Variable(this, *it)); - } + } return set; } -std::set Device::getRWVariables() +std::set Device::getRWVariables()throw(NutException) { std::set set; - if (!isOk()) throw NutException("Invalid device"); - std::set names = getClient()->getDeviceRWVariableNames(getName()); - for(std::set::iterator it=names.begin(); it!=names.end(); ++it) - { + std::set names = getClient()->getDeviceRWVariableNames(getName()); + for(std::set::iterator it=names.begin(); it!=names.end(); ++it) + { set.insert(Variable(this, *it)); - } + } return set; } -std::set Device::getCommandNames() +std::set Device::getCommandNames()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - return getClient()->getDeviceCommandNames(getName()); + return getClient()->getDeviceCommandNames(getName()); } -std::set Device::getCommands() +std::set Device::getCommands()throw(NutException) { std::set cmds; @@ -1317,49 +1046,36 @@ std::set Device::getCommands() return cmds; } -Command Device::getCommand(const std::string& name) +Command Device::getCommand(const std::string& name)throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - if(getClient()->hasDeviceCommand(getName(), name)) - return Command(this, name); - else - return Command(nullptr, ""); + if(getClient()->hasDeviceCommand(getName(), name)) + return Command(this, name); + else + return Command(NULL, ""); } -TrackingID Device::executeCommand(const std::string& name, const std::string& param) +void Device::executeCommand(const std::string& name)throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - return getClient()->executeDeviceCommand(getName(), name, param); + getClient()->executeDeviceCommand(getName(), name); } -void Device::login() +void Device::login()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - getClient()->deviceLogin(getName()); + getClient()->deviceLogin(getName()); } -/* Note: "master" is deprecated, but supported - * for mixing old/new client/server combos: */ -void Device::master() +void Device::master()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - getClient()->deviceMaster(getName()); + getClient()->deviceMaster(getName()); } -void Device::primary() -{ - if (!isOk()) throw NutException("Invalid device"); - getClient()->devicePrimary(getName()); -} - -void Device::forcedShutdown() +void Device::forcedShutdown()throw(NutException) { } -int Device::getNumLogins() +int Device::getNumLogins()throw(NutException) { - if (!isOk()) throw NutException("Invalid device"); - return getClient()->deviceGetNumLogins(getName()); + return getClient()->deviceGetNumLogins(getName()); } /* @@ -1380,17 +1096,6 @@ _name(var._name) { } -Variable& Variable::operator=(const Variable& var) -{ - // Self assignment? - if (this==&var) - return *this; - - _device = var._device; - _name = var._name; - return *this; -} - Variable::~Variable() { } @@ -1412,7 +1117,7 @@ Device* Variable::getDevice() bool Variable::isOk()const { - return _device!=nullptr && !_name.empty(); + return _device!=NULL && !_name.empty(); } @@ -1436,22 +1141,22 @@ bool Variable::operator<(const Variable& var)const return getName() Variable::getValue() +std::vector Variable::getValue()throw(NutException) { - return getDevice()->getClient()->getDeviceVariableValue(getDevice()->getName(), getName()); + return getDevice()->getClient()->getDeviceVariableValue(getDevice()->getName(), getName()); } -std::string Variable::getDescription() +std::string Variable::getDescription()throw(NutException) { - return getDevice()->getClient()->getDeviceVariableDescription(getDevice()->getName(), getName()); + return getDevice()->getClient()->getDeviceVariableDescription(getDevice()->getName(), getName()); } -void Variable::setValue(const std::string& value) +void Variable::setValue(const std::string& value)throw(NutException) { getDevice()->setVariable(getName(), value); } -void Variable::setValues(const std::vector& values) +void Variable::setValues(const std::vector& values)throw(NutException) { getDevice()->setVariable(getName(), values); } @@ -1475,17 +1180,6 @@ _name(cmd._name) { } -Command& Command::operator=(const Command& cmd) -{ - // Self assignment? - if (this==&cmd) - return *this; - - _device = cmd._device; - _name = cmd._name; - return *this; -} - Command::~Command() { } @@ -1507,7 +1201,8 @@ Device* Command::getDevice() bool Command::isOk()const { - return _device!=nullptr && !_name.empty(); + return _device!=NULL && !_name.empty(); + } Command::operator bool()const @@ -1530,14 +1225,14 @@ bool Command::operator<(const Command& cmd)const return getName()getClient()->getDeviceCommandDescription(getDevice()->getName(), getName()); } -void Command::execute(const std::string& param) +void Command::execute()throw(NutException) { - getDevice()->executeCommand(getName(), param); + getDevice()->executeCommand(getName()); } } /* namespace nut */ @@ -1549,22 +1244,17 @@ void Command::execute(const std::string& param) extern "C" { -strarr strarr_alloc(size_t count) +strarr strarr_alloc(unsigned short count) { - strarr arr = static_cast(xcalloc(count+1, sizeof(char*))); - - if (arr == nullptr) { - throw nut::NutException("Out of memory"); - } - - arr[count] = nullptr; + strarr arr = (strarr)xcalloc(count+1, sizeof(char*)); + arr[count] = NULL; return arr; } void strarr_free(strarr arr) { char** pstr = arr; - while(*pstr!=nullptr) + while(*pstr!=NULL) { free(*pstr); ++pstr; @@ -1572,53 +1262,52 @@ void strarr_free(strarr arr) free(arr); } -strarr stringset_to_strarr(const std::set& strset) + +static strarr stringset_to_strarr(const std::set& strset) { strarr arr = strarr_alloc(strset.size()); strarr pstr = arr; for(std::set::const_iterator it=strset.begin(); it!=strset.end(); ++it) { *pstr = xstrdup(it->c_str()); - pstr++; } - return arr; + return arr; } -strarr stringvector_to_strarr(const std::vector& strset) +static strarr stringvector_to_strarr(const std::vector& strset) { strarr arr = strarr_alloc(strset.size()); strarr pstr = arr; for(std::vector::const_iterator it=strset.begin(); it!=strset.end(); ++it) { *pstr = xstrdup(it->c_str()); - pstr++; } - return arr; + return arr; } -NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, uint16_t port) + +NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port) { nut::TcpClient* client = new nut::TcpClient; try { client->connect(host, port); - return static_cast(client); + return (NUTCLIENT_TCP_t)client; } catch(nut::NutException& ex) { // TODO really catch it - NUT_UNUSED_VARIABLE(ex); delete client; - return nullptr; + return NULL; } - + } void nutclient_destroy(NUTCLIENT_t client) { if(client) { - delete static_cast(client); + delete (nut::Client*)client; } } @@ -1626,7 +1315,7 @@ int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client) { if(client) { - nut::TcpClient* cl = dynamic_cast(static_cast(client)); + nut::TcpClient* cl = dynamic_cast((nut::Client*)client); if(cl) { return cl->isConnected() ? 1 : 0; @@ -1639,7 +1328,7 @@ void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client) { if(client) { - nut::TcpClient* cl = dynamic_cast(static_cast(client)); + nut::TcpClient* cl = dynamic_cast((nut::Client*)client); if(cl) { cl->disconnect(); @@ -1647,11 +1336,12 @@ void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client) } } + int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client) { if(client) { - nut::TcpClient* cl = dynamic_cast(static_cast(client)); + nut::TcpClient* cl = dynamic_cast((nut::Client*)client); if(cl) { try @@ -1665,11 +1355,11 @@ int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client) return -1; } -void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout) +void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout) { if(client) { - nut::TcpClient* cl = dynamic_cast(static_cast(client)); + nut::TcpClient* cl = dynamic_cast((nut::Client*)client); if(cl) { cl->setTimeout(timeout); @@ -1677,11 +1367,11 @@ void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout) } } -time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client) +long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client) { if(client) { - nut::TcpClient* cl = dynamic_cast(static_cast(client)); + nut::TcpClient* cl = dynamic_cast((nut::Client*)client); if(cl) { return cl->getTimeout(); @@ -1690,11 +1380,12 @@ time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client) return -1; } + void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1710,7 +1401,7 @@ void nutclient_logout(NUTCLIENT_t client) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1726,7 +1417,7 @@ void nutclient_device_login(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1742,7 +1433,7 @@ int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1755,13 +1446,12 @@ int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev) return -1; } -/* Note: "master" is deprecated, but supported - * for mixing old/new client/server combos: */ + void nutclient_device_master(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1773,27 +1463,11 @@ void nutclient_device_master(NUTCLIENT_t client, const char* dev) } } -void nutclient_device_primary(NUTCLIENT_t client, const char* dev) -{ - if(client) - { - nut::Client* cl = static_cast(client); - if(cl) - { - try - { - cl->devicePrimary(dev); - } - catch(...){} - } - } -} - void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1809,7 +1483,7 @@ strarr nutclient_get_devices(NUTCLIENT_t client) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1819,14 +1493,14 @@ strarr nutclient_get_devices(NUTCLIENT_t client) catch(...){} } } - return nullptr; + return NULL; } int nutclient_has_device(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1843,7 +1517,7 @@ char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1853,14 +1527,14 @@ char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev) catch(...){} } } - return nullptr; + return NULL; } strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1870,14 +1544,14 @@ strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev) catch(...){} } } - return nullptr; + return NULL; } strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1887,14 +1561,14 @@ strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev) catch(...){} } } - return nullptr; + return NULL; } int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1911,7 +1585,7 @@ char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1921,14 +1595,14 @@ char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* catch(...){} } } - return nullptr; + return NULL; } strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1938,14 +1612,14 @@ strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, catch(...){} } } - return nullptr; + return NULL; } void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1961,13 +1635,13 @@ void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, c { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try { std::vector vals; - strarr pstr = static_cast(values); + strarr pstr = (strarr)values; while(*pstr) { vals.push_back(std::string(*pstr)); @@ -1981,11 +1655,13 @@ void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, c } } + + strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -1995,14 +1671,15 @@ strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev) catch(...){} } } - return nullptr; + return NULL; } + int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -2015,11 +1692,12 @@ int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char return 0; } + char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try @@ -2029,27 +1707,25 @@ char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* d catch(...){} } } - return nullptr; + return NULL; } -void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd, const char* param) +void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd) { if(client) { - nut::Client* cl = static_cast(client); + nut::Client* cl = (nut::Client*)client; if(cl) { try { - cl->executeDeviceCommand(dev, cmd, param); + cl->executeDeviceCommand(dev, cmd); } catch(...){} } } } -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT -#pragma GCC diagnostic pop -#endif - } /* extern "C" */ + + diff --git a/clients/nutclient.h b/clients/nutclient.h index e1020f2..ed2ea44 100644 --- a/clients/nutclient.h +++ b/clients/nutclient.h @@ -28,13 +28,6 @@ #include #include #include -#include -#include - -/* See include/common.h for details behind this */ -#ifndef NUT_UNUSED_VARIABLE -#define NUT_UNUSED_VARIABLE(x) (void)(x) -#endif namespace nut { @@ -58,11 +51,9 @@ class NutException : public std::exception { public: NutException(const std::string& msg):_msg(msg){} - NutException(const NutException&) = default; - NutException& operator=(NutException& rhs) = default; - virtual ~NutException() override; - virtual const char * what() const noexcept override {return this->_msg.c_str();} - virtual std::string str() const noexcept {return this->_msg;} + virtual ~NutException() throw() {} + virtual const char * what() const throw() {return this->_msg.c_str();} + virtual std::string str() const throw() {return this->_msg;} private: std::string _msg; }; @@ -74,9 +65,7 @@ class SystemException : public NutException { public: SystemException(); - SystemException(const SystemException&) = default; - SystemException& operator=(SystemException& rhs) = default; - virtual ~SystemException() override; + virtual ~SystemException() throw() {} private: static std::string err(); }; @@ -89,9 +78,7 @@ class IOException : public NutException { public: IOException(const std::string& msg):NutException(msg){} - IOException(const IOException&) = default; - IOException& operator=(IOException& rhs) = default; - virtual ~IOException() override; + virtual ~IOException() throw() {} }; /** @@ -101,9 +88,7 @@ class UnknownHostException : public IOException { public: UnknownHostException():IOException("Unknown host"){} - UnknownHostException(const UnknownHostException&) = default; - UnknownHostException& operator=(UnknownHostException& rhs) = default; - virtual ~UnknownHostException() override; + virtual ~UnknownHostException() throw() {} }; /** @@ -113,9 +98,7 @@ class NotConnectedException : public IOException { public: NotConnectedException():IOException("Not connected"){} - NotConnectedException(const NotConnectedException&) = default; - NotConnectedException& operator=(NotConnectedException& rhs) = default; - virtual ~NotConnectedException() override; + virtual ~NotConnectedException() throw() {} }; /** @@ -125,30 +108,9 @@ class TimeoutException : public IOException { public: TimeoutException():IOException("Timeout"){} - TimeoutException(const TimeoutException&) = default; - TimeoutException& operator=(TimeoutException& rhs) = default; - virtual ~TimeoutException() override; + virtual ~TimeoutException() throw() {} }; -/** - * Cookie given when performing async action, used to redeem result at a later date. - */ -typedef std::string TrackingID; - -/** - * Result of an async action. - */ -typedef enum -{ - UNKNOWN, - PENDING, - SUCCESS, - INVALID_ARGUMENT, - FAILURE, -} TrackingResult; - -typedef std::string Feature; - /** * A nut client is the starting point to dialog to NUTD. * It can connect to an NUTD then retrieve its device list. @@ -160,7 +122,7 @@ class Client friend class Variable; friend class Command; public: - virtual ~Client(); + ~Client(); /** * Intend to authenticate to a NUTD server. @@ -170,13 +132,13 @@ public: * \todo Is his method is global to all connection protocol or is it specific to TCP ? * \note Actually, authentication fails only if already set, not if bad values are sent. */ - virtual void authenticate(const std::string& user, const std::string& passwd) = 0; + virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0; /** * Disconnect from the NUTD server. * \todo Is his method is global to all connection protocol or is it specific to TCP ? */ - virtual void logout() = 0; + virtual void logout()throw(NutException)=0; /** * Device manipulations. @@ -189,29 +151,29 @@ public: * \param name Name of the device. * \return The device. */ - virtual Device getDevice(const std::string& name); + virtual Device getDevice(const std::string& name)throw(NutException); /** * Retrieve the list of all devices supported by UPSD server. * \return The set of supported devices. */ - virtual std::set getDevices(); + virtual std::set getDevices()throw(NutException); /** * Test if a device is supported by the NUTD server. * \param dev Device name. * \return true if supported, false otherwise. */ - virtual bool hasDevice(const std::string& dev); + virtual bool hasDevice(const std::string& dev)throw(NutException); /** * Retrieve names of devices supported by NUTD server. * \return The set of names of supported devices. */ - virtual std::set getDeviceNames() = 0; + virtual std::set getDeviceNames()throw(NutException)=0; /** * Retrieve the description of a device. * \param name Device name. * \return Device description. */ - virtual std::string getDeviceDescription(const std::string& name) = 0; + virtual std::string getDeviceDescription(const std::string& name)throw(NutException)=0; /** \} */ /** @@ -224,60 +186,54 @@ public: * \param dev Device name * \return Variable names */ - virtual std::set getDeviceVariableNames(const std::string& dev) = 0; + virtual std::set getDeviceVariableNames(const std::string& dev)throw(NutException)=0; /** * Retrieve names of read/write variables supported by a device. * \param dev Device name * \return RW variable names */ - virtual std::set getDeviceRWVariableNames(const std::string& dev) = 0; + virtual std::set getDeviceRWVariableNames(const std::string& dev)throw(NutException)=0; /** * Test if a variable is supported by a device. * \param dev Device name * \param name Variable name * \return true if the variable is supported. */ - virtual bool hasDeviceVariable(const std::string& dev, const std::string& name); + virtual bool hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException); /** * Retrieve the description of a variable. * \param dev Device name * \param name Variable name * \return Variable description if provided. */ - virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) = 0; + virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)=0; /** * Retrieve values of a variable. * \param dev Device name * \param name Variable name * \return Variable values (usually one) if available. */ - virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name) = 0; + virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)=0; /** * Retrieve values of all variables of a device. * \param dev Device name * \return Variable values indexed by variable names. */ - virtual std::map > getDeviceVariableValues(const std::string& dev); - /** - * Retrieve values of all variables of a set of devices. - * \param devs Device names - * \return Variable values indexed by variable names, indexed by device names. - */ - virtual std::map > > getDevicesVariableValues(const std::set& devs); + virtual std::map > getDeviceVariableValues(const std::string& dev)throw(NutException); /** * Intend to set the value of a variable. * \param dev Device name * \param name Variable name * \param value Variable value - */ - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) = 0; + */ + virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)=0; /** * Intend to set the value of a variable. * \param dev Device name * \param name Variable name - * \param values Vector of variable values - */ - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values) = 0; + * \param value Variable value + */ + virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException)=0; /** \} */ /** @@ -290,28 +246,27 @@ public: * \param dev Device name * \return Command names */ - virtual std::set getDeviceCommandNames(const std::string& dev) = 0; + virtual std::set getDeviceCommandNames(const std::string& dev)throw(NutException)=0; /** * Test if a command is supported by a device. * \param dev Device name * \param name Command name * \return true if the command is supported. */ - virtual bool hasDeviceCommand(const std::string& dev, const std::string& name); + virtual bool hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException); /** * Retrieve the description of a command. * \param dev Device name * \param name Command name * \return Command description if provided. */ - virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) = 0; + virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)=0; /** * Intend to execute a command. * \param dev Device name * \param name Command name - * \param param Additional command parameter */ - virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") = 0; + virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)=0; /** \} */ /** @@ -322,33 +277,15 @@ public: * Log the current user (if authenticated) for a device. * \param dev Device name. */ - virtual void deviceLogin(const std::string& dev) = 0; + virtual void deviceLogin(const std::string& dev)throw(NutException)=0; /** - * Retrieve the number of user logged-in for the specified device. + * Retrieve the number of user longged in the specified device. * \param dev Device name. * \return Number of logged-in users. */ - virtual int deviceGetNumLogins(const std::string& dev) = 0; - /* NOTE: "master" is deprecated since NUT v2.8.0 in favor of "primary". - * For the sake of old/new server/client interoperability, - * practical implementations should try to use one and fall - * back to the other, and only fail if both return "ERR". - */ - virtual void deviceMaster(const std::string& dev) = 0; - virtual void devicePrimary(const std::string& dev) = 0; - virtual void deviceForcedShutdown(const std::string& dev) = 0; - - /** - * Retrieve the result of a tracking ID. - * \param id Tracking ID. - */ - virtual TrackingResult getTrackingResult(const TrackingID& id) = 0; - - virtual bool hasFeature(const Feature& feature); - virtual bool isFeatureEnabled(const Feature& feature) = 0; - virtual void setFeature(const Feature& feature, bool status) = 0; - - static const Feature TRACKING; + virtual int deviceGetNumLogins(const std::string& dev)throw(NutException)=0; + virtual void deviceMaster(const std::string& dev)throw(NutException)=0; + virtual void deviceForcedShutdown(const std::string& dev)throw(NutException)=0; protected: Client(); @@ -360,11 +297,6 @@ protected: */ class TcpClient : public Client { - /* We have a number of direct-call methods we do not expose - * generally, but still want covered with integration tests - */ - friend class NutActiveClientTest; - public: /** * Construct a nut TcpClient object. @@ -377,21 +309,21 @@ public: * \param host Server host name. * \param port Server port. */ - TcpClient(const std::string& host, uint16_t port = 3493); - ~TcpClient() override; + TcpClient(const std::string& host, int port = 3493)throw(nut::IOException); + ~TcpClient(); /** * Connect it to the specified server. * \param host Server host name. * \param port Server port. */ - void connect(const std::string& host, uint16_t port = 3493); + void connect(const std::string& host, int port = 3493)throw(nut::IOException); /** * Connect to the server. * Host name and ports must have already set (usefull for reconnection). */ - void connect(); + void connect()throw(nut::IOException); /** * Test if the connection is active. @@ -407,13 +339,13 @@ public: * Set the timeout in seconds. * \param timeout Timeout n seconds, negative to block operations. */ - void setTimeout(time_t timeout); + void setTimeout(long timeout); /** * Retrieve the timeout. * \returns Current timeout in seconds. */ - time_t getTimeout()const; + long getTimeout()const; /** * Retriueve the host name of the server the client is connected to. @@ -424,64 +356,53 @@ public: * Retriueve the port of host of the server the client is connected to. * \return Server port */ - uint16_t getPort()const; + int getPort()const; - virtual void authenticate(const std::string& user, const std::string& passwd) override; - virtual void logout() override; + virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException); + virtual void logout()throw(NutException); + + virtual Device getDevice(const std::string& name)throw(NutException); + virtual std::set getDeviceNames()throw(NutException); + virtual std::string getDeviceDescription(const std::string& name)throw(NutException); - virtual Device getDevice(const std::string& name) override; - virtual std::set getDeviceNames() override; - virtual std::string getDeviceDescription(const std::string& name) override; + virtual std::set getDeviceVariableNames(const std::string& dev)throw(NutException); + virtual std::set getDeviceRWVariableNames(const std::string& dev)throw(NutException); + virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException); + virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException); + virtual std::map > getDeviceVariableValues(const std::string& dev)throw(NutException); + virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException); + virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException); - virtual std::set getDeviceVariableNames(const std::string& dev) override; - virtual std::set getDeviceRWVariableNames(const std::string& dev) override; - virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) override; - virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name) override; - virtual std::map > getDeviceVariableValues(const std::string& dev) override; - virtual std::map > > getDevicesVariableValues(const std::set& devs) override; - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) override; - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values) override; + virtual std::set getDeviceCommandNames(const std::string& dev)throw(NutException); + virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException); + virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException); - virtual std::set getDeviceCommandNames(const std::string& dev) override; - virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) override; - virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") override; - - virtual void deviceLogin(const std::string& dev) override; - /* FIXME: Protocol update needed to handle master/primary alias - * and probably an API bump also, to rename/alias the routine. - */ - virtual void deviceMaster(const std::string& dev) override; - virtual void devicePrimary(const std::string& dev) override; - virtual void deviceForcedShutdown(const std::string& dev) override; - virtual int deviceGetNumLogins(const std::string& dev) override; - - virtual TrackingResult getTrackingResult(const TrackingID& id) override; - - virtual bool isFeatureEnabled(const Feature& feature) override; - virtual void setFeature(const Feature& feature, bool status) override; + virtual void deviceLogin(const std::string& dev)throw(NutException); + virtual void deviceMaster(const std::string& dev)throw(NutException); + virtual void deviceForcedShutdown(const std::string& dev)throw(NutException); + virtual int deviceGetNumLogins(const std::string& dev)throw(NutException); protected: - std::string sendQuery(const std::string& req); - void sendAsyncQueries(const std::vector& req); - static void detectError(const std::string& req); - TrackingID sendTrackingQuery(const std::string& req); + std::string sendQuery(const std::string& req)throw(nut::IOException); + static void detectError(const std::string& req)throw(nut::NutException); - std::vector get(const std::string& subcmd, const std::string& params = ""); + std::vector get(const std::string& subcmd, const std::string& params = "") + throw(nut::NutException); - std::vector > list(const std::string& subcmd, const std::string& params = ""); - - std::vector > parseList(const std::string& req); + std::vector > list(const std::string& subcmd, const std::string& params = "") + throw(nut::NutException); static std::vector explode(const std::string& str, size_t begin=0); static std::string escape(const std::string& str); private: std::string _host; - uint16_t _port; - time_t _timeout; + int _port; + long _timeout; internal::Socket* _socket; }; + /** * Device attached to a client. * Device is a lightweight class which can be copied easily. @@ -490,14 +411,9 @@ class Device { friend class Client; friend class TcpClient; - friend class TcpClientMock; -#ifdef _NUTCLIENTTEST_BUILD - friend class NutClientTest; -#endif public: ~Device(); Device(const Device& dev); - Device& operator=(const Device& dev); /** * Retrieve the name of the device. @@ -519,117 +435,112 @@ public: bool isOk()const; /** * Test if the device is valid (has a name and is attached to a client). - * @see Device::isOk() + * @see Device::isOk() */ operator bool()const; /** * Test if the device is not valid (has no name or is not attached to any client). - * @see Device::isOk() + * @see Device::isOk() */ bool operator!()const; /** * Test if the two devices are sames (same name ad same client attached to). */ bool operator==(const Device& dev)const; - /** - * Comparison operator. - */ - bool operator<(const Device& dev)const; + /** + * Comparison operator. + */ + bool operator<(const Device& dev)const; /** * Retrieve the description of the devce if specified. */ - std::string getDescription(); + std::string getDescription()throw(NutException); /** * Intend to retrieve the value of a variable of the device. * \param name Name of the variable to get. - * \return Value of the variable, if available. + * \return Value of the variable, if available. */ - std::vector getVariableValue(const std::string& name); + std::vector getVariableValue(const std::string& name)throw(NutException); /** * Intend to retrieve values of all variables of the devices. * \return Map of all variables values indexed by their names. */ - std::map > getVariableValues(); + std::map > getVariableValues()throw(NutException); /** * Retrieve all variables names supported by the device. * \return Set of available variable names. */ - std::set getVariableNames(); + std::set getVariableNames()throw(NutException); /** * Retrieve all Read/Write variables names supported by the device. * \return Set of available Read/Write variable names. */ - std::set getRWVariableNames(); + std::set getRWVariableNames()throw(NutException); /** * Intend to set the value of a variable of the device. * \param name Variable name. * \param value New variable value. */ - void setVariable(const std::string& name, const std::string& value); + void setVariable(const std::string& name, const std::string& value)throw(NutException); /** * Intend to set values of a variable of the device. * \param name Variable name. - * \param values Vector of new variable values. + * \param value New variable values. */ - void setVariable(const std::string& name, const std::vector& values); + void setVariable(const std::string& name, const std::vector& values)throw(NutException); /** * Retrieve a Variable object representing the specified variable. - * \param name Variable name. + * \param name Variable name. * \return Variable object. */ - Variable getVariable(const std::string& name); + Variable getVariable(const std::string& name)throw(NutException); /** * Retrieve Variable objects representing all variables available for the device. * \return Set of Variable objects. */ - std::set getVariables(); + std::set getVariables()throw(NutException); /** * Retrieve Variable objects representing all Read/Write variables available for the device. * \return Set of Variable objects. */ - std::set getRWVariables(); + std::set getRWVariables()throw(NutException); /** * Retrieve names of all commands supported by the device. * \return Set of available command names. */ - std::set getCommandNames(); + std::set getCommandNames()throw(NutException); /** * Retrieve objects for all commands supported by the device. * \return Set of available Command objects. */ - std::set getCommands(); + std::set getCommands()throw(NutException); /** * Retrieve an object representing a command of the device. * \param name Command name. * \return Command object. */ - Command getCommand(const std::string& name); + Command getCommand(const std::string& name)throw(NutException); /** * Intend to execute a command on the device. * \param name Command name. - * \param param Additional command parameter */ - TrackingID executeCommand(const std::string& name, const std::string& param=""); + void executeCommand(const std::string& name)throw(NutException); /** * Login current client's user for the device. */ - void login(); - /* FIXME: Protocol update needed to handle master/primary alias - * and probably an API bump also, to rename/alias the routine. - */ - void master(); - void primary(); - void forcedShutdown(); + void login()throw(NutException); + void master()throw(NutException); + void forcedShutdown()throw(NutException); /** * Retrieve the number of logged user for the device. * \return Number of users. */ - int getNumLogins(); + int getNumLogins()throw(NutException); protected: Device(Client* client, const std::string& name); @@ -647,15 +558,10 @@ class Variable { friend class Device; friend class TcpClient; - friend class TcpClientMock; -#ifdef _NUTCLIENTTEST_BUILD - friend class NutClientTest; -#endif public: ~Variable(); Variable(const Variable& var); - Variable& operator=(const Variable& var); /** * Retrieve variable name. @@ -697,23 +603,23 @@ public: * Intend to retrieve variable value. * \return Value of the variable. */ - std::vector getValue(); + std::vector getValue()throw(NutException); /** * Intend to retireve variable description. * \return Variable description if provided. */ - std::string getDescription(); + std::string getDescription()throw(NutException); /** * Intend to set a value to the variable. * \param value New variable value. */ - void setValue(const std::string& value); + void setValue(const std::string& value)throw(NutException); /** * Intend to set (multiple) values to the variable. - * \param values Vector of new variable values. + * \param value New variable values. */ - void setValues(const std::vector& values); + void setValues(const std::vector& values)throw(NutException); protected: Variable(Device* dev, const std::string& name); @@ -731,15 +637,10 @@ class Command { friend class Device; friend class TcpClient; - friend class TcpClientMock; -#ifdef _NUTCLIENTTEST_BUILD - friend class NutClientTest; -#endif public: ~Command(); Command(const Command& cmd); - Command& operator=(const Command& cmd); /** * Retrieve command name. @@ -782,13 +683,13 @@ public: * Intend to retireve command description. * \return Command description if provided. */ - std::string getDescription(); + std::string getDescription()throw(NutException); /** - * Intend to execute the instant command on device. - * \param param Optional additional command parameter + * Intend to retrieve command description. + * \return Command description if provided. */ - void execute(const std::string& param=""); + void execute()throw(NutException); protected: Command(Device* dev, const std::string& name); @@ -821,19 +722,13 @@ typedef char** strarr; /** * Alloc an array of string. */ -strarr strarr_alloc(size_t count); +strarr strarr_alloc(unsigned short count); /** * Free an array of string. */ void strarr_free(strarr arr); -/** - * Convert C++ types into an array of string. - */ -strarr stringvector_to_strarr(const std::vector& strset); -strarr stringset_to_strarr(const std::set& strset); - /** * Nut general client types and functions. @@ -843,7 +738,7 @@ strarr stringset_to_strarr(const std::set& strset); typedef void* NUTCLIENT_t; /** - * Destroy a client. + * Destroy a client. * \param client Nut client handle. */ void nutclient_destroy(NUTCLIENT_t client); @@ -881,11 +776,7 @@ int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev); * \param client Nut client handle. * \param dev Device name to test. */ -/* FIXME: Protocol update needed to handle master/primary alias - * and probably an API bump also, to rename/alias the routine. - */ void nutclient_device_master(NUTCLIENT_t client, const char* dev); -void nutclient_device_primary(NUTCLIENT_t client, const char* dev); /** * Set the FSD flag for the device. @@ -1010,7 +901,7 @@ char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* d * \param dev Device name. * \param cmd Command name. */ -void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd, const char* param=""); +void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd); /** \} */ @@ -1020,7 +911,7 @@ void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const * \{ */ /** - * Hidden structure representing a TCP connection to NUTD. + * Hidden structure representing a TCP connection to NUTD. * NUTCLIENT_TCP_t is back compatible to NUTCLIENT_t. */ typedef NUTCLIENT_t NUTCLIENT_TCP_t; @@ -1029,9 +920,9 @@ typedef NUTCLIENT_t NUTCLIENT_TCP_t; * Create a client to NUTD using a TCP connection. * \param host Host name to connect to. * \param port Host port. - * \return New client or nullptr if failed. + * \return New client or NULL if failed. */ -NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, uint16_t port); +NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port); /** * Test if a nut TCP client is connected. * \param client Nut TCP client handle. @@ -1054,12 +945,12 @@ int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client); * Set the timeout value for the TCP connection. * \param timeout Timeout in seconds, negative for blocking. */ -void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout); +void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout); /** * Retrieve the timeout value for the TCP connection. * \return Timeout value in seconds. */ -time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); +long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); /** \} */ diff --git a/clients/nutclientmem.cpp b/clients/nutclientmem.cpp deleted file mode 100644 index df97cb3..0000000 --- a/clients/nutclientmem.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* nutclientmem.cpp - nutclientmem C++ library implementation - - Copyright (C) 2021 Eric Clappier - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "nutclientmem.h" -#include - -namespace nut -{ - -/* - * - * Memory Client stub implementation - * - */ - -Device MemClientStub::getDevice(const std::string& name) -{ - NUT_UNUSED_VARIABLE(name); - throw NutException("Not implemented"); -} - -std::set MemClientStub::getDeviceNames() -{ - throw NutException("Not implemented"); -} - -std::string MemClientStub::getDeviceDescription(const std::string& name) -{ - NUT_UNUSED_VARIABLE(name); - throw NutException("Not implemented"); -} - -std::set MemClientStub::getDeviceVariableNames(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -std::set MemClientStub::getDeviceRWVariableNames(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -std::string MemClientStub::getDeviceVariableDescription(const std::string& dev, const std::string& name) -{ - NUT_UNUSED_VARIABLE(dev); - NUT_UNUSED_VARIABLE(name); - throw NutException("Not implemented"); -} - -ListValue MemClientStub::getDeviceVariableValue(const std::string& dev, const std::string& name) -{ - ListValue res; - auto it_dev = _values.find(dev); - if (it_dev != _values.end()) - { - auto map = it_dev->second; - auto it_map = map.find(name); - if (it_map != map.end()) - { - res = it_map->second; - } - } - return res; -} - -ListObject MemClientStub::getDeviceVariableValues(const std::string& dev) -{ - ListObject res; - auto it_dev = _values.find(dev); - if (it_dev != _values.end()) - { - res = it_dev->second; - } - return res; -} - -ListDevice MemClientStub::getDevicesVariableValues(const std::set& devs) -{ - ListDevice res; - for (auto itr = devs.begin(); itr != devs.end(); itr++) - { - std::string dev = *itr; - auto it_dev = _values.find(dev); - if (it_dev != _values.end()) - { - res.insert(std::pair(dev, it_dev->second)); - } - } - return res; -} - -TrackingID MemClientStub::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) -{ - auto it_dev = _values.find(dev); - if (it_dev == _values.end()) - { - ListObject list; - _values.emplace(dev, list); - it_dev = _values.find(dev); - } - if (it_dev != _values.end()) - { - auto map = &(it_dev->second); - auto it_map = map->find(name); - if (it_map != map->end()) - { - it_map->second[0] = value; - } - else - { - ListValue list_value; - list_value.push_back(value); - map->emplace(name, list_value); - } - } - return ""; -} - -TrackingID MemClientStub::setDeviceVariable(const std::string& dev, const std::string& name, const ListValue& values) -{ - auto it_dev = _values.find(dev); - if (it_dev != _values.end()) - { - auto map = &(it_dev->second); - auto it_map = map->find(name); - if (it_map != map->end()) - { - it_map->second = values; - } - else - { - map->emplace(name, values); - } - } - return ""; -} - -std::set MemClientStub::getDeviceCommandNames(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -std::string MemClientStub::getDeviceCommandDescription(const std::string& dev, const std::string& name) -{ - NUT_UNUSED_VARIABLE(dev); - NUT_UNUSED_VARIABLE(name); - throw NutException("Not implemented"); -} - -TrackingID MemClientStub::executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param) -{ - NUT_UNUSED_VARIABLE(dev); - NUT_UNUSED_VARIABLE(name); - NUT_UNUSED_VARIABLE(param); - throw NutException("Not implemented"); -} - -void MemClientStub::deviceLogin(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -/* Note: "master" is deprecated, but supported - * for mixing old/new client/server combos: */ -void MemClientStub::deviceMaster(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -void MemClientStub::devicePrimary(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -void MemClientStub::deviceForcedShutdown(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -int MemClientStub::deviceGetNumLogins(const std::string& dev) -{ - NUT_UNUSED_VARIABLE(dev); - throw NutException("Not implemented"); -} - -TrackingResult MemClientStub::getTrackingResult(const TrackingID& id) -{ - NUT_UNUSED_VARIABLE(id); - throw NutException("Not implemented"); - //return TrackingResult::SUCCESS; -} - -bool MemClientStub::isFeatureEnabled(const Feature& feature) -{ - NUT_UNUSED_VARIABLE(feature); - throw NutException("Not implemented"); -} - -void MemClientStub::setFeature(const Feature& feature, bool status) -{ - NUT_UNUSED_VARIABLE(feature); - NUT_UNUSED_VARIABLE(status); - throw NutException("Not implemented"); -} - -} /* namespace nut */ - -/** - * C nutclient API. - */ -extern "C" { - -NUTCLIENT_MEM_t nutclient_mem_create_client() -{ - nut::MemClientStub* client = new nut::MemClientStub; - try - { - return static_cast(client); - } - catch(nut::NutException& ex) - { - // TODO really catch it - NUT_UNUSED_VARIABLE(ex); - delete client; - return nullptr; - } -} - -} /* extern "C" */ diff --git a/clients/nutclientmem.h b/clients/nutclientmem.h deleted file mode 100644 index 3bd2243..0000000 --- a/clients/nutclientmem.h +++ /dev/null @@ -1,118 +0,0 @@ -/* nutclientmem.h - definitions for nutclientmem C/C++ library - - Copyright (C) 2021 Eric Clappier - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#ifndef NUTCLIENTMEM_HPP_SEEN -#define NUTCLIENTMEM_HPP_SEEN - -/* Begin of C++ nutclient library declaration */ -#ifdef __cplusplus - -#include "nutclient.h" - -namespace nut -{ - -typedef std::vector ListValue; -typedef std::map ListObject; -typedef std::map ListDevice; - -/** - * Memory client stub. - * Class to stub TCPClient for test (data store in local memory). - */ -class MemClientStub : public Client -{ -public: - /** - * Construct a nut MemClientStub object. - */ - MemClientStub() {} - ~MemClientStub() override {} - - virtual void authenticate(const std::string& user, const std::string& passwd) override { - NUT_UNUSED_VARIABLE(user); - NUT_UNUSED_VARIABLE(passwd); - } - virtual void logout() override {} - - virtual Device getDevice(const std::string& name) override; - virtual std::set getDeviceNames() override; - virtual std::string getDeviceDescription(const std::string& name) override; - - virtual std::set getDeviceVariableNames(const std::string& dev) override; - virtual std::set getDeviceRWVariableNames(const std::string& dev) override; - virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name) override; - virtual ListValue getDeviceVariableValue(const std::string& dev, const std::string& name) override; - virtual ListObject getDeviceVariableValues(const std::string& dev) override; - virtual ListDevice getDevicesVariableValues(const std::set& devs) override; - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) override; - virtual TrackingID setDeviceVariable(const std::string& dev, const std::string& name, const ListValue& values) override; - - virtual std::set getDeviceCommandNames(const std::string& dev) override; - virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name) override; - virtual TrackingID executeDeviceCommand(const std::string& dev, const std::string& name, const std::string& param="") override; - - virtual void deviceLogin(const std::string& dev) override; - /* Note: "master" is deprecated, but supported - * for mixing old/new client/server combos: */ - virtual void deviceMaster(const std::string& dev) override; - virtual void devicePrimary(const std::string& dev) override; - virtual void deviceForcedShutdown(const std::string& dev) override; - virtual int deviceGetNumLogins(const std::string& dev) override; - - virtual TrackingResult getTrackingResult(const TrackingID& id) override; - - virtual bool isFeatureEnabled(const Feature& feature) override; - virtual void setFeature(const Feature& feature, bool status) override; - -private: - ListDevice _values; -}; - -} /* namespace nut */ - -#endif /* __cplusplus */ -/* End of C++ nutclient library declaration */ - -/* Begin of C nutclient library declaration */ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Nut MEM client dedicated types and functions - */ -/** - * Hidden structure representing a MEM connection. - * NUTCLIENT_MEM_t is back compatible to NUTCLIENT_t. - */ -typedef NUTCLIENT_t NUTCLIENT_MEM_t; - -/** - * Create a client to NUTD using memory. - * \return New client or nullptr if failed. - */ -NUTCLIENT_MEM_t nutclient_mem_create_client(); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -/* End of C nutclient library declaration */ - -#endif /* NUTCLIENTMOCK_HPP_SEEN */ diff --git a/clients/status.h b/clients/status.h index c643351..c98c489 100644 --- a/clients/status.h +++ b/clients/status.h @@ -17,19 +17,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NUT_STATUS_H_SEEN -#define NUT_STATUS_H_SEEN 1 - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { /* *INDENT-ON* */ #endif -/* This is only used in upsstats.c, but might it also have external consumers?.. - * To move or not to move?.. - */ -static struct { +struct { char *name; char *desc; int severity; @@ -54,4 +48,3 @@ static struct { /* *INDENT-ON* */ #endif -#endif /* NUT_STATUS_H_SEEN */ diff --git a/clients/upsc.c b/clients/upsc.c index 550b74a..ae584d3 100644 --- a/clients/upsc.c +++ b/clients/upsc.c @@ -1,4 +1,4 @@ -/* upsc - simple "client" to test communications +/* upsc - simple "client" to test communications Copyright (C) 1999 Russell Kroll Copyright (C) 2012 Arnaud Quette @@ -25,7 +25,6 @@ #include #include -#include "nut_stdint.h" #include "upsclient.h" static char *upsname = NULL, *hostname = NULL; @@ -59,7 +58,7 @@ static void usage(const char *prog) static void printvar(const char *var) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -87,7 +86,7 @@ static void printvar(const char *var) } if (numa < numq) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least %zu)", numa, numq); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least %d)", numa, numq); } printf("%s\n", answer[3]); @@ -96,7 +95,7 @@ static void printvar(const char *var) static void list_vars(void) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -120,7 +119,7 @@ static void list_vars(void) /* VAR */ if (numa < 4) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } printf("%s: %s\n", answer[2], answer[3]); @@ -130,7 +129,7 @@ static void list_vars(void) static void list_upses(int verbose) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -138,7 +137,7 @@ static void list_upses(int verbose) numq = 1; ret = upscli_list_start(ups, numq, query); - + if (ret < 0) { /* check for an old upsd */ if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) { @@ -152,7 +151,7 @@ static void list_upses(int verbose) /* UPS */ if (numa < 3) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa); } if(verbose) { @@ -166,7 +165,7 @@ static void list_upses(int verbose) static void list_clients(const char *devname) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -189,7 +188,7 @@ static void list_clients(const char *devname) /* CLIENT
*/ if (numa < 3) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa); } printf("%s\n", answer[2]); @@ -209,8 +208,7 @@ static void clean_exit(void) int main(int argc, char **argv) { - int i; - uint16_t port; + int i, port; int varlist = 0, clientlist = 0, verbose = 0; const char *prog = xbasename(argv[0]); @@ -220,9 +218,7 @@ int main(int argc, char **argv) { case 'L': verbose = 1; - goto fallthrough_case_l; case 'l': - fallthrough_case_l: varlist = 1; break; case 'c': @@ -231,9 +227,6 @@ int main(int argc, char **argv) case 'V': fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_SUCCESS); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif case 'h': default: diff --git a/clients/upsclient.c b/clients/upsclient.c index 2787783..43c0e79 100644 --- a/clients/upsclient.c +++ b/clients/upsclient.c @@ -25,7 +25,7 @@ #ifdef HAVE_PTHREAD /* this include is needed on AIX to have errno stored in thread local storage */ #include -#endif +#endif #include #include @@ -38,14 +38,13 @@ #include #include -#include "common.h" -#include "nut_stdint.h" -#include "timehead.h" #include "upsclient.h" +#include "common.h" +#include "timehead.h" /* WA for Solaris/i386 bug: non-blocking connect sets errno to ENOENT */ -#if (defined NUT_PLATFORM_SOLARIS) - #define SOLARIS_i386_NBCONNECT_ENOENT(status) ( (!strcmp("i386", CPU_TYPE)) ? (ENOENT == (status)) : 0 ) +#if (defined NUT_PLATFORM_SOLARIS && CPU_TYPE == i386) + #define SOLARIS_i386_NBCONNECT_ENOENT(status) (ENOENT == (status)) #else #define SOLARIS_i386_NBCONNECT_ENOENT(status) (0) #endif /* end of Solaris/i386 WA for non-blocking connect */ @@ -76,7 +75,7 @@ #define shutdown_how 2 #endif -static struct { +struct { int flags; const char *str; } upscli_errlist[] = @@ -132,7 +131,7 @@ typedef struct HOST_CERT_s { const char *certname; int certverify; int forcessl; - + struct HOST_CERT_s *next; } HOST_CERT_t; static HOST_CERT_t* upscli_find_host_cert(const char* hostname); @@ -154,7 +153,7 @@ static char* nsscertpasswd = NULL; static void ssl_debug(void) { - unsigned long e; + int e; char errmsg[SMALLBUF]; while ((e = ERR_get_error()) != 0) { @@ -163,36 +162,32 @@ static void ssl_debug(void) } } -static int ssl_error(SSL *ssl, ssize_t ret) +static int ssl_error(SSL *ssl, int ret) { int e; - if (ret >= INT_MAX) { - upslogx(LOG_ERR, "ssl_error() ret=%zd would not fit in an int", ret); - return -1; - } - e = SSL_get_error(ssl, (int)ret); + e = SSL_get_error(ssl, ret); switch (e) { case SSL_ERROR_WANT_READ: - upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_WANT_READ", ret); + upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_READ", ret); break; case SSL_ERROR_WANT_WRITE: - upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_WANT_WRITE", ret); + upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_WRITE", ret); break; case SSL_ERROR_SYSCALL: if (ret == 0 && ERR_peek_error() == 0) { upslogx(LOG_ERR, "ssl_error() EOF from client"); } else { - upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR_SYSCALL", ret); + upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_SYSCALL", ret); } break; default: - upslogx(LOG_ERR, "ssl_error() ret=%zd SSL_ERROR %d", ret, e); + upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR %d", ret, e); ssl_debug(); } @@ -201,12 +196,9 @@ static int ssl_error(SSL *ssl, ssize_t ret) #elif defined(WITH_NSS) /* WITH_OPENSSL */ -static char *nss_password_callback(PK11SlotInfo *slot, PRBool retry, +static char *nss_password_callback(PK11SlotInfo *slot, PRBool retry, void *arg) { - NUT_UNUSED_VARIABLE(retry); - NUT_UNUSED_VARIABLE(arg); - upslogx(LOG_INFO, "Intend to retrieve password for %s / %s: password %sconfigured", PK11_GetSlotName(slot), PK11_GetTokenName(slot), nsscertpasswd?"":"not "); return nsscertpasswd ? PL_strdup(nsscertpasswd) : NULL; @@ -241,10 +233,6 @@ static SECStatus AuthCertificateDontVerify(CERTCertDBHandle *arg, PRFileDesc *fd PRBool checksig, PRBool isServer) { UPSCONN_t *ups = (UPSCONN_t *)SSL_RevealPinArg(fd); - NUT_UNUSED_VARIABLE(arg); - NUT_UNUSED_VARIABLE(checksig); - NUT_UNUSED_VARIABLE(isServer); - upslogx(LOG_INFO, "Do not intend to authenticate server %s", ups?ups->host:""); return SECSuccess; @@ -253,8 +241,6 @@ static SECStatus AuthCertificateDontVerify(CERTCertDBHandle *arg, PRFileDesc *fd static SECStatus BadCertHandler(UPSCONN_t *arg, PRFileDesc *fd) { HOST_CERT_t* cert; - NUT_UNUSED_VARIABLE(fd); - upslogx(LOG_WARNING, "Certificate validation failed for %s", (arg&&arg->host)?arg->host:""); /* BadCertHandler is called when the NSS certificate validation is failed. @@ -302,63 +288,49 @@ static SECStatus GetClientAuthData(UPSCONN_t *arg, PRFileDesc *fd, static void HandshakeCallback(PRFileDesc *fd, UPSCONN_t *client_data) { - NUT_UNUSED_VARIABLE(fd); - upslogx(LOG_INFO, "SSL handshake done successfully with server %s", client_data->host); } #endif /* WITH_OPENSSL | WITH_NSS */ -int upscli_init(int certverify, const char *certpath, +int upscli_init(int certverify, const char *certpath, const char *certname, const char *certpasswd) { #ifdef WITH_OPENSSL - long ret; - int ssl_mode = SSL_VERIFY_NONE; - NUT_UNUSED_VARIABLE(certname); - NUT_UNUSED_VARIABLE(certpasswd); + int ret, ssl_mode = SSL_VERIFY_NONE; +#if OPENSSL_VERSION_NUMBER >= 0x10000000L + const SSL_METHOD *ssl_method; +#else + SSL_METHOD *ssl_method; +#endif #elif defined(WITH_NSS) /* WITH_OPENSSL */ SECStatus status; -#else - NUT_UNUSED_VARIABLE(certverify); - NUT_UNUSED_VARIABLE(certpath); - NUT_UNUSED_VARIABLE(certname); - NUT_UNUSED_VARIABLE(certpasswd); #endif /* WITH_OPENSSL | WITH_NSS */ + if (upscli_initialized == 1) { upslogx(LOG_WARNING, "upscli already initialized"); return -1; } - + #ifdef WITH_OPENSSL - -#if OPENSSL_VERSION_NUMBER < 0x10100000L - SSL_load_error_strings(); + SSL_library_init(); + SSL_load_error_strings(); - ssl_ctx = SSL_CTX_new(SSLv23_client_method()); -#else - ssl_ctx = SSL_CTX_new(TLS_client_method()); -#endif + ssl_method = TLSv1_client_method(); + if (!ssl_method) { + return 0; + } + + ssl_ctx = SSL_CTX_new(ssl_method); if (!ssl_ctx) { upslogx(LOG_ERR, "Can not initialize SSL context"); return -1; } - -#if OPENSSL_VERSION_NUMBER < 0x10100000L - /* set minimum protocol TLSv1 */ - SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3); -#else - ret = SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION); - if (ret != 1) { - upslogx(LOG_ERR, "Can not set minimum protocol to TLSv1"); - return -1; - } -#endif - + if (!certpath) { if (certverify == 1) { upslogx(LOG_ERR, "Can not verify certificate if any is specified"); @@ -381,13 +353,13 @@ int upscli_init(int certverify, const char *certpath, return -1; } - SSL_CTX_set_verify(ssl_ctx, ssl_mode, NULL); + SSL_CTX_set_verify(ssl_ctx, ssl_mode, NULL); } #elif defined(WITH_NSS) /* WITH_OPENSSL */ PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0); - + PK11_SetPasswordFunc(nss_password_callback); - + if (certpath) { upslogx(LOG_INFO, "Init SSL with cerificate database located at %s", certpath); status = NSS_Init(certpath); @@ -400,16 +372,16 @@ int upscli_init(int certverify, const char *certpath, nss_error("upscli_init / NSS_[NoDB]_Init"); return -1; } - + status = NSS_SetDomesticPolicy(); if (status != SECSuccess) { upslogx(LOG_ERR, "Can not initialize SSL policy"); nss_error("upscli_init / NSS_SetDomesticPolicy"); return -1; } - + SSL_ClearSessionCache(); - + status = SSL_OptionSetDefault(SSL_ENABLE_SSL3, PR_TRUE); if (status != SECSuccess) { upslogx(LOG_ERR, "Can not enable SSLv3"); @@ -435,13 +407,8 @@ int upscli_init(int certverify, const char *certpath, nsscertpasswd = xstrdup(certpasswd); } verify_certificate = certverify; -#else - /* Note: historically we do not return with error here, - * just fall through to below and treat as initialized. - */ - upslogx(LOG_ERR, "upscli_init called but SSL wasn't compiled in"); #endif /* WITH_OPENSSL | WITH_NSS */ - + upscli_initialized = 1; return 1; } @@ -456,11 +423,6 @@ void upscli_add_host_cert(const char* hostname, const char* certname, int certve cert->certverify = certverify; cert->forcessl = forcessl; first_host_cert = cert; -#else - NUT_UNUSED_VARIABLE(hostname); - NUT_UNUSED_VARIABLE(certname); - NUT_UNUSED_VARIABLE(certverify); - NUT_UNUSED_VARIABLE(forcessl); #endif /* WITH_NSS */ } @@ -476,13 +438,11 @@ static HOST_CERT_t* upscli_find_host_cert(const char* hostname) cert = cert->next; } } -#else - NUT_UNUSED_VARIABLE(hostname); #endif /* WITH_NSS */ return NULL; } -int upscli_cleanup(void) +int upscli_cleanup() { #ifdef WITH_OPENSSL if (ssl_ctx) { @@ -492,7 +452,7 @@ int upscli_cleanup(void) #endif /* WITH_OPENSSL */ -#ifdef WITH_NSS +#ifdef WITH_NSS /* Called to force cache clearing to prevent NSS shutdown failures. * http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslfnc.html#1138601 */ @@ -505,7 +465,7 @@ int upscli_cleanup(void) */ PL_ArenaFinish(); #endif /* WITH_NSS */ - + upscli_initialized = 0; return 1; } @@ -517,16 +477,6 @@ const char *upscli_strerror(UPSCONN_t *ups) char sslbuf[UPSCLI_ERRBUF_LEN]; #endif -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - if (!ups) { return upscli_errlist[UPSCLI_ERR_INVALIDARG].str; } @@ -567,12 +517,12 @@ const char *upscli_strerror(UPSCONN_t *ups) if (PR_GetErrorTextLength() < UPSCLI_ERRBUF_LEN) { PR_GetErrorText(ups->errbuf); } else { - snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, + snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, "SSL error #%ld, message too long to be displayed", (long)PR_GetError()); } #else - snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, + snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, "SSL error, but SSL wasn't enabled at compile-time"); #endif /* WITH_OPENSSL | WITH_NSS */ return ups->errbuf; @@ -584,10 +534,6 @@ const char *upscli_strerror(UPSCONN_t *ups) return ups->errbuf; } -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif - /* fallthrough */ snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN, "Unknown error flag %d", @@ -599,9 +545,9 @@ const char *upscli_strerror(UPSCONN_t *ups) /* Read up to buflen bytes from fd and return the number of bytes read. If no data is available within d_sec + d_usec, return 0. On error, a value < 0 is returned (errno indicates error). */ -static ssize_t upscli_select_read(const int fd, void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec) +static int upscli_select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec) { - ssize_t ret; + int ret; fd_set fds; struct timeval tv; @@ -620,37 +566,17 @@ static ssize_t upscli_select_read(const int fd, void *buf, const size_t buflen, return read(fd, buf, buflen); } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif /* internal: abstract the SSL calls for the other functions */ -static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout) +static int net_read(UPSCONN_t *ups, char *buf, size_t buflen) { - ssize_t ret = -1; + int ret; #ifdef WITH_SSL if (ups->ssl) { #ifdef WITH_OPENSSL - /* SSL_* routines deal with int type for return and buflen - * We might need to window our I/O if we exceed 2GB (in - * 32-bit builds)... Not likely to exceed in 64-bit builds, - * but smaller systems with 16-bits might be endangered :) - */ - assert(buflen <= INT_MAX); - int iret = SSL_read(ups->ssl, buf, (int)buflen); - assert(iret <= SSIZE_MAX); - ret = (ssize_t)iret; + ret = SSL_read(ups->ssl, buf, buflen); #elif defined(WITH_NSS) /* WITH_OPENSSL */ - /* PR_* routines deal in PRInt32 type - * We might need to window our I/O if we exceed 2GB :) */ - assert(buflen <= PR_INT32_MAX); - ret = PR_Read(ups->ssl, buf, (PRInt32)buflen); + ret = PR_Read(ups->ssl, buf, buflen); #endif /* WITH_OPENSSL | WITH_NSS*/ if (ret < 1) { @@ -661,7 +587,7 @@ static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t t } #endif - ret = upscli_select_read(ups->fd, buf, buflen, timeout, 0); + ret = upscli_select_read(ups->fd, buf, buflen, 5, 0); /* error reading data, server disconnected? */ if (ret < 0) { @@ -676,16 +602,13 @@ static ssize_t net_read(UPSCONN_t *ups, char *buf, size_t buflen, const time_t t return ret; } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic pop -#endif /* Write up to buflen bytes to fd and return the number of bytes written. If no data is available within d_sec + d_usec, return 0. On error, a value < 0 is returned (errno indicates error). */ -static ssize_t upscli_select_write(const int fd, const void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec) +static int upscli_select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec) { - ssize_t ret; + int ret; fd_set fds; struct timeval tv; @@ -704,37 +627,17 @@ static ssize_t upscli_select_write(const int fd, const void *buf, const size_t b return write(fd, buf, buflen); } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif /* internal: abstract the SSL calls for the other functions */ -static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout) +static int net_write(UPSCONN_t *ups, const char *buf, size_t buflen) { - ssize_t ret = -1; + int ret; #ifdef WITH_SSL if (ups->ssl) { #ifdef WITH_OPENSSL - /* SSL_* routines deal with int type for return and buflen - * We might need to window our I/O if we exceed 2GB (in - * 32-bit builds)... Not likely to exceed in 64-bit builds, - * but smaller systems with 16-bits might be endangered :) - */ - assert(buflen <= INT_MAX); - int iret = SSL_write(ups->ssl, buf, (int)buflen); - assert(iret <= SSIZE_MAX); - ret = (ssize_t)iret; + ret = SSL_write(ups->ssl, buf, buflen); #elif defined(WITH_NSS) /* WITH_OPENSSL */ - /* PR_* routines deal in PRInt32 type - * We might need to window our I/O if we exceed 2GB :) */ - assert(buflen <= PR_INT32_MAX); - ret = PR_Write(ups->ssl, buf, (PRInt32)buflen); + ret = PR_Write(ups->ssl, buf, buflen); #endif /* WITH_OPENSSL | WITH_NSS */ if (ret < 1) { @@ -745,7 +648,7 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t } #endif - ret = upscli_select_write(ups->fd, buf, buflen, timeout, 0); + ret = upscli_select_write(ups->fd, buf, buflen, 0, 0); /* error writing data, server disconnected? */ if (ret < 0) { @@ -760,9 +663,6 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t return ret; } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic pop -#endif #ifdef WITH_SSL @@ -770,7 +670,7 @@ static ssize_t net_write(UPSCONN_t *ups, const char *buf, size_t buflen, const t /* * 1 : OK * -1 : ERROR - * 0 : SSL NOT SUPPORTED + * 0 : SSL NOT SUPPORTED */ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) { @@ -779,7 +679,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) #elif defined(WITH_NSS) /* WITH_OPENSSL */ SECStatus status; PRFileDesc *socket; - HOST_CERT_t *cert; + HOST_CERT_t *cert; #endif /* WITH_OPENSSL | WITH_NSS */ char buf[UPSCLI_NETBUF_LEN]; @@ -791,7 +691,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) "force initialisation without SSL configuration"); upscli_init(0, NULL, NULL, NULL); } - + /* see if upsd even talks SSL/TLS */ snprintf(buf, sizeof(buf), "STARTTLS\n"); @@ -808,7 +708,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) } /* upsd is happy, so let's crank up the client */ - + #ifdef WITH_OPENSSL if (!ssl_ctx) { @@ -837,7 +737,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) switch(res) { case 1: - upsdebugx(3, "SSL connected (%s)", SSL_get_version(ups->ssl)); + upsdebugx(3, "SSL connected"); break; case 0: upslog_with_errno(1, "SSL_connect do not accept handshake."); @@ -847,7 +747,7 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) upslog_with_errno(1, "Unknown return value from SSL_connect %d", res); ssl_error(ups->ssl, res); return -1; - } + } return 1; @@ -864,12 +764,12 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) nss_error("upscli_sslinit / SSL_ImportFD"); return -1; } - + if (SSL_SetPKCS11PinArg(ups->ssl, ups) == -1){ nss_error("upscli_sslinit / SSL_SetPKCS11PinArg"); return -1; } - + if (verifycert) { status = SSL_AuthCertificateHook(ups->ssl, (SSLAuthCertificate)AuthCertificate, CERT_GetDefaultCertDB()); @@ -881,19 +781,19 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) nss_error("upscli_sslinit / SSL_AuthCertificateHook"); return -1; } - + status = SSL_BadCertHook(ups->ssl, (SSLBadCertHandler)BadCertHandler, ups); if (status != SECSuccess) { nss_error("upscli_sslinit / SSL_BadCertHook"); return -1; } - + status = SSL_GetClientAuthDataHook(ups->ssl, (SSLGetClientAuthData)GetClientAuthData, ups); if (status != SECSuccess) { nss_error("upscli_sslinit / SSL_GetClientAuthDataHook"); return -1; } - + status = SSL_HandshakeCallback(ups->ssl, (SSLHandshakeCallback)HandshakeCallback, ups); if (status != SECSuccess) { nss_error("upscli_sslinit / SSL_HandshakeCallback"); @@ -930,9 +830,9 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) /* TODO : Close the connection. */ return -1; } - + return 1; - + #endif /* WITH_OPENSSL | WITH_NSS */ } @@ -940,15 +840,12 @@ static int upscli_sslinit(UPSCONN_t *ups, int verifycert) static int upscli_sslinit(UPSCONN_t *ups, int verifycert) { - NUT_UNUSED_VARIABLE(ups); - NUT_UNUSED_VARIABLE(verifycert); - return 0; /* not supported */ } #endif /* WITH_SSL */ -int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags, struct timeval * timeout) +int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,struct timeval * timeout) { int sock_fd; struct addrinfo hints, *res, *ai; @@ -974,7 +871,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags return -1; } - snprintf(sport, sizeof(sport), "%ju", (uintmax_t)port); + snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port); memset(&hints, 0, sizeof(hints)); @@ -1108,7 +1005,7 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags ups->port = port; hostcert = upscli_find_host_cert(host); - + if (hostcert != NULL) { /* An host security rule is specified. */ certverify = hostcert->certverify; @@ -1118,39 +1015,39 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags forcessl = (flags & UPSCLI_CONN_REQSSL) != 0 ? 1 : 0; } tryssl = (flags & UPSCLI_CONN_TRYSSL) != 0 ? 1 : 0; - + if (tryssl || forcessl) { ret = upscli_sslinit(ups, certverify); if (forcessl && ret != 1) { - upslogx(LOG_ERR, "Can not connect to NUT server %s in SSL, disconnect", host); + upslogx(LOG_ERR, "Can not connect to %s in SSL, disconnect", host); ups->upserror = UPSCLI_ERR_SSLFAIL; upscli_disconnect(ups); return -1; } else if (tryssl && ret == -1) { - upslogx(LOG_NOTICE, "Error while connecting to NUT server %s, disconnect", host); + upslogx(LOG_NOTICE, "Error while connecting to %s, disconnect", host); upscli_disconnect(ups); return -1; } else if (tryssl && ret == 0) { if (certverify != 0) { - upslogx(LOG_NOTICE, "Can not connect to NUT server %s in SSL and " + upslogx(LOG_NOTICE, "Can not connect to %s in SSL and " "certificate is needed, disconnect", host); upscli_disconnect(ups); return -1; } - upsdebugx(3, "Can not connect to NUT server %s in SSL, continue unencrypted", host); + upsdebugx(3, "Can not connect to %s in SSL, continue uncrypted", host); } else { - upslogx(LOG_INFO, "Connected to NUT server %s in SSL", host); + upslogx(LOG_INFO, "Connected to %s in SSL", host); if (certverify == 0) { /* you REALLY should set CERTVERIFY to 1 if using SSL... */ upslogx(LOG_WARNING, "Certificate verification is disabled"); } } } - + return 0; } -int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags) +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags) { return upscli_tryconnect(ups,host,port,flags,NULL); } @@ -1161,7 +1058,7 @@ static struct { const char *text; } upsd_errlist[] = { - { UPSCLI_ERR_VARNOTSUPP, "VAR-NOT-SUPPORTED" }, + { UPSCLI_ERR_VARNOTSUPP, "VAR-NOT-SUPPORTED" }, { UPSCLI_ERR_UNKNOWNUPS, "UNKNOWN-UPS" }, { UPSCLI_ERR_ACCESSDENIED, "ACCESS-DENIED" }, { UPSCLI_ERR_PWDREQUIRED, "PASSWORD-REQUIRED" }, @@ -1186,7 +1083,7 @@ static struct { { UPSCLI_ERR_INVPASSWORD, "INVALID-PASSWORD" }, { UPSCLI_ERR_USERREQUIRED, "USERNAME-REQUIRED" }, { UPSCLI_ERR_DRVNOTCONN, "DRIVER-NOT-CONNECTED" }, - + { 0, NULL, } }; @@ -1223,9 +1120,9 @@ static int upscli_errcheck(UPSCONN_t *ups, char *buf) } static void build_cmd(char *buf, size_t bufsize, const char *cmdname, - size_t numarg, const char **arg) + int numarg, const char **arg) { - size_t i; + int i; size_t len; char enc[UPSCLI_NETBUF_LEN]; const char *format; @@ -1245,20 +1142,8 @@ static void build_cmd(char *buf, size_t bufsize, const char *cmdname, /* snprintfcat would tie us to common */ len = strlen(buf); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - snprintf(buf + len, bufsize - len, format, + snprintf(buf + len, bufsize - len, format, pconf_encode(arg[i], enc, sizeof(enc))); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif } len = strlen(buf); @@ -1266,9 +1151,9 @@ static void build_cmd(char *buf, size_t bufsize, const char *cmdname, } /* make sure upsd is giving us what we asked for */ -static int verify_resp(size_t num, const char **q, char **a) +static int verify_resp(int num, const char **q, char **a) { - size_t i; + int i; for (i = 0; i < num; i++) { if (strcasecmp(q[i], a[i]) != 0) { @@ -1281,11 +1166,11 @@ static int verify_resp(size_t num, const char **q, char **a) return 1; /* OK */ } -int upscli_get(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) +int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) { char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN]; - + if (!ups) { return -1; } @@ -1334,7 +1219,7 @@ int upscli_get(UPSCONN_t *ups, size_t numq, const char **query, return 0; } -int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query) +int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) { char cmd[UPSCLI_NETBUF_LEN], tmp[UPSCLI_NETBUF_LEN]; @@ -1392,8 +1277,8 @@ int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query) return 0; } -int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) +int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) { char tmp[UPSCLI_NETBUF_LEN]; @@ -1441,9 +1326,9 @@ int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query, return 1; } -ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout) +int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen) { - ssize_t ret; + int ret; if (!ups) { return -1; @@ -1464,7 +1349,7 @@ ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, return -1; } - ret = net_write(ups, buf, buflen, timeout); + ret = net_write(ups, buf, buflen); if (ret < 1) { upscli_disconnect(ups); @@ -1474,14 +1359,9 @@ ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, return 0; } -ssize_t upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen) +int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen) { - return upscli_sendline_timeout(ups, buf, buflen, 0); -} - -ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout) -{ - ssize_t ret; + int ret; size_t recv; if (!ups) { @@ -1507,17 +1387,14 @@ ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const if (ups->readidx == ups->readlen) { - ret = net_read(ups, ups->readbuf, sizeof(ups->readbuf), timeout); + ret = net_read(ups, ups->readbuf, sizeof(ups->readbuf)); if (ret < 1) { upscli_disconnect(ups); return -1; } - /* Here ret is safe to cast since it is >=1 and certainly - * fits under SIZE_MAX being it signed sibling - */ - ups->readlen = (size_t)ret; + ups->readlen = ret; ups->readidx = 0; } @@ -1532,13 +1409,8 @@ ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const return 0; } -ssize_t upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen) -{ - return upscli_readline_timeout(ups, buf, buflen, DEFAULT_NETWORK_TIMEOUT); -} - /* split upsname[@hostname[:port]] into separate components */ -int upscli_splitname(const char *buf, char **upsname, char **hostname, uint16_t *port) +int upscli_splitname(const char *buf, char **upsname, char **hostname, int *port) { char *s, tmp[SMALLBUF], *last = NULL; @@ -1574,10 +1446,9 @@ int upscli_splitname(const char *buf, char **upsname, char **hostname, uint16_t } /* split hostname[:port] into separate components */ -int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port) +int upscli_splitaddr(const char *buf, char **hostname, int *port) { char *s, tmp[SMALLBUF], *last = NULL; - long l; /* paranoia */ if ((!buf) || (!hostname) || (!port)) { @@ -1620,13 +1491,10 @@ int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port) } } - /* Check that "long" port fits in an "uint16_t" so is in IP range - * (under 65536) */ - if ((*(++s) == '\0') || ((l = strtol(s, NULL, 10)) < 1 ) || (l > 65535)) { + if ((*(++s) == '\0') || ((*port = strtol(s, NULL, 10)) < 1 )) { fprintf(stderr, "upscli_splitaddr: no port specified after ':' separator\n"); return -1; } - *port = (uint16_t)l; return 0; } @@ -1650,7 +1518,7 @@ int upscli_disconnect(UPSCONN_t *ups) return 0; } - net_write(ups, "LOGOUT\n", 7, 0); + net_write(ups, "LOGOUT\n", 7); #ifdef WITH_OPENSSL if (ups->ssl) { diff --git a/clients/upsclient.h b/clients/upsclient.h index 08574b8..ac5fb5d 100644 --- a/clients/upsclient.h +++ b/clients/upsclient.h @@ -21,26 +21,13 @@ #define UPSCLIENT_H_SEEN #ifdef WITH_OPENSSL - #include - #include + #include + #include #elif defined(WITH_NSS) /* WITH_OPENSSL */ #include #include #endif /* WITH_OPENSSL | WITH_NSS */ -/* Not including nut_stdint.h because this is part of end-user API */ -#if defined HAVE_INTTYPES_H - #include -#endif - -#if defined HAVE_STDINT_H - #include -#endif - -#if defined HAVE_LIMITS_H - #include -#endif - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { @@ -54,7 +41,7 @@ extern "C" { typedef struct { char *host; - uint16_t port; + int port; int fd; int flags; int upserror; @@ -82,33 +69,31 @@ typedef struct { const char *upscli_strerror(UPSCONN_t *ups); int upscli_init(int certverify, const char *certpath, const char *certname, const char *certpasswd); -int upscli_cleanup(void); +int upscli_cleanup(); -int upscli_tryconnect(UPSCONN_t *ups, const char *host, uint16_t port, int flags, struct timeval *tv); -int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags); +int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags, struct timeval *tv); +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl); /* --- functions that only use the new names --- */ -int upscli_get(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer); +int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer); -int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query); +int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query); -int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer); +int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer); -ssize_t upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, const time_t timeout); -ssize_t upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); +int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); -ssize_t upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, const time_t timeout); -ssize_t upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); +int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); int upscli_splitname(const char *buf, char **upsname, char **hostname, - uint16_t *port); + int *port); -int upscli_splitaddr(const char *buf, char **hostname, uint16_t *port); +int upscli_splitaddr(const char *buf, char **hostname, int *port); int upscli_disconnect(UPSCONN_t *ups); @@ -118,7 +103,7 @@ int upscli_fd(UPSCONN_t *ups); int upscli_upserror(UPSCONN_t *ups); /* returns 1 if SSL mode is active for this connection */ -int upscli_ssl(UPSCONN_t *ups); +int upscli_ssl(UPSCONN_t *ups); /* upsclient error list */ diff --git a/clients/upscmd.c b/clients/upscmd.c index c057303..f4990a8 100644 --- a/clients/upscmd.c +++ b/clients/upscmd.c @@ -1,8 +1,6 @@ /* upscmd - simple "client" to test instant commands via upsd - Copyright (C) - 2000 Russell Kroll - 2019 EATON (author: Arnaud Quette ) + Copyright (C) 2000 Russell Kroll This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,13 +26,10 @@ #include #include -#include "nut_stdint.h" #include "upsclient.h" -static char *upsname = NULL, *hostname = NULL; +static char *upsname = NULL, *hostname = NULL; static UPSCONN_t *ups = NULL; -static int tracking_enabled = 0; -static unsigned int timeout = DEFAULT_TRACKING_TIMEOUT; struct list_t { char *name; @@ -46,16 +41,13 @@ static void usage(const char *prog) printf("Network UPS Tools upscmd %s\n\n", UPS_VERSION); printf("usage: %s [-h]\n", prog); printf(" %s [-l ]\n", prog); - printf(" %s [-u ] [-p ] [-w] [-t ] []\n\n", prog); + printf(" %s [-u ] [-p ] []\n\n", prog); printf("Administration program to initiate instant commands on UPS hardware.\n"); printf("\n"); printf(" -h display this help text\n"); printf(" -l show available commands on UPS \n"); printf(" -u set username for command authentication\n"); printf(" -p set password for command authentication\n"); - printf(" -w wait for the completion of command by the driver\n"); - printf(" and return its actual result from the device\n"); - printf(" -t set a timeout when using -w (in seconds, default: %u)\n", DEFAULT_TRACKING_TIMEOUT); printf("\n"); printf(" UPS identifier - [@[:]]\n"); printf(" Valid instant command - test.panel.start, etc.\n"); @@ -65,7 +57,7 @@ static void usage(const char *prog) static void print_cmd(char *cmdname) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -88,7 +80,7 @@ static void print_cmd(char *cmdname) static void listcmds(void) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; struct list_t *lhead = NULL, *llast = NULL, *ltmp, *lnext; @@ -113,7 +105,7 @@ static void listcmds(void) /* CMD */ if (numa < 3) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 3)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 3)", numa); } /* we must first read the entire list of commands, @@ -144,21 +136,9 @@ static void listcmds(void) } } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic push -#endif -#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif static void do_cmd(char **argv, const int argc) { - int cmd_complete = 0; char buf[SMALLBUF]; - char tracking_id[UUID4_LEN]; - time_t start, now; if (argc > 1) { snprintf(buf, sizeof(buf), "INSTCMD %s %s %s\n", upsname, argv[0], argv[1]); @@ -174,88 +154,13 @@ static void do_cmd(char **argv, const int argc) fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups)); } - /* verify answer */ + /* FUTURE: status cookies will tie in here */ if (strncmp(buf, "OK", 2) != 0) { fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); } - /* check for status tracking id */ - if ( - !tracking_enabled || - /* sanity check on the size: "OK TRACKING " + UUID4_LEN */ - strlen(buf) != (UUID4_LEN - 1 + strlen("OK TRACKING ")) - ) { - /* reply as usual */ - fprintf(stderr, "%s\n", buf); - return; - } - -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic ignored "-Wformat-truncation" -#endif - /* From the check above, we know that we have exactly UUID4_LEN chars - * (aka sizeof(tracking_id)) in the buf after "OK TRACKING " prefix, - * plus the null-byte. - */ - assert (UUID4_LEN == 1 + snprintf(tracking_id, sizeof(tracking_id), "%s", buf + strlen("OK TRACKING "))); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic pop -#endif - time(&start); - - /* send status tracking request, looping if status is PENDING */ - while (!cmd_complete) { - - /* check for timeout */ - time(&now); - if (difftime(now, start) >= timeout) - fatalx(EXIT_FAILURE, "Can't receive status tracking information: timeout"); - - snprintf(buf, sizeof(buf), "GET TRACKING %s\n", tracking_id); - - if (upscli_sendline(ups, buf, strlen(buf)) < 0) - fatalx(EXIT_FAILURE, "Can't send status tracking request: %s", upscli_strerror(ups)); - -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) ) -/* Note for gating macros above: unsuffixed HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP - * means support of contexts both inside and outside function body, so the push - * above and pop below (outside this finction) are not used. - */ -# pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS -/* Note that the individual warning pragmas for use inside function bodies - * are named without a _INSIDEFUNC suffix, for simplicity and legacy reasons - */ -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif - /* and get status tracking reply */ - assert(timeout < LONG_MAX); -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) ) -# pragma GCC diagnostic pop -#endif - - if (upscli_readline_timeout(ups, buf, sizeof(buf), (long)timeout) < 0) - fatalx(EXIT_FAILURE, "Can't receive status tracking information: %s", upscli_strerror(ups)); - - if (strncmp(buf, "PENDING", 7)) - cmd_complete = 1; - else - /* wait a second before retrying */ - sleep(1); - } - fprintf(stderr, "%s\n", buf); } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic pop -#endif static void clean_exit(void) { @@ -270,14 +175,12 @@ static void clean_exit(void) int main(int argc, char **argv) { - int i; - uint16_t port; - ssize_t ret; + int i, ret, port; int have_un = 0, have_pw = 0, cmdlist = 0; - char buf[SMALLBUF * 2], username[SMALLBUF], password[SMALLBUF]; + char buf[SMALLBUF], username[SMALLBUF], password[SMALLBUF]; const char *prog = xbasename(argv[0]); - while ((i = getopt(argc, argv, "+lhu:p:t:wV")) != -1) { + while ((i = getopt(argc, argv, "+lhu:p:V")) != -1) { switch (i) { @@ -295,20 +198,8 @@ int main(int argc, char **argv) have_pw = 1; break; - case 't': - if (!str_to_uint(optarg, &timeout, 10)) - fatal_with_errno(EXIT_FAILURE, "Could not convert the provided value for timeout ('-t' option) to unsigned int"); - break; - - case 'w': - tracking_enabled = 1; - break; - case 'V': fatalx(EXIT_SUCCESS, "Network UPS Tools upscmd %s", UPS_VERSION); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_SUCCESS); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif case 'h': default: @@ -422,25 +313,6 @@ int main(int argc, char **argv) fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups)); } - /* enable status tracking ID */ - if (tracking_enabled) { - - snprintf(buf, sizeof(buf), "SET TRACKING ON\n"); - - if (upscli_sendline(ups, buf, strlen(buf)) < 0) { - fatalx(EXIT_FAILURE, "Can't enable command status tracking: %s", upscli_strerror(ups)); - } - - if (upscli_readline(ups, buf, sizeof(buf)) < 0) { - fatalx(EXIT_FAILURE, "Enabling command status tracking failed: %s", upscli_strerror(ups)); - } - - /* Verify the result */ - if (strncmp(buf, "OK", 2) != 0) { - fatalx(EXIT_FAILURE, "Enabling command status tracking failed. upsd answered: %s", buf); - } - } - do_cmd(&argv[1], argc - 1); exit(EXIT_SUCCESS); diff --git a/clients/upsimage.c b/clients/upsimage.c index d49156c..3d6a51d 100644 --- a/clients/upsimage.c +++ b/clients/upsimage.c @@ -37,7 +37,6 @@ */ #include "common.h" -#include "nut_stdint.h" #include "upsclient.h" #include "cgilib.h" #include @@ -50,7 +49,7 @@ static char *monhost = NULL, *cmd = NULL; -static uint16_t port; +static int port; static char *upsname, *hostname; static UPSCONN_t ups; @@ -61,7 +60,7 @@ static UPSCONN_t ups; void parsearg(char *var, char *value) { - long long i, v; /* Be big enough to fit all expected inputs; truncate later */ + int i, v; /* avoid bogus junk from evil people */ if ((strlen(var) > MAX_CGI_STRLEN) || (strlen(value) > MAX_CGI_STRLEN)) @@ -83,20 +82,17 @@ void parsearg(char *var, char *value) for (i = 0; imgarg[i].name != NULL; i++) { if (!strcmp(imgarg[i].name, var)) { if (!strncmp(value, "0x", 2)) - v = (long long)strtoul(value + 2, (char **)NULL, 16); + v = strtoul(value + 2, (char **)NULL, 16); else - v = (long long)atoi(value); + v = atoi(value); /* avoid false numbers from bad people */ if (v < imgarg[i].min) imgarg[i].val = imgarg[i].min; else if (v > imgarg[i].max) imgarg[i].val = imgarg[i].max; - else { - assert (v < INT_MAX); - assert (v > INT_MIN); - imgarg[i].val = (int)v; - } + else + imgarg[i].val = v; return; } } @@ -115,9 +111,6 @@ static int get_imgarg(const char *name) } /* write the HTML header then have gd dump the image */ -static void drawimage(gdImagePtr im) - __attribute__((noreturn)); - static void drawimage(gdImagePtr im) { printf("Pragma: no-cache\n"); @@ -198,7 +191,7 @@ static void drawscale( if (level % step5 == 0) gdImageLine(im, 5, y, width - 5, y, col2); else - gdImageLine(im, 10, y, width - 10, y, col2); + gdImageLine(im, 10, y, width - 10, y, col2); } } @@ -207,25 +200,13 @@ static void drawscale( if (level % step10 == 0) { y = scale_height * (lvlhi - level) / range; snprintf(lbltxt, sizeof(lbltxt), "%d", level); - gdImageString(im, gdFontMediumBold, - width - (int)(strlen(lbltxt)) * gdFontMediumBold->w, - y, (unsigned char *) lbltxt, scale_num_color); + gdImageString(im, gdFontMediumBold, width - strlen(lbltxt)*gdFontMediumBold->w, y, + (unsigned char *) lbltxt, scale_num_color); } } } /* draws the bar style indicator */ -static void drawbar( - int lvllo, int lvlhi, /* min and max numbers on the scale */ - int step, int step5, int step10, /* steps for minor, submajor and major dashes */ - int redlo1, int redhi1, /* first red zone start and end */ - int redlo2, int redhi2, /* second red zone start and end */ - int grnlo, int grnhi, /* green zone start and end */ - double value, /* UPS variable value to draw */ - const char *format /* printf style format to be used when rendering summary text */ -) - __attribute__((noreturn)); - static void drawbar( int lvllo, int lvlhi, /* min and max numbers on the scale */ int step, int step5, int step10, /* steps for minor, submajor and major dashes */ @@ -259,7 +240,7 @@ static void drawbar( summary_color = color_alloc(im, get_imgarg("summary_col")); /* rescale UPS value to fit in the scale */ - bar_y = (int)((1.0 - (value - lvllo) / (lvlhi - lvllo)) * scale_height); + bar_y = (1 - (value - lvllo) / (lvlhi - lvllo)) * scale_height; /* sanity checks: */ @@ -276,21 +257,9 @@ static void drawbar( bar_color); /* stick the text version of the value at the bottom center */ -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif snprintf(text, sizeof(text), format, value); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif gdImageString(im, gdFontMediumBold, - (width - (int)(strlen(text))*gdFontMediumBold->w)/2, + (width - strlen(text)*gdFontMediumBold->w)/2, height - gdFontMediumBold->h, (unsigned char *) text, summary_color); @@ -300,9 +269,6 @@ static void drawbar( } /* draws the error image */ -static void noimage(const char *fmt, ...) - __attribute__((noreturn)); - static void noimage(const char *fmt, ...) { gdImagePtr im; @@ -312,19 +278,7 @@ static void noimage(const char *fmt, ...) va_list ap; va_start(ap, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vsnprintf(msg, sizeof(msg), fmt, ap); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(ap); width = get_imgarg("width"); @@ -339,23 +293,17 @@ static void noimage(const char *fmt, ...) if (width > height) gdImageString(im, gdFontMediumBold, - (width - (int)(strlen(msg))*gdFontMediumBold->w)/2, + (width - strlen(msg)*gdFontMediumBold->w)/2, (height - gdFontMediumBold->h)/2, (unsigned char *) msg, summary_color); else gdImageStringUp(im, gdFontMediumBold, (width - gdFontMediumBold->h)/2, - (height + (int)(strlen(msg))*gdFontMediumBold->w)/2, + (height + strlen(msg)*gdFontMediumBold->w)/2, (unsigned char *) msg, summary_color); drawimage(im); - /* NOTE: Earlier code called noimage() and then exit(EXIT_FAILURE); - * to signal an error via process exit code. Now that drawimage() - * always ends with exit(EXIT_SUCCESS) - which might make webserver - * feel good - the command-line use if any suffers no error returns. - */ - /* NOTREACHED */ } @@ -363,10 +311,6 @@ static void noimage(const char *fmt, ...) UPS variable can be determined. deviation < 0 means that values below nom should be grey instead of green */ -static void drawgeneralbar(double var, int min, int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - static void drawgeneralbar(double var, int min, int nom, int max, int deviation, const char *format) { @@ -426,10 +370,6 @@ static void drawgeneralbar(double var, int min, int nom, int max, } /* draws input and output voltage bar style indicators */ -static void draw_utility(double var, int min, int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - static void draw_utility(double var, int min, int nom, int max, int deviation, const char *format) { @@ -465,7 +405,7 @@ static void draw_utility(double var, int min, int nom, int max, /* Acceptable range of voltage is 85%-110% of nominal voltage * in EU at least. Be conservative and say +-10% */ - deviation = (int)(nom * 0.1); + deviation = nom*0.1; drawgeneralbar(var, min, nom, max, deviation, format); @@ -473,17 +413,9 @@ static void draw_utility(double var, int min, int nom, int max, } /* draws battery.percent bar style indicator */ -static void draw_battpct(double var, int min, int nom, - int max, int deviation, const char *format) - __attribute__((noreturn)); - -static void draw_battpct(double var, int min, int nom, - int max, int deviation, const char *format) +static void draw_battpct(double var, int min, int nom, int max, + int deviation, const char *format) { - NUT_UNUSED_VARIABLE(nom); - NUT_UNUSED_VARIABLE(max); - NUT_UNUSED_VARIABLE(deviation); - if (min < 0) { min = 50; } @@ -492,10 +424,6 @@ static void draw_battpct(double var, int min, int nom, } /* draws battery.voltage bar style indicator */ -static void draw_battvolt(double var, int min, int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - static void draw_battvolt(double var, int min, int nom, int max, int deviation, const char *format) { @@ -522,17 +450,18 @@ static void draw_battvolt(double var, int min, int nom, int max, } if(min == -1) { - min = (int)(nom/2*1.6+1); /* Assume a 2V cell is dead at 1.6V */ + min = nom/2*1.6+1; /* Assume a 2V cell is dead at 1.6V */ } if(max == -1) { - max = (int)(nom/2*2.3+1); /* Assume 2.3V float charge voltage */ + max = nom/2*2.3+1; /* Assume 2.3V float charge voltage */ } if (nom < min || nom > max) - nom = -1; + nom = -1; - deviation = (int)(-nom*0.05); /* 5% deviation from nominal voltage */ + + deviation = -(nom*0.05); /* 5% deviation from nominal voltage */ if(deviation==0) { deviation = -1; } @@ -541,57 +470,33 @@ static void draw_battvolt(double var, int min, int nom, int max, } /* draws ups.load bar style indicator */ -static void draw_upsload(double var, int min, - int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - -static void draw_upsload(double var, int min, - int nom, int max, +static void draw_upsload(double var, int min, int nom, int max, int deviation, const char *format) { - NUT_UNUSED_VARIABLE(min); - NUT_UNUSED_VARIABLE(nom); - NUT_UNUSED_VARIABLE(max); - NUT_UNUSED_VARIABLE(deviation); - drawbar(0, 125, 5, 5, 25, 100, 125, -1, -1, 0, 50, var, format); } /* draws temperature bar style indicator */ -static void draw_temperature(double var, int min, int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - static void draw_temperature(double var, int min, int nom, int max, int deviation, const char *format) { int hi = get_imgarg("tempmax"); int lo = get_imgarg("tempmin"); - NUT_UNUSED_VARIABLE(nom); - NUT_UNUSED_VARIABLE(deviation); drawbar(lo, hi, 1, 5, 10, lo, min, max, hi, -1, -1, var, format); } /* draws humidity bar style indicator */ -static void draw_humidity(double var, int min, int nom, int max, - int deviation, const char *format) - __attribute__((noreturn)); - static void draw_humidity(double var, int min, int nom, int max, int deviation, const char *format) { - NUT_UNUSED_VARIABLE(nom); - NUT_UNUSED_VARIABLE(deviation); - drawbar(0, 100, 2, 10, 20, 0, min, max, 100, -1, -1, var, format); } static int get_var(const char *var, char *buf, size_t buflen) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -618,8 +523,6 @@ int main(int argc, char **argv) char str[SMALLBUF]; int i, min, nom, max; double var = 0; - NUT_UNUSED_VARIABLE(argc); - NUT_UNUSED_VARIABLE(argv); extractcgiargs(); @@ -634,17 +537,13 @@ int main(int argc, char **argv) if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) { noimage("Invalid UPS definition (upsname[@hostname[:port]])\n"); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif + exit(EXIT_FAILURE); } if (upscli_connect(&ups, hostname, port, 0) < 0) { noimage("Can't connect to server:\n%s\n", upscli_strerror(&ups)); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif + exit(EXIT_FAILURE); } for (i = 0; imgvar[i].name; i++) @@ -654,9 +553,7 @@ int main(int argc, char **argv) registered with this variable */ if (!imgvar[i].drawfunc) { noimage("Draw function N/A"); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif + exit(EXIT_FAILURE); } /* get the variable value */ @@ -667,9 +564,7 @@ int main(int argc, char **argv) snprintf(str, sizeof(str), "%s N/A", imgvar[i].name); noimage(str); -#ifndef HAVE___ATTRIBUTE__NORETURN - exit(EXIT_FAILURE); /* Should not get here in practice, but compiler is afraid we can fall through */ -#endif + exit(EXIT_FAILURE); } /* when getting minimum, nominal and maximum values, @@ -722,9 +617,7 @@ int main(int argc, char **argv) } noimage("Unknown display"); -#ifndef HAVE___ATTRIBUTE__NORETURN exit(EXIT_FAILURE); -#endif } imgvar_t imgvar[] = { diff --git a/clients/upsimagearg.h b/clients/upsimagearg.h index 7064b7f..9483d8d 100644 --- a/clients/upsimagearg.h +++ b/clients/upsimagearg.h @@ -17,32 +17,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NUT_UPSIMAGEARG_H_SEEN -#define NUT_UPSIMAGEARG_H_SEEN 1 - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { /* *INDENT-ON* */ #endif -/* This is used in upsstats.c and in upsimage.c, but compiler complains about - * non-extern definition if this is not "static". To move or not to move?.. - * Do we have cases of building binaries refering to only one of those objects? - */ -static struct { +struct { char *name; int val; /* hex digits, ala HTML */ int min; /* minimum reasonable value */ int max; /* maximum reasonable value */ -} imgarg[] = +} imgarg[] = { { "width", 100, 50, 200 }, { "height", 350, 100, 500 }, { "scale_height", 300, 100, 500 }, { "back_col", 0x000000, 0x000000, 0xffffff }, { "scale_num_col", 0xffff00, 0x000000, 0xffffff }, - { "summary_col", 0xffff00, 0x000000, 0xffffff }, + { "summary_col", 0xffff00, 0x000000, 0xffffff }, { "ok_zone_maj_col", 0x00ff00, 0x000000, 0xffffff }, { "ok_zone_min_col", 0x007800, 0x000000, 0xffffff }, { "neutral_zone_maj_col", 0xffffff, 0x000000, 0xffffff }, @@ -54,20 +47,20 @@ static struct { { "tempmax", 40, -100, 150 }, { "nom_in_freq", 50, 0, 100 }, { "nom_out_freq", 50, 0, 100 }, - { NULL, 0, 0, 0 } + { NULL, 0, 0, 0 } }; typedef struct { char *name; /* name of the UPS variable */ char *minimum; /* name of minimum value UPS variable - or variable in imgarg table */ + or variable in imgarg table */ char *nominal; /* as above, only for nominal value */ char *maximum; /* as above, only for maximum value */ int deviation; /* variable deviation - width of green zone */ char *format; /* format string to generate summary text */ /* pointer to drawing function */ - void (*drawfunc)(double, int, int, int, int, const char*); + void (*drawfunc)(double, int, int, int, int, const char*); } imgvar_t; extern imgvar_t imgvar[]; @@ -78,4 +71,3 @@ extern imgvar_t imgvar[]; /* *INDENT-ON* */ #endif -#endif /* NUT_UPSIMAGEARG_H_SEEN */ diff --git a/clients/upslog.c b/clients/upslog.c index a0ebeaa..325cdc9 100644 --- a/clients/upslog.c +++ b/clients/upslog.c @@ -20,12 +20,12 @@ /* Basic theory of operation: * * First we go through and parse as much of the status format string as - * possible. We used to do this parsing run every time, but that's a + * possible. We used to do this parsing run every time, but that's a * waste of CPU since it can't change during the program's run. * * This version does the parsing pass once, and creates a linked list of * pointers to the functions that do the work and the arg they get. - * + * * That means the main loop just has to run the linked list and call * anything it finds in there. Everything happens from there, and we * don't have to pointlessly reparse the string every time around. @@ -37,11 +37,9 @@ #include "config.h" #include "timehead.h" -#include "nut_stdint.h" #include "upslog.h" - static int reopen_flag = 0, exit_flag = 0; - static uint16_t port; + static int port, reopen_flag = 0, exit_flag = 0; static char *upsname, *hostname; static UPSCONN_t ups; @@ -81,8 +79,6 @@ static void set_exit_flag(int sig) static void set_print_now_flag(int sig) { - NUT_UNUSED_VARIABLE(sig); - /* no need to do anything, the signal will cause sleep to be interrupted */ } @@ -112,9 +108,6 @@ static void setup_signals(void) fatal_with_errno(EXIT_FAILURE, "Can't install SIGUSR1 handler"); } -static void help(const char *prog) - __attribute__((noreturn)); - static void help(const char *prog) { printf("UPS status logger.\n"); @@ -125,9 +118,7 @@ static void help(const char *prog) printf(" -f - Log format. See below for details.\n"); printf(" - Use -f \"\" so your shell doesn't break it up.\n"); printf(" -i - Time between updates, in seconds\n"); - printf(" -l - Log file name, or - for stdout (foreground by default)\n"); - printf(" -F - stay foregrounded even if logging into a file\n"); - printf(" -B - stay backgrounded even if logging to stdout\n"); + printf(" -l - Log file name, or - for stdout\n"); printf(" -p - Base name for PID file (defaults to \"%s\")\n", prog); printf(" -s - Monitor UPS - @[:]\n"); printf(" - Example: -s myups@server\n"); @@ -155,7 +146,6 @@ static void do_host(const char *arg) { int ret; char hn[LARGEBUF]; - NUT_UNUSED_VARIABLE(arg); ret = gethostname(hn, sizeof(hn)); @@ -169,15 +159,11 @@ static void do_host(const char *arg) static void do_upshost(const char *arg) { - NUT_UNUSED_VARIABLE(arg); - snprintfcat(logbuffer, sizeof(logbuffer), "%s", monhost); } static void do_pid(const char *arg) { - NUT_UNUSED_VARIABLE(arg); - snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (long)getpid()); } @@ -186,7 +172,6 @@ static void do_time(const char *arg) unsigned int i; char timebuf[SMALLBUF], *format; time_t tod; - struct tm tmbuf; format = xstrdup(arg); @@ -196,7 +181,7 @@ static void do_time(const char *arg) format[i] = '%'; time(&tod); - strftime(timebuf, sizeof(timebuf), format, localtime_r(&tod, &tmbuf)); + strftime(timebuf, sizeof(timebuf), format, localtime(&tod)); snprintfcat(logbuffer, sizeof(logbuffer), "%s", timebuf); @@ -206,7 +191,7 @@ static void do_time(const char *arg) static void getvar(const char *var) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -250,7 +235,6 @@ static void do_var(const char *arg) static void do_etime(const char *arg) { time_t tod; - NUT_UNUSED_VARIABLE(arg); time(&tod); snprintfcat(logbuffer, sizeof(logbuffer), "%ld", (unsigned long) tod); @@ -285,7 +269,7 @@ static void add_call(void (*fptr)(const char *arg), const char *arg) tmp->next = NULL; if (last) - last->next = tmp; + last->next = tmp; else fhead = tmp; } @@ -293,9 +277,8 @@ static void add_call(void (*fptr)(const char *arg), const char *arg) /* turn the format string into a list of function calls with args */ static void compile_format(void) { - size_t i; - int j, found; - size_t ofs; + unsigned int i; + int j, found, ofs; char *cmd, *arg, *ptr; for (i = 0; i < strlen(logformat); i++) { @@ -347,7 +330,7 @@ static void compile_format(void) /* see if we know how to handle this command */ for (j = 0; logcmds[j].name != NULL; j++) { - if (strncasecmp(cmd, logcmds[j].name, + if (strncasecmp(cmd, logcmds[j].name, strlen(logcmds[j].name)) == 0) { add_call(logcmds[j].func, arg); @@ -395,7 +378,7 @@ static void run_flist(void) int main(int argc, char **argv) { - int interval = 30, i, foreground = -1; + int interval = 30, i; const char *prog = xbasename(argv[0]); time_t now, nextpoll = 0; const char *user = NULL; @@ -407,13 +390,11 @@ int main(int argc, char **argv) printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); - while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:FB")) != -1) { + while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) { switch(i) { case 'h': help(prog); -#ifndef HAVE___ATTRIBUTE__NORETURN break; -#endif case 's': monhost = optarg; @@ -441,14 +422,6 @@ int main(int argc, char **argv) case 'p': pidfilebase = optarg; break; - - case 'F': - foreground = 1; - break; - - case 'B': - foreground = 0; - break; } } @@ -489,7 +462,7 @@ int main(int argc, char **argv) if (!logformat) fatalx(EXIT_FAILURE, "No format defined - but this should be impossible"); - printf("logging status of %s to %s (%is intervals)\n", + printf("logging status of %s to %s (%is intervals)\n", monhost, logfn, interval); if (upscli_splitname(monhost, &upsname, &hostname, &port) != 0) { @@ -497,7 +470,7 @@ int main(int argc, char **argv) } if (upscli_connect(&ups, hostname, port, UPSCLI_CONN_TRYSSL) < 0) - fprintf(stderr, "Warning: initial connect failed: %s\n", + fprintf(stderr, "Warning: initial connect failed: %s\n", upscli_strerror(&ups)); if (strcmp(logfn, "-") == 0) @@ -511,19 +484,10 @@ int main(int argc, char **argv) /* now drop root if we have it */ new_uid = get_user_pwent(user); - open_syslog(prog); + open_syslog(prog); - if (foreground < 0) { - if (logfile == stdout) { - foreground = 1; - } else { - foreground = 0; - } - } - - if (!foreground) { + if (logfile != stdout) background(); - } setup_signals(); @@ -538,7 +502,7 @@ int main(int argc, char **argv) if (nextpoll > now) { /* there is still time left, so sleep it off */ - sleep((unsigned int)(difftime(nextpoll, now))); + sleep(difftime(nextpoll, now)); nextpoll += interval; } else { /* we spent more time in polling than the interval allows */ @@ -546,7 +510,7 @@ int main(int argc, char **argv) } if (reopen_flag) { - upslogx(LOG_INFO, "Signal %d: reopening log file", + upslogx(LOG_INFO, "Signal %d: reopening log file", reopen_flag); reopen_log(); reopen_flag = 0; @@ -571,7 +535,7 @@ int main(int argc, char **argv) fclose(logfile); upscli_disconnect(&ups); - + exit(EXIT_SUCCESS); } diff --git a/clients/upslog.h b/clients/upslog.h index 2e31ec4..4d0596f 100644 --- a/clients/upslog.h +++ b/clients/upslog.h @@ -1,8 +1,5 @@ /* upslog.h - table of functions for handling various logging functions */ -#ifndef NUT_UPSLOG_H_SEEN -#define NUT_UPSLOG_H_SEEN 1 - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { @@ -23,10 +20,7 @@ static void do_time(const char *arg); static void do_var(const char *arg); static void do_etime(const char *arg); -/* This is only used in upslog.c, but refers to routines declared here... - * To move or not to move?.. - */ -static struct { +struct { const char *name; void (*func)(const char *arg); } logcmds[] = @@ -37,7 +31,7 @@ static struct { { "TIME", do_time }, { "VAR", do_var }, { "ETIME", do_etime }, - { NULL, (void(*)(const char*))(NULL) } + { NULL, (void(*)())(NULL) } }; #ifdef __cplusplus @@ -46,4 +40,3 @@ static struct { /* *INDENT-ON* */ #endif -#endif /* NUT_UPSLOG_H_SEEN */ diff --git a/clients/upsmon.c b/clients/upsmon.c index 4b65fc1..12823fa 100644 --- a/clients/upsmon.c +++ b/clients/upsmon.c @@ -24,10 +24,7 @@ #include #include #include -#include -#include -#include "nut_stdint.h" #include "upsclient.h" #include "upsmon.h" #include "parseconf.h" @@ -40,19 +37,16 @@ static char *shutdowncmd = NULL, *notifycmd = NULL; static char *powerdownflag = NULL, *configfile = NULL; -static unsigned int minsupplies = 1, sleepval = 5; - - /* sum of all power values from config file */ -static unsigned int totalpv = 0; - - /* default TTL of a device gone AWOL, 3 x polling interval = 15 sec */ -static int deadtime = 15; +static int minsupplies = 1, sleepval = 5, deadtime = 15; /* default polling interval = 5 sec */ -static unsigned int pollfreq = 5, pollfreqalert = 5; +static int pollfreq = 5, pollfreqalert = 5; - /* secondary hosts are given 15 sec by default to logout from upsd */ -static int hostsync = 15; + /* slave hosts are given 15 sec by default to logout from upsd */ +static int hostsync = 15; + + /* sum of all power values from config file */ +static int totalpv = 0; /* default replace battery warning interval (seconds) */ static int rbwarntime = 43200; @@ -61,7 +55,7 @@ static int rbwarntime = 43200; static int nocommwarntime = 300; /* default interval between the shutdown warning and the shutdown */ -static unsigned int finaldelay = 5; +static int finaldelay = 5; /* set by SIGHUP handler, cleared after reload finishes */ static int reload_flag = 0; @@ -89,20 +83,12 @@ static int opt_af = AF_UNSPEC; static struct sigaction sa; static sigset_t nut_upsmon_sigmask; -/* Users can pass a -D[...] option to enable debugging. - * For the service tracing purposes, also the upsmon.conf - * can define a debug_min value in the global section, - * to set the minimal debug level (CLI provided value less - * than that would not have effect, can only have more). - */ -static int nut_debug_level_global = -1; - static void setflag(int *val, int flag) { *val |= flag; } -static void clearflag(int *val, int flag) +static void clearflag(int *val, int flag) { *val ^= (*val & flag); } @@ -125,9 +111,9 @@ static void wall(const char *text) fprintf(wf, "%s\n", text); pclose(wf); -} +} -static void notify(const char *notice, int flags, const char *ntype, +static void notify(const char *notice, int flags, const char *ntype, const char *upsname) { char exec[LARGEBUF]; @@ -185,24 +171,11 @@ static void do_notify(const utype_t *ups, int ntype) for (i = 0; notifylist[i].name != NULL; i++) { if (notifylist[i].type == ntype) { - upsdebugx(2, "%s: ntype 0x%04x (%s)", __func__, ntype, + upsdebugx(2, "%s: ntype 0x%04x (%s)", __func__, ntype, notifylist[i].name); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - snprintf(msg, sizeof(msg), - notifylist[i].msg ? notifylist[i].msg : notifylist[i].stockmsg, + snprintf(msg, sizeof(msg), notifylist[i].msg ? notifylist[i].msg : notifylist[i].stockmsg, ups ? ups->sys : ""); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif - notify(msg, notifylist[i].flags, notifylist[i].name, + notify(msg, notifylist[i].flags, notifylist[i].name, upsname); return; } @@ -211,40 +184,26 @@ static void do_notify(const utype_t *ups, int ntype) /* not found ?! */ } -/* check if we need "primary" mode (managerial permissions) - * on the server for this ups, and apply for them then. - * Returns 0 in case of error, 1 otherwise (including when - * we do not need to try becoming a primary). This currently - * propagates further as the return value of do_upsd_auth(). - */ -/* TODO: Includes API change in NUT 2.8.0 to replace deprecated - * keywords "MASTER" with "PRIMARY", and "SLAVE" with "SECONDARY", - * (and backwards-compatible alias handling) - */ -static int apply_for_primary(utype_t *ups) +/* check for master permissions on the server for this ups */ +static int checkmaster(utype_t *ups) { char buf[SMALLBUF]; - char upscli_readraw_error; - /* don't bother if we're not configured as a primary for this ups */ - if (!flag_isset(ups->status, ST_PRIMARY)) + /* don't bother if we're not configured as a master for this ups */ + if (!flag_isset(ups->status, ST_MASTER)) return 1; /* this shouldn't happen (LOGIN checks it earlier) */ if ((ups->upsname == NULL) || (strlen(ups->upsname) == 0)) { - upslogx(LOG_ERR, "Set primary managerial mode on UPS [%s] failed: empty upsname", + upslogx(LOG_ERR, "Set master on UPS [%s] failed: empty upsname", ups->sys); return 0; } - /* Use PRIMARY first but if talking to older server, retry with MASTER */ - snprintf(buf, sizeof(buf), "PRIMARY %s\n", ups->upsname); + snprintf(buf, sizeof(buf), "MASTER %s\n", ups->upsname); if (upscli_sendline(&ups->conn, buf, strlen(buf)) < 0) { - /* File descriptor not suitable, net_write() errors, etc. - * Not connected to issues with PRIMARY vs. MASTER keyword. - */ - upslogx(LOG_ALERT, "Can't set primary managerial mode on UPS [%s] - %s", + upslogx(LOG_ALERT, "Can't set master mode on UPS [%s] - %s", ups->sys, upscli_strerror(&ups->conn)); return 0; } @@ -253,41 +212,14 @@ static int apply_for_primary(utype_t *ups) if (!strncmp(buf, "OK", 2)) return 1; - /* Try the older keyword */ - upsdebugx(3, - "%s: Server did not grant PRIMARY mode on UPS [%s], " - "retry with older MASTER keyword", - __func__, ups->upsname); - snprintf(buf, sizeof(buf), "MASTER %s\n", ups->upsname); - - if (upscli_sendline(&ups->conn, buf, strlen(buf)) < 0) { - upslogx(LOG_ALERT, "Can't set primary managerial mode on UPS [%s] - %s", - ups->sys, upscli_strerror(&ups->conn)); - return 0; - } - - if (upscli_readline(&ups->conn, buf, sizeof(buf)) == 0) { - if (!strncmp(buf, "OK", 2)) - return 1; - - upscli_readraw_error = 0; - } - else { - upscli_readraw_error = 1; - } - } - else { - upscli_readraw_error = 1; - } - - if (upscli_readraw_error == 0) { /* not ERR, but not caught by readline either? */ - upslogx(LOG_ALERT, "Primary managerial privileges unavailable on UPS [%s]", + + upslogx(LOG_ALERT, "Master privileges unavailable on UPS [%s]", ups->sys); upslogx(LOG_ALERT, "Response: [%s]", buf); } else { /* something caught by readraw's parsing call */ - upslogx(LOG_ALERT, "Primary managerial privileges unavailable on UPS [%s]", + upslogx(LOG_ALERT, "Master privileges unavailable on UPS [%s]", ups->sys); upslogx(LOG_ALERT, "Reason: %s", upscli_strerror(&ups->conn)); } @@ -373,8 +305,8 @@ static int do_upsd_auth(utype_t *ups) upsdebugx(1, "Logged into UPS %s", ups->sys); setflag(&ups->status, ST_LOGIN); - /* now see if we also need to test primary managerial-mode permissions */ - return apply_for_primary(ups); + /* now see if we also need to test master permissions */ + return checkmaster(ups); } /* set flags and make announcements when a UPS has been checked successfully */ @@ -433,7 +365,7 @@ static void ups_on_batt(utype_t *ups) sleepval = pollfreqalert; /* bump up polling frequency */ - ups->linestate = 0; + ups->linestate = 0; upsdebugx(3, "%s: %s (first time)", __func__, ups->sys); @@ -484,11 +416,10 @@ static void set_pdflag(void) } /* the actual shutdown procedure */ -static void doshutdown(void) - __attribute__((noreturn)); - static void doshutdown(void) { + int ret; + /* this should probably go away at some point */ upslogx(LOG_CRIT, "Executing automatic power-fail shutdown"); wall("Executing automatic power-fail shutdown\n"); @@ -500,25 +431,20 @@ static void doshutdown(void) /* in the pipe model, we let the parent do this for us */ if (use_pipe) { char ch; - ssize_t wret; ch = 1; - wret = write(pipefd[1], &ch, 1); - - if (wret < 1) - upslogx(LOG_ERR, "Unable to call parent pipe for shutdown"); + ret = write(pipefd[1], &ch, 1); } else { /* one process model = we do all the work here */ - int sret; if (geteuid() != 0) upslogx(LOG_WARNING, "Not root, shutdown may fail"); set_pdflag(); - sret = system(shutdowncmd); + ret = system(shutdowncmd); - if (sret != 0) + if (ret != 0) upslogx(LOG_ERR, "Unable to call shutdown command: %s", shutdowncmd); } @@ -530,7 +456,7 @@ static void doshutdown(void) static void setfsd(utype_t *ups) { char buf[SMALLBUF]; - ssize_t ret; + int ret; /* this shouldn't happen */ if (!ups->upsname) { @@ -573,21 +499,14 @@ static void set_alarm(void) static void clear_alarm(void) { -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wstrict-prototypes" -#endif signal(SIGALRM, SIG_IGN); -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES) -# pragma GCC diagnostic pop -#endif alarm(0); } static int get_var(utype_t *ups, const char *var, char *buf, size_t bufsize) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -638,7 +557,7 @@ static int get_var(utype_t *ups, const char *var, char *buf, size_t bufsize) if (numa < numq) { upslogx(LOG_ERR, "%s: Error: insufficient data " - "(got %zu args, need at least %zu)", + "(got %d args, need at least %d)", var, numa, numq); return -1; } @@ -647,16 +566,12 @@ static int get_var(utype_t *ups, const char *var, char *buf, size_t bufsize) return 0; } -/* Called by upsmon which is the primary on some UPS(es) to wait - * until all secondaries log out from it on the shared upsd server - * or the HOSTSYNC timeout expires - */ -static void sync_secondaries(void) +static void slavesync(void) { utype_t *ups; char temp[SMALLBUF]; time_t start, now; - long maxlogins, logins; + int maxlogins, logins; time(&start); @@ -665,8 +580,8 @@ static void sync_secondaries(void) for (ups = firstups; ups != NULL; ups = ups->next) { - /* only check login count on devices we are the primary for */ - if (!flag_isset(ups->status, ST_PRIMARY)) + /* only check login count on our master(s) */ + if (!flag_isset(ups->status, ST_MASTER)) continue; set_alarm(); @@ -681,15 +596,11 @@ static void sync_secondaries(void) clear_alarm(); } - /* if no UPS has more than 1 login (that would be us), - * then secondaries are all gone */ - /* TO THINK: how about redundant setups with several primary-mode - * clients managing an UPS, or possibly differend UPSes, with the - * same upsd? */ + /* if no UPS has more than 1 login (us), then slaves are gone */ if (maxlogins <= 1) return; - /* after HOSTSYNC seconds, assume secondaries are stuck - and bail */ + /* after HOSTSYNC seconds, assume slaves are stuck and bail */ time(&now); if ((now - start) > hostsync) { @@ -701,34 +612,31 @@ static void sync_secondaries(void) } } -static void forceshutdown(void) - __attribute__((noreturn)); - static void forceshutdown(void) { utype_t *ups; - int isaprimary = 0; + int isamaster = 0; - upsdebugx(1, "Shutting down any UPSes in PRIMARY mode..."); + upsdebugx(1, "Shutting down any UPSes in MASTER mode..."); - /* set FSD on any "primary" UPS entries (forced shutdown in progress) */ + /* set FSD on any "master" UPS entries (forced shutdown in progress) */ for (ups = firstups; ups != NULL; ups = ups->next) - if (flag_isset(ups->status, ST_PRIMARY)) { - isaprimary = 1; + if (flag_isset(ups->status, ST_MASTER)) { + isamaster = 1; setfsd(ups); } - /* if we're not a primary on anything, we should shut down now */ - if (!isaprimary) + /* if we're not a master on anything, we should shut down now */ + if (!isamaster) doshutdown(); - /* we must be the primary now */ - upsdebugx(1, "This system is a primary... waiting for secondaries to logout..."); + /* must be the master now */ + upsdebugx(1, "This system is a master... waiting for slave logout..."); - /* wait up to HOSTSYNC seconds for secondaries to logout */ - sync_secondaries(); + /* wait up to HOSTSYNC seconds for slaves to logout */ + slavesync(); - /* time expired or all the secondaries are gone, so shutdown */ + /* time expired or all the slaves are gone, so shutdown */ doshutdown(); } @@ -736,10 +644,7 @@ static int is_ups_critical(utype_t *ups) { time_t now; - /* FSD = the primary is forcing a shutdown, or a driver forwarded the flag - * from a smarter UPS depending on vendor protocol, ability and settings - * (e.g. is charging but battery too low to guarantee safety to the load) - */ + /* FSD = the master is forcing a shutdown */ if (flag_isset(ups->status, ST_FSD)) return 1; @@ -750,37 +655,24 @@ static int is_ups_critical(utype_t *ups) /* must be OB+LB now */ - /* if UPS is calibrating, don't declare it critical */ - /* FIXME: Consider UPSes where we can know if they have other power - * circuits (bypass, etc.) and whether those do currently provide - * wall power to the host - and that we do not have both calibration - * and a real outage, when we still should shut down right now. - */ - if (flag_isset(ups->status, ST_CAL)) { - upslogx(LOG_WARNING, "%s: seems that UPS [%s] is OB+LB now, but " - "it is also calibrating - not declaring a critical state", - __func__, ups->upsname); - return 0; - } - - /* if we're a primary, declare it critical so we set FSD on it */ - if (flag_isset(ups->status, ST_PRIMARY)) + /* if we're a master, declare it critical so we set FSD on it */ + if (flag_isset(ups->status, ST_MASTER)) return 1; - /* must be a secondary now */ + /* must be a slave now */ - /* FSD isn't set, so the primary hasn't seen it yet */ + /* FSD isn't set, so the master hasn't seen it yet */ time(&now); - /* give the primary up to HOSTSYNC seconds before shutting down */ + /* give the master up to HOSTSYNC seconds before shutting down */ if ((now - ups->lastnoncrit) > hostsync) { - upslogx(LOG_WARNING, "Giving up on the primary for UPS [%s]", + upslogx(LOG_WARNING, "Giving up on the master for UPS [%s]", ups->sys); return 1; } - /* there's still time left, maybe OB+LB will go away next time we look? */ + /* there's still time left */ return 0; } @@ -788,7 +680,7 @@ static int is_ups_critical(utype_t *ups) static void recalc(void) { utype_t *ups; - unsigned int val_ol = 0; + int val_ol = 0; time_t now; time(&now); @@ -815,8 +707,8 @@ static void recalc(void) ups = ups->next; } - upsdebugx(3, "Current power value: %u", val_ol); - upsdebugx(3, "Minimum power value: %u", minsupplies); + upsdebugx(3, "Current power value: %d", val_ol); + upsdebugx(3, "Minimum power value: %d", minsupplies); if (val_ol < minsupplies) forceshutdown(); @@ -849,21 +741,6 @@ static void upsreplbatt(utype_t *ups) } } -static void ups_cal(utype_t *ups) -{ - if (flag_isset(ups->status, ST_CAL)) { /* no change */ - upsdebugx(4, "%s: %s (no change)", __func__, ups->sys); - return; - } - - upsdebugx(3, "%s: %s (first time)", __func__, ups->sys); - - /* must have changed from !CAL to CAL, so notify */ - - do_notify(ups, NOTIFY_CAL); - setflag(&ups->status, ST_CAL); -} - static void ups_fsd(utype_t *ups) { if (flag_isset(ups->status, ST_FSD)) { /* no change */ @@ -893,13 +770,13 @@ static void drop_connection(utype_t *ups) } /* change some UPS parameters during reloading */ -static void redefine_ups(utype_t *ups, unsigned int pv, const char *un, - const char *pw, const char *managerialOption) +static void redefine_ups(utype_t *ups, int pv, const char *un, + const char *pw, const char *master) { ups->retain = 1; if (ups->pv != pv) { - upslogx(LOG_INFO, "UPS [%s]: redefined power value to %d", + upslogx(LOG_INFO, "UPS [%s]: redefined power value to %d", ups->sys, pv); ups->pv = pv; } @@ -915,14 +792,14 @@ static void redefine_ups(utype_t *ups, unsigned int pv, const char *un, ups->un = xstrdup(un); - /* + /* * if not logged in force a reconnection since this * may have been redefined to make a login work */ if (!flag_isset(ups->status, ST_LOGIN)) { upslogx(LOG_INFO, "UPS [%s]: retrying connection", - ups->sys); + ups->sys); drop_connection(ups); } @@ -943,7 +820,7 @@ static void redefine_ups(utype_t *ups, unsigned int pv, const char *un, if (!flag_isset(ups->status, ST_LOGIN)) { upslogx(LOG_INFO, "UPS [%s]: retrying connection", - ups->sys); + ups->sys); drop_connection(ups); } @@ -972,75 +849,45 @@ static void redefine_ups(utype_t *ups, unsigned int pv, const char *un, } } - /* secondary|slave -> primary|master */ - if ( ( (!strcasecmp(managerialOption, "primary")) - || (!strcasecmp(managerialOption, "master")) ) - && (!flag_isset(ups->status, ST_PRIMARY)) ) { - upslogx(LOG_INFO, "UPS [%s]: redefined as a primary", ups->sys); - setflag(&ups->status, ST_PRIMARY); + /* slave -> master */ + if ((!strcasecmp(master, "master")) && (!flag_isset(ups->status, ST_MASTER))) { + upslogx(LOG_INFO, "UPS [%s]: redefined as master", ups->sys); + setflag(&ups->status, ST_MASTER); - /* reset connection to ensure primary mode gets checked */ + /* reset connection to ensure master mode gets checked */ drop_connection(ups); return; } - /* primary|master -> secondary|slave */ - if ( ( (!strcasecmp(managerialOption, "secondary")) - || (!strcasecmp(managerialOption, "slave")) ) - && (flag_isset(ups->status, ST_PRIMARY)) ) { - upslogx(LOG_INFO, "UPS [%s]: redefined as a secondary", ups->sys); - clearflag(&ups->status, ST_PRIMARY); + /* master -> slave */ + if ((!strcasecmp(master, "slave")) && (flag_isset(ups->status, ST_MASTER))) { + upslogx(LOG_INFO, "UPS [%s]: redefined as slave", ups->sys); + clearflag(&ups->status, ST_MASTER); return; } } -static void addups(int reloading, const char *sys, const char *pvs, - const char *un, const char *pw, const char *managerialOption) +static void addups(int reloading, const char *sys, const char *pvs, + const char *un, const char *pw, const char *master) { - unsigned int pv; + int pv; utype_t *tmp, *last; /* the username is now required - no more host-based auth */ - if ((!sys) || (!pvs) || (!pw) || (!managerialOption) || (!un)) { + if ((!sys) || (!pvs) || (!pw) || (!master) || (!un)) { upslogx(LOG_WARNING, "Ignoring invalid MONITOR line in %s!", configfile); upslogx(LOG_WARNING, "MONITOR configuration directives require five arguments."); return; } - long lpv = strtol(pvs, (char **) NULL, 10); + pv = strtol(pvs, (char **) NULL, 10); -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) ) -# pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -# pragma GCC diagnostic ignored "-Wunreachable-code" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif -#ifdef __clang__ -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wunreachable-code" -# pragma clang diagnostic ignored "-Wtautological-compare" -# pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif - /* Different platforms, different sizes, none fits all... */ - if (lpv < 0 || (sizeof(long) > sizeof(unsigned int) && lpv > (long)UINT_MAX)) { -#ifdef __clang__ -# pragma clang diagnostic pop -#endif -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) ) -# pragma GCC diagnostic pop -#endif - upslogx(LOG_WARNING, "UPS [%s]: ignoring invalid power value [%s]", + if (pv < 0) { + upslogx(LOG_WARNING, "UPS [%s]: ignoring invalid power value [%s]", sys, pvs); return; } - pv = (unsigned int)lpv; last = tmp = firstups; @@ -1050,7 +897,7 @@ static void addups(int reloading, const char *sys, const char *pvs, /* check for duplicates */ if (!strcmp(tmp->sys, sys)) { if (reloading) - redefine_ups(tmp, pv, un, pw, managerialOption); + redefine_ups(tmp, pv, un, pw, master); else upslogx(LOG_WARNING, "Warning: ignoring duplicate" " UPS [%s]", sys); @@ -1067,7 +914,10 @@ static void addups(int reloading, const char *sys, const char *pvs, /* build this up so the user doesn't run with bad settings */ totalpv += tmp->pv; - tmp->un = xstrdup(un); + if (un) + tmp->un = xstrdup(un); + else + tmp->un = NULL; tmp->pw = xstrdup(pw); tmp->status = 0; @@ -1082,10 +932,8 @@ static void addups(int reloading, const char *sys, const char *pvs, tmp->lastrbwarn = 0; tmp->lastncwarn = 0; - if ( (!strcasecmp(managerialOption, "primary")) - || (!strcasecmp(managerialOption, "master")) ) { - setflag(&tmp->status, ST_PRIMARY); - } + if (!strcasecmp(master, "master")) + setflag(&tmp->status, ST_MASTER); tmp->next = NULL; @@ -1095,15 +943,15 @@ static void addups(int reloading, const char *sys, const char *pvs, firstups = tmp; if (tmp->pv) - upslogx(LOG_INFO, "UPS: %s (%s) (power value %d)", tmp->sys, - flag_isset(tmp->status, ST_PRIMARY) ? "primary" : "secondary", + upslogx(LOG_INFO, "UPS: %s (%s) (power value %d)", tmp->sys, + flag_isset(tmp->status, ST_MASTER) ? "master" : "slave", tmp->pv); else upslogx(LOG_INFO, "UPS: %s (monitoring only)", tmp->sys); tmp->upsname = tmp->hostname = NULL; - if (upscli_splitname(tmp->sys, &tmp->upsname, &tmp->hostname, + if (upscli_splitname(tmp->sys, &tmp->upsname, &tmp->hostname, &tmp->port) != 0) { upslogx(LOG_ERR, "Error: unable to split UPS name [%s]", tmp->sys); @@ -1112,7 +960,7 @@ static void addups(int reloading, const char *sys, const char *pvs, if (!tmp->upsname) upslogx(LOG_WARNING, "Warning: UPS [%s]: no upsname set!", tmp->sys); -} +} static void set_notifymsg(const char *name, const char *msg) { @@ -1182,7 +1030,7 @@ static void set_notifyflag(const char *ntype, char *flags) } /* in split mode, the parent doesn't hear about reloads */ -static void checkmode(char *cfgentry, char *oldvalue, char *newvalue, +static void checkmode(char *cfgentry, char *oldvalue, char *newvalue, int reloading) { /* nothing to do if in "all as root" mode */ @@ -1206,7 +1054,7 @@ static void checkmode(char *cfgentry, char *oldvalue, char *newvalue, } /* returns 1 if used, 0 if not, so we can complain about bogus configs */ -static int parse_conf_arg(size_t numargs, char **arg) +static int parse_conf_arg(int numargs, char **arg) { /* using up to arg[1] below */ if (numargs < 2) @@ -1233,7 +1081,7 @@ static int parse_conf_arg(size_t numargs, char **arg) arg[1]); return 1; - } + } /* NOTIFYCMD */ if (!strcmp(arg[0], "NOTIFYCMD")) { @@ -1244,23 +1092,13 @@ static int parse_conf_arg(size_t numargs, char **arg) /* POLLFREQ */ if (!strcmp(arg[0], "POLLFREQ")) { - int ipollfreq = atoi(arg[1]); - if (ipollfreq < 0) { - upsdebugx(0, "Ignoring invalid POLLFREQ value: %d", ipollfreq); - } else { - pollfreq = (unsigned int)ipollfreq; - } + pollfreq = atoi(arg[1]); return 1; } /* POLLFREQALERT */ if (!strcmp(arg[0], "POLLFREQALERT")) { - int ipollfreqalert = atoi(arg[1]); - if (ipollfreqalert < 0) { - upsdebugx(0, "Ignoring invalid POLLFREQALERT value: %d", ipollfreqalert); - } else { - pollfreqalert = (unsigned int)ipollfreqalert; - } + pollfreqalert = atoi(arg[1]); return 1; } @@ -1278,12 +1116,7 @@ static int parse_conf_arg(size_t numargs, char **arg) /* MINSUPPLIES */ if (!strcmp(arg[0], "MINSUPPLIES")) { - int iminsupplies = atoi(arg[1]); - if (iminsupplies < 0) { - upsdebugx(0, "Ignoring invalid MINSUPPLIES value: %d", iminsupplies); - } else { - minsupplies = (unsigned int)iminsupplies; - } + minsupplies = atoi(arg[1]); return 1; } @@ -1301,17 +1134,12 @@ static int parse_conf_arg(size_t numargs, char **arg) /* FINALDELAY */ if (!strcmp(arg[0], "FINALDELAY")) { - int ifinaldelay = atoi(arg[1]); - if (ifinaldelay < 0) { - upsdebugx(0, "Ignoring invalid FINALDELAY value: %d", ifinaldelay); - } else { - finaldelay = (unsigned int)ifinaldelay; - } + finaldelay = atoi(arg[1]); return 1; } /* RUN_AS_USER */ - if (!strcmp(arg[0], "RUN_AS_USER")) { + if (!strcmp(arg[0], "RUN_AS_USER")) { free(run_as_user); run_as_user = xstrdup(arg[1]); return 1; @@ -1336,18 +1164,6 @@ static int parse_conf_arg(size_t numargs, char **arg) return 1; } - /* DEBUG_MIN (NUM) */ - /* debug_min (NUM) also acceptable, to be on par with ups.conf */ - if (!strcasecmp(arg[0], "DEBUG_MIN")) { - int lvl = -1; // typeof common/common.c: int nut_debug_level - if ( str_to_int (arg[1], &lvl, 10) && lvl >= 0 ) { - nut_debug_level_global = lvl; - } else { - upslogx(LOG_INFO, "WARNING : Invalid DEBUG_MIN value found in upsmon.conf global settings"); - } - return 1; - } - /* using up to arg[2] below */ if (numargs < 3) return 0; @@ -1362,7 +1178,7 @@ static int parse_conf_arg(size_t numargs, char **arg) if (!strcmp(arg[0], "NOTIFYFLAG")) { set_notifyflag(arg[1], arg[2]); return 1; - } + } /* CERTIDENT */ if (!strcmp(arg[0], "CERTIDENT")) { @@ -1372,7 +1188,7 @@ static int parse_conf_arg(size_t numargs, char **arg) certpasswd = xstrdup(arg[2]); return 1; } - + /* using up to arg[4] below */ if (numargs < 5) return 0; @@ -1393,7 +1209,7 @@ static int parse_conf_arg(size_t numargs, char **arg) fatalx(EXIT_FAILURE, "Fatal error: unusable configuration"); } - /* ("primary"|"master" | "secondary"|"slave") */ + /* ("master" | "slave") */ addups(reload_flag, arg[1], arg[2], arg[3], arg[4], arg[5]); return 1; } @@ -1425,13 +1241,6 @@ static void loadconfig(void) fatalx(EXIT_FAILURE, "%s", ctx.errmsg); } - if (reload_flag == 1) { - /* if upsmon.conf added or changed - * (or commented away) the debug_min - * setting, detect that */ - nut_debug_level_global = -1; - } - while (pconf_file_next(&ctx)) { if (pconf_parse_error(&ctx)) { upslogx(LOG_ERR, "Parse error: %s:%d: %s", @@ -1446,34 +1255,25 @@ static void loadconfig(void) unsigned int i; char errmsg[SMALLBUF]; - snprintf(errmsg, sizeof(errmsg), + snprintf(errmsg, sizeof(errmsg), "%s line %d: invalid directive", configfile, ctx.linenum); for (i = 0; i < ctx.numargs; i++) - snprintfcat(errmsg, sizeof(errmsg), " %s", + snprintfcat(errmsg, sizeof(errmsg), " %s", ctx.arglist[i]); upslogx(LOG_WARNING, "%s", errmsg); } } - if (reload_flag == 1) { - if (nut_debug_level_global > -1) { - upslogx(LOG_INFO, - "Applying debug_min=%d from upsmon.conf", - nut_debug_level_global); - nut_debug_level = nut_debug_level_global; - } - } - - pconf_finish(&ctx); + pconf_finish(&ctx); } /* SIGPIPE handler */ static void sigpipe(int sig) { - upsdebugx(1, "SIGPIPE: dazed and confused, but continuing after signal %i...", sig); + upsdebugx(1, "SIGPIPE: dazed and confused, but continuing..."); } /* SIGQUIT, SIGTERM handler */ @@ -1529,16 +1329,12 @@ static void user_fsd(int sig) static void set_reload_flag(int sig) { - NUT_UNUSED_VARIABLE(sig); - reload_flag = 1; } /* handler for alarm when getupsvarfd times out */ static void read_timeout(int sig) { - NUT_UNUSED_VARIABLE(sig); - /* don't do anything here, just return */ } @@ -1574,10 +1370,9 @@ static void setup_signals(void) /* remember the last time the ups was not critical (OB + LB) */ static void update_crittimer(utype_t *ups) { - /* if !OB, !LB, or CAL, then it's not critical, so log the time */ - if ((!flag_isset(ups->status, ST_ONBATT)) || - (!flag_isset(ups->status, ST_LOWBATT)) || - (flag_isset(ups->status, ST_CAL))) { + /* if !OB or !LB, then it's not critical, so log the time */ + if ((!flag_isset(ups->status, ST_ONBATT)) || + (!flag_isset(ups->status, ST_LOWBATT))) { time(&ups->lastnoncrit); return; @@ -1596,7 +1391,7 @@ static int try_connect(utype_t *ups) clearflag(&ups->status, ST_CONNECTED); /* force it if configured that way, just try it otherwise */ - if (forcessl == 1) + if (forcessl == 1) flags |= UPSCLI_CONN_REQSSL; else flags |= UPSCLI_CONN_TRYSSL; @@ -1637,9 +1432,6 @@ static int try_connect(utype_t *ups) /* we're definitely connected now */ setflag(&ups->status, ST_CONNECTED); - /* prevent connection leaking to NOTIFYCMD */ - fcntl(upscli_fd(&ups->conn), F_SETFD, FD_CLOEXEC); - /* now try to authenticate to upsd */ ret = do_upsd_auth(ups); @@ -1664,7 +1456,7 @@ static void parse_status(utype_t *ups, char *status) upsdebugx(2, "%s: [%s]", __func__, status); /* empty response is the same as a dead ups */ - if (status == NULL || status[0] == '\0') { + if (!strcmp(status, "")) { ups_is_gone(ups); return; } @@ -1695,8 +1487,6 @@ static void parse_status(utype_t *ups, char *status) ups_low_batt(ups); if (!strcasecmp(statword, "RB")) upsreplbatt(ups); - if (!strcasecmp(statword, "CAL")) - ups_cal(ups); /* do it last to override any possible OL */ if (!strcasecmp(statword, "FSD")) @@ -1705,7 +1495,7 @@ static void parse_status(utype_t *ups, char *status) update_crittimer(ups); statword = ptr; - } + } } /* see what the status of the UPS is and handle any changes */ @@ -1740,12 +1530,12 @@ static void pollups(utype_t *ups) case UPSCLI_ERR_UNKNOWNUPS: upslogx(LOG_ERR, "Poll UPS [%s] failed - [%s] " - "does not exist on server %s", + "does not exist on server %s", ups->sys, ups->upsname, ups->hostname); break; default: - upslogx(LOG_ERR, "Poll UPS [%s] failed - %s", + upslogx(LOG_ERR, "Poll UPS [%s] failed - %s", ups->sys, upscli_strerror(&ups->conn)); break; } @@ -1782,7 +1572,7 @@ static int pdflag_status(void) fclose(pdf); /* reasoning: say upsmon.conf is world-writable (!) and some nasty - * user puts something "important" as the power flag file. This + * user puts something "important" as the power flag file. This * keeps upsmon from utterly trashing it when starting up or powering * down at the expense of not shutting down the UPS. * @@ -1793,7 +1583,7 @@ static int pdflag_status(void) return 1; /* exists and looks good */ return -1; /* error: something else is in there */ -} +} /* only remove the flag file if it's actually from us */ static void clear_pdflag(void) @@ -1844,23 +1634,17 @@ static int check_pdflag(void) return EXIT_SUCCESS; } -static void help(const char *arg_progname) - __attribute__((noreturn)); - -static void help(const char *arg_progname) +static void help(const char *progname) { printf("Monitors UPS servers and may initiate shutdown if necessary.\n\n"); - printf("usage: %s [OPTIONS]\n\n", arg_progname); - printf(" -c send command to running process\n"); + printf("usage: %s [OPTIONS]\n\n", progname); + printf(" -c send command to running process\n"); printf(" commands:\n"); - printf(" - fsd: shutdown all primary-mode UPSes (use with caution)\n"); + printf(" - fsd: shutdown all master UPSes (use with caution)\n"); printf(" - reload: reread configuration\n"); printf(" - stop: stop monitoring and exit\n"); - printf(" -P send the signal above to specified PID (bypassing PID file)\n"); - printf(" -D raise debugging level (and stay foreground by default)\n"); - printf(" -F stay foregrounded even if no debugging is enabled\n"); - printf(" -B stay backgrounded even if debugging is bumped\n"); + printf(" -D raise debugging level\n"); printf(" -h display this help\n"); printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n"); printf(" -p always run privileged (disable privileged parent)\n"); @@ -1871,26 +1655,15 @@ static void help(const char *arg_progname) exit(EXIT_SUCCESS); } -static void runparent(int fd) - __attribute__((noreturn)); - static void runparent(int fd) { - ssize_t ret; - int sret; + int ret; char ch; /* handling signals is the child's job */ -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wstrict-prototypes" -#endif signal(SIGHUP, SIG_IGN); signal(SIGUSR1, SIG_IGN); signal(SIGUSR2, SIG_IGN); -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES) -# pragma GCC diagnostic pop -#endif ret = read(fd, &ch, 1); @@ -1907,9 +1680,9 @@ static void runparent(int fd) /* have to do this here - child is unprivileged */ set_pdflag(); - sret = system(shutdowncmd); + ret = system(shutdowncmd); - if (sret != 0) + if (ret != 0) upslogx(LOG_ERR, "parent: Unable to call shutdown command: %s", shutdowncmd); @@ -1937,15 +1710,10 @@ static void start_pipe(void) close(pipefd[1]); runparent(pipefd[0]); -#ifndef HAVE___ATTRIBUTE__NORETURN exit(EXIT_FAILURE); /* NOTREACHED */ -#endif } close(pipefd[0]); - - /* prevent pipe leaking to NOTIFYCMD */ - fcntl(pipefd[1], F_SETFD, FD_CLOEXEC); } static void delete_ups(utype_t *target) @@ -1984,7 +1752,7 @@ static void delete_ups(utype_t *target) /* shouldn't happen */ upslogx(LOG_ERR, "delete_ups: UPS not found"); -} +} /* see if we can open a file */ static int check_file(const char *fn) @@ -2046,7 +1814,7 @@ static void reload_conf(void) upslogx(LOG_CRIT, "Fatal error: total power value (%d) less " "than MINSUPPLIES (%d)", totalpv, minsupplies); - fatalx(EXIT_FAILURE, "Impossible power configuration, unable to continue"); + fatalx(EXIT_FAILURE, "Impossible power configuation, unable to continue"); } /* finally clear the flag */ @@ -2078,7 +1846,7 @@ static void check_parent(void) time(&now); /* complain every 2 minutes */ - if ((now - lastwarn) < 120) + if ((now - lastwarn) < 120) return; lastwarn = now; @@ -2088,11 +1856,10 @@ static void check_parent(void) upslogx(LOG_ALERT, "Parent died - shutdown impossible"); } -int main(int argc, char *argv[]) +int main(int argc, char *argv[]) { const char *prog = xbasename(argv[0]); - int i, cmd = 0, cmdret = -1, checking_flag = 0, foreground = -1; - pid_t oldpid = -1; + int i, cmd = 0, checking_flag = 0; printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); @@ -2103,7 +1870,7 @@ int main(int argc, char *argv[]) run_as_user = xstrdup(RUN_AS_USER); - while ((i = getopt(argc, argv, "+DFBhic:P:f:pu:VK46")) != -1) { + while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) { switch (i) { case 'c': if (!strncmp(optarg, "fsd", strlen(optarg))) @@ -2117,30 +1884,16 @@ int main(int argc, char *argv[]) if (cmd == 0) help(argv[0]); break; - - case 'P': - if ((oldpid = parsepid(optarg)) < 0) - help(argv[0]); - break; - case 'D': nut_debug_level++; break; - case 'F': - foreground = 1; - break; - case 'B': - foreground = 0; - break; case 'f': free(configfile); configfile = xstrdup(optarg); break; case 'h': help(argv[0]); -#ifndef HAVE___ATTRIBUTE__NORETURN break; -#endif case 'K': checking_flag = 1; break; @@ -2162,56 +1915,22 @@ int main(int argc, char *argv[]) break; default: help(argv[0]); -#ifndef HAVE___ATTRIBUTE__NORETURN break; -#endif - } - } - - if (foreground < 0) { - if (nut_debug_level > 0) { - foreground = 1; - } else { - foreground = 0; } } if (cmd) { - if (oldpid < 0) { - cmdret = sendsignal(prog, cmd); - } else { - cmdret = sendsignalpid(oldpid, cmd); - } - /* exit(EXIT_SUCCESS); */ - exit((cmdret == 0)?EXIT_SUCCESS:EXIT_FAILURE); + sendsignal(prog, cmd); + exit(EXIT_SUCCESS); } /* otherwise, we are being asked to start. * so check if a previous instance is running by sending signal '0' * (Ie 'kill 0') */ - if (oldpid < 0) { - cmdret = sendsignal(prog, 0); - } else { - cmdret = sendsignalpid(oldpid, 0); - } - switch (cmdret) { - case 0: + if (sendsignal(prog, 0) == 0) { printf("Fatal error: A previous upsmon instance is already running!\n"); printf("Either stop the previous instance first, or use the 'reload' command.\n"); exit(EXIT_FAILURE); - - case -3: - case -2: - upslogx(LOG_WARNING, "Could not %s PID file " - "to see if previous upsmon instance is " - "already running!\n", - (cmdret == -3 ? "find" : "parse")); - break; - - case -1: - default: - /* Just failed to send signal, no competitor running */ - break; } argc -= optind; @@ -2221,14 +1940,6 @@ int main(int argc, char *argv[]) loadconfig(); - /* CLI debug level can not be smaller than debug_min specified - * in upsmon.conf. Note that non-zero debug_min does not impact - * foreground running mode. - */ - if (nut_debug_level_global > nut_debug_level) - nut_debug_level = nut_debug_level_global; - upsdebugx(1, "debug level is '%d'", nut_debug_level); - if (checking_flag) exit(check_pdflag()); @@ -2251,14 +1962,12 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - if (!foreground) { + if (nut_debug_level < 1) { background(); - } - - if (nut_debug_level >= 1) { + } else { upsdebugx(1, "debug level is '%d'", nut_debug_level); } - + /* only do the pipe stuff if the user hasn't disabled it */ if (use_pipe) { struct passwd *new_uid = get_user_pwent(run_as_user); @@ -2272,14 +1981,14 @@ int main(int argc, char *argv[]) become_user(new_uid); } else { upslogx(LOG_INFO, "Warning: running as one big root process by request (upsmon -p)"); - + writepid(prog); } - + if (upscli_init(certverify, certpath, certname, certpasswd) < 0) { exit(EXIT_FAILURE); } - + /* prep our signal handlers */ setup_signals(); diff --git a/clients/upsmon.h b/clients/upsmon.h index d60720b..2504370 100644 --- a/clients/upsmon.h +++ b/clients/upsmon.h @@ -17,23 +17,18 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NUT_UPSMON_H_SEEN -#define NUT_UPSMON_H_SEEN 1 - /* flags for ups->status */ -#define ST_ONLINE (1 << 0) /* UPS is on line (OL) */ -#define ST_ONBATT (1 << 1) /* UPS is on battery (OB) */ -#define ST_LOWBATT (1 << 2) /* UPS has a low battery (LB) */ -#define ST_FSD (1 << 3) /* primary has set forced shutdown flag */ -#define ST_PRIMARY (1 << 4) /* we are the primary (manager) of this UPS */ -#define ST_MASTER ST_PRIMARY /* legacy alias */ -#define ST_LOGIN (1 << 5) /* we are logged into this UPS */ -#define ST_CONNECTED (1 << 6) /* upscli_connect returned OK */ -#define ST_CAL (1 << 7) /* UPS calibration in progress (CAL) */ +#define ST_ONLINE (1 << 0) /* UPS is on line (OL) */ +#define ST_ONBATT (1 << 1) /* UPS is on battery (OB) */ +#define ST_LOWBATT (1 << 2) /* UPS has a low battery (LB) */ +#define ST_FSD (1 << 3) /* master has set forced shutdown flag */ +#define ST_MASTER (1 << 4) /* we are the master on this UPS */ +#define ST_LOGIN (1 << 5) /* we are logged into this UPS */ +#define ST_CONNECTED (1 << 6) /* upscli_connect returned OK */ /* required contents of flag file */ -#define SDMAGIC "upsmon-shutdown-file" +#define SDMAGIC "upsmon-shutdown-file" #ifdef __cplusplus /* *INDENT-OFF* */ @@ -49,9 +44,9 @@ typedef struct { char *sys; /* raw system name from .conf */ char *upsname; /* just upsname */ char *hostname; /* just hostname */ - uint16_t port; /* just the port */ + int port; /* just the port */ - unsigned int pv; /* power value from conf */ + int pv; /* power value from conf */ char *un; /* username (optional for now) */ char *pw; /* password from conf */ int status; /* status (see flags above) */ @@ -70,17 +65,16 @@ typedef struct { /* notify identifiers */ -#define NOTIFY_ONLINE 0 /* UPS went on-line */ -#define NOTIFY_ONBATT 1 /* UPS went on battery */ -#define NOTIFY_LOWBATT 2 /* UPS went to low battery */ -#define NOTIFY_FSD 3 /* Primary upsmon set FSD flag */ -#define NOTIFY_COMMOK 4 /* Communication established */ -#define NOTIFY_COMMBAD 5 /* Communication lost */ -#define NOTIFY_SHUTDOWN 6 /* System shutdown in progress */ -#define NOTIFY_REPLBATT 7 /* UPS battery needs to be replaced */ -#define NOTIFY_NOCOMM 8 /* UPS hasn't been contacted in a while */ -#define NOTIFY_NOPARENT 9 /* privileged parent process died */ -#define NOTIFY_CAL 10 /* UPS is performing calibration */ +#define NOTIFY_ONLINE 0 /* UPS went on-line */ +#define NOTIFY_ONBATT 1 /* UPS went on battery */ +#define NOTIFY_LOWBATT 2 /* UPS went to low battery */ +#define NOTIFY_FSD 3 /* Master upsmon set FSD flag */ +#define NOTIFY_COMMOK 4 /* Communication established */ +#define NOTIFY_COMMBAD 5 /* Communication lost */ +#define NOTIFY_SHUTDOWN 6 /* System shutdown in progress */ +#define NOTIFY_REPLBATT 7 /* UPS battery needs to be replaced */ +#define NOTIFY_NOCOMM 8 /* UPS hasn't been contacted in awhile */ +#define NOTIFY_NOPARENT 9 /* privileged parent process died */ /* notify flag values */ @@ -92,10 +86,7 @@ typedef struct { /* flags are set to NOTIFY_SYSLOG | NOTIFY_WALL at program init */ /* the user can override with NOTIFYFLAGS in the upsmon.conf */ -/* This is only used in upsmon.c, but might it also have external consumers?.. - * To move or not to move?.. - */ -static struct { +struct { int type; const char *name; char *msg; /* NULL until overridden */ @@ -113,7 +104,6 @@ static struct { { NOTIFY_REPLBATT, "REPLBATT", NULL, "UPS %s battery needs to be replaced", NOTIFY_SYSLOG | NOTIFY_WALL }, { NOTIFY_NOCOMM, "NOCOMM", NULL, "UPS %s is unavailable", NOTIFY_SYSLOG | NOTIFY_WALL }, { NOTIFY_NOPARENT, "NOPARENT", NULL, "upsmon parent process died - shutdown impossible", NOTIFY_SYSLOG | NOTIFY_WALL }, - { NOTIFY_CAL, "CAL", NULL, "UPS %s: calibration in progress", NOTIFY_SYSLOG }, { 0, NULL, NULL, NULL, 0 } }; @@ -132,5 +122,3 @@ static struct { } /* *INDENT-ON* */ #endif - -#endif /* NUT_UPSMON_H_SEEN */ diff --git a/clients/upsrw.c b/clients/upsrw.c index 2789f9a..3a0efb4 100644 --- a/clients/upsrw.c +++ b/clients/upsrw.c @@ -1,8 +1,6 @@ /* upsrw - simple client for read/write variable access (formerly upsct2) - Copyright (C) - 1999 Russell Kroll - 2019 EATON (author: Arnaud Quette ) + Copyright (C) 1999 Russell Kroll This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,14 +25,10 @@ #include #include -#include "nut_stdint.h" #include "upsclient.h" -#include "extstate.h" -static char *upsname = NULL, *hostname = NULL; +static char *upsname = NULL, *hostname = NULL; static UPSCONN_t *ups = NULL; -static int tracking_enabled = 0; -static unsigned int timeout = DEFAULT_TRACKING_TIMEOUT; struct list_t { char *name; @@ -45,22 +39,18 @@ static void usage(const char *prog) { printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION); printf("usage: %s [-h]\n", prog); - printf(" %s [-s ] [-u ] [-p ] [-w] [-t ] \n\n", prog); + printf(" %s [-s ] [-u ] [-p ] \n\n", prog); printf("Demo program to set variables within UPS hardware.\n"); printf("\n"); printf(" -h display this help text\n"); printf(" -s specify variable to be changed\n"); printf(" use -s VAR=VALUE to avoid prompting for value\n"); - printf(" -l show all possible read/write variables.\n"); printf(" -u set username for command authentication\n"); printf(" -p set password for command authentication\n"); - printf(" -w wait for the completion of setting by the driver\n"); - printf(" and return its actual result from the device\n"); - printf(" -t set a timeout when using -w (in seconds, default: %u)\n", DEFAULT_TRACKING_TIMEOUT); printf("\n"); printf(" UPS identifier - [@[:]]\n"); printf("\n"); - printf("Call without -s to show all possible read/write variables (same as -l).\n"); + printf("Call without -s to show all possible read/write variables.\n"); } static void clean_exit(void) @@ -74,21 +64,9 @@ static void clean_exit(void) free(ups); } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic push -#endif -#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#if (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif static void do_set(const char *varname, const char *newval) { - int cmd_complete = 0; char buf[SMALLBUF], enc[SMALLBUF]; - char tracking_id[UUID4_LEN]; - time_t start, now; snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc))); @@ -100,92 +78,17 @@ static void do_set(const char *varname, const char *newval) fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups)); } - /* verify answer */ + /* FUTURE: status cookies will tie in here */ if (strncmp(buf, "OK", 2) != 0) { fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf); } - /* check for status tracking id */ - if ( - !tracking_enabled || - /* sanity check on the size: "OK TRACKING " + UUID4_LEN */ - strlen(buf) != (UUID4_LEN - 1 + strlen("OK TRACKING ")) - ) { - /* reply as usual */ - fprintf(stderr, "%s\n", buf); - return; - } - -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic ignored "-Wformat-truncation" -#endif - /* From the check above, we know that we have exactly UUID4_LEN chars - * (aka sizeof(tracking_id)) in the buf after "OK TRACKING " prefix, - * plus the null-byte. - */ - assert (UUID4_LEN == 1 + snprintf(tracking_id, sizeof(tracking_id), "%s", buf + strlen("OK TRACKING "))); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION -#pragma GCC diagnostic pop -#endif - time(&start); - - /* send status tracking request, looping if status is PENDING */ - while (!cmd_complete) { - - /* check for timeout */ - time(&now); - if (difftime(now, start) >= timeout) - fatalx(EXIT_FAILURE, "Can't receive status tracking information: timeout"); - - snprintf(buf, sizeof(buf), "GET TRACKING %s\n", tracking_id); - - if (upscli_sendline(ups, buf, strlen(buf)) < 0) - fatalx(EXIT_FAILURE, "Can't send status tracking request: %s", upscli_strerror(ups)); - -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) ) -/* Note for gating macros above: unsuffixed HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP - * means support of contexts both inside and outside function body, so the push - * above and pop below (outside this finction) are not used. - */ -# pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS -/* Note that the individual warning pragmas for use inside function bodies - * are named without a _INSIDEFUNC suffix, for simplicity and legacy reasons - */ -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE -# pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -#endif - /* and get status tracking reply */ - assert(timeout < LONG_MAX); -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE) ) -# pragma GCC diagnostic pop -#endif - - if (upscli_readline_timeout(ups, buf, sizeof(buf), (long)timeout) < 0) - fatalx(EXIT_FAILURE, "Can't receive status tracking information: %s", upscli_strerror(ups)); - - if (strncmp(buf, "PENDING", 7)) - cmd_complete = 1; - else - /* wait a second before retrying */ - sleep(1); - } - fprintf(stderr, "%s\n", buf); } -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC) && (!defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC) && ( (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC) || (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC) ) -# pragma GCC diagnostic pop -#endif static void do_setvar(const char *varname, char *uin, const char *pass) { - char newval[SMALLBUF], temp[SMALLBUF * 2], user[SMALLBUF], *ptr; + char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr; struct passwd *pw; if (uin) { @@ -274,32 +177,13 @@ static void do_setvar(const char *varname, char *uin, const char *pass) fatalx(EXIT_FAILURE, "Error: old variable names are not supported"); } - /* enable status tracking ID */ - if (tracking_enabled) { - - snprintf(temp, sizeof(temp), "SET TRACKING ON\n"); - - if (upscli_sendline(ups, temp, strlen(temp)) < 0) { - fatalx(EXIT_FAILURE, "Can't enable set variable status tracking: %s", upscli_strerror(ups)); - } - - if (upscli_readline(ups, temp, sizeof(temp)) < 0) { - fatalx(EXIT_FAILURE, "Enabling set variable status tracking failed: %s", upscli_strerror(ups)); - } - - /* Verify the result */ - if (strncmp(temp, "OK", 2) != 0) { - fatalx(EXIT_FAILURE, "Enabling set variable status tracking failed. upsd answered: %s", temp); - } - } - do_set(varname, newval); } static const char *get_data(const char *type, const char *varname) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer; const char *query[4]; @@ -319,7 +203,7 @@ static const char *get_data(const char *type, const char *varname) return answer[3]; } -static void do_string(const char *varname, const long len) +static void do_string(const char *varname, const int len) { const char *val; @@ -330,34 +214,14 @@ static void do_string(const char *varname, const long len) } printf("Type: STRING\n"); - printf("Maximum length: %ld\n", len); + printf("Maximum length: %d\n", len); printf("Value: %s\n", val); } -static void do_number(const char *varname) -{ - const char *val; - - val = get_data("VAR", varname); - - if (!val) { - fatalx(EXIT_FAILURE, "do_number: can't get current value of %s", varname); - } - - printf("Type: NUMBER\n"); - printf("Value: %s\n", val); -} - -/** - * Display ENUM information - * @param varname the name of the NUT variable - * @param vartype the type of the NUT variable (ST_FLAG_STRING, ST_FLAG_NUMBER - * @param len the length of the NUT variable, if type == ST_FLAG_STRING - */ -static void do_enum(const char *varname, const int vartype, const long len) +static void do_enum(const char *varname) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer, buf[SMALLBUF]; const char *query[4], *val; @@ -383,21 +247,14 @@ static void do_enum(const char *varname, const int vartype, const long len) ret = upscli_list_next(ups, numq, query, &numa, &answer); - /* Fallback for older upsd versions */ - if (vartype != ST_FLAG_NONE) - printf("Type: ENUM %s\n", (vartype == ST_FLAG_STRING)?"STRING":"NUMBER"); - else - printf("Type: ENUM\n"); - - if (vartype == ST_FLAG_STRING) - printf("Maximum length: %ld\n", len); + printf("Type: ENUM\n"); while (ret == 1) { /* ENUM */ if (numa < 4) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } printf("Option: \"%s\"", answer[3]); @@ -415,7 +272,7 @@ static void do_enum(const char *varname, const int vartype, const long len) static void do_range(const char *varname) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer; const char *query[4], *val; int ival, min, max; @@ -442,15 +299,14 @@ static void do_range(const char *varname) ret = upscli_list_next(ups, numq, query, &numa, &answer); - /* Ranges implies a type "NUMBER" */ - printf("Type: RANGE NUMBER\n"); + printf("Type: RANGE\n"); while (ret == 1) { /* RANGE */ if (numa < 5) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } min = atoi(answer[3]); @@ -471,8 +327,7 @@ static void do_range(const char *varname) static void do_type(const char *varname) { int ret; - int is_enum = 0; /* 1 if ENUM; FIXME: add a boolean type in common.h */ - size_t i, numq, numa; + unsigned int i, numq, numa; char **answer; const char *query[4]; @@ -484,18 +339,16 @@ static void do_type(const char *varname) ret = upscli_get(ups, numq, query, &numa, &answer); if ((ret < 0) || (numa < numq)) { - printf("Unknown type\n"); + printf("Unknown type\n"); return; } /* TYPE ... */ for (i = 3; i < numa; i++) { - /* ENUM can be NUMBER or STRING - * just flag it for latter processing */ if (!strcasecmp(answer[i], "ENUM")) { - is_enum = 1; - continue; + do_enum(varname); + return; } if (!strcasecmp(answer[i], "RANGE")) { @@ -506,21 +359,15 @@ static void do_type(const char *varname) if (!strncasecmp(answer[i], "STRING:", 7)) { char *len = answer[i] + 7; - long length = strtol(len, NULL, 10); + int length = strtol(len, NULL, 10); - if (is_enum == 1) - do_enum(varname, ST_FLAG_STRING, length); - else - do_string(varname, length); + do_string(varname, length); return; } if (!strcasecmp(answer[i], "NUMBER")) { - if (is_enum == 1) - do_enum(varname, ST_FLAG_NUMBER, 0); - else - do_number(varname); + printf("Type: NUMBER\n"); return; } @@ -531,10 +378,6 @@ static void do_type(const char *varname) printf("Type: %s (unrecognized)\n", answer[i]); } - /* Fallback for older upsd versions, where STRING|NUMBER is not - * appended to ENUM */ - if (is_enum == 1) - do_enum(varname, ST_FLAG_NONE, 0); } static void print_rw(const char *varname) @@ -559,7 +402,7 @@ static void print_rw(const char *varname) static void print_rwlist(void) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[2]; char **answer; struct list_t *lhead, *llast, *ltmp, *lnext; @@ -593,7 +436,7 @@ static void print_rwlist(void) /* RW */ if (numa < 4) { - fatalx(EXIT_FAILURE, "Error: insufficient data (got %zu args, need at least 4)", numa); + fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa); } /* sock this entry away for later */ @@ -630,36 +473,22 @@ static void print_rwlist(void) int main(int argc, char **argv) { - int i; - uint16_t port; + int i, port; const char *prog = xbasename(argv[0]); char *password = NULL, *username = NULL, *setvar = NULL; - while ((i = getopt(argc, argv, "+hls:p:t:u:wV")) != -1) { + while ((i = getopt(argc, argv, "+hs:p:u:V")) != -1) { switch (i) { case 's': setvar = optarg; break; - case 'l': - if (setvar) { - upslogx(LOG_WARNING, "Listing mode requested, overriding setvar specified earlier!"); - setvar = NULL; - } - break; case 'p': password = optarg; break; - case 't': - if (!str_to_uint(optarg, &timeout, 10)) - fatal_with_errno(EXIT_FAILURE, "Could not convert the provided value for timeout ('-t' option) to unsigned int"); - break; case 'u': username = optarg; break; - case 'w': - tracking_enabled = 1; - break; case 'V': printf("Network UPS Tools %s %s\n", prog, UPS_VERSION); exit(EXIT_SUCCESS); diff --git a/clients/upssched-cmd b/clients/upssched-cmd index 893cd49..63255df 100755 --- a/clients/upssched-cmd +++ b/clients/upssched-cmd @@ -11,19 +11,8 @@ # from your AT lines. case $1 in - onbattwarn) - # Send a notification mail - echo "The UPS has been on battery for awhile" \ - | mail -s"UPS monitor" bofh@pager.example.com - # Create a flag-file on the filesystem, for your own processing - /usr/bin/touch /some/path/ups-on-battery - ;; - ups-back-on-power) - # Delete the flag-file on the filesystem - /bin/rm -f /some/path/ups-on-battery - ;; upsgone) - logger -t upssched-cmd "The communication with UPS has been gone for awhile" + logger -t upssched-cmd "The UPS has been gone for awhile" ;; *) logger -t upssched-cmd "Unrecognized command: $1" diff --git a/clients/upssched.c b/clients/upssched.c index 8bb3547..97b3ed4 100644 --- a/clients/upssched.c +++ b/clients/upssched.c @@ -46,12 +46,9 @@ #include #include #include -#include -#include #include "upssched.h" #include "timehead.h" -#include "nut_stdint.h" typedef struct ttype_s { char *name; @@ -59,13 +56,14 @@ typedef struct ttype_s { struct ttype_s *next; } ttype_t; -static ttype_t *thead = NULL; -static conn_t *connhead = NULL; -static char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL; -static int verbose = 0; /* use for debugging */ + ttype_t *thead = NULL; + static conn_t *connhead = NULL; + char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL; + int verbose = 0; /* use for debugging */ -/* ups name and notify type (string) as received from upsmon */ -static const char *upsname, *notify_type; + + /* ups name and notify type (string) as received from upsmon */ + const char *upsname, *notify_type; #define PARENT_STARTED -2 #define PARENT_UNNECESSARY -3 @@ -181,7 +179,7 @@ static void checktimers(void) static void start_timer(const char *name, const char *ofsstr) { time_t now; - long ofs; + int ofs; ttype_t *tmp, *last; /* get the time */ @@ -196,7 +194,7 @@ static void start_timer(const char *name, const char *ofsstr) } if (verbose) - upslogx(LOG_INFO, "New timer: %s (%ld seconds)", name, ofs); + upslogx(LOG_INFO, "New timer: %s (%d seconds)", name, ofs); /* now add to the queue */ tmp = last = thead; @@ -242,7 +240,7 @@ static void cancel_timer(const char *name, const char *cname) static void us_serialize(int op) { static int pipefd[2]; - ssize_t ret; + int ret; char ch; switch(op) { @@ -272,7 +270,6 @@ static int open_sock(void) int ret, fd; struct sockaddr_un ssaddr; - check_unix_socket_filename(pipefn); fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd < 0) @@ -300,9 +297,6 @@ static int open_sock(void) if (ret < 0) fatal_with_errno(EXIT_FAILURE, "listen(%d, %d) failed", fd, US_LISTEN_BACKLOG); - /* don't leak socket to CMDSCRIPT */ - fcntl(fd, F_SETFD, FD_CLOEXEC); - return fd; } @@ -335,40 +329,17 @@ static void conn_del(conn_t *target) static int send_to_one(conn_t *conn, const char *fmt, ...) { - ssize_t ret; - size_t buflen; + int ret; va_list ap; char buf[US_SOCK_BUF_LEN]; va_start(ap, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vsnprintf(buf, sizeof(buf), fmt, ap); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(ap); - buflen = strlen(buf); - if (buflen >= SSIZE_MAX) { - /* Can't compare buflen to ret */ - upsdebugx(2, "send_to_one(): buffered message too large"); + ret = write(conn->fd, buf, strlen(buf)); - close(conn->fd); - conn_del(conn); - - return 0; /* failed */ - } - ret = write(conn->fd, buf, buflen); - - if ((ret < 1) || (ret != (ssize_t) buflen)) { + if ((ret < 1) || (ret != (int) strlen(buf))) { upsdebugx(2, "write to fd %d failed", conn->fd); close(conn->fd); @@ -385,7 +356,7 @@ static void conn_add(int sockfd) int acc, ret; conn_t *tmp, *last; struct sockaddr_un saddr; -#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED) +#if defined(__hpux) && !defined(_XOPEN_SOURCE_EXTENDED) int salen; #else socklen_t salen; @@ -399,9 +370,6 @@ static void conn_add(int sockfd) return; } - /* don't leak connection to CMDSCRIPT */ - fcntl(acc, F_SETFD, FD_CLOEXEC); - /* enable nonblocking I/O */ ret = fcntl(acc, F_GETFL, 0); @@ -472,20 +440,19 @@ static int sock_arg(conn_t *conn) return 0; } -static void log_unknown(size_t numarg, char **arg) +static void log_unknown(int numarg, char **arg) { - size_t i; + int i; upslogx(LOG_INFO, "Unknown command on socket: "); for (i = 0; i < numarg; i++) - upslogx(LOG_INFO, "arg %zu: %s", i, arg[i]); + upslogx(LOG_INFO, "arg %d: %s", i, arg[i]); } static int sock_read(conn_t *conn) { - int i; - ssize_t ret; + int i, ret; char ch; for (i = 0; i < US_MAX_READ; i++) { @@ -498,19 +465,13 @@ static int sock_read(conn_t *conn) if ((ret == -1) && (errno == EAGAIN)) return 0; - /* O_NDELAY with zero bytes means nothing to read but - * since read() follows a succesful select() with - * ready file descriptor, ret shouldn't be 0. */ - if (ret == 0) - continue; - /* some other problem */ return -1; /* error */ } ret = pconf_char(&conn->ctx, ch); - if (ret == 0) /* nothing to parse yet */ + if (ret == 0) /* nothing to parse yet */ continue; if (ret == -1) { @@ -633,8 +594,6 @@ static int try_connect(void) int pipefd, ret; struct sockaddr_un saddr; - check_unix_socket_filename(pipefn); - memset(&saddr, '\0', sizeof(saddr)); saddr.sun_family = AF_UNIX; snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s", pipefn); @@ -700,15 +659,28 @@ static int check_parent(const char *cmd, const char *arg2) exit(EXIT_FAILURE); } +static void read_timeout(int sig) +{ + /* ignore this */ + return; +} + +static void setup_sigalrm(void) +{ + struct sigaction sa; + sigset_t nut_upssched_sigmask; + + sigemptyset(&nut_upssched_sigmask); + sa.sa_mask = nut_upssched_sigmask; + sa.sa_flags = 0; + sa.sa_handler = read_timeout; + sigaction(SIGALRM, &sa, NULL); +} + static void sendcmd(const char *cmd, const char *arg1, const char *arg2) { - int i, pipefd; - ssize_t ret; - size_t enclen, buflen; - char buf[SMALLBUF], enc[SMALLBUF + 8]; - int ret_s; - struct timeval tv; - fd_set fdread; + int i, pipefd, ret; + char buf[SMALLBUF], enc[SMALLBUF]; /* insanity */ if (!arg1) @@ -724,14 +696,6 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) snprintf(enc, sizeof(enc), "%s\n", buf); - /* Sanity checks, for static analyzers to sleep well */ - enclen = strlen(enc); - buflen = strlen(buf); - if (enclen >= SSIZE_MAX || buflen >= SSIZE_MAX) { - /* Can't compare enclen to ret below */ - fatalx(EXIT_FAILURE, "Unable to connect to daemon: buffered message too large"); - } - /* see if the parent needs to be started (and maybe start it) */ for (i = 0; i < MAX_TRIES; i++) { @@ -739,6 +703,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) pipefd = check_parent(cmd, arg2); if (pipefd == PARENT_STARTED) { + /* loop back and try to connect now */ usleep(250000); continue; @@ -750,41 +715,23 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) /* we're connected now */ - ret = write(pipefd, enc, enclen); + ret = write(pipefd, enc, strlen(enc)); /* if we can't send the whole thing, loop back and try again */ - if ((ret < 1) || (ret != (ssize_t)enclen)) { + if ((ret < 1) || (ret != (int) strlen(enc))) { upslogx(LOG_ERR, "write failed, trying again"); close(pipefd); continue; } - /* select on child's pipe fd */ - do { - /* set timeout every time before call select() */ - tv.tv_sec = 1; - tv.tv_usec = 0; + /* ugh - probably should use select here... */ + setup_sigalrm(); - FD_ZERO(&fdread); - FD_SET(pipefd, &fdread); + alarm(2); + ret = read(pipefd, buf, sizeof(buf)); + alarm(0); - ret_s = select(pipefd + 1, &fdread, NULL, NULL, &tv); - switch(ret_s) { - /* select error */ - case -1: - upslogx(LOG_DEBUG, "parent select error: %s", strerror(errno)); - break; - - /* nothing to read */ - case 0: - break; - - /* available data to read */ - default: - ret = read(pipefd, buf, sizeof(buf)); - break; - } - } while (ret_s <= 0); + signal(SIGALRM, SIG_IGN); close(pipefd); @@ -800,7 +747,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2) upslogx(LOG_ERR, "read confirmation got [%s]", buf); /* try again ... */ - } /* loop until MAX_TRIES if no success above */ + } fatalx(EXIT_FAILURE, "Unable to connect to daemon and unable to start daemon"); } @@ -847,7 +794,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd, } if (!strcmp(cmd, "EXECUTE")) { - if (ca1[0] == '\0') { + if (ca1 == '\0') { upslogx(LOG_ERR, "Empty EXECUTE command argument"); return; } @@ -862,7 +809,7 @@ static void parse_at(const char *ntype, const char *un, const char *cmd, upslogx(LOG_ERR, "Invalid command: %s", cmd); } -static int conf_arg(size_t numargs, char **arg) +static int conf_arg(int numargs, char **arg) { if (numargs < 2) return 0; @@ -953,15 +900,9 @@ static void checkconf(void) int main(int argc, char **argv) { - const char *prog = NULL; - /* More a use for argc to avoid warnings than a real need: */ - if (argc > 0) { - xbasename(argv[0]); - } else { - xbasename("upssched"); - } + const char *prog = xbasename(argv[0]); - verbose = 1; /* TODO: remove when done testing, or add -D */ + verbose = 1; /* TODO: remove when done testing */ /* normally we don't have stderr, so get this going to syslog early */ open_syslog(prog); diff --git a/clients/upssched.h b/clients/upssched.h index 1b7e8f1..db0c25d 100644 --- a/clients/upssched.h +++ b/clients/upssched.h @@ -1,8 +1,5 @@ /* upssched.h - supporting structures */ -#ifndef NUT_UPSSCHED_H_SEEN -#define NUT_UPSSCHED_H_SEEN 1 - #include #define SERIALIZE_INIT 1 @@ -28,4 +25,3 @@ typedef struct conn_s { /* *INDENT-ON* */ #endif -#endif /* NUT_UPSSCHED_H_SEEN */ diff --git a/clients/upsset.c b/clients/upsset.c index 788b201..8f18b7c 100644 --- a/clients/upsset.c +++ b/clients/upsset.c @@ -24,7 +24,6 @@ #include #include -#include "nut_stdint.h" #include "upsclient.h" #include "cgilib.h" #include "parseconf.h" @@ -40,12 +39,12 @@ struct list_t { #define HARD_UPSVAR_LIMIT_NUM 64 #define HARD_UPSVAR_LIMIT_LEN 256 -static char *monups, *username, *password, *function, *upscommand; + char *monups, *username, *password, *function, *upscommand; -/* set once the MAGIC_ENABLE_STRING is found in the upsset.conf */ -static int magic_string_set = 0; + /* set once the MAGIC_ENABLE_STRING is found in the upsset.conf */ + int magic_string_set = 0; -static uint16_t port; +static int port; static char *upsname, *hostname; static UPSCONN_t ups; @@ -55,7 +54,7 @@ typedef struct { void *next; } uvtype_t; -static uvtype_t *firstuv = NULL; + uvtype_t *firstuv = NULL; void parsearg(char *var, char *value) { @@ -135,7 +134,7 @@ static void do_header(const char *title) printf("\n"); printf("upsset: %s\n", title); - printf("\n"); + printf("\n"); printf("\n"); printf("
\n"); @@ -145,7 +144,7 @@ static void start_table(void) { printf("\n"); printf("\n"); } @@ -159,12 +158,12 @@ static void do_hidden(const char *next) password); if (next) - printf("\n", + printf("\n", next); } /* generate SELECT chooser from hosts.conf entries */ -static void upslist_arg(size_t numargs, char **arg) +static void upslist_arg(int numargs, char **arg) { if (numargs < 3) return; @@ -223,7 +222,7 @@ static void do_pickups(const char *currfunc) continue; } - upslist_arg(ctx.numargs, ctx.arglist); + upslist_arg(ctx.numargs, ctx.arglist); } pconf_finish(&ctx); @@ -254,10 +253,6 @@ static void do_pickups(const char *currfunc) printf("\n"); } -static void error_page(const char *next, const char *title, - const char *fmt, ...) - __attribute__((noreturn)); - static void error_page(const char *next, const char *title, const char *fmt, ...) { @@ -265,19 +260,7 @@ static void error_page(const char *next, const char *title, va_list ap; va_start(ap, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vsnprintf(msg, sizeof(msg), fmt, ap); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(ap); do_header(title); @@ -299,9 +282,6 @@ static void error_page(const char *next, const char *title, exit(EXIT_SUCCESS); } -static void loginscreen(void) - __attribute__((noreturn)); - static void loginscreen(void) { do_header("Login"); @@ -351,7 +331,7 @@ static void upsd_connect(void) static void print_cmd(const char *cmd) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer; const char *query[4]; @@ -374,7 +354,7 @@ static void print_cmd(const char *cmd) static void showcmds(void) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[2]; char **answer; struct list_t *lhead, *llast, *ltmp, *lnext; @@ -411,7 +391,7 @@ static void showcmds(void) /* CMD upsname cmdname */ if (numa < 3) { fprintf(stderr, "Error: insufficient data " - "(got %zu args, need at least 3)\n", numa); + "(got %d args, need at least 3)\n", numa); return; } @@ -486,7 +466,7 @@ static void showcmds(void) upscli_disconnect(&ups); exit(EXIT_SUCCESS); -} +} /* handle setting authentication data in the server */ static void send_auth(const char *next) @@ -511,7 +491,7 @@ static void send_auth(const char *next) "upsd version too old - USERNAME not supported"); } - error_page(next, "Can't set user name", + error_page(next, "Can't set user name", "Set user name failed: %s", upscli_strerror(&ups)); } @@ -524,10 +504,7 @@ static void send_auth(const char *next) if (upscli_readline(&ups, buf, sizeof(buf)) < 0) error_page(next, "Can't set password", "Password set failed: %s", upscli_strerror(&ups)); -} - -static void docmd(void) - __attribute__((noreturn)); +} static void docmd(void) { @@ -538,13 +515,13 @@ static void docmd(void) "Access to that host is not authorized"); /* the user is messing with us */ - if (!upscommand) - error_page("showcmds", "Form error", + if (!upscommand) + error_page("showcmds", "Form error", "No instant command selected"); /* (l)user took the default blank option */ if (strlen(upscommand) == 0) - error_page("showcmds", "Form error", + error_page("showcmds", "Form error", "No instant command selected"); upsd_connect(); @@ -618,7 +595,7 @@ static void docmd(void) static const char *get_data(const char *type, const char *varname) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer; const char *query[4]; @@ -656,7 +633,7 @@ static void do_string(const char *varname, int maxlen) static void do_enum(const char *varname) { int ret; - size_t numq, numa; + unsigned int numq, numa; char **answer, *val; const char *query[4], *tmp; @@ -682,9 +659,8 @@ static void do_enum(const char *varname) if (ret < 0) { printf("Unavailable\n"); - fprintf(stderr, "Error doing ENUM %s %s: %s\n", + fprintf(stderr, "Error doing ENUM %s %s: %s\n", upsname, varname, upscli_strerror(&ups)); - free(val); return; } @@ -698,7 +674,7 @@ static void do_enum(const char *varname) if (numa < 4) { fprintf(stderr, "Error: insufficient data " - "(got %zu args, need at least 4)\n", numa); + "(got %d args, need at least 4)\n", numa); free(val); return; @@ -721,7 +697,7 @@ static void do_enum(const char *varname) static void do_type(const char *varname) { int ret; - size_t i, numq, numa; + unsigned int i, numq, numa; char **answer; const char *query[4]; @@ -733,7 +709,7 @@ static void do_type(const char *varname) ret = upscli_get(&ups, numq, query, &numa, &answer); if ((ret < 0) || (numa < numq)) { - printf("Unknown type\n"); + printf("Unknown type\n"); return; } @@ -751,9 +727,7 @@ static void do_type(const char *varname) /* split out the : data */ ptr = strchr(answer[i], ':'); *ptr++ = '\0'; - long l = strtol(ptr, (char **) NULL, 10); - assert(l <= 127); /* FIXME: Loophole about longer numbers? Why are we limited to char at all here? */ - len = (char)l; + len = strtol(ptr, (char **) NULL, 10); do_string(varname, len); return; @@ -767,12 +741,10 @@ static void do_type(const char *varname) } } -static void print_rw(const char *arg_upsname, const char *varname) +static void print_rw(const char *upsname, const char *varname) { const char *tmp; - printf("\n", arg_upsname); - printf("\n"); printf("\n"); } -static void showsettings(void) - __attribute__((noreturn)); - static void showsettings(void) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[2]; char **answer, *desc = NULL; struct list_t *lhead, *llast, *ltmp, *lnext; @@ -938,16 +907,13 @@ static int setvar(const char *var, const char *val) } /* turn a form submission of settings into SET commands for upsd */ -static void savesettings(void) - __attribute__((noreturn)); - static void savesettings(void) { int changed = 0; char *desc; uvtype_t *upsvar; - if (!checkhost(monups, &desc)) + if (!checkhost(monups, &desc)) error_page("showsettings", "Access denied", "Access to that host is not authorized"); @@ -987,9 +953,6 @@ static void savesettings(void) exit(EXIT_SUCCESS); } -static void initial_pickups(void) - __attribute__((noreturn)); - static void initial_pickups(void) { do_header("Select a UPS"); @@ -1064,12 +1027,10 @@ static void check_conf(void) fprintf(stderr, "upsset.conf does not permit execution\n"); exit(EXIT_FAILURE); -} +} int main(int argc, char **argv) { - NUT_UNUSED_VARIABLE(argc); - NUT_UNUSED_VARIABLE(argv); username = password = function = monups = NULL; printf("Content-type: text/html\n\n"); @@ -1079,16 +1040,15 @@ int main(int argc, char **argv) /* see if there's anything waiting .. the server my not close STDIN properly */ if (1) { - fd_set fds; - struct timeval tv; + fd_set fds; + struct timeval tv; - FD_ZERO(&fds); - FD_SET(STDIN_FILENO, &fds); - tv.tv_sec = 0; - tv.tv_usec = 250000; /* wait for up to 250ms for a POST response */ - - if ((select(STDIN_FILENO+1, &fds, 0, 0, &tv)) > 0) - extractpostargs(); + FD_ZERO(&fds); + FD_SET(STDIN_FILENO, &fds); + tv.tv_sec = 0; + tv.tv_usec = 250000; /* wait for up to 250ms for a POST response */ + if ((select(STDIN_FILENO+1, &fds, 0, 0, &tv)) > 0) + extractpostargs(); } if ((!username) || (!password) || (!function)) loginscreen(); @@ -1114,6 +1074,6 @@ int main(int argc, char **argv) docmd(); printf("Error: Unhandled function name [%s]\n", function); - + return 0; } diff --git a/clients/upsstats.c b/clients/upsstats.c index 4b7f754..07ab6ea 100644 --- a/clients/upsstats.c +++ b/clients/upsstats.c @@ -19,12 +19,11 @@ */ #include "common.h" -#include "nut_stdint.h" -#include "timehead.h" #include "upsclient.h" #include "status.h" #include "cgilib.h" #include "parseconf.h" +#include "timehead.h" #include "upsstats.h" #include "upsimagearg.h" @@ -37,7 +36,7 @@ static int use_celsius = 1, refreshdelay = -1, treemode = 0; /* from cgilib's checkhost() */ static char *monhostdesc = NULL; -static uint16_t port; +static int port; static char *upsname, *hostname; static char *upsimgpath="upsimage.cgi", *upsstatpath="upsstats.cgi"; static UPSCONN_t ups; @@ -104,7 +103,7 @@ static int check_ups_fd(int do_report) static int get_var(const char *var, char *buf, size_t buflen, int verbose) { int ret; - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -135,7 +134,7 @@ static int get_var(const char *var, char *buf, size_t buflen, int verbose) if (numa < numq) { if (verbose) printf("[Invalid response]\n"); - + return 0; } @@ -196,10 +195,9 @@ static int do_date(const char *buf) { char datebuf[SMALLBUF]; time_t tod; - struct tm tmbuf; time(&tod); - if (strftime(datebuf, sizeof(datebuf), buf, localtime_r(&tod, &tmbuf))) { + if (strftime(datebuf, sizeof(datebuf), buf, localtime(&tod))) { printf("%s", datebuf); return 1; } @@ -293,12 +291,12 @@ static int do_img(char *buf) /* only allow known types through */ - if (!strcmp(type, "input.voltage") - || !strcmp(type, "input.L1-N.voltage") - || !strcmp(type, "input.L2-N.voltage") + if (!strcmp(type, "input.voltage") + || !strcmp(type, "input.L1-N.voltage") + || !strcmp(type, "input.L2-N.voltage") || !strcmp(type, "input.L3-N.voltage") - || !strcmp(type, "input.L1-L2.voltage") - || !strcmp(type, "input.L2-L3.voltage") + || !strcmp(type, "input.L1-L2.voltage") + || !strcmp(type, "input.L2-L3.voltage") || !strcmp(type, "input.L3-L1.voltage")) { return get_img_val(type, "Input voltage", imgargs); } @@ -310,11 +308,11 @@ static int do_img(char *buf) return get_img_val(type, "Battery charge", imgargs); if (!strcmp(type, "output.voltage") - || !strcmp(type, "output.L1-N.voltage") - || !strcmp(type, "output.L2-N.voltage") + || !strcmp(type, "output.L1-N.voltage") + || !strcmp(type, "output.L2-N.voltage") || !strcmp(type, "output.L3-N.voltage") - || !strcmp(type, "output.L1-L2.voltage") - || !strcmp(type, "output.L2-L3.voltage") + || !strcmp(type, "output.L1-L2.voltage") + || !strcmp(type, "output.L2-L3.voltage") || !strcmp(type, "output.L3-L1.voltage")) { return get_img_val(type, "Output voltage", imgargs); } @@ -351,7 +349,7 @@ static void ups_connect(void) { static ulist_t *lastups = NULL; char *newups, *newhost; - uint16_t newport; + int newport; /* try to minimize reconnects */ if (lastups) { @@ -365,13 +363,13 @@ static void ups_connect(void) /* see if it's just on the same host */ newups = newhost = NULL; - if (upscli_splitname(currups->sys, &newups, &newhost, + if (upscli_splitname(currups->sys, &newups, &newhost, &newport) != 0) { printf("Unusable UPS definition [%s]\n", currups->sys); - fprintf(stderr, "Unusable UPS definition [%s]\n", + fprintf(stderr, "Unusable UPS definition [%s]\n", currups->sys); exit(EXIT_FAILURE); - } + } if ((!strcmp(newhost, hostname)) && (port == newport)) { free(upsname); @@ -566,7 +564,7 @@ static void do_upsimgpath(const char *s) { static void do_temp(const char *var) { char tempc[SMALLBUF]; - double tempf; + float tempf; if (!get_var(var, tempc, sizeof(tempc), 1)) return; @@ -809,8 +807,7 @@ static int do_command(char *cmd) static void parse_line(const char *buf) { char cmd[SMALLBUF]; - size_t i, len; - char do_cmd = 0; + int i, len, do_cmd = 0; for (i = 0; buf[i]; i += len) { @@ -827,10 +824,9 @@ static void parse_line(const char *buf) i++; /* skip over the '@' character */ continue; } - assert (len < INT_MAX); if (do_cmd) { - snprintf(cmd, sizeof(cmd), "%.*s", (int)len, &buf[i]); + snprintf(cmd, sizeof(cmd), "%.*s", len, &buf[i]); continue; } @@ -840,13 +836,13 @@ static void parse_line(const char *buf) } /* pass it trough */ - printf("%.*s", (int)len, &buf[i]); + printf("%.*s", len, &buf[i]); } } static void display_template(const char *tfn) { - char fn[SMALLBUF], buf[LARGEBUF]; + char fn[SMALLBUF], buf[LARGEBUF]; snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn); @@ -869,7 +865,7 @@ static void display_template(const char *tfn) static void display_tree(int verbose) { - size_t numq, numa; + unsigned int numq, numa; const char *query[4]; char **answer; @@ -894,7 +890,7 @@ static void display_tree(int verbose) printf("\n"); printf("upsstat: data tree of %s\n", currups->desc); - printf("\n"); + printf("\n"); printf("
\n"); - printf("Network UPS Tools upsset %s\n", + printf("Network UPS Tools upsset %s\n", UPS_VERSION); printf("
"); @@ -793,13 +765,10 @@ static void print_rw(const char *arg_upsname, const char *varname) printf("
\n"); printf("\n"); - + printf("\n", answer[2]); printf("\n"); printf("\n", answer[3]); @@ -940,7 +936,7 @@ static void add_ups(char *sys, char *desc) tmp = last = ulhead; - while (tmp) { + while (tmp) { last = tmp; tmp = tmp->next; } @@ -1045,12 +1041,9 @@ static void display_single(void) int main(int argc, char **argv) { - NUT_UNUSED_VARIABLE(argc); - NUT_UNUSED_VARIABLE(argv); - extractcgiargs(); - printf("Content-type: text/html\n"); + printf("Content-type: text/html\n"); printf("Pragma: no-cache\n"); printf("\n"); diff --git a/clients/upsstats.h b/clients/upsstats.h index 92ed932..84ca8ad 100644 --- a/clients/upsstats.h +++ b/clients/upsstats.h @@ -17,9 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef NUT_UPSSTATS_H_SEEN -#define NUT_UPSSTATS_H_SEEN 1 - #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" { @@ -38,4 +35,3 @@ typedef struct { /* *INDENT-ON* */ #endif -#endif /* NUT_UPSSTATS_H_SEEN */ diff --git a/common/Makefile.am b/common/Makefile.am index 5ce88ab..2bfc6e0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -8,42 +8,10 @@ libparseconf_la_SOURCES = parseconf.c # 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 -# be built before anything else... but do depend on its build area: -if BUILDING_IN_TREE -# No need for symlink hack -common.c: $(top_builddir)/include/nut_version.h -else -# Surprisingly, for some "make" implementations this dependency means -# that the "common.c" required for builds below will be seeked in the -# current directory. So for out-of-tree builds like distcheck, we have -# to symlink the "real" source to build area: -common.c: $(top_builddir)/include/nut_version.h $(srcdir)/common.c - test -s "$@" || ln -s -f "$(top_srcdir)/common/common.c" "$@" -endif - -$(top_builddir)/include/nut_version.h: - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) - -libcommon_la_SOURCES = state.c str.c upsconf.c -libcommonclient_la_SOURCES = state.c str.c -if BUILDING_IN_TREE -libcommon_la_SOURCES += common.c -libcommonclient_la_SOURCES += common.c -else -nodist_libcommon_la_SOURCES = common.c -nodist_libcommonclient_la_SOURCES = common.c -CLEANFILES = $(top_builddir)/common/common.c -BUILT_SOURCES = common.c -endif - +# be built before anything else +libcommon_la_SOURCES = common.c state.c str.c upsconf.c +libcommonclient_la_SOURCES = common.c state.c str.c # ensure inclusion of local implementation of missing systems functions -# using LTLIBOBJS. Refer to configure.in/.ac -> AC_REPLACE_FUNCS +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@ - -MAINTAINERCLEANFILES = Makefile.in .dirstamp - -# NOTE: Do not clean ".deps" in SUBDIRS of the main project, -# the root Makefile.am takes care of that! -#clean-local: -# rm -rf $(builddir)/.deps diff --git a/common/Makefile.in b/common/Makefile.in index a6eb968..8710560 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,17 +17,7 @@ # Network UPS Tools: common VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -91,27 +81,20 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@BUILDING_IN_TREE_TRUE@am__append_1 = common.c -@BUILDING_IN_TREE_TRUE@am__append_2 = common.c subdir = common +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am atexit.c \ + snprintf.c setenv.c strerror.c $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -120,39 +103,26 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ -am__libcommon_la_SOURCES_DIST = state.c str.c upsconf.c common.c -@BUILDING_IN_TREE_TRUE@am__objects_1 = common.lo -am_libcommon_la_OBJECTS = state.lo str.lo upsconf.lo $(am__objects_1) -@BUILDING_IN_TREE_FALSE@nodist_libcommon_la_OBJECTS = common.lo -libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \ - $(nodist_libcommon_la_OBJECTS) +am_libcommon_la_OBJECTS = common.lo state.lo str.lo upsconf.lo +libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libcommonclient_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@ -am__libcommonclient_la_SOURCES_DIST = state.c str.c common.c -am_libcommonclient_la_OBJECTS = state.lo str.lo $(am__objects_1) -@BUILDING_IN_TREE_FALSE@nodist_libcommonclient_la_OBJECTS = common.lo -libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) \ - $(nodist_libcommonclient_la_OBJECTS) +am_libcommonclient_la_OBJECTS = common.lo state.lo str.lo +libcommonclient_la_OBJECTS = $(am_libcommonclient_la_OBJECTS) libparseconf_la_LIBADD = am_libparseconf_la_OBJECTS = parseconf.lo libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS) @@ -170,12 +140,7 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp -am__maybe_remake_depfiles = depfiles -am__depfiles_remade = $(DEPDIR)/atexit.Plo $(DEPDIR)/setenv.Plo \ - $(DEPDIR)/snprintf.Plo $(DEPDIR)/strerror.Plo \ - ./$(DEPDIR)/common.Plo ./$(DEPDIR)/parseconf.Plo \ - ./$(DEPDIR)/state.Plo ./$(DEPDIR)/str.Plo \ - ./$(DEPDIR)/upsconf.Plo +am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -195,12 +160,9 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) \ - $(libcommonclient_la_SOURCES) \ - $(nodist_libcommonclient_la_SOURCES) \ +SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ $(libparseconf_la_SOURCES) -DIST_SOURCES = $(am__libcommon_la_SOURCES_DIST) \ - $(am__libcommonclient_la_SOURCES_DIST) \ +DIST_SOURCES = $(libcommon_la_SOURCES) $(libcommonclient_la_SOURCES) \ $(libparseconf_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ @@ -226,8 +188,6 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp atexit.c \ - setenv.c snprintf.c strerror.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -236,7 +196,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -247,7 +206,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -261,7 +219,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -274,7 +231,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -292,8 +248,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -304,29 +258,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -346,9 +292,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -362,7 +305,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -380,7 +322,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -394,9 +335,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -422,14 +360,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -442,20 +378,18 @@ udevdir = @udevdir@ AM_CFLAGS = -I$(top_srcdir)/include noinst_LTLIBRARIES = libparseconf.la libcommon.la libcommonclient.la libparseconf_la_SOURCES = parseconf.c -libcommon_la_SOURCES = state.c str.c upsconf.c $(am__append_1) -libcommonclient_la_SOURCES = state.c str.c $(am__append_2) -@BUILDING_IN_TREE_FALSE@nodist_libcommon_la_SOURCES = common.c -@BUILDING_IN_TREE_FALSE@nodist_libcommonclient_la_SOURCES = common.c -@BUILDING_IN_TREE_FALSE@CLEANFILES = $(top_builddir)/common/common.c -@BUILDING_IN_TREE_FALSE@BUILT_SOURCES = common.c +# 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 +# be built before anything else +libcommon_la_SOURCES = common.c state.c str.c upsconf.c +libcommonclient_la_SOURCES = common.c state.c str.c # ensure inclusion of local implementation of missing systems functions -# using LTLIBOBJS. Refer to configure.in/.ac -> AC_REPLACE_FUNCS +# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@ libcommonclient_la_LIBADD = libparseconf.la @LTLIBOBJS@ -MAINTAINERCLEANFILES = Makefile.in .dirstamp -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -471,13 +405,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -515,21 +450,15 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ # am--include-marker - -$(am__depfiles_remade): - @$(MKDIR_P) $(@D) - @echo '# dummy' >$@-t && $(am__mv) $@-t $@ - -am--depfiles: $(am__depfiles_remade) +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/str.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -613,10 +542,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -647,14 +573,11 @@ distdir-am: $(DISTFILES) fi; \ done check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am +check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install: install-am +install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -675,7 +598,6 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -684,23 +606,13 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am - -rm -f $(DEPDIR)/atexit.Plo - -rm -f $(DEPDIR)/setenv.Plo - -rm -f $(DEPDIR)/snprintf.Plo - -rm -f $(DEPDIR)/strerror.Plo - -rm -f ./$(DEPDIR)/common.Plo - -rm -f ./$(DEPDIR)/parseconf.Plo - -rm -f ./$(DEPDIR)/state.Plo - -rm -f ./$(DEPDIR)/str.Plo - -rm -f ./$(DEPDIR)/upsconf.Plo + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -746,15 +658,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f $(DEPDIR)/atexit.Plo - -rm -f $(DEPDIR)/setenv.Plo - -rm -f $(DEPDIR)/snprintf.Plo - -rm -f $(DEPDIR)/strerror.Plo - -rm -f ./$(DEPDIR)/common.Plo - -rm -f ./$(DEPDIR)/parseconf.Plo - -rm -f ./$(DEPDIR)/state.Plo - -rm -f ./$(DEPDIR)/str.Plo - -rm -f ./$(DEPDIR)/upsconf.Plo + -rm -rf $(DEPDIR) ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -773,45 +677,22 @@ ps-am: uninstall-am: -.MAKE: all check install install-am install-exec install-strip +.MAKE: install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ - clean-generic clean-libtool clean-noinstLTLIBRARIES \ - cscopelist-am ctags ctags-am distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am -.PRECIOUS: Makefile - - -# 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 -# be built before anything else... but do depend on its build area: -# No need for symlink hack -@BUILDING_IN_TREE_TRUE@common.c: $(top_builddir)/include/nut_version.h -# Surprisingly, for some "make" implementations this dependency means -# that the "common.c" required for builds below will be seeked in the -# current directory. So for out-of-tree builds like distcheck, we have -# to symlink the "real" source to build area: -@BUILDING_IN_TREE_FALSE@common.c: $(top_builddir)/include/nut_version.h $(srcdir)/common.c -@BUILDING_IN_TREE_FALSE@ test -s "$@" || ln -s -f "$(top_srcdir)/common/common.c" "$@" - -$(top_builddir)/include/nut_version.h: - @cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F) - -# NOTE: Do not clean ".deps" in SUBDIRS of the main project, -# the root Makefile.am takes care of that! -#clean-local: -# rm -rf $(builddir)/.deps # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/common/common.c b/common/common.c index f664d99..6637113 100644 --- a/common/common.c +++ b/common/common.c @@ -1,7 +1,6 @@ /* common.c - common useful functions Copyright (C) 2000 Russell Kroll - Copyright (C) 2021-2022 Jim Klimov This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,11 +21,8 @@ #include #include -#include #include #include -#include -#include /* the reason we define UPS_VERSION as a static string, rather than a macro, is to make dependency tracking easier (only common.o depends @@ -36,52 +32,6 @@ #include "nut_version.h" const char *UPS_VERSION = NUT_VERSION_MACRO; -#include - -/* Know which bitness we were built for, - * to adjust the search paths for get_libname() */ -#include "nut_stdint.h" -#if UINTPTR_MAX == 0xffffffffffffffffULL -# define BUILD_64 1 -#else -# ifdef BUILD_64 -# undef BUILD_64 -# endif -#endif - -/* https://stackoverflow.com/a/12844426/4715872 */ -#include -#include -#include -pid_t get_max_pid_t() -{ -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic ignored "-Wunreachable-code" -#endif -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" -#endif - if (sizeof(pid_t) == sizeof(short)) return (pid_t)SHRT_MAX; - if (sizeof(pid_t) == sizeof(int)) return (pid_t)INT_MAX; - if (sizeof(pid_t) == sizeof(long)) return (pid_t)LONG_MAX; -#if defined(__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined _STDC_C99) || (defined __C99FEATURES__) /* C99+ build mode */ -# if defined(LLONG_MAX) /* since C99 */ - if (sizeof(pid_t) == sizeof(long long)) return (pid_t)LLONG_MAX; -# endif -#endif - abort(); -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic pop -#endif -} - int nut_debug_level = 0; int nut_log_level = 0; static int upslog_flags = UPSLOG_STDERR; @@ -101,7 +51,7 @@ static int xbit_test(int val, int flag) return ((val & flag) == flag); } -/* enable writing upslog_with_errno() and upslogx() type messages to +/* enable writing upslog_with_errno() and upslogx() type messages to the syslog */ void syslogbit_set(void) { @@ -176,7 +126,7 @@ void background(void) close(1); close(2); - if (pid != 0) + if (pid != 0) _exit(EXIT_SUCCESS); /* parent */ /* child */ @@ -213,32 +163,8 @@ struct passwd *get_user_pwent(const char *name) fatalx(EXIT_FAILURE, "user %s not found", name); else fatal_with_errno(EXIT_FAILURE, "getpwnam(%s)", name); - -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) || (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN) ) -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic ignored "-Wunreachable-code" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN -#pragma GCC diagnostic ignored "-Wunreachable-code-return" -#endif -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" -# ifdef HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN -# pragma clang diagnostic ignored "-Wunreachable-code-return" -# endif -#endif - /* Oh joy, adding unreachable "return" to make one compiler happy, - * and pragmas around to make other compilers happy, all at once! */ - return NULL; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -#if (defined HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP) && ( (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE) || (defined HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN) ) -#pragma GCC diagnostic pop -#endif + + return NULL; /* to make the compiler happy */ } /* change to the user defined in the struct */ @@ -282,7 +208,7 @@ void writepid(const char *name) { char fn[SMALLBUF]; FILE *pidf; - mode_t mask; + int mask; /* use full path if present, else build filename in PIDPATH */ if (*name == '/') @@ -294,9 +220,7 @@ void writepid(const char *name) pidf = fopen(fn, "w"); if (pidf) { - intmax_t pid = (intmax_t)getpid(); - upsdebugx(1, "Saving PID %jd into %s", pid, fn); - fprintf(pidf, "%jd\n", pid); + fprintf(pidf, "%d\n", (int) getpid()); fclose(pidf); } else { upslog_with_errno(LOG_NOTICE, "writepid: fopen %s", fn); @@ -305,17 +229,30 @@ void writepid(const char *name) umask(mask); } -/* send sig to pid, returns -1 for error, or - * zero for a successfully sent signal - */ -int sendsignalpid(pid_t pid, int sig) +/* open pidfn, get the pid, then send it sig */ +int sendsignalfn(const char *pidfn, int sig) { - int ret; + char buf[SMALLBUF]; + FILE *pidf; + int pid, ret; - if (pid < 2 || pid > get_max_pid_t()) { - upslogx(LOG_NOTICE, - "Ignoring invalid pid number %" PRIdMAX, - (intmax_t) pid); + pidf = fopen(pidfn, "r"); + if (!pidf) { + upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn); + return -1; + } + + if (fgets(buf, sizeof(buf), pidf) == NULL) { + upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); + fclose(pidf); + return -1; + } + + pid = strtol(buf, (char **)NULL, 10); + + if (pid < 2) { + upslogx(LOG_NOTICE, "Ignoring invalid pid number %d", pid); + fclose(pidf); return -1; } @@ -324,78 +261,21 @@ int sendsignalpid(pid_t pid, int sig) if (ret < 0) { perror("kill"); + fclose(pidf); return -1; } - if (sig != 0) { - /* now actually send it */ - ret = kill(pid, sig); + /* now actually send it */ + ret = kill(pid, sig); - if (ret < 0) { - perror("kill"); - return -1; - } - } - - return 0; -} - -/* parses string buffer into a pid_t if it passes - * a few sanity checks; returns -1 on error - */ -pid_t parsepid(const char *buf) -{ - pid_t pid = -1; - - /* assuming 10 digits for a long */ - intmax_t _pid = strtol(buf, (char **)NULL, 10); - if (_pid <= get_max_pid_t()) { - pid = (pid_t)_pid; - } else { - upslogx(LOG_NOTICE, "Received a pid number too big for a pid_t: %" PRIdMAX, _pid); - } - - return pid; -} - -/* open pidfn, get the pid, then send it sig - * returns negative codes for errors, or - * zero for a successfully sent signal - */ -int sendsignalfn(const char *pidfn, int sig) -{ - char buf[SMALLBUF]; - FILE *pidf; - pid_t pid = -1; - int ret = -1; - - pidf = fopen(pidfn, "r"); - if (!pidf) { - upslog_with_errno(LOG_NOTICE, "fopen %s", pidfn); - return -3; - } - - if (fgets(buf, sizeof(buf), pidf) == NULL) { - upslogx(LOG_NOTICE, "Failed to read pid from %s", pidfn); + if (ret < 0) { + perror("kill"); fclose(pidf); - return -2; - } - /* TOTHINK: Original code only closed pidf before - * exiting the method, on error or "normally". - * Why not here? Do we want an (exclusive?) hold - * on it while being active in the method? - */ - - /* this method actively reports errors, if any */ - pid = parsepid(buf); - - if (pid >= 0) { - /* this method actively reports errors, if any */ - ret = sendsignalpid(pid, sig); + return -1; } fclose(pidf); - return ret; + return 0; } int snprintfcat(char *dst, size_t size, const char *fmt, ...) @@ -405,46 +285,14 @@ int snprintfcat(char *dst, size_t size, const char *fmt, ...) int ret; size--; - if (len > size) { - /* Do not truncate existing string */ - errno = ERANGE; - return -1; - } + assert(len <= size); va_start(ap, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif - /* Note: this code intentionally uses a caller-provided format string */ ret = vsnprintf(dst + len, size - len, fmt, ap); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(ap); dst[size] = '\0'; - - /* Note: there is a standards loophole here: strlen() must return size_t - * and printf() family returns a signed int with negatives for errors. - * In theory it can overflow a 64-vs-32 bit range, or signed-vs-unsigned. - * In practice we hope to not have gigabytes-long config strings. - */ - if (ret < 0) { - return ret; - } -#ifdef INT_MAX - if ( ( (unsigned long long)len + (unsigned long long)ret ) >= (unsigned long long)INT_MAX ) { - errno = ERANGE; - return -1; - } -#endif - return (int)len + ret; + return len + ret; } /* lazy way to send a signal if the program uses the PIDPATH */ @@ -471,27 +319,7 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror) int ret; char buf[LARGEBUF]; -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wformat-nonliteral" -#pragma clang diagnostic ignored "-Wformat-security" -#endif ret = vsnprintf(buf, sizeof(buf), fmt, va); -#ifdef __clang__ -#pragma clang diagnostic pop -#endif -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif if ((ret < 0) || (ret >= (int) sizeof(buf))) syslog(LOG_WARNING, "vupslog: vsnprintf needed more than %d bytes", @@ -501,20 +329,20 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror) snprintfcat(buf, sizeof(buf), ": %s", strerror(errno)); if (nut_debug_level > 0) { - static struct timeval start = { 0, 0 }; + static struct timeval start = { 0 }; struct timeval now; - + gettimeofday(&now, NULL); - + if (start.tv_sec == 0) { start = now; } - + if (start.tv_usec > now.tv_usec) { now.tv_usec += 1000000; now.tv_sec -= 1; } - + fprintf(stderr, "%4.0f.%06ld\t", difftime(now.tv_sec, start.tv_sec), (long)(now.tv_usec - start.tv_usec)); } @@ -525,7 +353,7 @@ static void vupslog(int priority, const char *fmt, va_list va, int use_strerror) } /* Return the default path for the directory containing configuration files */ -const char * confpath(void) +const char * confpath(void) { const char * path; @@ -536,82 +364,33 @@ const char * confpath(void) } /* Return the default path for the directory containing state files */ -const char * dflt_statepath(void) +const char * dflt_statepath(void) { const char * path; - path = getenv("NUT_STATEPATH"); - if ( (path == NULL) || (*path == '\0') ) + if ((path = getenv("NUT_STATEPATH")) == NULL) path = STATEPATH; return path; } -/* Return the alternate path for pid files, for processes running as non-root - * Per documentation and configure script, the fallback value is the - * state-file path as the daemon and drivers can write there too. - * Note that this differs from PIDPATH that higher-privileged daemons, such - * as upsmon, tend to use. - */ -const char * altpidpath(void) +/* Return the alternate path for pid files */ +const char * altpidpath(void) { - const char * path; - - path = getenv("NUT_ALTPIDPATH"); - if ( (path == NULL) || (*path == '\0') ) - path = getenv("NUT_STATEPATH"); - - if ( (path != NULL) && (*path != '\0') ) - return path; - #ifdef ALTPIDPATH return ALTPIDPATH; #else -/* We assume, here and elsewhere, that at least STATEPATH is always defined */ - return STATEPATH; + return dflt_statepath(); #endif } -/* Die with a standard message if socket filename is too long */ -void check_unix_socket_filename(const char *fn) { - struct sockaddr_un ssaddr; - if (strlen(fn) < sizeof(ssaddr.sun_path)) - return; - - /* Avoid useless truncated pathnames that - * other driver instances would conflict - * with, and upsd can not discover. - * Note this is quite short on many OSes - * varying 104-108 bytes (UNIX_PATH_MAX) - * as opposed to PATH_MAX or MAXPATHLEN - * typically of a kilobyte range. - */ - fatalx(EXIT_FAILURE, - "Can't create a unix domain socket: pathname '%s' " - "is too long (%zu) for 'struct sockaddr_un->sun_path' " - "on this system (%zu)", - fn, strlen(fn), sizeof(ssaddr.sun_path)); -} - /* logs the formatted string to any configured logging devices + the output of strerror(errno) */ void upslog_with_errno(int priority, const char *fmt, ...) { va_list va; va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vupslog(priority, fmt, va, 1); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); } @@ -621,115 +400,44 @@ void upslogx(int priority, const char *fmt, ...) va_list va; va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vupslog(priority, fmt, va, 0); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); } -void s_upsdebug_with_errno(int level, const char *fmt, ...) +void upsdebug_with_errno(int level, const char *fmt, ...) { va_list va; - char fmt2[LARGEBUF]; - - /* Note: Thanks to macro wrapping, we do not quite need this - * test now, but we still need the "level" value to report - * below - when it is not zero. - */ + if (nut_debug_level < level) return; -/* For debugging output, we want to prepend the debug level so the user can - * e.g. lower the level (less -D's on command line) to retain just the amount - * of logging info he needs to see at the moment. Using '-DDDDD' all the time - * is too brutal and needed high-level overview can be lost. This [D#] prefix - * can help limit this debug stream quicker, than experimentally picking ;) */ - if (level > 0) { - int ret; - ret = snprintf(fmt2, sizeof(fmt2), "[D%d] %s", level, fmt); - if ((ret < 0) || (ret >= (int) sizeof(fmt2))) { - syslog(LOG_WARNING, "upsdebug_with_errno: snprintf needed more than %d bytes", - LARGEBUF); - } else { - fmt = (const char *)fmt2; - } - } - va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vupslog(LOG_DEBUG, fmt, va, 1); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); } -void s_upsdebugx(int level, const char *fmt, ...) +void upsdebugx(int level, const char *fmt, ...) { va_list va; - char fmt2[LARGEBUF]; - + if (nut_debug_level < level) return; -/* See comments above in upsdebug_with_errno() - they apply here too. */ - if (level > 0) { - int ret; - ret = snprintf(fmt2, sizeof(fmt2), "[D%d] %s", level, fmt); - if ((ret < 0) || (ret >= (int) sizeof(fmt2))) { - syslog(LOG_WARNING, "upsdebugx: snprintf needed more than %d bytes", - LARGEBUF); - } else { - fmt = (const char *)fmt2; - } - } - va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vupslog(LOG_DEBUG, fmt, va, 0); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); } /* dump message msg and len bytes from buf to upsdebugx(level) in hexadecimal. (This function replaces Philippe Marzouk's original dump_hex() function) */ -void s_upsdebug_hex(int level, const char *msg, const void *buf, size_t len) +void upsdebug_hex(int level, const char *msg, const void *buf, int len) { char line[100]; int n; /* number of characters currently in line */ - size_t i; /* number of bytes output from buffer */ + int i; /* number of bytes output from buffer */ - n = snprintf(line, sizeof(line), "%s: (%zu bytes) =>", msg, len); - if (n < 0) goto failed; + n = snprintf(line, sizeof(line), "%s: (%d bytes) =>", msg, len); for (i = 0; i < len; i++) { @@ -739,16 +447,9 @@ void s_upsdebug_hex(int level, const char *msg, const void *buf, size_t len) } n = snprintfcat(line, sizeof(line), n ? " %02x" : "%02x", - ((const unsigned char *)buf)[i]); - - if (n < 0) goto failed; + ((unsigned char *)buf)[i]); } - - s_upsdebugx(level, "%s", line); - return; - -failed: - s_upsdebugx(level, "%s", "Failed to print a hex dump for debug"); + upsdebugx(level, "%s", line); } /* taken from www.asciitable.com */ @@ -788,37 +489,29 @@ static const char* ascii_symb[] = { }; /* dump message msg and len bytes from buf to upsdebugx(level) in ascii. */ -void s_upsdebug_ascii(int level, const char *msg, const void *buf, size_t len) +void upsdebug_ascii(int level, const char *msg, const void *buf, int len) { char line[256]; - int n; /* number of characters currently in line */ - size_t i; /* number of bytes output from buffer */ + int i; unsigned char ch; if (nut_debug_level < level) return; /* save cpu cycles */ - n = snprintf(line, sizeof(line), "%s", msg); - if (n < 0) goto failed; + snprintf(line, sizeof(line), "%s", msg); for (i=0; i= 0x80) - n = snprintfcat(line, sizeof(line), "%02Xh ", ch); + snprintfcat(line, sizeof(line), "%02Xh ", ch); else - n = snprintfcat(line, sizeof(line), "'%c' ", ch); - - if (n < 0) goto failed; + snprintfcat(line, sizeof(line), "'%c' ", ch); } - s_upsdebugx(level, "%s", line); - return; - -failed: - s_upsdebugx(level, "%s", "Failed to print an ASCII data dump for debug"); + upsdebugx(level, "%s", line); } static void vfatal(const char *fmt, va_list va, int use_strerror) @@ -828,19 +521,7 @@ static void vfatal(const char *fmt, va_list va, int use_strerror) if (xbit_test(upslog_flags, UPSLOG_SYSLOG_ON_FATAL)) xbit_set(&upslog_flags, UPSLOG_SYSLOG); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vupslog(LOG_ERR, fmt, va, use_strerror); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif } void fatal_with_errno(int status, const char *fmt, ...) @@ -848,19 +529,7 @@ void fatal_with_errno(int status, const char *fmt, ...) va_list va; va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vfatal(fmt, va, (errno > 0) ? 1 : 0); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); exit(status); @@ -871,19 +540,7 @@ void fatalx(int status, const char *fmt, ...) va_list va; va_start(va, fmt); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY -#pragma GCC diagnostic ignored "-Wformat-security" -#endif vfatal(fmt, va, 0); -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL -#pragma GCC diagnostic pop -#endif va_end(va); exit(status); @@ -930,7 +587,7 @@ char *xstrdup(const char *string) /* Read up to buflen bytes from fd and return the number of bytes read. If no data is available within d_sec + d_usec, return 0. On error, a value < 0 is returned (errno indicates error). */ -ssize_t select_read(const int fd, void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec) +int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec) { int ret; fd_set fds; @@ -954,7 +611,7 @@ ssize_t select_read(const int fd, void *buf, const size_t buflen, const time_t d /* Write up to buflen bytes to fd and return the number of bytes written. If no data is available within d_sec + d_usec, return 0. On error, a value < 0 is returned (errno indicates error). */ -ssize_t select_write(const int fd, const void *buf, const size_t buflen, const time_t d_sec, const suseconds_t d_usec) +int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec) { int ret; fd_set fds; @@ -974,106 +631,3 @@ ssize_t select_write(const int fd, const void *buf, const size_t buflen, const t return write(fd, buf, buflen); } - - -/* FIXME: would be good to get more from /etc/ld.so.conf[.d] and/or - * LD_LIBRARY_PATH and a smarter dependency on build bitness; also - * note that different OSes can have their pathnames set up differently - * with regard to default/preferred bitness (maybe a "32" in the name - * should also be searched explicitly - again, IFF our build is 32-bit). - * - * General premise for this solution is that some parts of NUT (e.g. the - * nut-scanner tool, or DMF feature code) must be pre-built and distributed - * in binary packages, but only at run-time it gets to know which third-party - * libraries it should use for particular operations. This differs from e.g. - * distribution packages which group NUT driver binaries explicitly dynamically - * linked against certain OS-provided libraries for accessing this or that - * communications media and/or vendor protocol. - */ -static const char * search_paths[] = { - /* Use the library path (and bitness) provided during ./configure first */ - LIBDIR, - "/usr"LIBDIR, - "/usr/local"LIBDIR, -#ifdef BUILD_64 - /* Fall back to explicit preference of 64-bit paths as named on some OSes */ - "/usr/lib/64", - "/usr/lib64", -#endif - "/usr/lib", -#ifdef BUILD_64 - "/lib/64", - "/lib64", -#endif - "/lib", -#ifdef BUILD_64 - "/usr/local/lib/64", - "/usr/local/lib64", -#endif - "/usr/local/lib", -#ifdef AUTOTOOLS_TARGET_SHORT_ALIAS - "/usr/lib/" AUTOTOOLS_TARGET_SHORT_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_TARGET_SHORT_ALIAS, -#else -# ifdef AUTOTOOLS_HOST_SHORT_ALIAS - "/usr/lib/" AUTOTOOLS_HOST_SHORT_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_HOST_SHORT_ALIAS, -# else -# ifdef AUTOTOOLS_BUILD_SHORT_ALIAS - "/usr/lib/" AUTOTOOLS_BUILD_SHORT_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_BUILD_SHORT_ALIAS, -# endif -# endif -#endif -#ifdef AUTOTOOLS_TARGET_ALIAS - "/usr/lib/" AUTOTOOLS_TARGET_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_TARGET_ALIAS, -#else -# ifdef AUTOTOOLS_HOST_ALIAS - "/usr/lib/" AUTOTOOLS_HOST_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_HOST_ALIAS, -# else -# ifdef AUTOTOOLS_BUILD_ALIAS - "/usr/lib/" AUTOTOOLS_BUILD_ALIAS, - "/usr/lib/gcc/" AUTOTOOLS_BUILD_ALIAS, -# endif -# endif -#endif - NULL -}; - -char * get_libname(const char* base_libname) -{ - DIR *dp; - struct dirent *dirp; - int index = 0; - char *libname_path = NULL; - char current_test_path[LARGEBUF]; - size_t base_libname_length = strlen(base_libname); - - for(index = 0 ; (search_paths[index] != NULL) && (libname_path == NULL) ; index++) - { - memset(current_test_path, 0, LARGEBUF); - - if ((dp = opendir(search_paths[index])) == NULL) - continue; - - upsdebugx(2,"Looking for lib %s in directory #%d : %s", base_libname, index, search_paths[index]); - while ((dirp = readdir(dp)) != NULL) - { - upsdebugx(5,"Comparing lib %s with dirpath %s", base_libname, dirp->d_name); - int compres = strncmp(dirp->d_name, base_libname, base_libname_length); - if(compres == 0) { - snprintf(current_test_path, LARGEBUF, "%s/%s", search_paths[index], dirp->d_name); - libname_path = realpath(current_test_path, NULL); - upsdebugx(2,"Candidate path for lib %s is %s (realpath %s)", base_libname, current_test_path, (libname_path!=NULL)?libname_path:"NULL"); - if (libname_path != NULL) - break; - } - } - closedir(dp); - } - - upsdebugx(1,"Looking for lib %s, found %s", base_libname, (libname_path!=NULL)?libname_path:"NULL"); - return libname_path; -} diff --git a/common/parseconf.c b/common/parseconf.c index 7c284b7..7073eb1 100644 --- a/common/parseconf.c +++ b/common/parseconf.c @@ -26,7 +26,7 @@ * There is now a context buffer, and you call pconf_init to set it up. * All subsequent calls must have it as the first argument. There are * two entry points for parsing lines. You can have it read a file - * (pconf_file_begin and pconf_file_next), take lines directly from + * (pconf_file_begin and pconf_file_next), take lines directly from * the caller (pconf_line), or go along a character at a time (pconf_char). * The parsing is identical no matter how you feed it. * @@ -38,7 +38,7 @@ * * Fatal errors are those that involve memory allocation. If the user * defines an error handler when calling pconf_init, that function will - * be called with the error message before parseconf exits. By default + * be called with the error message before parseconf exits. By default * it will just write the message to stderr before exiting. * * Input vs. Output: @@ -57,12 +57,12 @@ * also allows you to join lines, allowing you to have logical lines * that span physical lines, just like you can do in some shells. * - * Lines normally end with a newline, but reaching EOF will also force + * Lines normally end with a newline, but reaching EOF will also force * parsing on what's been scanned so far. - * + * * Design: * - * Characters are read one at a time to drive the state machine. + * Characters are read one at a time to drive the state machine. * As words are completed (by hitting whitespace or ending a "" item), * they are committed to the next buffer in the arglist. realloc is * used, so the buffer can grow to handle bigger words. @@ -76,20 +76,15 @@ * */ -#include "common.h" - #include #include #include #include #include -#include +#include #include -#include #include "parseconf.h" -#include "attribute.h" -#include "nut_stdint.h" /* possible states */ @@ -102,9 +97,6 @@ #define STATE_ENDOFLINE 7 #define STATE_PARSEERR 8 -static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt) - __attribute__((noreturn)); - static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt) { if (ctx->errhandler) @@ -117,7 +109,7 @@ static void pconf_fatal(PCONF_CTX_t *ctx, const char *errtxt) static void add_arg_word(PCONF_CTX_t *ctx) { - size_t argpos; + int argpos; size_t wbuflen; /* this is where the new value goes */ @@ -130,13 +122,13 @@ static void add_arg_word(PCONF_CTX_t *ctx) ctx->maxargs = ctx->numargs; /* resize the lists */ - ctx->arglist = realloc(ctx->arglist, + ctx->arglist = realloc(ctx->arglist, sizeof(char *) * ctx->numargs); if (!ctx->arglist) pconf_fatal(ctx, "realloc arglist failed"); - ctx->argsize = realloc(ctx->argsize, + ctx->argsize = realloc(ctx->argsize, sizeof(size_t) * ctx->numargs); if (!ctx->argsize) @@ -179,7 +171,7 @@ static void addchar(PCONF_CTX_t *ctx) wbuflen = strlen(ctx->wordbuf); - /* CVE-2012-2944: only allow the subset of ASCII charset from Space to ~ */ + /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */ if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) { fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n", ctx->ch); @@ -207,7 +199,7 @@ static void addchar(PCONF_CTX_t *ctx) ctx->wordptr = &ctx->wordbuf[wbuflen]; } - *ctx->wordptr++ = (char)ctx->ch; + *ctx->wordptr++ = ctx->ch; *ctx->wordptr = '\0'; } @@ -242,8 +234,8 @@ static int findwordstart(PCONF_CTX_t *ctx) return STATE_FINDEOL; /* space = not in a word yet, so loop back */ - if (isspace((size_t)ctx->ch)) - return STATE_FINDWORDSTART; + if (isspace(ctx->ch)) + return STATE_FINDWORDSTART; /* \ = literal = accept the next char blindly */ if (ctx->ch == '\\') @@ -263,7 +255,7 @@ static int findwordstart(PCONF_CTX_t *ctx) } return STATE_COLLECT; -} +} /* eat characters until the end of the line is found */ static int findeol(PCONF_CTX_t *ctx) @@ -282,7 +274,7 @@ static void pconf_seterr(PCONF_CTX_t *ctx, const char *errmsg) snprintf(ctx->errmsg, PCONF_ERR_LEN, "%s", errmsg); ctx->error = 1; -} +} /* quote characters inside a word bounded by "quotes" */ static int quotecollect(PCONF_CTX_t *ctx) @@ -299,7 +291,7 @@ static int quotecollect(PCONF_CTX_t *ctx) /* another " means we're done with this word */ if (ctx->ch == '"') { endofword(ctx); - + return STATE_FINDWORDSTART; } @@ -342,7 +334,7 @@ static int collect(PCONF_CTX_t *ctx) } /* space means the word is done */ - if (isspace((size_t)ctx->ch)) { + if (isspace(ctx->ch)) { endofword(ctx); return STATE_FINDWORDSTART; @@ -451,9 +443,6 @@ int pconf_file_begin(PCONF_CTX_t *ctx, const char *fn) return 0; } - /* prevent fd leaking to child processes */ - fcntl(fileno(ctx->f), F_SETFD, FD_CLOEXEC); - return 1; /* OK */ } @@ -582,7 +571,7 @@ int pconf_line(PCONF_CTX_t *ctx, const char *line) /* deal with any lingering characters */ /* still building a word? */ - if (ctx->wordptr != ctx->wordbuf) + if (ctx->wordptr != ctx->wordbuf) endofword(ctx); /* tie it off */ return 1; diff --git a/common/setenv.c b/common/setenv.c index 85b8974..00f7a6b 100644 --- a/common/setenv.c +++ b/common/setenv.c @@ -9,14 +9,13 @@ int nut_setenv(const char *name, const char *value, int overwrite) char *val; char *buffer; int rv; - + if (overwrite == 0) { val = getenv(name); if (val != NULL) { return 0; } } - buffer = xmalloc(strlen(value) + strlen(name) + 2); strcpy(buffer, name); strcat(buffer, "="); diff --git a/common/snprintf.c b/common/snprintf.c index 0caa04e..a180269 100644 --- a/common/snprintf.c +++ b/common/snprintf.c @@ -35,9 +35,9 @@ * original. Also, there is now a builtin-test, just compile with: * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm * and run snprintf for results. - * + * * Thomas Roessler 01/27/98 for mutt 0.89i - * The PGP code was using unsigned hexadecimal formats. + * The PGP code was using unsigned hexadecimal formats. * Unfortunately, unsigned formats simply didn't work. * * Michael Elkins 03/05/98 for mutt 0.90.8 @@ -54,7 +54,7 @@ #include "config.h" #include -#include +# include #include #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) @@ -102,14 +102,14 @@ /*int snprintf (char *str, size_t count, const char *fmt, ...);*/ /*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/ -static void dopr (char *buffer, size_t maxlen, const char *format, +static void dopr (char *buffer, size_t maxlen, const char *format, va_list args); static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, - char *value, int flags, int min, int max); + char *value, int flags, int min, int max); static void fmtint (char *buffer, size_t *currlen, size_t maxlen, - long value, int base, int min, int max, int flags); + long value, int base, int min, int max, int flags); static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, - LDOUBLE fvalue, int min, int max, int flags); + LDOUBLE fvalue, int min, int max, int flags); static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); /* @@ -137,26 +137,10 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c ); /* Conversion Flags */ #define DP_C_SHORT 1 -/* Note: Originally DP_C_SHORT converted to "short int" types, but modernish - * (C99+ or even earlier) standards require that the minimal type passed - * through variadic args '...' is an int, and smaller types are padded up - * to it - so value shifts in memory and erroneous access crashes can occur - * if smaller data is accessed blindly. Code below has been fixed to not pass - * "short int" anymore - it just casts the int to desired smaller type (and - * so drops the padding bits). */ #define DP_C_LONG 2 #define DP_C_LDOUBLE 3 #define DP_C_LLONG 4 -#ifdef C89PLUS -#undef C89PLUS -#endif - -#if defined(__STDC__) || defined(__STDC_VERSION__) -/* C89+ and C90+ code respectively */ -#define C89PLUS 1 -#endif - #define char_to_int(p) ((p)- '0') #define MAX(p,q) (((p) >= (q)) ? (p) : (q)) @@ -172,7 +156,7 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) int flags; int cflags; size_t currlen; - + state = DP_S_DEFAULT; currlen = flags = cflags = min = 0; max = -1; @@ -180,259 +164,237 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) while (state != DP_S_DONE) { - if ((ch == '\0') || (currlen >= maxlen)) + if ((ch == '\0') || (currlen >= maxlen)) state = DP_S_DONE; - switch(state) + switch(state) { case DP_S_DEFAULT: - if (ch == '%') - state = DP_S_FLAGS; - else - dopr_outch (buffer, &currlen, maxlen, ch); + if (ch == '%') + state = DP_S_FLAGS; + else + dopr_outch (buffer, &currlen, maxlen, ch); ch = *format++; break; case DP_S_FLAGS: - switch (ch) + switch (ch) { case '-': - flags |= DP_F_MINUS; + flags |= DP_F_MINUS; ch = *format++; - break; + break; case '+': - flags |= DP_F_PLUS; + flags |= DP_F_PLUS; ch = *format++; - break; + break; case ' ': - flags |= DP_F_SPACE; + flags |= DP_F_SPACE; ch = *format++; - break; + break; case '#': - flags |= DP_F_NUM; + flags |= DP_F_NUM; ch = *format++; - break; + break; case '0': - flags |= DP_F_ZERO; + flags |= DP_F_ZERO; ch = *format++; - break; + break; default: - state = DP_S_MIN; - break; + state = DP_S_MIN; + break; } break; case DP_S_MIN: - if (isdigit((unsigned char)ch)) + if (isdigit((unsigned char)ch)) { - min = 10*min + char_to_int (ch); - ch = *format++; - } - else if (ch == '*') + min = 10*min + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') { - min = va_arg (args, int); - ch = *format++; - state = DP_S_DOT; - } - else - state = DP_S_DOT; + min = va_arg (args, int); + ch = *format++; + state = DP_S_DOT; + } + else + state = DP_S_DOT; break; case DP_S_DOT: - if (ch == '.') + if (ch == '.') { - state = DP_S_MAX; - ch = *format++; - } - else - state = DP_S_MOD; + state = DP_S_MAX; + ch = *format++; + } + else + state = DP_S_MOD; break; case DP_S_MAX: - if (isdigit((unsigned char)ch)) + if (isdigit((unsigned char)ch)) { - if (max < 0) - max = 0; - max = 10*max + char_to_int (ch); - ch = *format++; - } - else if (ch == '*') + if (max < 0) + max = 0; + max = 10*max + char_to_int (ch); + ch = *format++; + } + else if (ch == '*') { - max = va_arg (args, int); - ch = *format++; - state = DP_S_MOD; - } - else - state = DP_S_MOD; + max = va_arg (args, int); + ch = *format++; + state = DP_S_MOD; + } + else + state = DP_S_MOD; break; case DP_S_MOD: - switch (ch) + switch (ch) { case 'h': - cflags = DP_C_SHORT; - ch = *format++; - break; + cflags = DP_C_SHORT; + ch = *format++; + break; case 'l': - cflags = DP_C_LONG; - ch = *format++; - if (ch == 'l') { /* It's a long long */ - cflags = DP_C_LLONG; - ch = *format++; - } - break; + cflags = DP_C_LONG; + ch = *format++; + if (ch == 'l') { /* It's a long long */ + cflags = DP_C_LLONG; + ch = *format++; + } + break; case 'L': - cflags = DP_C_LDOUBLE; - ch = *format++; - break; + cflags = DP_C_LDOUBLE; + ch = *format++; + break; default: - break; + break; } state = DP_S_CONV; break; case DP_S_CONV: - switch (ch) + switch (ch) { case 'd': case 'i': - if (cflags == DP_C_SHORT) -#ifdef C89PLUS - value = (short int)va_arg (args, int); -#else - value = va_arg (args, short int); -#endif - else if (cflags == DP_C_LONG) - value = va_arg (args, long int); - else if (cflags == DP_C_LLONG) - value = va_arg (args, LLONG); - else - value = va_arg (args, int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; + if (cflags == DP_C_SHORT) + value = va_arg (args, short int); + else if (cflags == DP_C_LONG) + value = va_arg (args, long int); + else if (cflags == DP_C_LLONG) + value = va_arg (args, LLONG); + else + value = va_arg (args, int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; case 'o': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) -#ifdef C89PLUS - value = (unsigned short int)va_arg (args, unsigned int); -#else - value = va_arg (args, unsigned short int); -#endif - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (long)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); - break; + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (long)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags); + break; case 'u': - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) -#ifdef C89PLUS - value = (unsigned short int)va_arg (args, unsigned int); -#else - value = va_arg (args, unsigned short int); -#endif - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (LLONG)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); - break; + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags); + break; case 'X': - flags |= DP_F_UP; - goto fallthrough_case_x; + flags |= DP_F_UP; case 'x': - fallthrough_case_x: - flags |= DP_F_UNSIGNED; - if (cflags == DP_C_SHORT) -#ifdef C89PLUS - value = (unsigned short int)va_arg (args, unsigned int); -#else - value = va_arg (args, unsigned short int); -#endif - else if (cflags == DP_C_LONG) - value = (long)va_arg (args, unsigned long int); - else if (cflags == DP_C_LLONG) - value = (LLONG)va_arg (args, unsigned LLONG); - else - value = (long)va_arg (args, unsigned int); - fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); - break; + flags |= DP_F_UNSIGNED; + if (cflags == DP_C_SHORT) + value = va_arg (args, unsigned short int); + else if (cflags == DP_C_LONG) + value = (long)va_arg (args, unsigned long int); + else if (cflags == DP_C_LLONG) + value = (LLONG)va_arg (args, unsigned LLONG); + else + value = (long)va_arg (args, unsigned int); + fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags); + break; case 'f': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - /* um, floating point? */ - fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); - break; + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + /* um, floating point? */ + fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags); + break; case 'E': - flags |= DP_F_UP; - goto fallthrough_case_e; + flags |= DP_F_UP; case 'e': - fallthrough_case_e: - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - break; + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; case 'G': - flags |= DP_F_UP; - goto fallthrough_case_g; + flags |= DP_F_UP; case 'g': - fallthrough_case_g: - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg (args, LDOUBLE); - else - fvalue = va_arg (args, double); - break; + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg (args, LDOUBLE); + else + fvalue = va_arg (args, double); + break; case 'c': - dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); - break; + dopr_outch (buffer, &currlen, maxlen, va_arg (args, int)); + break; case 's': - strvalue = va_arg (args, char *); - if (max < 0) - max = maxlen; /* ie, no max */ - fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); - break; + strvalue = va_arg (args, char *); + if (max < 0) + max = maxlen; /* ie, no max */ + fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max); + break; case 'p': - strvalue = va_arg (args, void *); - fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); - break; + strvalue = va_arg (args, void *); + fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags); + break; case 'n': - if (cflags == DP_C_SHORT) - { - short int *num; - num = va_arg (args, short int *); - *num = currlen; + if (cflags == DP_C_SHORT) + { + short int *num; + num = va_arg (args, short int *); + *num = currlen; + } + else if (cflags == DP_C_LONG) + { + long int *num; + num = va_arg (args, long int *); + *num = (long int)currlen; + } + else if (cflags == DP_C_LLONG) + { + LLONG *num; + num = va_arg (args, LLONG *); + *num = (LLONG)currlen; + } + else + { + int *num; + num = va_arg (args, int *); + *num = currlen; } - else if (cflags == DP_C_LONG) - { - long int *num; - num = va_arg (args, long int *); - *num = (long int)currlen; - } - else if (cflags == DP_C_LLONG) - { - LLONG *num; - num = va_arg (args, LLONG *); - *num = (LLONG)currlen; - } - else - { - int *num; - num = va_arg (args, int *); - *num = currlen; - } - break; + break; case '%': - dopr_outch (buffer, &currlen, maxlen, ch); - break; + dopr_outch (buffer, &currlen, maxlen, ch); + break; case 'w': - /* not supported yet, treat as next char */ - ch = *format++; - break; + /* not supported yet, treat as next char */ + ch = *format++; + break; default: - /* Unknown, skip */ - break; + /* Unknown, skip */ + break; } ch = *format++; state = DP_S_DEFAULT; @@ -446,18 +408,18 @@ static void dopr (char *buffer, size_t maxlen, const char *format, va_list args) break; /* some picky compilers need this */ } } - if (currlen < maxlen - 1) + if (currlen < maxlen - 1) buffer[currlen] = '\0'; - else + else buffer[maxlen - 1] = '\0'; } static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, - char *value, int flags, int min, int max) + char *value, int flags, int min, int max) { int padlen, strln; /* amount to pad */ int cnt = 0; - + if (value == 0) { value = ""; @@ -465,23 +427,23 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, for (strln = 0; value[strln]; ++strln); /* strlen */ padlen = min - strln; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justify */ - while ((padlen > 0) && (cnt < max)) + while ((padlen > 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); --padlen; ++cnt; } - while (*value && (cnt < max)) + while (*value && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, *value++); ++cnt; } - while ((padlen < 0) && (cnt < max)) + while ((padlen < 0) && (cnt < max)) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; @@ -492,7 +454,7 @@ static void fmtstr (char *buffer, size_t *currlen, size_t maxlen, /* Have to handle DP_F_NUM (ie 0x and 0 alternates) */ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, - long value, int base, int min, int max, int flags) + long value, int base, int min, int max, int flags) { int signvalue = 0; unsigned long uvalue; @@ -501,7 +463,7 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, int spadlen = 0; /* amount to space pad */ int zpadlen = 0; /* amount to zero pad */ int caps = 0; - + if (max < 0) max = 0; @@ -515,12 +477,12 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, } else if (flags & DP_F_PLUS) /* Do a sign (+/i) */ - signvalue = '+'; + signvalue = '+'; else if (flags & DP_F_SPACE) - signvalue = ' '; + signvalue = ' '; } - + if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ do { @@ -541,27 +503,27 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, zpadlen = MAX(zpadlen, spadlen); spadlen = 0; } - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) spadlen = -spadlen; /* Left Justifty */ #ifdef DEBUG_SNPRINTF printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n", - zpadlen, spadlen, min, max, place); + zpadlen, spadlen, min, max, place); #endif /* Spaces */ - while (spadlen > 0) + while (spadlen > 0) { dopr_outch (buffer, currlen, maxlen, ' '); --spadlen; } /* Sign */ - if (signvalue) + if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); /* Zeros */ - if (zpadlen > 0) + if (zpadlen > 0) { while (zpadlen > 0) { @@ -571,9 +533,9 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, } /* Digits */ - while (place > 0) + while (place > 0) dopr_outch (buffer, currlen, maxlen, convert[--place]); - + /* Left Justified spaces */ while (spadlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); @@ -581,7 +543,6 @@ static void fmtint (char *buffer, size_t *currlen, size_t maxlen, } } -#ifndef HAVE_ABS_VAL static LDOUBLE abs_val (LDOUBLE value) { LDOUBLE result = value; @@ -591,13 +552,7 @@ static LDOUBLE abs_val (LDOUBLE value) return result; } -#endif -#ifndef HAVE_FCVT -/* The two routines that may get defined below are only used if we also don't - * have a fcvt() in the system. Defining and not using the routines may be a - * warning (fatal with -Werror), so we hide them here. */ -# ifndef HAVE_POW10 static LDOUBLE pow10 (int exp) { LDOUBLE result = 1; @@ -607,12 +562,10 @@ static LDOUBLE pow10 (int exp) result *= 10; exp--; } - + return result; } -# endif -# ifndef HAVE_ROUND static long round (LDOUBLE value) { long intpart; @@ -624,11 +577,9 @@ static long round (LDOUBLE value) return intpart; } -# endif -#endif /* HAVE_FCVT */ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, - LDOUBLE fvalue, int min, int max, int flags) + LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; LDOUBLE ufvalue; @@ -650,14 +601,12 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, int iplace = 0; int fplace = 0; int padlen = 0; /* amount to pad */ - int zpadlen = 0; -#ifndef HAVE_FCVT + int zpadlen = 0; int caps = 0; long intpart; long fracpart; -#endif - - /* + + /* * AIX manpage says the default is 0, but Solaris says the default * is 6, and sprintf on AIX defaults to 6 */ @@ -673,7 +622,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, signvalue = '+'; else if (flags & DP_F_SPACE) - signvalue = ' '; + signvalue = ' '; #if 0 if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */ @@ -682,8 +631,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, #ifndef HAVE_FCVT intpart = (long)ufvalue; - /* - * Sorry, we only support 9 digits past the decimal because of our + /* + * Sorry, we only support 9 digits past the decimal because of our * conversion method */ if (max > 9) @@ -701,8 +650,8 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, } #ifdef DEBUG_SNPRINTF - printf("fmtfp: %g %d.%d min=%d max=%d\n", - (double)fvalue, intpart, fracpart, min, max); + printf("fmtfp: %g %d.%d min=%d max=%d\n", + (double)fvalue, intpart, fracpart, min, max); #endif /* Convert integer part */ @@ -758,38 +707,38 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, fconvert[fplace++] = result[--r_length]; while ((dec_pt < 0) && (fplace < max)) { - fconvert[fplace++] = '0'; - dec_pt++; - } + fconvert[fplace++] = '0'; + dec_pt++; + } } else { int c; iplace=0; for(c=dec_pt; c; iconvert[iplace++] = result[--c]) - ; + ; iconvert[iplace] = '\0'; result += dec_pt; fplace = 0; - + for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c]) - ; + ; } #endif /* fcvt */ - + /* -1 for decimal point, another -1 if we are printing a sign */ - padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); + padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); zpadlen = max - fplace; if (zpadlen < 0) zpadlen = 0; - if (padlen < 0) + if (padlen < 0) padlen = 0; - if (flags & DP_F_MINUS) + if (flags & DP_F_MINUS) padlen = -padlen; /* Left Justifty */ - if ((flags & DP_F_ZERO) && (padlen > 0)) + if ((flags & DP_F_ZERO) && (padlen > 0)) { - if (signvalue) + if (signvalue) { dopr_outch (buffer, currlen, maxlen, signvalue); --padlen; @@ -806,10 +755,10 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, dopr_outch (buffer, currlen, maxlen, ' '); --padlen; } - if (signvalue) + if (signvalue) dopr_outch (buffer, currlen, maxlen, signvalue); - while (iplace > 0) + while (iplace > 0) dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]); @@ -822,10 +771,10 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, * char to print out. */ if (max > 0) { - dopr_outch (buffer, currlen, maxlen, '.'); + dopr_outch (buffer, currlen, maxlen, '.'); - while (fplace > 0) - dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); + while (fplace > 0) + dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]); } while (zpadlen > 0) @@ -834,7 +783,7 @@ static void fmtfp (char *buffer, size_t *currlen, size_t maxlen, --zpadlen; } - while (padlen < 0) + while (padlen < 0) { dopr_outch (buffer, currlen, maxlen, ' '); ++padlen; @@ -871,7 +820,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) char *fmt; #endif VA_LOCAL_DECL; - + VA_START (fmt); VA_SHIFT (str, char *); VA_SHIFT (count, size_t ); @@ -911,7 +860,7 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) "%.1f", NULL }; - double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, + double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 0.9996, 1.996, 4.136, 6442452944.1234, 0}; char *int_fmt[] = { "%-1.5d", @@ -939,9 +888,9 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) sprintf (buf2, fp_fmt[x], fp_nums[y]); if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", - fp_fmt[x], buf1, buf2); - fail++; + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + fp_fmt[x], buf1, buf2); + fail++; } num++; } @@ -953,9 +902,9 @@ static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c) sprintf (buf2, int_fmt[x], int_nums[y]); if (strcmp (buf1, buf2)) { - printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", - int_fmt[x], buf1, buf2); - fail++; + printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n", + int_fmt[x], buf1, buf2); + fail++; } num++; } diff --git a/common/state.c b/common/state.c index 280eac5..cb79e0f 100644 --- a/common/state.c +++ b/common/state.c @@ -20,8 +20,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" /* must be first */ - #include #include #include @@ -126,10 +124,7 @@ static void st_tree_node_add(st_tree_t **nptr, st_tree_t *sptr) *nptr = sptr; } -/* remove a variable from a tree - * except for variables with ST_FLAG_IMMUTABLE - * (for override.* to survive) per issue #737 - */ +/* remove a variable from a tree */ int state_delinfo(st_tree_t **nptr, const char *var) { while (*nptr) { @@ -146,11 +141,6 @@ int state_delinfo(st_tree_t **nptr, const char *var) continue; } - if (node->flags & ST_FLAG_IMMUTABLE) { - upsdebugx(6, "%s: not deleting immutable variable [%s]", __func__, var); - return 0; - } - /* whatever is on the left, hang it off current right */ st_tree_node_add(&node->right, node->left); @@ -163,7 +153,7 @@ int state_delinfo(st_tree_t **nptr, const char *var) } return 0; /* not found */ -} +} /* interface */ @@ -228,7 +218,7 @@ static int st_tree_enum_add(enum_t **list, const char *enc) list = &(*list)->next; continue; } - + return 0; /* duplicate */ } @@ -313,7 +303,7 @@ int state_addrange(st_tree_t *root, const char *var, const int min, const int ma int state_setaux(st_tree_t *root, const char *var, const char *auxs) { st_tree_t *sttmp; - long aux; + int aux; /* find the tree node for var */ sttmp = state_tree_find(root, var); @@ -364,7 +354,7 @@ int state_getflags(st_tree_t *root, const char *var) return sttmp->flags; } -long state_getaux(st_tree_t *root, const char *var) +int state_getaux(st_tree_t *root, const char *var) { st_tree_t *sttmp; @@ -406,9 +396,9 @@ const range_t *state_getrangelist(st_tree_t *root, const char *var) return sttmp->range_list; } -void state_setflags(st_tree_t *root, const char *var, size_t numflags, char **flag) -{ - size_t i; +void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag) +{ + int i; st_tree_t *sttmp; /* find the tree node for var */ @@ -434,11 +424,6 @@ void state_setflags(st_tree_t *root, const char *var, size_t numflags, char **fl continue; } - if (!strcasecmp(flag[i], "NUMBER")) { - sttmp->flags |= ST_FLAG_NUMBER; - continue; - } - upsdebugx(2, "Unrecognized flag [%s]", flag[i]); } } diff --git a/common/str.c b/common/str.c index 295f450..092efcf 100644 --- a/common/str.c +++ b/common/str.c @@ -20,21 +20,12 @@ * */ -#include "config.h" /* must be first */ - #include #include +#include #include +#include -#ifdef HAVE_STRING_H -#include /* for strdup() and many others */ -#endif - -#ifdef HAVE_STRINGS_H -#include /* for strncasecmp() and strcasecmp() */ -#endif - -#include "nut_stdint.h" #include "str.h" char *str_trim(char *string, const char character) @@ -118,7 +109,7 @@ char *str_ltrim_space(char *string) while ( *string != '\0' && - isspace((size_t)*string) + isspace(*string) ) memmove(string, string + 1, strlen(string)); @@ -139,7 +130,7 @@ char *str_rtrim_space(char *string) while ( ptr >= string && - isspace((size_t)*ptr) + isspace(*ptr) ) *ptr-- = '\0'; @@ -261,7 +252,7 @@ int str_to_short(const char *string, short *number, const int base) return 0; } - *number = (short)num; + *number = num; return 1; } @@ -282,7 +273,7 @@ int str_to_short_strict(const char *string, short *number, const int base) return 0; } - *number = (short)num; + *number = num; return 1; } @@ -300,7 +291,7 @@ int str_to_ushort(const char *string, unsigned short *number, const int base) return 0; } - *number = (unsigned short)num; + *number = num; return 1; } @@ -318,13 +309,13 @@ int str_to_ushort_strict(const char *string, unsigned short *number, const int b return 0; } - *number = (unsigned short)num; + *number = num; return 1; } int str_to_int(const char *string, int *number, const int base) { - long num; /* long >= int, make sure we fit well */ + long num; *number = 0; @@ -339,13 +330,13 @@ int str_to_int(const char *string, int *number, const int base) return 0; } - *number = (int)num; + *number = num; return 1; } int str_to_int_strict(const char *string, int *number, const int base) { - long num; /* long >= int, make sure we fit well */ + long num; *number = 0; @@ -360,13 +351,13 @@ int str_to_int_strict(const char *string, int *number, const int base) return 0; } - *number = (int)num; + *number = num; return 1; } int str_to_uint(const char *string, unsigned int *number, const int base) { - unsigned long num; /* long >= int, make sure we fit well */ + unsigned long num; *number = 0; @@ -378,13 +369,13 @@ int str_to_uint(const char *string, unsigned int *number, const int base) return 0; } - *number = (unsigned int)num; + *number = num; return 1; } int str_to_uint_strict(const char *string, unsigned int *number, const int base) { - unsigned long num; /* long >= int, make sure we fit well */ + unsigned long num; *number = 0; @@ -396,7 +387,7 @@ int str_to_uint_strict(const char *string, unsigned int *number, const int base) return 0; } - *number = (unsigned int)num; + *number = num; return 1; } @@ -438,7 +429,7 @@ int str_to_long_strict(const char *string, long *number, const int base) if ( string == NULL || *string == '\0' || - isspace((size_t)*string) + isspace(*string) ) { errno = EINVAL; return 0; @@ -504,7 +495,7 @@ int str_to_ulong_strict(const char *string, unsigned long *number, const int bas *string == '\0' || *string == '+' || *string == '-' || - isspace((size_t)*string) + isspace(*string) ) { errno = EINVAL; return 0; @@ -568,7 +559,7 @@ int str_to_double_strict(const char *string, double *number, const int base) if ( string == NULL || *string == '\0' || - isspace((size_t)*string) + isspace(*string) ) { errno = EINVAL; return 0; @@ -614,16 +605,3 @@ int str_to_double_strict(const char *string, double *number, const int base) return 1; } - -int str_ends_with(const char *s, const char *suff) { - size_t slen; - size_t sufflen; - - if (!s) return 0; /* null string does not end with anything */ - if (!suff) return 1; /* null suffix tails anything */ - - slen = strlen(s); - sufflen = strlen(suff); - - return (slen >= sufflen) && (!memcmp(s + slen - sufflen, suff, sufflen)); -} diff --git a/common/strerror.c b/common/strerror.c index e00f208..b5cecb9 100644 --- a/common/strerror.c +++ b/common/strerror.c @@ -11,16 +11,6 @@ char *strerror(int errnum) { static char buf[32]; -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic push -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK -#pragma GCC diagnostic ignored "-Wunreachable-code-break" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic ignored "-Wunreachable-code" -#endif - switch (errnum) { #if defined (EPERM) case EPERM: @@ -508,11 +498,6 @@ char *strerror(int errnum) /* Fallback: just print the error number */ snprintf(buf, sizeof(buf), "Error %d", errnum); return buf; - -#ifdef HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE -#pragma GCC diagnostic pop -#endif - } #endif /* HAVE_STRERROR */ diff --git a/common/upsconf.c b/common/upsconf.c index bb7fd35..867163b 100644 --- a/common/upsconf.c +++ b/common/upsconf.c @@ -17,8 +17,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "config.h" /* must be the first header */ - #include #include #include @@ -31,14 +29,14 @@ static char *ups_section; /* handle arguments separated by parseconf */ -static void conf_args(size_t numargs, char **arg) +static void conf_args(int numargs, char **arg) { if (numargs < 1) return; /* look for section headers - [upsname] */ if ((arg[0][0] == '[') && (arg[0][strlen(arg[0])-1] == ']')) { - + free(ups_section); arg[0][strlen(arg[0])-1] = '\0'; diff --git a/conf/Makefile.am b/conf/Makefile.am index 847c299..95c0173 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -15,27 +15,3 @@ endif dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL) nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample - -SPELLCHECK_SRC = $(dist_sysconf_DATA) \ - upssched.conf.sample.in upsmon.conf.sample.in - -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here -# by a wildcard target in case the make implementation can put the two together. -*-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - -.sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -.in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_DIR="$(srcdir)" $@ - - -MAINTAINERCLEANFILES = Makefile.in .dirstamp -CLEANFILES = *.pdf *.html *-spellchecked diff --git a/conf/Makefile.in b/conf/Makefile.in index 7858703..cc5884c 100644 --- a/conf/Makefile.in +++ b/conf/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,17 +17,7 @@ # Network UPS Tools: conf VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -92,24 +82,21 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = conf +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/upsmon.conf.sample.in \ + $(srcdir)/upssched.conf.sample.in \ + $(am__dist_sysconf_DATA_DIST) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -118,18 +105,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_sysconf_DATA_DIST) \ - $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample @@ -187,9 +167,6 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in \ - $(srcdir)/upsmon.conf.sample.in \ - $(srcdir)/upssched.conf.sample.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -198,7 +175,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -209,7 +185,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -223,7 +198,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -236,7 +210,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -254,8 +227,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -266,29 +237,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -308,9 +271,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -324,7 +284,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -342,7 +301,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -356,9 +314,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -384,14 +339,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -411,15 +364,9 @@ CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ @WITH_CGI_TRUE@CGI_INSTALL = $(CGIPUB) dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL) nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample -SPELLCHECK_SRC = $(dist_sysconf_DATA) \ - upssched.conf.sample.in upsmon.conf.sample.in - -MAINTAINERCLEANFILES = Makefile.in .dirstamp -CLEANFILES = *.pdf *.html *-spellchecked all: all-am .SUFFIXES: -.SUFFIXES: .in .in-spellchecked .sample .sample-spellchecked $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -432,13 +379,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu conf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu conf/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -508,10 +456,7 @@ ctags CTAGS: cscope cscopelist: -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -570,7 +515,6 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -579,7 +523,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -663,25 +606,6 @@ uninstall-am: uninstall-dist_sysconfDATA uninstall-nodist_sysconfDATA uninstall-am uninstall-dist_sysconfDATA \ uninstall-nodist_sysconfDATA -.PRECIOUS: Makefile - - -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here -# by a wildcard target in case the make implementation can put the two together. -*-spellchecked: Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - -.sample.sample-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -.in.in-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SPELLCHECK_SRC)" SPELLCHECK_DIR="$(srcdir)" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/conf/hosts.conf.sample b/conf/hosts.conf.sample index 24beb82..9a4b669 100644 --- a/conf/hosts.conf.sample +++ b/conf/hosts.conf.sample @@ -22,7 +22,7 @@ # # MONITOR "" # -# Examples: +# Examples: # # MONITOR myups@localhost "Local UPS" # MONITOR su2200@10.64.1.1 "Finance department" diff --git a/conf/nut.conf.sample b/conf/nut.conf.sample index ebf6c04..9309825 100644 --- a/conf/nut.conf.sample +++ b/conf/nut.conf.sample @@ -14,7 +14,7 @@ # The values of MODE can be: # - none: NUT is not configured, or use the Integrated Power Management, or use # some external system to startup NUT components. So nothing is to be started. -# - standalone: This mode address a local only configuration, with 1 UPS +# - standalone: This mode address a local only configuration, with 1 UPS # protecting the local system. This implies to start the 3 NUT layers (driver, # upsd and upsmon) and the matching configuration files. This mode can also # address UPS redundancy. @@ -26,14 +26,7 @@ # - netclient: this mode only requires upsmon. # # IMPORTANT NOTE: -# This file is intended to be sourced by standard POSIX shell scripts (so -# there is no guaranteed `export VAR=VAL` syntax) and by systemd on Linux. +# This file is intended to be sourced by shell scripts. # You MUST NOT use spaces around the equal sign! MODE=none - -# Uncomment this to allow starting the service even if ups.conf has no device -# sections at the moment. This environment variable overrides the built-in -# "false" and an optional same-named default flag that can be set in upsd.conf: -#ALLOW_NO_DEVICE=true -#export ALLOW_NO_DEVICE diff --git a/conf/ups.conf.sample b/conf/ups.conf.sample index a86a845..d8faef2 100644 --- a/conf/ups.conf.sample +++ b/conf/ups.conf.sample @@ -2,7 +2,7 @@ # # --- SECURITY NOTE --- # -# If you use snmp-ups and set a community string in here, you +# If you use snmp-ups and set a community string in here, you # will have to secure this file to keep other users from obtaining # that string. It needs to be readable by upsdrvctl and any drivers, # and by upsd. @@ -14,98 +14,69 @@ # USB devices and SNMP devices are also supported. # # This file is used by upsdrvctl to start and stop your driver(s), and -# is also used by upsd to determine which drivers to monitor. The +# is also used by upsd to determine which drivers to monitor. The # drivers themselves also read this file for configuration directives. # # The general form is: -# +# # [upsname] # driver = # port = -# < any other directives here > +# < any other directives here > # # The section header ([upsname]) can be just about anything as long as -# it is a single word inside brackets. upsd uses this to uniquely +# it is a single word inside brackets. upsd uses this to uniquely # identify a UPS on this system. # # If you have a UPS called snoopy, your section header would be "[snoopy]". # On a system called "doghouse", the line in your upsmon.conf to monitor -# and manage it would look something like this: +# it would look something like this: # -# MONITOR snoopy@doghouse 1 upsmonuser mypassword primary +# MONITOR snoopy@doghouse 1 upsmonuser mypassword master # -# It might look like this if monitoring in "secondary" mode (without any -# ability to directly manage the UPS) from a different system: +# It might look like this if monitoring in slave mode: # -# MONITOR snoopy@doghouse 1 upsmonuser mypassword secondary +# MONITOR snoopy@doghouse 1 upsmonuser mypassword slave # # Configuration directives # ------------------------ +# +# These directives are common to all drivers that support ups.conf: # -# These directives are used by upsdrvctl only and should be specified outside -# of a driver definition: +# driver: REQUIRED. Specify the program to run to talk to this UPS. +# apcsmart, bestups, and sec are some examples. # -# maxretry: OPTIONAL. Specify the number of attempts to start the driver(s), -# in case of failure, before giving up. A delay of 'retrydelay' is -# inserted between each attempt. Caution should be taken when using -# this option, since it can impact the time taken by your system to -# start. +# port: REQUIRED. The serial port where your UPS is connected. +# /dev/ttyS0 is usually the first port on Linux boxes, for example. # -# The built-in default is 1 attempt. +# sdorder: optional. When you have multiple UPSes on your system, you +# usually need to turn them off in a certain order. upsdrvctl +# shuts down all the 0s, then the 1s, 2s, and so on. To exclude +# a UPS from the shutdown sequence, set this to -1. # -# retrydelay: OPTIONAL. Specify the delay between each restart attempt of the -# driver(s), as specified by 'maxretry'. Caution should be taken -# when using this option, since it can impact the time taken by your -# system to start. +# The default value for this parameter is 0. # -# The default is 5 seconds. +# nolock: optional, and not recommended for use in this file. # -# chroot: OPTIONAL. Used for securing. See man page for details. +# If you put nolock in here, the driver will not lock the +# serial port every time it starts. This may allow other +# processes to seize the port if you start more than one by +# mistake. # -# driverpath: OPTIONAL. Used for custom setups. See man page for details. +# This is only intended to be used on systems where locking +# absolutely must be disabled for the software to work. # -# nowait: OPTIONAL. Tell upsdrvctl to not wait at all for the driver(s) -# to execute the requested command. Fire and forget. -# -# pollinterval: OPTIONAL. The status of the UPS will be refreshed after a -# maximum delay which is controlled by this setting (default -# 2 seconds). This may be useful if the driver is creating too -# much of a load on your system or network. -# Note that some drivers also have an option called *pollfreq* -# which controls how frequently some of the less critical -# parameters are polled. See respective driver man pages. -# - -# Set maxretry to 3 by default, this should mitigate race with slow devices: -maxretry = 3 - -# These directives can be set outside and inside a driver definition, with -# slightly different meanings per context: -# -# maxstartdelay: OPTIONAL. This can be set as a global variable +# maxstartdelay: optional. This can be set as a global variable # above your first UPS definition and it can also be # set in a UPS section. This value controls how long # upsdrvctl will wait for the driver to finish starting. # This keeps your system from getting stuck due to a # broken driver or UPS. +# # The default is 45 seconds. # -# debug_min: OPTIONAL. Specify a minimum debug level for all driver daemons -# (when specified at global level), or for this driver daemon -# (when specified in a driver section), e.g. for troubleshooting -# a deployment. This does not directly impact the foreground or -# background running mode. If both the global and driver level -# `debug_min` are set, the driver-level setting takes precedence. -# Command-line option `-D` can only increase this verbosity level. -# -# user, group: OPTIONAL. Overrides the compiled-in (also global-section, -# when used in driver section) default unprivileged user/group -# name for NUT device driver. Impacts access rights used for -# the socket file access (group) and communication ports (user). -# -# synchronous: OPTIONAL. The driver work by default in asynchronous -# mode (like *no*) with fallback to synchronous if sending -# fails (i.e *synchronous=auto*). This means that all data +# synchronous: optional. The driver work by default in asynchronous +# mode (i.e *synchronous=no*). This means that all data # are pushed by the driver on the communication socket to # upsd (Unix socket on Unix, Named pipe on Windows) without # waiting for these data to be actually consumed. With @@ -120,63 +91,9 @@ maxretry = 3 # The default is 'no' (i.e. asynchronous mode) for backward # compatibility of the driver behavior. # - -# These directives are common to all drivers that support ups.conf: -# -# driver: REQUIRED. Specify the program to run to talk to this UPS. -# apcsmart, bestups, and sec are some examples. -# -# port: REQUIRED. The serial port where your UPS is connected. -# /dev/ttyS0 is usually the first port on Linux boxes, for example. -# -# sdorder: OPTIONAL. When you have multiple UPSes on your system, you -# usually need to turn them off in a certain order. upsdrvctl -# shuts down all the 0s, then the 1s, 2s, and so on. To exclude -# a UPS from the shutdown sequence, set this to -1. -# -# The default value for this parameter is 0. -# -# desc: optional, to keep a note of the UPS purpose, location, etc. -# -# nolock: optional, and not recommended for use in this file. -# -# If you put nolock in here, the driver will not lock the -# serial port every time it starts. This may allow other -# processes to seize the port if you start more than one by -# mistake. -# -# This is only intended to be used on systems where locking -# absolutely must be disabled for the software to work. -# -# ignorelb: OPTIONAL. Ignore low battery condition reported by device, -# and evaluate remaining battery charge or runtime instead. -# See man page for details. -# -# usb_set_altinterface(=num): OPTIONAL. Require that NUT calls this method -# to set the interface, even if 0 (default). Some devices require -# the call to initialize; others however can get stuck due to it - -# so it is not called by default. Yet others can be composite -# devices which use a non-zero interface to represent the UPS. -# -# default.: OPTIONAL. Set a default value for which is -# used in case the UPS doesn't provide a value, but which will be -# overwritten if a value is available from the UPS, e.g.: -# default.input.voltage.nominal = 230 -# will report the nominal input voltage to be 230, unless the UPS -# eventually tells us differently. -# -# override.: OPTIONAL. Set a value for that overrides -# (for NUT) any value that may be read from the UPS. -# Used for overriding values from the UPS that are clearly wrong -# (e.g. some devices report wrong values for battery voltage): -# override.battery.voltage.nominal = 12 -# Use with caution! This will only change the appearance of the -# variable to the outside world (and NUT calculations), internally -# in the UPS the original value is used. -# # Anything else is passed through to the hardware-specific part of # the driver. -# +# # Examples # -------- # @@ -184,19 +101,19 @@ maxretry = 3 # driver on /dev/ttyS0 is: # # [powerpal] -# driver = blazer_ser -# port = /dev/ttyS0 -# desc = "Web server" +# driver = blazer_ser +# port = /dev/ttyS0 +# desc = "Web server" # # If your UPS driver requires additional settings, you can specify them # here. For example, if it supports a setting of "1234" for the # variable "cable", it would look like this: -# +# # [myups] -# driver = mydriver -# port = /dev/ttyS1 -# cable = 1234 -# desc = "Something descriptive" +# driver = mydriver +# port = /dev/ttyS1 +# cable = 1234 +# desc = "Something descriptive" # # To find out if your driver supports any extra settings, start it with # the -h option and/or read the driver's documentation. diff --git a/conf/upsd.conf.sample b/conf/upsd.conf.sample index fb420e3..7292777 100644 --- a/conf/upsd.conf.sample +++ b/conf/upsd.conf.sample @@ -5,8 +5,6 @@ # It should only be readable by the user that upsd becomes. See the FAQ. # # Each entry below provides usage and default value. -# -# For more information, refer to upsd.conf manual page. # ======================================================================= # MAXAGE @@ -21,29 +19,6 @@ # the data fresh within the normal 15 second interval. Watch the syslog # for notifications from upsd about staleness. -# ======================================================================= -# TRACKINGDELAY -# TRACKINGDELAY 3600 -# -# This defaults to 1 hour. When instant commands and variables setting status -# tracking is enabled, status execution information are kept during this -# amount of time, and then cleaned up. - -# ======================================================================= -# ALLOW_NO_DEVICE -# ALLOW_NO_DEVICE true -# -# Normally upsd requires that at least one device section is defined in ups.conf -# when the daemon starts, to serve its data. For automatically managed services -# it may be preferred to have upsd always running, and reload the configuration -# when power devices become defined. -# -# Boolean values 'true', 'yes', 'on' and '1' mean that the server would not -# refuse to start with zero device sections found in ups.conf. -# -# Boolean values 'false', 'no', 'off' and '0' mean that the server should refuse -# to start if zero device sections were found in ups.conf. This is the default. - # ======================================================================= # STATEPATH # STATEPATH /var/run/nut @@ -52,17 +27,15 @@ # than the default that was compiled into the program. # ======================================================================= -# LISTEN [] +# LISTEN
[] # LISTEN 127.0.0.1 3493 # LISTEN ::1 3493 -# LISTEN myhostname 83493 -# LISTEN myhostname.mydomain # # This defaults to the localhost listening addresses and port 3493. # In case of IP v4 or v6 disabled kernel, only the available one will be used. # -# You may specify each interface IP address or name that you want upsd to -# listen on for connections, optionally with a port number. +# You may specify each interface you want upsd to listen on for connections, +# optionally with a port number. # # You may need this if you have multiple interfaces on your machine and # you don't want upsd to listen to all interfaces (for instance on a @@ -101,9 +74,9 @@ # # When compiled with SSL support with NSS backend, # you can enter the certificate path here. -# Certificates are stored in a dedicated database (split into 3 files). +# Certificates are stored in a dedicated database (splitted in 3 files). # Specify the path of the database directory. -# +# # See 'docs/security.txt' or the Security chapter of NUT user manual # for more information on the SSL support in NUT. @@ -115,7 +88,7 @@ # you can specify the certificate name to retrieve from database to # authenticate itself and the password # required to access certificate related private key. -# +# # See 'docs/security.txt' or the Security chapter of NUT user manual # for more information on the SSL support in NUT. @@ -130,39 +103,7 @@ # - 0 to not request to clients to provide any certificate # - 1 to require to all clients a certificate # - 2 to require to all clients a valid certificate -# +# # See 'docs/security.txt' or the Security chapter of NUT user manual # for more information on the SSL support in NUT. -# ======================================================================= -# DISABLE_WEAK_SSL -# DISABLE_WEAK_SSL true -# -# Tell upsd to disable older/weak SSL/TLS protocols and ciphers. -# -# With relatively recent versions of OpenSSL or NSS it will be restricted -# to TLSv1.2 or better. -# -# Unless you have really ancient clients, you probably want to enable this. -# Currently disabled by default to ensure compatibility with existing setups. - -# ======================================================================= -# DEBUG_MIN -# DEBUG_MIN 2 -# -# Optionally specify a minimum debug level for `upsd` data daemon, e.g. for -# troubleshooting a deployment, without impacting foreground or background -# running mode directly, and without need to edit init-scripts or service -# unit definitions. Note that command-line option `-D` can only increase -# this verbosity level. -# -# NOTE: if the running daemon receives a `reload` command, presence of the -# `DEBUG_MIN NUMBER` value in the configuration file can be used to tune -# debugging verbosity in the running service daemon (it is recommended to -# comment it away or set the minimum to explicit zero when done, to avoid -# huge journals and I/O system abuse). Keep in mind that for this run-time -# tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files -# is applied instantly and overrides any previously set value, from file -# or CLI options, regardless of older logging level being higher or lower -# than the newly found number; a missing (or commented away) value however -# does not change the previously active logging verbosity. diff --git a/conf/upsd.users.sample b/conf/upsd.users.sample index c6b9f36..ec78eb5 100644 --- a/conf/upsd.users.sample +++ b/conf/upsd.users.sample @@ -18,25 +18,25 @@ # # -------------------------------------------------------------------------- # -# actions: Let the user do certain things with upsd. -# +# actions: Let the user do certain things with upsd. +# # Valid actions are: # -# SET - change the value of certain variables in the UPS +# SET - change the value of certain variables in the UPS # FSD - set the "forced shutdown" flag in the UPS -# +# # -------------------------------------------------------------------------- # # instcmds: Let the user initiate specific instant commands. Use "ALL" -# to grant all commands automatically. There are many possible +# to grant all commands automatically. There are many possible # commands, so use 'upscmd -l' to see what your hardware supports. Here # are a few examples: # -# test.panel.start - Start a front panel test -# test.battery.start - Start battery test -# test.battery.stop - Stop battery test -# calibrate.start - Start calibration -# calibrate.stop - Stop calibration +# test.panel.start - Start a front panel test +# test.battery.start - Start battery test +# test.battery.stop - Stop battery test +# calibrate.start - Start calibration +# calibrate.stop - Stop calibration # # -------------------------------------------------------------------------- # @@ -61,15 +61,12 @@ # # To add a user for your upsmon, use this example: # -# [upsmon] -# password = pass -# upsmon primary +# [upsmon] +# password = pass +# upsmon master # or -# upsmon secondary +# upsmon slave # # The matching MONITOR line in your upsmon.conf would look like this: # -# MONITOR myups@localhost 1 upsmon pass primary (or secondary) -# -# See comments in the upsmon.conf(.sample) file for details about this -# keyword and the difference of NUT secondary and primary systems. +# MONITOR myups@localhost 1 upsmon pass master (or slave) diff --git a/conf/upsmon.conf.sample.in b/conf/upsmon.conf.sample.in index aeec849..8703eb4 100644 --- a/conf/upsmon.conf.sample.in +++ b/conf/upsmon.conf.sample.in @@ -9,9 +9,9 @@ # waits to run the SHUTDOWNCMD. The other one switches to another userid # and does everything else. # -# The default unprivileged user is set at compile-time with the option -# 'configure --with-user=...' -# +# The default nonprivileged user is set at compile-time with +# 'configure --with-user=...'. +# # You can override it with '-u ' when starting upsmon, or just # define it here for convenience. # @@ -30,19 +30,19 @@ # RUN_AS_USER @RUN_AS_USER@ # -------------------------------------------------------------------------- -# MONITOR ("primary"|"secondary") +# MONITOR ("master"|"slave") # # List systems you want to monitor. Not all of these may supply power # to the system running upsmon, but if you want to watch it, it has to # be in this section. -# +# # You must have at least one of these declared. # # is a UPS identifier in the form @[:] # like ups@localhost, su700@mybox, etc. -# +# # Examples: -# +# # - "su700@mybox" means a UPS called "su700" on a system called "mybox" # # - "fenton@bigbox:5678" is a UPS called "fenton" on a system called @@ -54,67 +54,34 @@ # If the ups.conf on host "doghouse" has a section called "snoopy", the # identifier for it would be "snoopy@doghouse". # -# is an integer - the number of power supplies that this UPS -# feeds on this system. Most personal computers only have one power supply, -# so this value is normally set to 1, while most modern servers have at least -# two. You need a pretty big or special box to have any other value here. +# is an integer - the number of power supplies that this UPS +# feeds on this system. Most computers only have one power supply, so this +# is normally set to 1. You need a pretty big or special box to have any +# other value here. # -# You can also set this to 0 for a system that doesn't take any power -# from the MONITORed supply, which you still want to monitor (e.g. for an -# administrative workstation fed from a different circuit than the datacenter -# servers it monitors). Use if 0 when you want to hear about -# changes for a given UPS without shutting down when it goes critical. +# You can also set this to 0 for a system that doesn't supply any power, +# but you still want to monitor. Use this when you want to hear about +# changes for a given UPS without shutting down when it goes critical, +# unless is 0. # # and must match an entry in that system's -# upsd.users. If your username is "upsmon" and your password is +# upsd.users. If your username is "monmaster" and your password is # "blah", the upsd.users would look like this: # -# [upsmon] +# [monmaster] # password = blah -# upsmon primary # (or secondary) +# upsmon master (or slave) +# +# "master" means this system will shutdown last, allowing the slaves +# time to shutdown first. # -# "primary" means this system will shutdown last, allowing the secondary -# systems time to shutdown first. +# "slave" means this system shuts down immediately when power goes critical. # -# "secondary" means this system shuts down immediately when power goes -# critical and less than MINSUPPLIES power sources have reliable input feeds. +# Examples: # -# The general assumption is that the "primary" system is the one with direct -# connection to an UPS (such as serial or USB cable), so the primary system -# runs the NUT driver and 'upsd' server locally and can manage the device, -# and it would often tell the UPS to completely power itself off as a step -# in power-race avoidance (see POWERDOWNFLAG for details). -# -# Also, since the primary system stays up the longest, it suffers higher risks -# of ungraceful shutdown if the estimation of remaining runtime (or of the -# time it takes to shut down this system) was guessed wrong. By consequence, -# the "secondary" systems typically monitor the power environment state -# through the 'upsd' processes running on the remote (often "primary") systems -# and do not directly interact with an UPS (no local NUT drivers are running -# on the secondary systems). As such, secondaries typically shut down as -# soon as there is a sufficiently long power outage, or a low-battery alert -# from the UPS, or a loss of connection to the primary while the power was -# last known to be missing. -# -# This assumption and configuration can also make sense for networked UPSes, -# where a rack full of servers might overload the communications capacity -# of the networked management card on the UPS - in this case you might either -# reduce the 'snmp-ups' or 'netxml-ups' driver polling rate, or dedicate a -# "primary" server and set up the rest as "secondary" systems. -# -# In case of such large setups as mentioned above, beware also that shutdown -# times of the rack done all at once can substantially differ from smaller -# scale experiments with single-server shutdowns, since systems can compete -# for shared storage and other limited resources as they go down (and also -# not everyone may safely shut down simultaneously - e.g. a NAS or DB server -# would better go down after all its clients). You would be well served by -# higher-end UPSes with manageable thresholds to declare a critical state. -# -# Examples: -# -# MONITOR myups@bigserver 1 upswired blah primary -# MONITOR su700@server.example.com 1 upsmon secretpass secondary -# MONITOR myups@localhost 1 upsmon pass primary # (or secondary) +# MONITOR myups@bigserver 1 monmaster blah master +# MONITOR su700@server.example.com 1 upsmon secretpass slave +# MONITOR myups@localhost 1 upsmon pass master (or slave) # -------------------------------------------------------------------------- # MINSUPPLIES @@ -124,7 +91,7 @@ # put "1" in this field. # # Large/expensive server type systems usually have more, and can run with -# a few missing. Some of these can run with 2 out of 4, for example, +# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example, # so you'd set that to 2. The idea is to keep the box running as long # as possible, right? # @@ -139,15 +106,7 @@ MINSUPPLIES 1 # # upsmon runs this command when the system needs to be brought down. # -# This should work just about everywhere ... if it doesn't, well, change it, -# perhaps to a more complicated custom script. -# -# Note that while you experiment with the initial setup and want to test how -# your configuration reacts to power state changes and ultimately when power -# is reported to go critical, but do not want your system to actually turn -# off, consider setting the SHUTDOWNCMD temporarily to do something benign - -# such as posting a message with 'logger' or 'wall' or 'mailx'. Do be careful -# to plug the UPS back into the wall in a timely fashion. +# This should work just about everywhere ... if it doesn't, well, change it. SHUTDOWNCMD "/sbin/shutdown -h +0" @@ -156,32 +115,25 @@ SHUTDOWNCMD "/sbin/shutdown -h +0" # # upsmon calls this to send messages when things happen # -# This command is called with the full text of the message (from NOTIFYMSG) -# as one argument. -# +# This command is called with the full text of the message as one argument. # The environment string NOTIFYTYPE will contain the type string of # whatever caused this event to happen. # -# The environment string UPSNAME will contain the name of the system/device -# that generated the change. -# # Note that this is only called for NOTIFY events that have EXEC set with # NOTIFYFLAG. See NOTIFYFLAG below for more details. # -# Making this some sort of shell script might not be a bad idea. -# Alternately you can use the upssched program as your NOTIFYCMD for some -# more complex setups (e.g. to ease handling of notification storms). -# For more information and ideas, see docs/scheduling.txt +# Making this some sort of shell script might not be a bad idea. For more +# information and ideas, see docs/scheduling.txt # # Example: # NOTIFYCMD @BINDIR@/notifyme # -------------------------------------------------------------------------- -# POLLFREQ +# POLLFREQ # # Polling frequency for normal activities, measured in seconds. # -# Adjust this to keep upsmon from flooding your network, but don't make +# Adjust this to keep upsmon from flooding your network, but don't make # it too high or it may miss certain short-lived power events. POLLFREQ 5 @@ -192,8 +144,8 @@ POLLFREQ 5 # Polling frequency in seconds while UPS on battery. # # You can make this number lower than POLLFREQ, which will make updates -# faster when any UPS is running on battery. This is a good way to tune -# network load if you have a lot of these things running. +# faster when any UPS is running on battery. This is a good way to tune +# network load if you have a lot of these things running. # # The default is 5 seconds for both this and POLLFREQ. @@ -202,17 +154,17 @@ POLLFREQALERT 5 # -------------------------------------------------------------------------- # HOSTSYNC - How long upsmon will wait before giving up on another upsmon # -# The primary upsmon process uses this number when waiting for secondary -# systems to disconnect once it has set the forced shutdown (FSD) flag. -# If they don't disconnect after this many seconds, it goes on without them. +# The master upsmon process uses this number when waiting for slaves to +# disconnect once it has set the forced shutdown (FSD) flag. If they +# don't disconnect after this many seconds, it goes on without them. # -# Similarly, upsmon secondary processes wait up to this interval for the -# primary upsmon to set FSD when an UPS they are monitoring goes critical - -# that is, on battery and low battery. If the primary doesn't do its job, -# the secondaries will shut down anyway to avoid damage to the file systems. +# Similarly, upsmon slave processes wait up to this interval for the +# master upsmon to set FSD when a UPS they are monitoring goes critical - +# that is, on battery and low battery. If the master doesn't do its job, +# the slaves will shut down anyway to avoid damage to the file systems. # # This "wait for FSD" is done to avoid races where the status changes -# to critical and back between polls by the primary. +# to critical and back between polls by the master. HOSTSYNC 15 @@ -236,12 +188,11 @@ HOSTSYNC 15 DEADTIME 15 # -------------------------------------------------------------------------- -# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the primary system +# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system # -# upsmon will create a file with this name in primary mode when it's time +# upsmon will create a file with this name in master mode when it's time # to shut down the load. You should check for this file's existence in -# your shutdown scripts and run 'upsdrvctl shutdown' if it exists, to tell -# the UPS(es) to power off. +# your shutdown scripts and run 'upsdrvctl shutdown' if it exists. # # See the config-notes.txt file in the docs subdirectory for more information. # Refer to the section: @@ -275,7 +226,7 @@ POWERDOWNFLAG /etc/killpower # ONLINE : UPS is back online # ONBATT : UPS is on battery # LOWBATT : UPS has a low battery (if also on battery, it's "critical") -# FSD : UPS is being shutdown by the primary (FSD = "Forced Shutdown") +# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown") # COMMOK : Communications established with the UPS # COMMBAD : Communications lost to the UPS # SHUTDOWN : The system is being shutdown @@ -304,7 +255,7 @@ POWERDOWNFLAG /etc/killpower # # Possible values for the flags: # -# SYSLOG - Write the message in the syslog +# SYSLOG - Write the message in the syslog # WALL - Write the message to all users on the system # EXEC - Execute NOTIFYCMD (see above) with the message # IGNORE - Don't do anything @@ -318,7 +269,7 @@ POWERDOWNFLAG /etc/killpower # every 43200 seconds, which is 12 hours. It does this by triggering a # NOTIFY_REPLBATT which is then handled by the usual notify structure # you've defined above. -# +# # If this number is not to your liking, override it here. RBWARNTIME 43200 @@ -328,7 +279,7 @@ RBWARNTIME 43200 # # upsmon will let you know through the usual notify system if it can't # talk to any of the UPS entries that are defined in this file. It will -# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you +# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you # change the interval with this directive. NOCOMMWARNTIME 300 @@ -336,20 +287,17 @@ NOCOMMWARNTIME 300 # -------------------------------------------------------------------------- # FINALDELAY - last sleep interval before shutting down the system # -# On a primary, upsmon will wait this long after sending the NOTIFY_SHUTDOWN +# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN # before executing your SHUTDOWNCMD. If you need to do something in between -# those events, increase this number. Remember, at this point your UPS is -# almost depleted, so don't make this too high. If needed, on high-end UPS -# devices you can usually configure when the low-battery state is announced -# based on estimated remaining run-time or on charge level of the batteries. +# those events, increase this number. Remember, at this point your UPS is +# almost depleted, so don't make this too high. # # Alternatively, you can set this very low so you don't wait around when # it's time to shut down. Some UPSes don't give much warning for low # battery and will require a value of 0 here for a safe shutdown. # -# Note: If FINALDELAY on the secondary is greater than HOSTSYNC on the -# primary, the primary will give up waiting for that secondary system -# to disconnect. +# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master, +# the master will give up waiting for the slave to disconnect. FINALDELAY 5 @@ -359,9 +307,9 @@ FINALDELAY 5 # When compiled with SSL support, you can enter the certificate path here. # # With NSS: -# Certificates are stored in a dedicated database (split into 3 files). +# Certificates are stored in a dedicated database (splitted in 3 files). # Specify the path of the database directory. -# +# # CERTPATH @CONFPATH@/cert/upsmon # # With OpenSSL: @@ -371,7 +319,7 @@ FINALDELAY 5 # name hash value, which must hence be available. # # CERTPATH /usr/ssl/certs -# +# # See 'docs/security.txt' or the Security chapter of NUT user manual # for more information on the SSL support in NUT. @@ -384,7 +332,7 @@ FINALDELAY 5 # required to access certificate related private key. # # CERTIDENT "my nut monitor" "MyPasSw0rD" -# +# # See 'docs/security.txt' or the Security chapter of NUT user manual # for more information on the SSL support in NUT. @@ -407,14 +355,14 @@ FINALDELAY 5 # CERTVERIFY - make upsmon verify all connections with certificates # CERTVERIFY 1 # -# When compiled with SSL support, make upsmon verify all connections with +# When compiled with SSL support, make upsmon verify all connections with # certificates. # Without this, there is no guarantee that the upsd is the right host. # Enabling this greatly reduces the risk of man in the middle attacks. # This effectively forces the use of SSL, so don't use this unless # all of your upsd hosts are ready for SSL and have their certificates # in order. -# When compiled with NSS support of SSL, can be overridden for host +# When compiled with NSS support of SSL, can be overriden for host # specified with a CERTHOST directive. @@ -428,26 +376,5 @@ FINALDELAY 5 # that nobody can sniff your sessions without a large effort. Setting # this will make upsmon drop connections if the remote upsd doesn't # support SSL, so don't use it unless all of them have it running. -# When compiled with NSS support of SSL, can be overridden for host +# When compiled with NSS support of SSL, can be overriden for host # specified with a CERTHOST directive. - -# -------------------------------------------------------------------------- -# DEBUG_MIN - specify minimal debugging level for upsmon daemon -# e.g. DEBUG_MIN 6 -# -# Optionally specify a minimum debug level for `upsmon` daemon, e.g. for -# troubleshooting a deployment, without impacting foreground or background -# running mode directly, and without need to edit init-scripts or service -# unit definitions. Note that command-line option `-D` can only increase -# this verbosity level. -# -# NOTE: if the running daemon receives a `reload` command, presence of the -# `DEBUG_MIN NUMBER` value in the configuration file can be used to tune -# debugging verbosity in the running service daemon (it is recommended to -# comment it away or set the minimum to explicit zero when done, to avoid -# huge journals and I/O system abuse). Keep in mind that for this run-time -# tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files -# is applied instantly and overrides any previously set value, from file -# or CLI options, regardless of older logging level being higher or lower -# than the newly found number; a missing (or commented away) value however -# does not change the previously active logging verbosity. diff --git a/conf/upssched.conf.sample.in b/conf/upssched.conf.sample.in index 541dea8..c7e625d 100644 --- a/conf/upssched.conf.sample.in +++ b/conf/upssched.conf.sample.in @@ -25,7 +25,7 @@ CMDSCRIPT @BINDIR@/upssched-cmd # normal users can't create the file, due to the possibility of symlinking # and other evil. # -# Note: if you are running Solaris or similar, the permissions that +# Note: if you are running Solaris or similar, the permissions that # upssched sets on this file *are not enough* to keep you safe. If # your OS ignores the permissions on a FIFO, then you MUST put this in # a protected directory! @@ -67,9 +67,9 @@ CMDSCRIPT @BINDIR@/upssched-cmd # can be the special value * to apply this handler to every # possible value of . # -# Run the command via your CMDSCRIPT when it happens. +# Run the command via your CMDSCRIPT when it happens. # -# Note that any AT that matches both the and the +# Note that any AT that matches both the and the # for the current event will be used. # ============================================================================ @@ -83,15 +83,9 @@ CMDSCRIPT @BINDIR@/upssched-cmd # argument. # # Example: -# 1) Start a timer that will execute when communication with any UPS (*) has -# been gone for 10 seconds +# Start a timer that'll execute when any UPS (*) has been gone 10 seconds # # AT COMMBAD * START-TIMER upsgone 10 -# -# 2) Start a timer that will execute when any UPS (*) has been running -# on battery for 30 seconds -# -# AT ONBATT * START-TIMER onbattwarn 30 # ----------------------------------------------------------------------- # @@ -101,15 +95,10 @@ CMDSCRIPT @BINDIR@/upssched-cmd # has passed then pass the optional argument to CMDSCRIPT. # # Example: -# 1) If a specific UPS (myups@localhost) communication is restored, then stop -# the timer before it triggers -# +# If a specific UPS (myups@localhost) comes back online, then stop the +# timer before it triggers +# # AT COMMOK myups@localhost CANCEL-TIMER upsgone -# -# 2) If any UPS (*) reverts to utility power, then stop the timer before it -# triggers -# -# AT ONLINE * CANCEL-TIMER onbattwarn # ----------------------------------------------------------------------- # diff --git a/conf/upsset.conf.sample b/conf/upsset.conf.sample index 921a20a..56795ba 100644 --- a/conf/upsset.conf.sample +++ b/conf/upsset.conf.sample @@ -2,12 +2,12 @@ # # This file is provided to ensure that you do not expose your upsd server # to the world upon installing the CGI programs. Specifically, it keeps -# the upsset.cgi program from running until you have assured it that you +# the upsset.cgi program from running until you have assured it that you # have secured your web server's CGI directory. # # By default, your web server will probably let anyone access upsset.cgi # once it is installed. This means that anyone could attempt to crack -# upsd logins since they would appear to be coming from your web server, +# upsd logins since they would appear to be coming from your web server, # rather than the outside world, slipping through any ACL/ACCESS definitions. # # For this reason, you *MUST* first secure your CGI programs before @@ -17,17 +17,17 @@ # For Apache, the .htaccess file can be used in the directory with the # programs. You'll need something like this: # -# -# deny from all -# allow from your.network.addresses -# +# +# deny from all +# allow from your.network.addresses +# # # You will probably have to set "AllowOverride Limit" for this directory in # your server-level configuration file as well. # # If this doesn't make sense, then stop reading and leave this program alone. # -# Assuming you have all this done (and it works), then you may uncomment +# Assuming you have all this done (and it works), then you may uncomment # the line below and start using upsset.cgi through your web browser. # diff --git a/conf/upsstats-single.html.sample b/conf/upsstats-single.html.sample index 4c2a6a8..4d34421 100644 --- a/conf/upsstats-single.html.sample +++ b/conf/upsstats-single.html.sample @@ -17,8 +17,8 @@ @UPSSTATSPATH upsstats.cgi@ @UPSIMAGEPATH upsimage.cgi@ - + @@ -26,16 +26,10 @@ @REFRESH@ @HOSTDESC@ : @VAR ups.model@ on @HOST@ - - + -
\n"); @@ -914,12 +910,12 @@ static void display_tree(int verbose) if (numa < 4) { if (verbose) printf("[Invalid response]\n"); - + return; } printf("
%s:%s
+
@@ -57,7 +51,7 @@ table{background:#000;} -
Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ - @VAR ups.model@ on @HOST@
+ @@ -201,7 +195,7 @@ table{background:#000;} @IFSUPP ambient.temperature@ @IFSUPP ambient.humidity@ -
+ @@ -209,21 +203,21 @@ table{background:#000;} @ELSE@ @IFSUPP ambient.temperature@ - @ELSE@ @IFSUPP ambient.humidity@ - @ENDIF@ - - - -
Temperature
@IMG ambient.temperature tempmin=0 tempmax=50 width=90@
Humidity
@IMG ambient.humidity width=90@
+
Temperature
@IMG ambient.temperature tempmin=0 tempmax=50@
+
Humidity
@IMG ambient.humidity@
+ @IFSUPP battery.charge@ @IFSUPP battery.voltage@ @@ -238,7 +232,7 @@ table{background:#000;}
+ @IFSUPP input.L2-L3.voltage@ @@ -255,7 +249,7 @@ table{background:#000;}
L1-L2
@IMG input.L1-L2.voltage width=68@
+ @IFSUPP output.L2-L3.voltage@ @@ -272,7 +266,7 @@ table{background:#000;}
L1-L2
@IMG output.L1-L2.voltage width=68@
+ @IFSUPP output.L2.power.percent@ @@ -292,12 +286,9 @@ table{background:#000;}
L1
@IMG output.L1.power.percent width=68@
-
Valid CSS -Valid HTML 4.01 Strict
+Valid HTML 4.0 Transitional + diff --git a/conf/upsstats.html.sample b/conf/upsstats.html.sample index 23442e0..e25a829 100644 --- a/conf/upsstats.html.sample +++ b/conf/upsstats.html.sample @@ -1,6 +1,6 @@ - @REFRESH@ - + - +
- +
- - + @@ -73,20 +65,20 @@ th, td{padding:0.5ex;} @FOREACHUPS@ - - + - - - - - - - - @@ -188,9 +180,11 @@ th, td{padding:0.5ex;}
+ -Network UPS Tools upsstats +Network UPS Tools upsstats @VERSION@ - +
@DATE %a %b %d %X %Z %Y@ @@ -58,7 +50,7 @@ th, td{padding:0.5ex;}
System Model Status
+
@HOSTLINK@ + @VAR ups.model@ + @STATUS@ + @IFSUPP battery.charge@ @VAR battery.charge@ % @@ -97,18 +89,18 @@ th, td{padding:0.5ex;} @IFBETWEEN input.transfer.low input.transfer.high input.L1-L2.voltage@ @IFBETWEEN input.transfer.low input.transfer.high input.L2-L3.voltage@ @IFBETWEEN input.transfer.low input.transfer.high input.L3-L1.voltage@ - + @ELSE@ @IFSUPP input.L2-N.voltage@ @IFBETWEEN input.transfer.low input.transfer.high input.L1-N.voltage@ @IFBETWEEN input.transfer.low input.transfer.high input.L2-N.voltage@ @IFBETWEEN input.transfer.low input.transfer.high input.L3-N.voltage@ - + @ELSE@ @IFBETWEEN input.transfer.low input.transfer.high input.voltage@ - + @ELSE@ - + @ENDIF@ @IFSUPP input.L2-L3.voltage@ @@ -126,7 +118,7 @@ th, td{padding:0.5ex;} @ENDIF@ + @IFSUPP output.L2-L3.voltage@ @VAR output.L1-L2.voltage@ @VAR output.L2-L3.voltage@ @@ -142,7 +134,7 @@ th, td{padding:0.5ex;} @ENDIF@ + @IFSUPP output.L2.power.percent@ @VAR output.L1.power.percent@ @VAR output.L2.power.percent@ @@ -159,7 +151,7 @@ th, td{padding:0.5ex;} @ENDIF@ + @IFSUPP ups.temperature@ @UPSTEMP@ @DEGREES@ @@ -170,13 +162,13 @@ th, td{padding:0.5ex;} @ENDIF@ + @IFSUPP battery.runtime@ @RUNTIME@ @ENDIF@ + @TREELINK@
-
-Valid CSS! -Valid HTML 4.01 Strict +
+Valid CSS! +
diff --git a/config.guess b/config.guess index f50dcdb..1f5c50c 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2018-02-24' +timestamp='2014-03-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2018-02-24' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,12 +24,12 @@ timestamp='2018-02-24' # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# Originally written by Per Bothner. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches to . +# Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Options: +Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; + ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" - cat <<-EOF > "$dummy.c" + eval $set_cc_for_build + cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,20 +149,13 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" - - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl - fi + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -175,31 +168,21 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` - case "$UNAME_MACHINE_ARCH" in + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` - machine="${arch}${endian}"-unknown - ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in - earm*) - os=netbsdelf - ;; + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -214,67 +197,44 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in os=netbsd ;; esac - # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in - earm*) - expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` - ;; - esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; - *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; - *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; - *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; - *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; - mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -291,54 +251,63 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE=alpha ;; + UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") - UNAME_MACHINE=alpha ;; + UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") - UNAME_MACHINE=alpha ;; + UNAME_MACHINE="alpha" ;; "EV5 (21164)") - UNAME_MACHINE=alphaev5 ;; + UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") - UNAME_MACHINE=alphaev56 ;; + UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") - UNAME_MACHINE=alphapca56 ;; + UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") - UNAME_MACHINE=alphapca57 ;; + UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") - UNAME_MACHINE=alphaev6 ;; + UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") - UNAME_MACHINE=alphaev67 ;; + UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") - UNAME_MACHINE=alphaev68 ;; + UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") - UNAME_MACHINE=alphaev68 ;; + UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") - UNAME_MACHINE=alphaev68 ;; + UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE=alphaev69 ;; + UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") - UNAME_MACHINE=alphaev7 ;; + UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") - UNAME_MACHINE=alphaev79 ;; + UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos + echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos + echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -350,7 +319,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" + echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -377,38 +346,38 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" + echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 + eval $set_cc_for_build + SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH=x86_64 + SUN_ARCH="x86_64" fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -417,25 +386,25 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" + echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" + echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -446,44 +415,44 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" + echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" + echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" + echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" + echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" + echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" + echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" + echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" + echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" + echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -492,23 +461,23 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" + echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -534,17 +503,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] then - echo m88k-dg-dgux"$UNAME_RELEASE" + echo m88k-dg-dgux${UNAME_RELEASE} else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else - echo i586-dg-dgux"$UNAME_RELEASE" + echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -561,7 +530,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -573,14 +542,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include main() @@ -591,7 +560,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else @@ -605,27 +574,26 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" + echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) + ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -640,28 +608,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - case "$UNAME_MACHINE" in - 9000/31?) HP_ARCH=m68000 ;; - 9000/[34]??) HP_ARCH=m68k ;; + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "$sc_cpu_version" in - 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 - 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in - 32) HP_ARCH=hppa2.0n ;; - 64) HP_ARCH=hppa2.0w ;; - '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include @@ -694,13 +662,13 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if [ ${HP_ARCH} = "hppa2.0w" ] then - eval "$set_cc_for_build" + eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -711,23 +679,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH=hppa2.0w + HP_ARCH="hppa2.0w" else - HP_ARCH=hppa64 + HP_ARCH="hppa64" fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" + echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux"$HPUX_REV" + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -752,11 +720,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -765,7 +733,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -773,9 +741,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + echo ${UNAME_MACHINE}-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -800,109 +768,127 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" + echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case "$UNAME_PROCESSOR" in + case ${UNAME_PROCESSOR} in amd64) - UNAME_PROCESSOR=x86_64 ;; - i386) - UNAME_PROCESSOR=i586 ;; + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin + echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 + echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 + echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 + echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case ${UNAME_MACHINE} in x86) - echo i586-pc-interix"$UNAME_RELEASE" + echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" + echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" + echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin + echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -915,64 +901,58 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; - e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" - sed 's/^ //' << EOF > "$dummy.c" + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -986,74 +966,64 @@ EOF #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" + echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" + echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" + echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - if objdump -f /bin/sh | grep -q elf32-x86-64; then - echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 - else - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1067,34 +1037,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx + echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop + echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos + echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable + echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" + echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp + echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; - i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) @@ -1104,12 +1074,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1119,9 +1089,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1129,7 +1099,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configure will decide that + # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1141,9 +1111,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1163,9 +1133,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1174,28 +1144,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" + echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" + echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" + echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" + echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" + echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1206,7 +1176,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo "$UNAME_MACHINE"-sni-sysv4 + echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1226,23 +1196,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos + echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" + echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv"$UNAME_RELEASE" + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv"$UNAME_RELEASE" + echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1261,56 +1231,46 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" + echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" + echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" + echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" + echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" + echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; - SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" + echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" + echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1321,33 +1281,27 @@ EOF # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = x86; then + if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" + echo nse-tandem-nsk${UNAME_RELEASE} exit ;; - NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; - NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1356,18 +1310,18 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = 386; then + if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo "$UNAME_MACHINE"-unknown-plan9 + echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1388,14 +1342,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "$UNAME_MACHINE" in + case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1404,48 +1358,34 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos + echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros + echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx + echo ${UNAME_MACHINE}-unknown-esx exit ;; - amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; -esac - -echo "$0: unable to guess system type" >&2 - -case "$UNAME_MACHINE:$UNAME_SYSTEM" in - mips:Linux | mips64:Linux) - # If we got here on MIPS GNU/Linux, output extra information. - cat >&2 <&2 < in order to provide the needed +information to handle your system. config.guess timestamp = $timestamp @@ -1464,16 +1404,16 @@ hostinfo = `(hostinfo) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = "$UNAME_MACHINE" -UNAME_RELEASE = "$UNAME_RELEASE" -UNAME_SYSTEM = "$UNAME_SYSTEM" -UNAME_VERSION = "$UNAME_VERSION" +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/config.sub b/config.sub index 1d8e98b..bba4efb 100755 --- a/config.sub +++ b/config.sub @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2018-02-22' +timestamp='2014-09-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2018-02-22' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -25,7 +25,7 @@ timestamp='2018-02-22' # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -33,7 +33,7 @@ timestamp='2018-02-22' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,11 +53,12 @@ timestamp='2018-02-22' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS Canonicalize a configuration name. -Options: +Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -94,7 +95,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo "$1" + echo $1 exit ;; * ) @@ -112,24 +113,24 @@ esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac @@ -178,44 +179,44 @@ case $os in ;; -sco6) os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -227,7 +228,10 @@ case $os in os=-lynxos ;; -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos @@ -251,16 +255,15 @@ case $basic_machine in | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ - | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ + | epiphany \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ + | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -296,14 +299,13 @@ case $basic_machine in | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ + | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -311,8 +313,7 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ + | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -326,14 +327,11 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown @@ -362,7 +360,7 @@ case $basic_machine in ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -374,18 +372,17 @@ case $basic_machine in | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ - | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ + | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -426,15 +423,13 @@ case $basic_machine in | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ | pyramid-* \ - | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -442,8 +437,6 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ - | visium-* \ - | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -457,7 +450,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-pc + basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -491,7 +484,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -520,9 +513,6 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; - asmjs) - basic_machine=asmjs-unknown - ;; aux) basic_machine=m68k-apple os=-aux @@ -536,7 +526,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -544,13 +534,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -639,18 +629,10 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2*) + dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -740,6 +722,9 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -752,26 +737,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - vsta) + i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; @@ -789,17 +774,17 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + m88k-omron*) + basic_machine=m88k-omron + ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -831,10 +816,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -853,7 +838,7 @@ case $basic_machine in os=-msdos ;; ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc @@ -895,7 +880,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next) + next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) @@ -940,12 +925,6 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem - ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -978,7 +957,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -994,7 +973,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -1009,16 +988,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -1028,23 +1007,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle) + ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little) + ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1098,10 +1077,17 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; sh5el) basic_machine=sh5le-unknown ;; - simso-wrs) + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1120,7 +1106,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1242,9 +1228,6 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; - x64) - basic_machine=x86_64-pc - ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1253,12 +1236,20 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1287,6 +1278,10 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; @@ -1296,6 +1291,9 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; cydra) basic_machine=cydra-cydrome ;; @@ -1315,7 +1313,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac @@ -1323,10 +1321,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1337,8 +1335,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases that might get confused - # with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1349,48 +1347,45 @@ case $os in -solaris) os=-solaris2 ;; + -svr4*) + os=-sysv4 + ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose - ;; - # Now accept the basic system types. + # First accept the basic system types. # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. + # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1407,12 +1402,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo "$os" | sed -e 's|mac|macos|'` + os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1421,10 +1416,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo "$os" | sed -e 's|sunos5|solaris2|'` + os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo "$os" | sed -e 's|sunos6|solaris3|'` + os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1435,6 +1430,12 @@ case $os in -wince*) os=-wince ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; -utek*) os=-bsd ;; @@ -1459,7 +1460,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2) + -ns2 ) os=-nextstep2 ;; -nsk*) @@ -1481,7 +1482,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4*) + -svr4) os=-sysv4 ;; -svr3) @@ -1496,38 +1497,32 @@ case $os in -ose*) os=-ose ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; + -aros*) + os=-aros + ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; - -pikeos*) - # Until real need of OS specific support for - # particular features comes up, bare metal - # configurations are quite functional. - case $basic_machine in - arm*) - os=-eabi - ;; - *) - os=-elf - ;; - esac - ;; -nacl*) ;; - -ios) - ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac @@ -1617,12 +1612,12 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; - pru-*) - os=-elf - ;; *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1662,7 +1657,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next) + *-next ) os=-nextstep ;; *-sequent) @@ -1677,6 +1672,9 @@ case $basic_machine in i370-*) os=-mvs ;; + *-next) + os=-nextstep3 + ;; *-gould) os=-sysv ;; @@ -1786,15 +1784,15 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo $basic_machine$os exit # Local variables: -# eval: (add-hook 'write-file-functions 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/configure b/configure index f2af308..f70451d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for nut 2.8.0. +# Generated by GNU Autoconf 2.69 for nut 2.7.4. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='nut' PACKAGE_TARNAME='nut' -PACKAGE_VERSION='2.8.0' -PACKAGE_STRING='nut 2.8.0' +PACKAGE_VERSION='2.7.4' +PACKAGE_STRING='nut 2.7.4' PACKAGE_BUGREPORT='https://github.com/networkupstools/nut/issues' PACKAGE_URL='' @@ -634,17 +634,12 @@ ac_includes_default="\ #endif" ac_config_libobj_dir=common -ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS -BUILDING_IN_TREE_FALSE -BUILDING_IN_TREE_TRUE udevdir hotplugdir -auglensdir -systemdtmpfilesdir -systemdshutdowndir +systemdsystemshutdowndir systemdsystemunitdir pkgconfigdir driverexecdir @@ -657,8 +652,6 @@ RUN_AS_USER PORT SBINDIR DRVPATH -NUT_LIBEXECDIR -NUT_DATADIR LIBDIR BINDIR CONFPATH @@ -673,12 +666,9 @@ LIBLTDL_LIBS LIBLTDL_CFLAGS LIBWRAP_LIBS LIBWRAP_CFLAGS -DOC_CHECK_LIST DOC_BUILD_LIST LIBIPMI_LIBS LIBIPMI_CFLAGS -LIBMODBUS_LIBS -LIBMODBUS_CFLAGS LIBPOWERMAN_LIBS LIBPOWERMAN_CFLAGS LIBAVAHI_LIBS @@ -691,56 +681,34 @@ LIBNETSNMP_LIBS LIBNETSNMP_CFLAGS LIBGD_LDFLAGS LIBGD_CFLAGS -LIBSSL_REQUIRES LIBSSL_LIBS LIBSSL_CFLAGS NUT_NETVERSION TREE_VERSION OS_NAME now -HAVE_SNMP_FALSE -HAVE_SNMP_TRUE -WITH_SNMP_FALSE -WITH_SNMP_TRUE -WITH_VALGRIND_FALSE -WITH_VALGRIND_TRUE -HAVE_VALGRIND_FALSE -HAVE_VALGRIND_TRUE -VALGRIND SYSTEM_AIX_FALSE SYSTEM_AIX_TRUE +HAVE_ASPELL_FALSE +HAVE_ASPELL_TRUE +ASPELL +MANUALUPDATE_FALSE +MANUALUPDATE_TRUE WITH_DEVD_FALSE WITH_DEVD_TRUE WITH_UDEV_FALSE WITH_UDEV_TRUE WITH_HOTPLUG_FALSE WITH_HOTPLUG_TRUE -HAVE_AUGPARSE_FALSE -HAVE_AUGPARSE_TRUE -AUGPARSE -WITH_AUGLENS_FALSE -WITH_AUGLENS_TRUE -HAVE_CPPUNIT_FALSE -HAVE_CPPUNIT_TRUE -CPPUNIT_LIBS -CPPUNIT_CFLAGS -HAVE_CXX11_FALSE -HAVE_CXX11_TRUE HAVE_SYSTEMD_FALSE HAVE_SYSTEMD_TRUE -WITH_SOLARIS_PKG_IPS_FALSE -WITH_SOLARIS_PKG_IPS_TRUE -WITH_SOLARIS_PKG_SVR4_FALSE -WITH_SOLARIS_PKG_SVR4_TRUE -WITH_SOLARIS_SMF_FALSE -WITH_SOLARIS_SMF_TRUE WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE +SOME_DRIVERS_FALSE +SOME_DRIVERS_TRUE WITH_DEV_FALSE WITH_DEV_TRUE -LIBTOOL_DEPS CXXCPP -LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -750,6 +718,7 @@ MANIFEST_TOOL ac_ct_AR DLLTOOL OBJDUMP +LN_S NM ac_ct_DUMPBIN DUMPBIN @@ -757,41 +726,18 @@ LD FGREP SED LIBTOOL -DOC_INSTALL_DISTED_MANS_FALSE -DOC_INSTALL_DISTED_MANS_TRUE -SKIP_MANS_FALSE -SKIP_MANS_TRUE -WITH_MANS_FALSE -WITH_MANS_TRUE -WITH_DOCS_FALSE -WITH_DOCS_TRUE -WITH_ASCIIDOC_FALSE -WITH_ASCIIDOC_TRUE HAVE_ASCIIDOC_FALSE HAVE_ASCIIDOC_TRUE -HAVE_ASPELL_FALSE -HAVE_ASPELL_TRUE -ASPELL -HAVE_SOURCE_HIGHLIGHT_FALSE -HAVE_SOURCE_HIGHLIGHT_TRUE +WITH_ASCIIDOC_FALSE +WITH_ASCIIDOC_TRUE SOURCE_HIGHLIGHT XMLLINT XSLTPROC DBLATEX A2X -MANUALUPDATE_FALSE -MANUALUPDATE_TRUE ASCIIDOC -WITH_CHECK_NIT_FALSE -WITH_CHECK_NIT_TRUE -WITH_CPPCHECK_FALSE -WITH_CPPCHECK_TRUE -HAVE_CPPCHECK_FALSE -HAVE_CPPCHECK_TRUE -CPPCHECK WITH_CGI_FALSE WITH_CGI_TRUE -GDLIB_CONFIG WITH_LIBLTDL_FALSE WITH_LIBLTDL_TRUE WITH_WRAP_FALSE @@ -810,54 +756,34 @@ WITH_FREEIPMI_FALSE WITH_FREEIPMI_TRUE WITH_IPMI_FALSE WITH_IPMI_TRUE -WITH_MODBUS_FALSE -WITH_MODBUS_TRUE WITH_LIBPOWERMAN_FALSE WITH_LIBPOWERMAN_TRUE WITH_AVAHI_FALSE WITH_AVAHI_TRUE -HAVE_NEON_FALSE -HAVE_NEON_TRUE WITH_NEON_FALSE WITH_NEON_TRUE +WITH_SNMP_FALSE +WITH_SNMP_TRUE WITH_USB_FALSE WITH_USB_TRUE -WITH_LIBUSB_0_1_FALSE -WITH_LIBUSB_0_1_TRUE -WITH_LIBUSB_1_0_FALSE -WITH_LIBUSB_1_0_TRUE WITH_SERIAL_FALSE WITH_SERIAL_TRUE -NET_SNMP_CONFIG -LIBUSB_CONFIG -SOME_DRIVERS_FALSE -SOME_DRIVERS_TRUE -HAVE_PYTHON3_FALSE -HAVE_PYTHON3_TRUE -PYTHON3 -HAVE_PYTHON2_FALSE -HAVE_PYTHON2_TRUE -PYTHON2 -HAVE_PYTHON_FALSE -HAVE_PYTHON_TRUE -PYTHON +HAVE_CPPUNIT_FALSE +HAVE_CPPUNIT_TRUE +CPPUNIT_LIBS +CPPUNIT_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG LIBOBJS -LN_S_R RANLIB AR -LN_S am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX -dummy_PKG_CONFIG_LIBS -dummy_PKG_CONFIG_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -dummy_PKG_CONFIG MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -871,6 +797,7 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE +am__quote am__include DEPDIR OBJEXT @@ -938,7 +865,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -957,45 +883,30 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL -am__quote' +SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_maintainer_mode -with_pkg_config -enable_Wcolor -with_python -with_python2 -with_python3 -with_drivers with_all with_dev -with_docs -with_doc -enable_warnings -enable_Werror with_serial with_usb -with_libusb_config +with_doc +with_avahi +with_snmp_includes +with_snmp_libs with_usb_includes with_usb_libs with_snmp -with_net_snmp_config -with_snmp_includes -with_snmp_libs with_neon with_neon_includes with_neon_libs with_powerman with_powerman_includes with_powerman_libs -with_modbus -with_modbus_includes -with_modbus_libs -with_avahi with_avahi_includes with_avahi_libs with_ipmi @@ -1016,16 +927,12 @@ with_libltdl with_libltdl_includes with_libltdl_libs with_cgi -with_gdlib_config with_gd_includes with_gd_libs -enable_cppcheck -enable_check_NIT enable_shared enable_static with_pic enable_fast_install -with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock @@ -1039,20 +946,13 @@ with_port with_user with_group with_logfacility +with_drivers enable_strip with_pkgconfig_dir -with_solaris_smf -with_solaris_pkg_svr4 -with_solaris_pkg_ips with_systemdsystemunitdir -with_systemdshutdowndir -with_systemdtmpfilesdir -enable_cppunit -with_augeas_lenses_dir with_hotplug_dir with_udev_dir with_devd_dir -with_valgrind ' ac_precious_vars='build_alias host_alias @@ -1063,18 +963,15 @@ LDFLAGS LIBS CPPFLAGS CPP -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -dummy_PKG_CONFIG_CFLAGS -dummy_PKG_CONFIG_LIBS CXX CXXFLAGS CCC -LT_SYS_LIBRARY_PATH -CXXCPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR CPPUNIT_CFLAGS -CPPUNIT_LIBS' +CPPUNIT_LIBS +CXXCPP' # Initialize some variables set by options. @@ -1113,7 +1010,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1366,15 +1262,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1512,7 +1399,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1625,7 +1512,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures nut 2.8.0 to adapt to many kinds of systems. +\`configure' configures nut 2.7.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1665,7 +1552,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1697,7 +1583,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of nut 2.8.0:";; + short | recursive ) echo "Configuration of nut 2.7.4:";; esac cat <<\_ACEOF @@ -1714,65 +1600,30 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer - --enable-Wcolor Request that compiler output is colorized (no = - leave it up to compiler defaults) (no) - --enable-warnings enable warning presets that were picked as useful in - maintainership and CI practice (variants include - gcc-minimal, gcc-medium, gcc-hard, clang-minimal, - clang-medium, clang-hard, all; auto-choosers: hard, - medium, minimal, yes=auto='gcc or clang or all at - hardcoded default difficulty') (auto) - --enable-Werror fail the build if compiler emits any warnings (treat - them as errors) (no) - --enable-cppcheck Run a cppcheck on the codebase among checks (no) - --enable-check-NIT Run check-NIT among default checks (no) --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-strip Strip debugging symbols from binaries (no) - --enable-cppunit enable CPPUNIT tests for C++ bindings Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - [--with-pkg-config=/path/to/gdlib-config] - path to program that reports development package - configuration - --with-python Use a particular program name of the python - interpeter (auto) - --with-python2 Use a particular program name of the python2 - interpeter for code that needs that version and is - not compatible with python3 (auto) - --with-python3 Use a particular program name of the python3 - interpeter for code that needs that version and is - not compatible with python2 (auto) - [--with-drivers=driver[,driver]] - Only build specific drivers (all) - --with-all enable serial, usb, snmp, neon, ipmi, powerman, - modbus, cgi, dev, avahi, linux_i2c + --with-all enable serial, usb, snmp, neon, ipmi, powerman, cgi, + dev, avahi, linux_i2c --with-dev build and install the development files (no) - --with-docs build and install documentation (alias to - --with-doc) (man=auto) - --with-doc build and install documentation (see - docs/configure.txt for many variants of the option) - (${nut_with_docs}) --with-serial build and install serial drivers (yes) - --with-usb build and install USB drivers, optionally require - build with specified version of libusb library and - API: (auto|libusb-0.1|libusb-1.0) (auto) - [--with-libusb-config=/path/to/libusb-config] - path to program that reports LibUSB configuration + --with-usb build and install USB drivers (auto) + --with-doc build and install documentation (no) + --with-avahi build and install Avahi support (auto) + [--with-snmp-includes=CFLAGS] + include flags for the Net-SNMP library + [--with-snmp-libs=LIBS] linker flags for the Net-SNMP library [--with-usb-includes=CFLAGS] include flags for the libusb library [--with-usb-libs=LIBS] linker flags for the libusb library --with-snmp build and install SNMP drivers (auto) - [--with-net-snmp-config=/path/to/net-snmp-config] - path to program that reports Net-SNMP configuration - [--with-snmp-includes=CFLAGS] - include flags for the Net-SNMP library - [--with-snmp-libs=LIBS] linker flags for the Net-SNMP library --with-neon build and install neon based XML/HTTP driver (auto) [--with-neon-includes=CFLAGS] include flags for the neon library @@ -1782,12 +1633,6 @@ Optional Packages: include flags for the libpowerman library [--with-powerman-libs=LIBS] linker flags for the libpowerman library - --with-modbus build and install modbus drivers (auto) - [--with-modbus-includes=CFLAGS] - include flags for the libmodbus library - [--with-modbus-libs=LIBS] - linker flags for the libmodbus library - --with-avahi build and install Avahi support (auto) [--with-avahi-includes=CFLAGS] include flags for the avahi library [--with-avahi-libs=LIBS] @@ -1819,20 +1664,15 @@ Optional Packages: [--with-libltdl-libs=LIBS] linker flags for the libltdl library --with-cgi build and install the CGI programs (no) - [--with-gdlib-config=/path/to/gdlib-config] - path to program that reports GDLIB configuration [--with-gd-includes=CFLAGS] include flags for the gd library [--with-gd-libs=LDFLAGS] linker flags for the gd library --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] - --with-aix-soname=aix|svr4|both - shared library versioning (aka "SONAME") variant to - provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-statepath=PATH path for ups state files (/var/state/ups) --with-altpidpath=PATH path for driver/upsd .pid files () --with-drvpath=PATH where to install UPS drivers (EPREFIX/bin) @@ -1840,35 +1680,22 @@ Optional Packages: --with-htmlpath=PATH where to install HTML files (PREFIX/html) --with-pidpath=PATH path for .pid files (/var/run) --with-port=PORT port for network communications (3493) - --with-user=username user for programs started as root (${RUN_AS_USER}) + --with-user=username user for programs started as root (nobody) --with-group=groupname group membership of user for programs started as - root (${RUN_AS_GROUP}) + root (nogroup) --with-logfacility=FACILITY facility for log messages (LOG_DAEMON) + [--with-drivers=driver[,driver]] + Only build specific drivers (all) --with-pkgconfig-dir=PATH where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig) - --with-solaris-smf=(yes|auto|no) - Enable installation of NUT scripts and manifests for - Solaris Service Management Framework (auto) - --with-solaris-pkg-svr4=(yes|auto|no) - Enable construction of Solaris SVR4 packages (auto) - --with-solaris-pkg-ips=(yes|auto|no) - Enable construction of Solaris IPS packages (auto) --with-systemdsystemunitdir=DIR Directory for systemd service files (auto) - --with-systemdshutdowndir=DIR - Directory for systemd shutdown scripts (auto) - --with-systemdtmpfilesdir=DIR - Directory for systemd tmpfiles scripts (auto) - --with-augeas-lenses-dir=PATH - where to install Augeas configuration-management - lenses (/usr/share/augeas/lenses{/dist,/}) --with-hotplug-dir=PATH where to install hotplug rules (/etc/hotplug) --with-udev-dir=PATH where to install udev rules (/lib/udev or /etc/udev) --with-devd-dir=PATH where to install devd.conf file (/usr/local/etc/devd or /etc/devd) - --with-valgrind=PATH whether to use valgrind for memory-leak testing Some influential environment variables: CC C compiler command @@ -1879,24 +1706,18 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - dummy_PKG_CONFIG_CFLAGS - C compiler flags for dummy_PKG_CONFIG, overriding pkg-config - dummy_PKG_CONFIG_LIBS - linker flags for dummy_PKG_CONFIG, overriding pkg-config - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LT_SYS_LIBRARY_PATH - User-defined run-time library search path. - CXXCPP C++ preprocessor CPPUNIT_CFLAGS C compiler flags for CPPUNIT, overriding pkg-config CPPUNIT_LIBS linker flags for CPPUNIT, overriding pkg-config + CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1964,7 +1785,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -nut configure 2.8.0 +nut configure 2.7.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2301,94 +2122,6 @@ fi } # ac_fn_c_try_link -# ac_fn_cxx_try_link LINENO -# ------------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_link - -# ac_fn_cxx_try_run LINENO -# ------------------------ -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_cxx_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_run - # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly @@ -2556,189 +2289,6 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_type -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_cxx_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by nut $as_me 2.8.0, which was +It was created by nut $as_me 2.7.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3059,11 +2655,6 @@ $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -as_fn_append ac_header_list " sys/time.h" -as_fn_append ac_header_list " time.h" -as_fn_append ac_header_list " sys/types.h" -as_fn_append ac_header_list " sys/socket.h" -as_fn_append ac_header_list " netdb.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -3132,8 +2723,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "Network UPS Tools version ${PACKAGE_VERSION}" ac_aux_dir= -for ac_dir in . "$srcdir"/.; do +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -3149,7 +2743,7 @@ for ac_dir in . "$srcdir"/.; do fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3161,9 +2755,6 @@ ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -echo "Network UPS Tools version ${PACKAGE_VERSION}" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 @@ -3275,6 +2866,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- + os_get_name() { case "$1" in (*CentOS*|*CENTOS*) echo 'centos' ;; @@ -3413,74 +3005,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dist_cv_build_flavor" >&5 $as_echo "$dist_cv_build_flavor" >&6; } - - CFLAGS_STASHED_WARNINGS="" - CPPFLAGS_STASHED_WARNINGS="" - CXXFLAGS_STASHED_WARNINGS="" - - if test -z "$CFLAGS"; then : - -else - - TMP="" - for V in ${CFLAGS} ; do - case "$V" in - -W*|-*pedantic*) CFLAGS_STASHED_WARNINGS="${CFLAGS_STASHED_WARNINGS} ${V}" ;; - *) TMP="${TMP} ${V}" ;; - esac - done - CFLAGS="$TMP" - -fi - if test -n "${CFLAGS_STASHED_WARNINGS}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Stashed CFLAGS warnings to not confuse autotools probes: ${CFLAGS_STASHED_WARNINGS}" >&5 -$as_echo "$as_me: Stashed CFLAGS warnings to not confuse autotools probes: ${CFLAGS_STASHED_WARNINGS}" >&6;} -fi - - if test -z "$CPPFLAGS"; then : - -else - - TMP="" - for V in ${CPPFLAGS} ; do - case "$V" in - -W*|-*pedantic*) CPPFLAGS_STASHED_WARNINGS="${CPPFLAGS_STASHED_WARNINGS} ${V}" ;; - *) TMP="${TMP} ${V}" ;; - esac - done - CPPFLAGS="$TMP" - -fi - if test -n "${CPPFLAGS_STASHED_WARNINGS}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Stashed CPPFLAGS warnings to not confuse autotools probes: ${CPPFLAGS_STASHED_WARNINGS}" >&5 -$as_echo "$as_me: Stashed CPPFLAGS warnings to not confuse autotools probes: ${CPPFLAGS_STASHED_WARNINGS}" >&6;} -fi - - - if test -z "$CXXFLAGS"; then : - -else - - TMP="" - for V in ${CXXFLAGS} ; do - case "$V" in - -W*|-*pedantic*) CXXFLAGS_STASHED_WARNINGS="${CXXFLAGS_STASHED_WARNINGS} ${V}" ;; - *) TMP="${TMP} ${V}" ;; - esac - done - CXXFLAGS="$TMP" - -fi - if test -n "${CXXFLAGS_STASHED_WARNINGS}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Stashed CXXFLAGS warnings to not confuse autotools probes: ${CXXFLAGS_STASHED_WARNINGS}" >&5 -$as_echo "$as_me: Stashed CXXFLAGS warnings to not confuse autotools probes: ${CXXFLAGS_STASHED_WARNINGS}" >&6;} -fi - - ac_config_headers="$ac_config_headers include/config.h" -am__api_version='1.16' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3656,7 +3184,12 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3667,7 +3200,7 @@ else $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh+set}" != xset; then +if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -3961,7 +3494,7 @@ fi # Define the identity of the package. PACKAGE='nut' - VERSION='2.8.0' + VERSION='2.7.4' cat >>confdefs.h <<_ACEOF @@ -3991,12 +3524,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target (and possibly the TAP driver). The -# system "awk" is bad on some platforms. +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -4043,7 +3576,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -4064,45 +3597,45 @@ $as_echo "yes" >&6; } ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } -cat > confinc.mk << 'END' + +am_make=${MAKE-make} +cat > confinc << 'END' am__doit: - @echo this is the am__doit target >confinc.out + @echo this is the am__doit target .PHONY: am__doit END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -# BSD make does it like this. -echo '.include "confinc.mk" # ignored' > confmf.BSD -# Other make implementations (GNU, Solaris 10, AIX) do it like this. -echo 'include confinc.mk # ignored' > confmf.GNU -_am_result=no -for s in GNU BSD; do - { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 - (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - case $?:`cat confinc.out 2>/dev/null` in #( - '0:this is the am__doit target') : - case $s in #( - BSD) : - am__include='.include' am__quote='"' ;; #( - *) : - am__include='include' am__quote='' ;; -esac ;; #( - *) : - ;; +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; esac - if test "$am__include" != "#"; then - _am_result="yes ($s style)" - break - fi -done -rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -5561,8 +5094,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -5589,360 +5120,6 @@ fi - - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi - -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - - - - TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`" cat >>confdefs.h <<_ACEOF @@ -5950,7 +5127,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -NUT_NETVERSION="1.3" +NUT_NETVERSION="1.2" cat >>confdefs.h <<_ACEOF #define NUT_NETVERSION "${NUT_NETVERSION}" @@ -5971,13 +5148,6 @@ cgiexecdir='${exec_prefix}/cgi-bin' driverexecdir='${exec_prefix}/bin' htmldir='${prefix}/html' pkgconfigdir='${libdir}/pkgconfig' -auglensdir='/usr/share/augeas/lenses/dist' -if test ! -d "${auglensdir}"; then - auglensdir='/usr/share/augeas/lenses' - if test ! -d "${auglensdir}"; then - auglensdir='' - fi -fi hotplugdir='/etc/hotplug' if test ! -d "${hotplugdir}"; then hotplugdir='' @@ -6000,15 +5170,737 @@ fi RUN_AS_USER="nobody" RUN_AS_GROUP="nobody" -if test -n "`getent group nogroup`" && ! test -n "`getent group "${RUN_AS_GROUP}"`"; then : - RUN_AS_GROUP="nogroup" - -fi PIDPATH="/var/run" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6532,83 +6424,6 @@ else fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX understands -c and -o together" >&5 -$as_echo_n "checking whether $CXX understands -c and -o together... " >&6; } -if ${ac_cv_prog_cxx_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -# We test twice because some compilers refuse to overwrite an existing -# `.o' file with `-o', although they will create one. -ac_try='$CXX $CXXFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - ac_cv_prog_cxx_c_o=yes -else - ac_cv_prog_cxx_c_o=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_c_o" >&5 -$as_echo "$ac_cv_prog_cxx_c_o" >&6; } -if test $ac_cv_prog_cxx_c_o = no; then - -$as_echo "#define CXX_NO_MINUS_C_MINUS_O 1" >>confdefs.h - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } @@ -7149,3825 +6964,7 @@ $as_echo "#define HAVE_C_VARARRAYS 1" >>confdefs.h fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC compiler family is GCC" >&5 -$as_echo_n "checking if CC compiler family is GCC... " >&6; } -if ${nut_cv_GCC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then : - if $CC --version 2>&1 | grep 'Free Software Foundation' > /dev/null; then : - nut_cv_GCC=yes -else - nut_cv_GCC=no -fi -else - as_fn_error $? "CC is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_GCC" >&5 -$as_echo "$nut_cv_GCC" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX compiler family is GCC" >&5 -$as_echo_n "checking if CXX compiler family is GCC... " >&6; } -if ${nut_cv_GXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then : - if $CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null; then : - nut_cv_GXX=yes -else - nut_cv_GXX=no -fi -else - as_fn_error $? "CXX is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_GXX" >&5 -$as_echo "$nut_cv_GXX" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPP preprocessor family is GCC" >&5 -$as_echo_n "checking if CPP preprocessor family is GCC... " >&6; } -if ${nut_cv_GPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CPP"; then : - if $CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null; then : - nut_cv_GPP=yes -else - nut_cv_GPP=no -fi -else - as_fn_error $? "CPP is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_GPP" >&5 -$as_echo "$nut_cv_GPP" >&6; } - - if test "x$GCC" = "x" && test "$nut_cv_GCC" = yes; then : - GCC=yes -fi - if test "x$GXX" = "x" && test "$nut_cv_GXX" = yes; then : - GXX=yes -fi - if test "x$GPP" = "x" && test "$nut_cv_GPP" = yes; then : - GPP=yes -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC compiler family is clang" >&5 -$as_echo_n "checking if CC compiler family is clang... " >&6; } -if ${nut_cv_CLANGCC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then : - if $CC --version 2>&1 | grep -E '(clang version|Apple LLVM version .*clang-)' > /dev/null; then : - nut_cv_CLANGCC=yes -else - nut_cv_CLANGCC=no -fi -else - as_fn_error $? "CC is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_CLANGCC" >&5 -$as_echo "$nut_cv_CLANGCC" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX compiler family is clang" >&5 -$as_echo_n "checking if CXX compiler family is clang... " >&6; } -if ${nut_cv_CLANGXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then : - if $CXX --version 2>&1 | grep -E '(clang version|Apple LLVM version .*clang-)' > /dev/null; then : - nut_cv_CLANGXX=yes -else - nut_cv_CLANGXX=no -fi -else - as_fn_error $? "CXX is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_CLANGXX" >&5 -$as_echo "$nut_cv_CLANGXX" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CPP preprocessor family is clang" >&5 -$as_echo_n "checking if CPP preprocessor family is clang... " >&6; } -if ${nut_cv_CLANGPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CPP"; then : - if $CPP --version 2>&1 | grep -E '(clang version|Apple LLVM version .*clang-)' > /dev/null; then : - nut_cv_CLANGPP=yes -else - nut_cv_CLANGPP=no -fi -else - as_fn_error $? "CPP is not set" "$LINENO" 5 - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_CLANGPP" >&5 -$as_echo "$nut_cv_CLANGPP" >&6; } - - if test "x$CLANGCC" = "x" && test "$nut_cv_CLANGCC" = yes; then : - CLANGCC=yes -fi - if test "x$CLANGXX" = "x" && test "$nut_cv_CLANGXX" = yes; then : - CLANGXX=yes -fi - if test "x$CLANGPP" = "x" && test "$nut_cv_CLANGPP" = yes; then : - CLANGPP=yes -fi - - # Check whether --enable-Wcolor was given. -if test "${enable_Wcolor+set}" = set; then : - enableval=$enable_Wcolor; nut_enable_Wcolor="${enableval}" -else - nut_enable_Wcolor="no" - -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: Detecting support for additional compiler flags" >&5 -$as_echo "$as_me: Detecting support for additional compiler flags" >&6;} - - - - - COMPILERFLAG="-Qunused-arguments" - - SAVED_CFLAGS="$CFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CFLAGS="$CFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C++ compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CXXFLAGS="$CXXFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - COMPILERFLAG="-Wno-reserved-identifier" - - SAVED_CFLAGS="$CFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CFLAGS="$CFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C++ compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CXXFLAGS="$CXXFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - if test x"${nut_enable_Wcolor}" = xyes; then : - - - - - COMPILERFLAG="-fdiagnostics-color=always" - - SAVED_CFLAGS="$CFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CFLAGS="$CFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C++ compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CXXFLAGS="$CXXFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: NOT checking for options to request colorized compiler output (pass --enable-Wcolor for that)" >&5 -$as_echo "$as_me: NOT checking for options to request colorized compiler output (pass --enable-Wcolor for that)" >&6;} -fi - - - - COMPILERFLAG="-Wno-unknown-warning-option" - - SAVED_CFLAGS="$CFLAGS" - SAVED_CXXFLAGS="$CXXFLAGS" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CFLAGS="$CFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - CFLAGS="$SAVED_CFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_${COMPILERFLAG}" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts ${COMPILERFLAG}" >&5 -$as_echo_n "checking whether C++ compiler accepts ${COMPILERFLAG}... " >&6; } -if eval \${$as_CACHEVAR+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror ${COMPILERFLAG}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - eval "$as_CACHEVAR=no" -else - eval "$as_CACHEVAR=yes" -fi -else - eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=\$$as_CACHEVAR - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_CACHEVAR"\" = x"yes"; then : - CXXFLAGS="$CXXFLAGS ${COMPILERFLAG}" - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - -else - CXXFLAGS="$SAVED_CXXFLAGS" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - if test "x$CLANGCC" = xyes -o "x$GCC" = xyes; then : - - if test -d /usr/local/include; then : - CFLAGS="-isystem /usr/local/include $CFLAGS" -fi - if test -d /usr/pkg/include; then : - CFLAGS="-isystem /usr/pkg/include $CFLAGS" -fi - -fi - if test "x$CLANGXX" = xyes -o "x$GXX" = xyes; then : - - if test -d /usr/local/include; then : - CXXFLAGS="-isystem /usr/local/include $CXXFLAGS" -fi - if test -d /usr/pkg/include; then : - CXXFLAGS="-isystem /usr/pkg/include $CXXFLAGS" -fi - -fi - - if test "x$GCC" = xyes -o "x$CLANGCC" = xyes; then : - case "${CFLAGS}" in #( - -std=*) : - ;; #( - *) : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu99" >&5 -$as_echo_n "checking whether C compiler accepts -std=gnu99... " >&6; } -if ${ax_cv_check_cflags__Werror__std_gnu99+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -std=gnu99" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - ax_cv_check_cflags__Werror__std_gnu99=no -else - ax_cv_check_cflags__Werror__std_gnu99=yes -fi -else - ax_cv_check_cflags__Werror__std_gnu99=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__std_gnu99" >&5 -$as_echo "$ax_cv_check_cflags__Werror__std_gnu99" >&6; } -if test "x$ax_cv_check_cflags__Werror__std_gnu99" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Defaulting C standard support to GNU C99 on a GCC or CLANG compatible compiler" >&5 -$as_echo "$as_me: Defaulting C standard support to GNU C99 on a GCC or CLANG compatible compiler" >&6;} - CFLAGS="$CFLAGS -std=gnu99" - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ;; -esac - -fi - - if test "x$GCC" = xyes -o "x$CLANGCC" = xyes; then : - case "${CXXFLAGS}" in #( - -std=*) : - ;; #( - *) : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=gnu++11" >&5 -$as_echo_n "checking whether C++ compiler accepts -std=gnu++11... " >&6; } -if ${ax_cv_check_cxxflags__Werror__std_gnupp11+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror -std=gnu++11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - ax_cv_check_cxxflags__Werror__std_gnupp11=no -else - ax_cv_check_cxxflags__Werror__std_gnupp11=yes -fi -else - ax_cv_check_cxxflags__Werror__std_gnupp11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags__Werror__std_gnupp11" >&5 -$as_echo "$ax_cv_check_cxxflags__Werror__std_gnupp11" >&6; } -if test "x$ax_cv_check_cxxflags__Werror__std_gnupp11" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Defaulting C++ standard support to GNU C++11 on a GCC or CLANG compatible compiler" >&5 -$as_echo "$as_me: Defaulting C++ standard support to GNU C++11 on a GCC or CLANG compatible compiler" >&6;} - CXXFLAGS="$CXXFLAGS -std=gnu++11" - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ;; -esac - -fi - - - -if test -z "${nut_have_ax_c_pragmas_seen}"; then - nut_have_ax_c_pragmas_seen="yes" - - CFLAGS_SAVED="${CFLAGS}" - CXXFLAGS_SAVED="${CXXFLAGS}" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - if test "${CLANG}" = "yes"; then : - CFLAGS="${CFLAGS_SAVED} -Werror=pragmas -Werror=unknown-pragmas -Werror=unknown-warning-option" - CXXFLAGS="${CXXFLAGS_SAVED} -Werror=pragmas -Werror=unknown-pragmas -Werror=unknown-warning-option" -else - if test "${GCC}" = "yes"; then : - CFLAGS="${CFLAGS_SAVED} -Wall -Wextra -Werror" - CXXFLAGS="${CXXFLAGS_SAVED} -Wall -Wextra -Werror" -else - CFLAGS="${CFLAGS_SAVED} -Wall -Wextra -Werror" - CXXFLAGS="${CXXFLAGS_SAVED} -Wall -Wextra -Werror" -fi - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic push and pop (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic push and pop (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_push_pop_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic pop - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_push_pop_besidefunc=yes -else - ax_cv__pragma__gcc__diags_push_pop_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_push_pop_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma clang diagnostic push and pop (outside functions)" >&5 -$as_echo_n "checking for pragma clang diagnostic push and pop (outside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_push_pop_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __clang__ -#endif -#pragma clang diagnostic push -#pragma clang diagnostic pop - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_push_pop_besidefunc=yes -else - ax_cv__pragma__clang__diags_push_pop_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_push_pop_besidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_push_pop_besidefunc" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic push and pop (inside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic push and pop (inside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_push_pop_insidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic push -#pragma GCC diagnostic pop -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_push_pop_insidefunc=yes -else - ax_cv__pragma__gcc__diags_push_pop_insidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_push_pop_insidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma clang diagnostic push and pop (inside functions)" >&5 -$as_echo_n "checking for pragma clang diagnostic push and pop (inside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_push_pop_insidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#ifdef __clang__ -#endif -#pragma clang diagnostic push -#pragma clang diagnostic pop -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_push_pop_insidefunc=yes -else - ax_cv__pragma__clang__diags_push_pop_insidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_push_pop_insidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_push_pop_insidefunc" >&6; } - - if test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes" && test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP_INSIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP_BESIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_besidefunc" = "yes" && test "$ax_cv__pragma__clang__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP 1" >>confdefs.h - - -fi - - if test "${CLANG}" = "yes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\"" >&5 -$as_echo_n "checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\"... " >&6; } -if ${ax_cv__pragma__clang__diags_ignored_unreachable_code_return+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma clang diagnostic ignored "-Wunreachable-code-return" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_ignored_unreachable_code_return=yes -else - ax_cv__pragma__clang__diags_ignored_unreachable_code_return=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_ignored_unreachable_code_return" >&5 -$as_echo "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return" >&6; } - if test "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\" (outside functions)" >&5 -$as_echo_n "checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\" (outside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma clang diagnostic ignored "-Wunreachable-code-return" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc=yes -else - ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" >&6; } - if test "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN_BESIDEFUNC 1" >>confdefs.h - - -fi - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunused-function\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunused-function\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unused_function+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunused-function" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unused_function=yes -else - ax_cv__pragma__gcc__diags_ignored_unused_function=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unused_function" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unused_function" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unused_function" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNUSED_FUNCTION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_nonliteral+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_nonliteral=yes -else - ax_cv__pragma__gcc__diags_ignored_format_nonliteral=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_nonliteral" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-security\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-security\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_security+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-security" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_security=yes -else - ax_cv__pragma__gcc__diags_ignored_format_security=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_security" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_security" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-security\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-security\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-security" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-truncation\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-truncation\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_truncation+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-truncation" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_truncation=yes -else - ax_cv__pragma__gcc__diags_ignored_format_truncation=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_truncation" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_truncation" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-truncation\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-truncation\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-truncation" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_stringop_truncation+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wstringop-truncation" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_stringop_truncation=yes -else - ax_cv__pragma__gcc__diags_ignored_stringop_truncation=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_stringop_truncation" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRINGOP_TRUNCATION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wstringop-truncation" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRINGOP_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtype-limits\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtype-limits\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_type_limits+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtype-limits" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_type_limits=yes -else - ax_cv__pragma__gcc__diags_ignored_type_limits=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_type_limits" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_type_limits" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_type_limits" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtype-limits\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtype-limits\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtype-limits" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Warray-bounds\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Warray-bounds\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_array_bounds+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Warray-bounds" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_array_bounds=yes -else - ax_cv__pragma__gcc__diags_ignored_array_bounds=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_array_bounds" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_array_bounds" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_array_bounds" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ARRAY_BOUNDS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Warray-bounds\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Warray-bounds\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Warray-bounds" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ARRAY_BOUNDS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-type-limit-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-type-limit-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-unsigned-zero-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-unsigned-zero-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wsign-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wsign-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-conversion\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-conversion\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_conversion+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wsign-conversion" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_conversion=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_conversion=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_conversion" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_conversion" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_conversion" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-conversion\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-conversion\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wsign-conversion" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_break+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code-break" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code-break" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_return+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code-return" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code-return" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-overflow\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-overflow\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_overflow+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-overflow" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_overflow=yes -else - ax_cv__pragma__gcc__diags_ignored_format_overflow=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_overflow" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_overflow" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_overflow" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-overflow\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-overflow\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-overflow" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_covered_switch_default+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wcovered-switch-default" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_covered_switch_default=yes -else - ax_cv__pragma__gcc__diags_ignored_covered_switch_default=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_covered_switch_default" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wcovered-switch-default" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wextra-semi-stmt" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt=yes -else - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wextra-semi-stmt" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcast-align\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcast-align\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cast_align+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wcast-align" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cast_align=yes -else - ax_cv__pragma__gcc__diags_ignored_cast_align=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cast_align" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cast_align" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cast_align" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcast-align\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcast-align\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wcast-align" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_strict_prototypes+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wstrict-prototypes" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_strict_prototypes=yes -else - ax_cv__pragma__gcc__diags_ignored_strict_prototypes=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_strict_prototypes" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wstrict-prototypes" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wassign-enum\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wassign-enum\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_assign_enum+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wassign-enum" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_assign_enum=yes -else - ax_cv__pragma__gcc__diags_ignored_assign_enum=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_assign_enum" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_assign_enum" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_assign_enum" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wassign-enum\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wassign-enum\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wassign-enum" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM_BESIDEFUNC 1" >>confdefs.h - - -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_PEDANTIC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_PEDANTIC_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wc++98-compat" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wc++98-compat" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_global_constructors+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wglobal-constructors" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_global_constructors=yes -else - ax_cv__pragma__gcc__diags_ignored_global_constructors=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_global_constructors" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_global_constructors" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_global_constructors" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wglobal-constructors" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_exit_time_destructors+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wexit-time-destructors" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors=yes -else - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wexit-time-destructors" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS_BESIDEFUNC 1" >>confdefs.h - - -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - if test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT 1" >>confdefs.h - - -fi - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes"; then : - - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_BESIDEFUNC 1" >>confdefs.h - - -fi - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma BOGUSforTest" >&5 -$as_echo_n "checking for pragma BOGUSforTest... " >&6; } -if ${ax_cv__pragma__bogus+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma BOGUSforTest -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus=yes -else - ax_cv__pragma__bogus=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus" >&5 -$as_echo "$ax_cv__pragma__bogus" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma BOGUSforTest (outside functions)" >&5 -$as_echo_n "checking for pragma BOGUSforTest (outside functions)... " >&6; } -if ${ax_cv__pragma__bogus_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma BOGUSforTest -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_besidefunc=yes -else - ax_cv__pragma__bogus_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_besidefunc" >&5 -$as_echo "$ax_cv__pragma__bogus_besidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\"... " >&6; } -if ${ax_cv__pragma__bogus_diag+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-WBOGUSforTest" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_diag=yes -else - ax_cv__pragma__bogus_diag=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_diag" >&5 -$as_echo "$ax_cv__pragma__bogus_diag" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\" (outside functions)... " >&6; } -if ${ax_cv__pragma__bogus_diag_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-WBOGUSforTest" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_diag_besidefunc=yes -else - ax_cv__pragma__bogus_diag_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_diag_besidefunc" >&5 -$as_echo "$ax_cv__pragma__bogus_diag_besidefunc" >&6; } - - if test "${ax_cv__pragma__bogus}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus=$ax_cv__pragma__bogus (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus=$ax_cv__pragma__bogus (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_besidefunc}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_besidefunc=$ax_cv__pragma__bogus_besidefunc (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_besidefunc=$ax_cv__pragma__bogus_besidefunc (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_diag}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag=$ax_cv__pragma__bogus_diag (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag=$ax_cv__pragma__bogus_diag (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_diag_besidefunc}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag_besidefunc=$ax_cv__pragma__bogus_diag_besidefunc (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag_besidefunc=$ax_cv__pragma__bogus_diag_besidefunc (not 'no')" >&2;} -fi - - CFLAGS="${CFLAGS_SAVED}" - CXXFLAGS="${CXXFLAGS_SAVED}" -fi - - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((unused)) for function arguments" >&5 -$as_echo_n "checking for __attribute__((unused)) for function arguments... " >&6; } -if ${ax_cv___attribute__unused_arg+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void foo( int); - static void - foo(__attribute__ ((unused)) int i) { - return; - } - -int -main () -{ -func(1); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv___attribute__unused_arg=yes -else - ax_cv___attribute__unused_arg=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__unused_arg" >&5 -$as_echo "$ax_cv___attribute__unused_arg" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((unused)) for functions" >&5 -$as_echo_n "checking for __attribute__((unused)) for functions... " >&6; } -if ${ax_cv___attribute__unused_func+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void foo(void) __attribute__ ((unused)); - static void - foo(void) { - return; - } - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv___attribute__unused_func=yes -else - ax_cv___attribute__unused_func=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__unused_func" >&5 -$as_echo "$ax_cv___attribute__unused_func" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__((noreturn))" >&5 -$as_echo_n "checking for __attribute__((noreturn))... " >&6; } -if ${ax_cv___attribute__noreturn+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static void foo(void) __attribute__ ((noreturn)); - static void - foo(void) { - exit(1); - } - -int -main () -{ -foo(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv___attribute__noreturn=yes -else - ax_cv___attribute__noreturn=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__noreturn" >&5 -$as_echo "$ax_cv___attribute__noreturn" >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at least some __attribute__ support" >&5 -$as_echo_n "checking for at least some __attribute__ support... " >&6; } -if ${ax_cv___attribute__+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$ax_cv___attribute__unused_arg" = "yes" \ - || test "$ax_cv___attribute__unused_func" = "yes" \ - || test "$ax_cv___attribute__noreturn" = "yes" \ - ; then - ax_cv___attribute__=yes - else - ax_cv___attribute__=no - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv___attribute__" >&5 -$as_echo "$ax_cv___attribute__" >&6; } - - if test "$ax_cv___attribute__unused_arg" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__UNUSED_ARG 1" >>confdefs.h - - fi - - if test "$ax_cv___attribute__unused_func" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__UNUSED_FUNC 1" >>confdefs.h - - fi - if test "$ax_cv___attribute__noreturn" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__NORETURN 1" >>confdefs.h - - fi - - if test "$ax_cv___attribute__" = "yes"; then - -$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h - - fi - - -if test -z "${nut_have_ax_c_printf_string_null_seen}"; then - nut_have_ax_c_printf_string_null_seen="yes" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for practical support to pritnf(\"%s\", NULL)" >&5 -$as_echo_n "checking for practical support to pritnf(\"%s\", NULL)... " >&6; } -if ${ax_cv__printf_string_null+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -char buf128; -char *s = NULL; -int res = snprintf(buf, sizeof(buf), "%s", s); -bufsizeof(buf)-1 = '\0'; -if (res < 0) { - printf(stderr, "FAILED to snprintf() a NULL string argument"); - exit 1; -} -if (buf0 == '\0') - printf(stderr, "RETURNED empty string from snprintf() with a NULL string argument"); - exit 0; -} -if (strcasestr(buf, 'null') == NULL) - printf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'", buf); - exit 0; -} -printf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'", buf); -exit 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ax_cv__printf_string_null=yes -else - ax_cv__printf_string_null=no - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -int -main () -{ -char buf128; -char *s = NULL; -int res = snprintf(buf, sizeof(buf), "%s", s); -bufsizeof(buf)-1 = '\0'; -if (res < 0) { - printf(stderr, "FAILED to snprintf() a NULL string argument"); - exit 1; -} -if (buf0 == '\0') - printf(stderr, "RETURNED empty string from snprintf() with a NULL string argument"); - exit 0; -} -if (strcasestr(buf, 'null') == NULL) - printf(stderr, "RETURNED some string from snprintf() with a NULL string argument: '%s'", buf); - exit 0; -} -printf(stderr, "SUCCESS: RETURNED a string that contains something like 'null' from snprintf() with a NULL string argument: '%s'", buf); -exit 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ax_cv__printf_string_null=yes -else - ax_cv__printf_string_null=no - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__printf_string_null" >&5 -$as_echo "$ax_cv__printf_string_null" >&6; } - - if test "$ax_cv__printf_string_null" = "yes"; then : - - -$as_echo "#define HAVE_PRINTF_STRING_NULL 1" >>confdefs.h - - -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi - -for ac_func in flock lockf fcvt fcvtl pow10 round abs_val abs +for ac_func in flock lockf fcvt fcvtl do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -10979,173 +6976,6 @@ _ACEOF fi done - -ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" -if test "x$ac_cv_header_float_h" = xyes; then : - -$as_echo "#define HAVE_FLOAT_H 1" >>confdefs.h - -fi - - -ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" -if test "x$ac_cv_header_math_h" = xyes; then : - -$as_echo "#define HAVE_MATH_H 1" >>confdefs.h - -fi - - -for ac_func in fabs fabsf fabsl -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" -if test "x$ac_cv_header_limits_h" = xyes; then : - -$as_echo "#define HAVE_LIMITS_H 1" >>confdefs.h - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" -if test "x$ac_cv_header_signal_h" = xyes; then : - -$as_echo "#define HAVE_SIGNAL_H 1" >>confdefs.h - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_signal_h" = xyes; then : - -$as_echo "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_resource_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct rlimit and getrlimit()" >&5 -$as_echo_n "checking for struct rlimit and getrlimit()... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ -struct rlimit limit; -getrlimit(RLIMIT_NOFILE, &limit); -/* Do not care about actual return value in this test, - * normally check for non-zero meaning to look in errno */ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default" -if test "x$ac_cv_header_semaphore_h" = xyes; then : - -$as_echo "#define HAVE_SEMAPHORE_H 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_t, sem_init() and sem_destroy()" >&5 -$as_echo_n "checking for sem_t, sem_init() and sem_destroy()... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include - -int -main () -{ -sem_t semaphore; -sem_init(&semaphore, 0, 4); -sem_destroy(&semaphore); -/* Do not care about actual return value in this test, - * normally check for non-zero meaning to look in errno */ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_SEMAPHORE 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -fi - - - for ac_func in cfsetispeed tcsendbreak do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -11195,354 +7025,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -{ $as_echo "$as_me:${as_lineno-$LINENO}: ----------------------------------------------------------------------- -The next few tests look for required C library routines; if something is -not found, you may need to enable a different C standard or extension macro -version. You may also have to configure without extreme warning levels -since autotools tests fail those on their own and assume system lacks -stuff (although note we try to not involve standard -W* flags here). ------------------------------------------------------------------------" >&5 -$as_echo "$as_me: ----------------------------------------------------------------------- -The next few tests look for required C library routines; if something is -not found, you may need to enable a different C standard or extension macro -version. You may also have to configure without extreme warning levels -since autotools tests fail those on their own and assume system lacks -stuff (although note we try to not involve standard -W* flags here). ------------------------------------------------------------------------" >&6;} - for ac_func in strtok_r fileno localtime_r sigemptyset sigaction -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Required C library routine not found; try adding -D_POSIX_C_SOURCE=200112L" >&5 -$as_echo "$as_me: WARNING: Required C library routine not found; try adding -D_POSIX_C_SOURCE=200112L" >&2;} -fi -done - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes; then : - -$as_echo "#define HAVE_STRING_H 1" >>confdefs.h - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" -if test "x$ac_cv_header_strings_h" = xyes; then : - -$as_echo "#define HAVE_STRINGS_H 1" >>confdefs.h - -fi - - - -CODE_STRINGINCL='#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif' - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp(s1,s2)" >&5 -$as_echo_n "checking for strcasecmp(s1,s2)... " >&6; } -if ${ac_cv_func_strcasecmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -if (strcasecmp("STR1", "str1") != 0) return 1 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_strcasecmp=yes -else - ac_cv_func_strcasecmp=no - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -if (strcasecmp("STR1", "str1") != 0) return 1 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strcasecmp=yes -else - ac_cv_func_strcasecmp=no - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcasecmp" >&5 -$as_echo "$ac_cv_func_strcasecmp" >&6; } -if test x"${ac_cv_func_strcasecmp}" = xyes; then : - -$as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Required C library routine strcasecmp not found; try adding __EXTENSIONS__" >&5 -$as_echo "$as_me: WARNING: Required C library routine strcasecmp not found; try adding __EXTENSIONS__" >&2;} - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strncasecmp(s1,s2,n)" >&5 -$as_echo_n "checking for strncasecmp(s1,s2,n)... " >&6; } -if ${ac_cv_func_strncasecmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -if (strncasecmp("STR1", "strX", 2) != 0) return 1 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_strncasecmp=yes -else - ac_cv_func_strncasecmp=no - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -if (strncasecmp("STR1", "strX", 2) != 0) return 1 - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strncasecmp=yes -else - ac_cv_func_strncasecmp=no - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strncasecmp" >&5 -$as_echo "$ac_cv_func_strncasecmp" >&6; } -if test x"${ac_cv_func_strncasecmp}" = xyes; then : - -$as_echo "#define HAVE_STRNCASECMP 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Required C library routine strncasecmp not found; try adding __EXTENSIONS__" >&5 -$as_echo "$as_me: WARNING: Required C library routine strncasecmp not found; try adding __EXTENSIONS__" >&2;} - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strdup(s)" >&5 -$as_echo_n "checking for strdup(s)... " >&6; } -if ${ac_cv_func_strdup+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -int res = 0; -char *t = "Test"; -char *s = strdup(t); -if (!s || !(s[0]=='T'&&s[1]=='e'&&s[2]=='s'&&s[3]=='t'&&s[4]=='\0') || s == t) res = 1; -if (s) free (s); -if (res != 0) return res -/* autoconf adds ";return 0;" */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_strdup=yes -else - ac_cv_func_strdup=no - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$CODE_STRINGINCL -int -main () -{ -int res = 0; -char *t = "Test"; -char *s = strdup(t); -if (!s || !(s[0]=='T'&&s[1]=='e'&&s[2]=='s'&&s[3]=='t'&&s[4]=='\0') || s == t) res = 1; -if (s) free (s); -if (res != 0) return res -/* autoconf adds ";return 0;" */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strdup=yes -else - ac_cv_func_strdup=no - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strdup" >&5 -$as_echo "$ac_cv_func_strdup" >&6; } -if test x"${ac_cv_func_strdup}" = xyes; then : - -$as_echo "#define HAVE_STRDUP 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Required C library routine strdup not found; try adding -D_POSIX_C_SOURCE=200112L" >&5 -$as_echo "$as_me: WARNING: Required C library routine strdup not found; try adding -D_POSIX_C_SOURCE=200112L" >&2;} - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usleep(us)" >&5 -$as_echo_n "checking for usleep(us)... " >&6; } -if ${ac_cv_func_usleep+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -useconds_t us = 1000; -if (usleep(us) != 0) return 1 /* per doc, no erros are returned actually*/ -/* autoconf adds ";return 0;" */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_usleep=yes -else - ac_cv_func_usleep=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_usleep" >&5 -$as_echo "$ac_cv_func_usleep" >&6; } -if test x"${ac_cv_func_usleep}" = xyes; then : - -$as_echo "#define HAVE_USLEEP 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Required C library routine usleep not found; try adding -D_POSIX_C_SOURCE=200112L" >&5 -$as_echo "$as_me: WARNING: Required C library routine usleep not found; try adding -D_POSIX_C_SOURCE=200112L" >&2;} - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -sr works" >&5 -$as_echo_n "checking whether ln -sr works... " >&6; } -LN_S_R="cp -pR" -if test "$as_ln_s" = "ln -s" ; then - LN_S_R="ln" - DIR1="$(mktemp -d "dir1.XXXXXXX")" && \ - DIR2="$(mktemp -d "dir2.XXXXXXX")" && \ - touch "${DIR1}/a" && \ - $as_ln_s -r "${DIR1}/a" "${DIR2}/b" && \ - ls -la "${DIR2}/b" | grep '\.\./' > /dev/null && \ - LN_S_R="$as_ln_s -r" - rm -rf "${DIR1}" "${DIR2}" -fi -LN_S_R=${LN_S_R} - -if test "$LN_S_R" = "ln -s -r" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S_R" >&5 -$as_echo "no, using $LN_S_R" >&6; } -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } @@ -11555,18 +7037,18 @@ else /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ /* Test literals. */ long long int ll = 9223372036854775807ll; long long int nll = -9223372036854775807LL; unsigned long long int ull = 18446744073709551615ULL; /* Test constant expressions. */ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; + ? 1 : -1)]; typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; + ? 1 : -1)]; int i = 63; int main () @@ -11575,9 +7057,9 @@ main () long long int llmax = 9223372036854775807ll; unsigned long long int ullmax = 18446744073709551615ull; return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); + | (llmax / ll) | (llmax % ll) + | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) + | (ullmax / ull) | (ullmax % ull)); ; return 0; } @@ -11668,33 +7150,33 @@ if ${ac_cv_type_long_long_int+:} false; then : else ac_cv_type_long_long_int=yes if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } @@ -11708,7 +7190,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi + fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 @@ -11765,6 +7247,217 @@ fi + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT" >&5 +$as_echo_n "checking for CPPUNIT... " >&6; } + +if test -n "$CPPUNIT_CFLAGS"; then + pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$CPPUNIT_LIBS"; then + pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cppunit" 2>&1` + else + CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cppunit" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CPPUNIT_PKG_ERRORS" >&5 + + have_cppunit=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + have_cppunit=no +else + CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS + CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_cppunit=yes +fi +if test "${have_cppunit}" != "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcppunit not found." >&5 +$as_echo "$as_me: WARNING: libcppunit not found." >&2;} +fi + if test "${have_cppunit}" = "yes"; then + HAVE_CPPUNIT_TRUE= + HAVE_CPPUNIT_FALSE='#' +else + HAVE_CPPUNIT_TRUE='#' + HAVE_CPPUNIT_FALSE= +fi + + +if ( test "${GCC}" = "yes" ) +then + CFLAGS="${CFLAGS} -Wall -Wsign-compare" +fi + case ${target_os} in solaris2* ) CFLAGS="${CFLAGS} -D_REENTRANT" @@ -12041,42 +7734,42 @@ if test "$ac_res" != no; then : fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include - - - for ac_header in $ac_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} _ACEOF - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no fi - -done - - - - - - - - - - - - -if test "$ac_cv_header_sys_time_h" = yes; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - fi -for ac_header in sys/modem.h stdarg.h varargs.h +for ac_header in sys/modem.h stdarg.h varargs.h sys/termios.h sys/time.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default @@ -12091,7 +7784,7 @@ fi done - +# pthread related checks { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : @@ -12148,310 +7841,12 @@ if test "$ac_res" != no; then : $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_tryjoin_np" >&5 -$as_echo_n "checking for library containing pthread_tryjoin_np... " >&6; } -if ${ac_cv_search_pthread_tryjoin_np+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_tryjoin_np (); -int -main () -{ -return pthread_tryjoin_np (); - ; - return 0; -} -_ACEOF -for ac_lib in '' pthread; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_pthread_tryjoin_np=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_pthread_tryjoin_np+:} false; then : - break -fi -done -if ${ac_cv_search_pthread_tryjoin_np+:} false; then : - -else - ac_cv_search_pthread_tryjoin_np=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_tryjoin_np" >&5 -$as_echo "$ac_cv_search_pthread_tryjoin_np" >&6; } -ac_res=$ac_cv_search_pthread_tryjoin_np -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -$as_echo "#define HAVE_PTHREAD_TRYJOIN 1" >>confdefs.h - -fi - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows.h" >&5 -$as_echo_n "checking for windows.h... " >&6; } -if ${nut_cv_header_windows_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#undef inline -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include - -int -main () -{ - -#if defined(__CYGWIN__) || defined(__CEGCC__) - HAVE_WINDOWS_H shall not be defined. -#else - int dummy=2*WINVER; -#endif - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - nut_cv_header_windows_h="yes" - -else - - nut_cv_header_windows_h="no" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_header_windows_h" >&5 -$as_echo "$nut_cv_header_windows_h" >&6; } - case "$nut_cv_header_windows_h" in - yes) - -cat >>confdefs.h <<_ACEOF -#define HAVE_WINDOWS_H 1 -_ACEOF - - ;; - esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock2.h" >&5 -$as_echo_n "checking for winsock2.h... " >&6; } -if ${nut_cv_header_winsock2_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#undef inline -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include -#include - -int -main () -{ - -#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) - HAVE_WINSOCK2_H shall not be defined. -#else - int dummy=2*IPPROTO_ESP; -#endif - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - nut_cv_header_winsock2_h="yes" - -else - - nut_cv_header_winsock2_h="no" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_header_winsock2_h" >&5 -$as_echo "$nut_cv_header_winsock2_h" >&6; } - case "$nut_cv_header_winsock2_h" in - yes) - -cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - - ;; - esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ws2tcpip.h" >&5 -$as_echo_n "checking for ws2tcpip.h... " >&6; } -if ${nut_cv_header_ws2tcpip_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#undef inline -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include -#include -#include - -int -main () -{ - -#if defined(__CYGWIN__) || defined(__CEGCC__) || defined(__MINGW32CE__) - HAVE_WS2TCPIP_H shall not be defined. -#else - int dummy=2*IP_PKTINFO; -#endif - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - nut_cv_header_ws2tcpip_h="yes" - -else - - nut_cv_header_ws2tcpip_h="no" - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_header_ws2tcpip_h" >&5 -$as_echo "$nut_cv_header_ws2tcpip_h" >&6; } - case "$nut_cv_header_ws2tcpip_h" in - yes) - -cat >>confdefs.h <<_ACEOF -#define HAVE_WS2TCPIP_H 1 -_ACEOF - - ;; - esac - - - HEADERS_SOCKLEN_T=' -#undef inline -#ifdef HAVE_WINDOWS_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# if (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501) -# undef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif -# include -# ifdef HAVE_WINSOCK2_H -# include -# ifdef HAVE_WS2TCPIP_H -# include -# endif -# endif -# define GNICALLCONV WSAAPI -# define GNICALLLINK WINSOCK_API_LINKAGE -#else -# ifdef HAVE_SYS_TYPES_H -# include -# endif -# ifdef HAVE_SYS_SOCKET_H -# include -# endif -# ifdef HAVE_NETDB_H -# include -# endif -# define GNICALLCONV -# define GNICALLLINK -#endif -' - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "${HEADERS_SOCKLEN_T} + ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include +#include " if test "x$ac_cv_type_socklen_t" = xyes; then : @@ -12465,26 +7860,22 @@ else # Systems have either "struct sockaddr *" or # "void *" as the second argument to getpeername - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - nut_cv_socklen_t_equiv= - for arg1 in "int" "SOCKET"; do - for arg2 in "struct sockaddr" void; do - for arg3 in int size_t unsigned long "unsigned long"; do + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -${HEADERS_SOCKLEN_T} - GNICALLLINK int GNICALLCONV getpeername ($arg1, $arg2 *, $arg3 *); + +#include +#include + + int getpeername (int, $arg2 *, $t *); int main () { - $arg3 len; + $t len; getpeername(0,0,&len); ; @@ -12493,20 +7884,13 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - nut_cv_socklen_t_equiv="$arg3" + nut_cv_socklen_t_equiv="$t" break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done - done done - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "x$nut_cv_socklen_t_equiv" = x; then as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 @@ -12525,746 +7909,6 @@ fi - for ac_header in sys/types.h sys/socket.h netdb.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for getnameinfo" >&5 -$as_echo_n "checking types of arguments for getnameinfo... " >&6; } -if ${nut_cv_func_getnameinfo_args+:} false; then : - $as_echo_n "(cached) " >&6 -else - - nut_cv_func_getnameinfo_args="unknown" - for gni_arg1 in 'const struct sockaddr *' 'struct sockaddr *' 'void *'; do - for gni_arg2 in 'socklen_t' 'size_t' 'int'; do - for gni_arg46 in 'socklen_t' 'size_t' 'int' 'unsigned int'; do - for gni_arg7 in 'int' 'unsigned int'; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#undef inline -#ifdef HAVE_WINDOWS_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# if (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501) -# undef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 -# endif -# include -# ifdef HAVE_WINSOCK2_H -# include -# ifdef HAVE_WS2TCPIP_H -# include -# endif -# endif -# define GNICALLCONV WSAAPI -#else -# ifdef HAVE_SYS_TYPES_H -# include -# endif -# ifdef HAVE_SYS_SOCKET_H -# include -# endif -# ifdef HAVE_NETDB_H -# include -# endif -# define GNICALLCONV -#endif - extern int GNICALLCONV getnameinfo($gni_arg1, $gni_arg2, - char *, $gni_arg46, - char *, $gni_arg46, - $gni_arg7); - -int -main () -{ - - $gni_arg2 salen=0; - $gni_arg46 hostlen=0; - $gni_arg46 servlen=0; - $gni_arg7 flags=0; - int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - - nut_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7" - break 4 - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done - done - done - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_func_getnameinfo_args" >&5 -$as_echo "$nut_cv_func_getnameinfo_args" >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test "$nut_cv_func_getnameinfo_args" = "unknown"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for getnameinfo args" >&5 -$as_echo "$as_me: WARNING: Cannot find proper types to use for getnameinfo args" >&2;} - else - gni_prev_IFS=$IFS; IFS=',' - set dummy `echo "$nut_cv_func_getnameinfo_args" | sed 's/\*/\*/g'` - IFS=$gni_prev_IFS - shift - -cat >>confdefs.h <<_ACEOF -#define GETNAMEINFO_TYPE_ARG1 $1 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define GETNAMEINFO_TYPE_ARG2 $2 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define GETNAMEINFO_TYPE_ARG46 $3 -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define GETNAMEINFO_TYPE_ARG7 $4 -_ACEOF - - fi - - - - if test -z "${nut_with_python}"; then : - - -# Check whether --with-python was given. -if test "${with_python+set}" = set; then : - withval=$with_python; nut_with_python="${withval}" -else - nut_with_python="auto" - -fi - - - - PYTHON="" - case ${nut_with_python} in #( - auto|yes|"") : - for ac_prog in python python3 python2 -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON"; then - ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON=$ac_cv_prog_PYTHON -if test -n "$PYTHON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 -$as_echo "$PYTHON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON" && break -done -test -n "$PYTHON" || PYTHON="_python_runtime" - ;; #( - no) : - PYTHON="no" ;; #( - *) : - PYTHON="${nut_with_python}" - ;; -esac - - case ${PYTHON} in #( - _python_runtime) : - - PYTHON="/usr/bin/env python" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python program name was not detected during configuration, will default to '$PYTHON' (scripts will fail if that is not in PATH at run time)" >&5 -$as_echo "$as_me: WARNING: A python program name was not detected during configuration, will default to '$PYTHON' (scripts will fail if that is not in PATH at run time)" >&2;} ;; #( - no) : - ;; #( - /*" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - ;; #( - /*) : - ;; #( - *" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - PYTHON="/usr/bin/env ${PYTHON}" - ;; #( - *" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&2;} - PYTHON="/usr/bin/env ${PYTHON}" - ;; #( - *) : - PYTHON="/usr/bin/env ${PYTHON}" - ;; #( - *) : - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python interpeter to call" >&5 -$as_echo_n "checking python interpeter to call... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON}" >&5 -$as_echo "${PYTHON}" >&6; } - PYTHON=${PYTHON} - - if test "${PYTHON}" != "no"; then - HAVE_PYTHON_TRUE= - HAVE_PYTHON_FALSE='#' -else - HAVE_PYTHON_TRUE='#' - HAVE_PYTHON_FALSE= -fi - - if test -n "${PYTHON}"; then : - export PYTHON -fi - -fi - - - if test -z "${nut_with_python2}"; then : - - -# Check whether --with-python2 was given. -if test "${with_python2+set}" = set; then : - withval=$with_python2; nut_with_python2="${withval}" -else - nut_with_python2="auto" - -fi - - - - PYTHON2="" - case ${nut_with_python2} in #( - auto|yes|"") : - for ac_prog in python2 python2.7 python-2.7 python -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON2+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON2"; then - ac_cv_prog_PYTHON2="$PYTHON2" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON2="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON2=$ac_cv_prog_PYTHON2 -if test -n "$PYTHON2"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2" >&5 -$as_echo "$PYTHON2" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON2" && break -done -test -n "$PYTHON2" || PYTHON2="_python2_runtime" - ;; #( - no) : - PYTHON2="no" ;; #( - *) : - PYTHON2="${nut_with_python2}" - ;; -esac - - case ${PYTHON2} in #( - _python2_runtime) : - - PYTHON2="/usr/bin/env python2" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python2 program name was not detected during configuration, will default to '$PYTHON2' (scripts will fail if that is not in PATH at run time)" >&5 -$as_echo "$as_me: WARNING: A python2 program name was not detected during configuration, will default to '$PYTHON2' (scripts will fail if that is not in PATH at run time)" >&2;} ;; #( - no) : - ;; #( - /*" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python2 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python2 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - ;; #( - /*) : - ;; #( - *" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python2 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python2 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - PYTHON2="/usr/bin/env ${PYTHON2}" - ;; #( - *" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python2 program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python2 program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&2;} - PYTHON2="/usr/bin/env ${PYTHON2}" - ;; #( - *) : - PYTHON2="/usr/bin/env ${PYTHON2}" - ;; #( - *) : - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python2 interpeter to call" >&5 -$as_echo_n "checking python2 interpeter to call... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON2}" >&5 -$as_echo "${PYTHON2}" >&6; } - PYTHON2=${PYTHON2} - - if test "${PYTHON2}" != "no"; then - HAVE_PYTHON2_TRUE= - HAVE_PYTHON2_FALSE='#' -else - HAVE_PYTHON2_TRUE='#' - HAVE_PYTHON2_FALSE= -fi - - if test -n "${PYTHON2}"; then : - export PYTHON2 -fi - -fi - - - if test -z "${nut_with_python3}"; then : - - -# Check whether --with-python3 was given. -if test "${with_python3+set}" = set; then : - withval=$with_python3; nut_with_python3="${withval}" -else - nut_with_python3="auto" - -fi - - - - PYTHON3="" - case ${nut_with_python3} in #( - auto|yes|"") : - for ac_prog in python3 python3.9 python-3.9 python3.7 python-3.7 python3.5 python-3.5 python -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PYTHON3+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PYTHON3"; then - ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PYTHON3="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PYTHON3=$ac_cv_prog_PYTHON3 -if test -n "$PYTHON3"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 -$as_echo "$PYTHON3" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PYTHON3" && break -done -test -n "$PYTHON3" || PYTHON3="_python3_runtime" - ;; #( - no) : - PYTHON3="no" ;; #( - *) : - PYTHON3="${nut_with_python3}" - ;; -esac - - case ${PYTHON3} in #( - _python3_runtime) : - - PYTHON3="/usr/bin/env python3" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python3 program name was not detected during configuration, will default to '$PYTHON3' (scripts will fail if that is not in PATH at run time)" >&5 -$as_echo "$as_me: WARNING: A python3 program name was not detected during configuration, will default to '$PYTHON3' (scripts will fail if that is not in PATH at run time)" >&2;} ;; #( - no) : - ;; #( - /*" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python3 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python3 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - ;; #( - /*) : - ;; #( - *" "*" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python3 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python3 program name is not a single token (was specified with more than one argument?), so shebangs can be not reliable" >&2;} - PYTHON3="/usr/bin/env ${PYTHON3}" - ;; #( - *" "*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A python3 program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&5 -$as_echo "$as_me: WARNING: A python3 program name is not a single token (was specified with an argument?), so /usr/bin/env shebangs can be not reliable" >&2;} - PYTHON3="/usr/bin/env ${PYTHON3}" - ;; #( - *) : - PYTHON3="/usr/bin/env ${PYTHON3}" - ;; #( - *) : - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python3 interpeter to call" >&5 -$as_echo_n "checking python3 interpeter to call... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON3}" >&5 -$as_echo "${PYTHON3}" >&6; } - PYTHON3=${PYTHON3} - - if test "${PYTHON3}" != "no"; then - HAVE_PYTHON3_TRUE= - HAVE_PYTHON3_FALSE='#' -else - HAVE_PYTHON3_TRUE='#' - HAVE_PYTHON3_FALSE= -fi - - if test -n "${PYTHON3}"; then : - export PYTHON3 -fi - -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which drivers to build" >&5 -$as_echo_n "checking which drivers to build... " >&6; } - -# Check whether --with-drivers was given. -if test "${with_drivers+set}" = set; then : - withval=$with_drivers; - case "${withval}" in - yes|no|'') - as_fn_error $? "invalid option --with(out)-drivers - see docs/configure.txt" "$LINENO" 5 - ;; - all) - DRIVER_BUILD_LIST="all" - if test -z "${with_serial}"; then with_serial="yes"; fi - if test -z "${with_usb}"; then with_usb="yes"; fi - if test -z "${with_snmp}"; then with_snmp="yes"; fi - if test -z "${with_neon}"; then with_neon="yes"; fi - if test -z "${with_powerman}"; then with_powerman="yes"; fi - if test -z "${with_modbus}"; then with_modbus="yes"; fi - if test -z "${with_ipmi}"; then with_ipmi="yes"; fi - - if test -z "${with_linux_i2c}"; then - case ${target_os} in - linux*) with_linux_i2c="yes";; - *) with_linux_i2c="auto";; - esac - fi - if test -z "${with_macosx_ups}"; then - if test -d /System/Library/Frameworks/IOKit.framework/ ; then - with_macosx_ups="yes" - else - with_macosx_ups="auto" - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_BUILD_LIST}" >&5 -$as_echo "${DRIVER_BUILD_LIST}" >&6; } - ;; - auto) - DRIVER_BUILD_LIST="all" - if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_usb}"; then with_usb="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi - if test -z "${with_neon}"; then with_neon="${withval}"; fi - if test -z "${with_powerman}"; then with_powerman="${withval}"; fi - if test -z "${with_modbus}"; then with_modbus="${withval}"; fi - if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi - if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi - if test -z "${with_macosx_ups}"; then with_macosx_ups="${withval}"; fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_BUILD_LIST}" >&5 -$as_echo "${DRIVER_BUILD_LIST}" >&6; } - ;; - *) - DRIVER_BUILD_LIST="`echo ${withval} | sed 's/,/ /g'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_BUILD_LIST}" >&5 -$as_echo "${DRIVER_BUILD_LIST}" >&6; } - - if test -n "$DRIVER_BUILD_LIST"; then : - DRVLIST_NAMES=" - SERIAL_DRIVERLIST USB_LIBUSB_DRIVERLIST SERIAL_USB_DRIVERLIST - SNMP_DRIVERLIST NEONXML_DRIVERLIST - MACOSX_DRIVERLIST MODBUS_DRIVERLIST LINUX_I2C_DRIVERLIST - POWERMAN_DRIVERLIST IPMI_DRIVERLIST" - - get_drvlist() ( - LB="["; RB="]" - SPACE="`printf "$LB"' \t'"$RB"`" - SPACES="${SPACE}*" - sed -e "s/${SPACES}""$LB"'+'"$RB"'*='"${SPACES}/=/" \ - -e "s/^${SPACES}//" < drivers/Makefile.am \ - | { - C=false; V=false - while read LINE ; do - case "$LINE" in - *'\') C=true; if $V ; then echo "$LINE" ; fi ;; - *) C=false; V=false ;; - esac - case "$LINE" in - "$1"=*) - echo "$LINE" | sed -e 's,^'"$LB"'^='"$RB"'*=,,' -e 's,\$,,' - V=$C - ;; - esac - done - } | tr '\n' ' ' | sed -e "s,${SPACE}${SPACES}, ," -e "s,${SPACES}\$,," - ) - - for DRVLIST_NAME in $DRVLIST_NAMES; do - OUT="`get_drvlist "$DRVLIST_NAME"`" \ - && test -n "$OUT" || OUT="" - eval $DRVLIST_NAME="\$OUT" - { $as_echo "$as_me:${as_lineno-$LINENO}: Will check custom driver selection against $DRVLIST_NAME=\"$OUT\"" >&5 -$as_echo "$as_me: Will check custom driver selection against $DRVLIST_NAME=\"$OUT\"" >&6;} - done - - for DRV in $DRIVER_BUILD_LIST ; do - - DRV_HITS="" - for DRVLIST_NAME in $DRVLIST_NAMES; do - eval DRVLIST="\${$DRVLIST_NAME}" - - for DN in $DRVLIST ; do - if test x"$DN" = x"$DRV"; then : - - DRV_HITS="$DRV_HITS $DRVLIST_NAME" - case "$DRVLIST_NAME" in #( - SERIAL_DRIVERLIST) : - - if test -z "${with_serial}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-serial=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-serial=yes for driver \"$DRV\"" >&6;} - with_serial=yes - -fi ;; #( - USB_LIBUSB_DRIVERLIST) : - - if test -z "${with_usb}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-usb=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-usb=yes for driver \"$DRV\"" >&6;} - with_usb=yes - -fi ;; #( - SERIAL_USB_DRIVERLIST) : - - if test -z "${with_usb}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-usb=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-usb=yes for driver \"$DRV\"" >&6;} - with_usb=yes - -fi - if test -z "${with_serial}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-serial=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-serial=yes for driver \"$DRV\"" >&6;} - with_serial=yes - -fi ;; #( - SNMP_DRIVERLIST) : - - if test -z "${with_snmp}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-snmp=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-snmp=yes for driver \"$DRV\"" >&6;} - with_snmp=yes - -fi ;; #( - NEONXML_DRIVERLIST) : - - if test -z "${with_neon}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-neon=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-neon=yes for driver \"$DRV\"" >&6;} - with_neon=yes - -fi ;; #( - MACOSX_DRIVERLIST) : - - if test -z "${with_macosx_ups}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-macosx-ups=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-macosx-ups=yes for driver \"$DRV\"" >&6;} - with_macosx_ups=yes - -fi ;; #( - MODBUS_DRIVERLIST) : - - if test -z "${with_modbus}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-modbus=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-modbus=yes for driver \"$DRV\"" >&6;} - with_modbus=yes - -fi ;; #( - LINUX_I2C_DRIVERLIST) : - - if test -z "${with_linux_i2c}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-linux-i2c=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-linux-i2c=yes for driver \"$DRV\"" >&6;} - with_linux_i2c=yes - -fi ;; #( - POWERMAN_DRIVERLIST) : - - if test -z "${with_powerman}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-powerman=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-powerman=yes for driver \"$DRV\"" >&6;} - with_powerman=yes - -fi ;; #( - IPMI_DRIVERLIST) : - - if test -z "${with_ipmi}"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Requiring --with-ipmi=yes for driver \"$DRV\"" >&5 -$as_echo "$as_me: Requiring --with-ipmi=yes for driver \"$DRV\"" >&6;} - with_ipmi=yes - -fi ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unhandled DRVLIST_NAME=$DRVLIST_NAME" >&5 -$as_echo "$as_me: WARNING: Unhandled DRVLIST_NAME=$DRVLIST_NAME" >&2;} - ;; -esac - break - -fi - done - done - if test -z "${DRV_HITS}"; then : - as_fn_error $? "Requested driver '$DRV' is not defined in drivers/Makefile.am (or configure.ac has a bug/lag detecting driver lists)" "$LINENO" 5 -fi - - done - -fi - - ;; - esac - -else - - DRIVER_BUILD_LIST="all" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 -$as_echo "all available" >&6; } - -fi - - if test "${DRIVER_BUILD_LIST}" != "all"; then - SOME_DRIVERS_TRUE= - SOME_DRIVERS_FALSE='#' -else - SOME_DRIVERS_TRUE='#' - SOME_DRIVERS_FALSE= -fi - - -if test "${DRIVER_BUILD_LIST}" != "all"; then - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - echo "======================" >> conf_nut_report_feature - fi - echo "only build specific drivers: ${DRIVER_BUILD_LIST}" >> conf_nut_report_feature - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-all" >&5 $as_echo_n "checking for --with-all... " >&6; } @@ -13273,32 +7917,16 @@ $as_echo_n "checking for --with-all... " >&6; } if test "${with_all+set}" = set; then : withval=$with_all; if test -n "${withval}"; then - if test -z "${with_serial}"; then with_serial="${withval}"; fi + if test -z "${with_serial}"; then with_serial="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi - if test -z "${with_modbus}"; then with_modbus="${withval}"; fi - if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi - - if test -z "${with_linux_i2c}"; then - with_linux_i2c="${withval}" - case ${target_os} in - linux*) ;; - *) test x"${withval}" = xno || with_linux_i2c="auto" ;; - esac - fi - if test -z "${with_macosx_ups}"; then - with_macosx_ups="${withval}" - if ! test -d /System/Library/Frameworks/IOKit.framework/ ; then - test x"${withval}" = xno || with_macosx_ups="auto" - fi - fi - - if test -z "${with_cgi}"; then with_cgi="${withval}"; fi + if test -z "${with_cgi}"; then with_cgi="${withval}"; fi if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi - + if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${withval}\"" >&5 $as_echo "\"${withval}\"" >&6; } else @@ -13326,48 +7954,6 @@ fi - -# Check whether --with-docs was given. -if test "${with_docs+set}" = set; then : - withval=$with_docs; nut_with_docs="${withval}" -else - nut_with_docs="man=auto" - -fi - - - -# Check whether --with-doc was given. -if test "${with_doc+set}" = set; then : - withval=$with_doc; nut_with_doc="${withval}" -else - nut_with_doc="${nut_with_docs}" - -fi - - - - # Check whether --enable-warnings was given. -if test "${enable_warnings+set}" = set; then : - enableval=$enable_warnings; nut_enable_warnings="${enableval}" -else - nut_enable_warnings="auto" - -fi - - - # Check whether --enable-Werror was given. -if test "${enable_Werror+set}" = set; then : - enableval=$enable_Werror; nut_enable_Werror="${enableval}" -else - nut_enable_Werror="no" - -fi - - - - - # Check whether --with-serial was given. if test "${with_serial+set}" = set; then : withval=$with_serial; nut_with_serial="${withval}" @@ -13378,8 +7964,6 @@ fi - - # Check whether --with-usb was given. if test "${with_usb+set}" = set; then : withval=$with_usb; nut_with_usb="${withval}" @@ -13389,1368 +7973,44 @@ else fi -nut_usb_lib="" - -if test -z "${nut_have_libusb_seen}"; then - nut_have_libusb_seen=yes - -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes +# Check whether --with-doc was given. +if test "${with_doc+set}" = set; then : + withval=$with_doc; nut_with_doc="${withval}" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - + nut_with_doc="no" fi - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 + + +# Check whether --with-avahi was given. +if test "${with_avahi+set}" = set; then : + withval=$with_avahi; nut_with_avahi="${withval}" else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + nut_with_avahi="auto" - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - - CFLAGS_ORIG="${CFLAGS}" - LIBS_ORIG="${LIBS}" - CFLAGS="" - LIBS="" - - nut_usb_lib="" - - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb-1.0 version via pkg-config" >&5 -$as_echo_n "checking for libusb-1.0 version via pkg-config... " >&6; } - LIBUSB_1_0_VERSION="`$PKG_CONFIG --silence-errors --modversion libusb-1.0 2>/dev/null`" \ - && test -n "${LIBUSB_1_0_VERSION}" \ - || LIBUSB_1_0_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_1_0_VERSION} found" >&5 -$as_echo "${LIBUSB_1_0_VERSION} found" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb(-0.1) version via pkg-config" >&5 -$as_echo_n "checking for libusb(-0.1) version via pkg-config... " >&6; } - LIBUSB_0_1_VERSION="`$PKG_CONFIG --silence-errors --modversion libusb 2>/dev/null`" \ - && test -n "${LIBUSB_0_1_VERSION}" \ - || LIBUSB_0_1_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_0_1_VERSION} found" >&5 -$as_echo "${LIBUSB_0_1_VERSION} found" >&6; } - -else - LIBUSB_0_1_VERSION="none" - LIBUSB_1_0_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libusb settings via pkg-config" >&5 -$as_echo "$as_me: can not check libusb settings via pkg-config" >&6;} - - -fi - - for ac_prog in libusb-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LIBUSB_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $LIBUSB_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_LIBUSB_CONFIG="$LIBUSB_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LIBUSB_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -LIBUSB_CONFIG=$ac_cv_path_LIBUSB_CONFIG -if test -n "$LIBUSB_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBUSB_CONFIG" >&5 -$as_echo "$LIBUSB_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LIBUSB_CONFIG" && break -done -test -n "$LIBUSB_CONFIG" || LIBUSB_CONFIG="none" - - - -# Check whether --with-libusb-config was given. -if test "${with_libusb_config+set}" = set; then : - withval=$with_libusb_config; - case "${withval}" in #( - "") : - ;; #( - yes|no) : - - as_fn_error $? "invalid option --with(out)-libusb-config - see docs/configure.txt" "$LINENO" 5 - ;; #( - *) : - LIBUSB_CONFIG="${withval}" - - ;; -esac - - -fi - - - if test x"${LIBUSB_CONFIG}" != xnone; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking via ${LIBUSB_CONFIG}" >&5 -$as_echo_n "checking via ${LIBUSB_CONFIG}... " >&6; } - LIBUSB_CONFIG_VERSION="`$LIBUSB_CONFIG --version 2>/dev/null`" \ - && test -n "${LIBUSB_CONFIG_VERSION}" \ - || LIBUSB_CONFIG_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_CONFIG_VERSION} found" >&5 -$as_echo "${LIBUSB_CONFIG_VERSION} found" >&6; } - -else - LIBUSB_CONFIG_VERSION="none" - -fi - - if test x"${LIBUSB_1_0_VERSION}" != xnone; then : - LIBUSB_VERSION="${LIBUSB_1_0_VERSION}" - nut_usb_lib="(libusb-1.0)" - -else - if test x"${LIBUSB_0_1_VERSION}" != xnone; then : - LIBUSB_VERSION="${LIBUSB_0_1_VERSION}" - nut_usb_lib="(libusb-0.1)" - -else - LIBUSB_VERSION="${LIBUSB_CONFIG_VERSION}" - if test x"${LIBUSB_CONFIG_VERSION}" != xnone; then : - nut_usb_lib="(libusb-0.1-config)" -else - nut_usb_lib="" - -fi - -fi - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb preferred version" >&5 -$as_echo_n "checking for libusb preferred version... " >&6; } - case "${nut_with_usb}" in #( - auto) : - ;; #( - yes) : - ;; #( - no) : - ;; #( - libusb-1.0|1.0) : - - if test x"${LIBUSB_1_0_VERSION}" = xnone; then : - as_fn_error $? "option --with-usb=${withval} was required, but this library version was not detected" "$LINENO" 5 - -fi - LIBUSB_VERSION="${LIBUSB_1_0_VERSION}" - nut_usb_lib="(libusb-1.0)" - ;; #( - libusb-0.1|0.1) : - - if test x"${LIBUSB_0_1_VERSION}" = xnone \ - && test x"${LIBUSB_CONFIG_VERSION}" = xnone; then : - as_fn_error $? "option --with-usb=${withval} was required, but this library version was not detected" "$LINENO" 5 - -fi - if test x"${LIBUSB_0_1_VERSION}" != xnone; then : - LIBUSB_VERSION="${LIBUSB_0_1_VERSION}" - nut_usb_lib="(libusb-0.1)" - -else - LIBUSB_VERSION="${LIBUSB_CONFIG_VERSION}" - nut_usb_lib="(libusb-0.1-config)" - -fi - ;; #( - *) : - as_fn_error $? "invalid option value --with-usb=${withval} - see docs/configure.txt" "$LINENO" 5 - - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} ${nut_usb_lib}" >&5 -$as_echo "${LIBUSB_VERSION} ${nut_usb_lib}" >&6; } - - if test x"${LIBUSB_1_0_VERSION}" != xnone && test x"${nut_usb_lib}" != x"(libusb-1.0)" ; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: libusb-1.0 support was detected, but another was chosen ${nut_usb_lib}" >&5 -$as_echo "$as_me: libusb-1.0 support was detected, but another was chosen ${nut_usb_lib}" >&6;} - -fi - - case ${nut_usb_lib} in #( - "(libusb-1.0)") : - - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libusb-1.0 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libusb-1.0 2>/dev/null`" - ;; #( - "(libusb-0.1)") : - - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libusb 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libusb 2>/dev/null`" - ;; #( - "(libusb-0.1-config)") : - - CFLAGS="`$LIBUSB_CONFIG --cflags 2>/dev/null`" - LIBS="`$LIBUSB_CONFIG --libs 2>/dev/null`" - ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Defaulting libusb configuration" >&5 -$as_echo "$as_me: WARNING: Defaulting libusb configuration" >&2;} - LIBUSB_VERSION="none" - CFLAGS="" - LIBS="-lusb" - - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb cflags" >&5 -$as_echo_n "checking for libusb cflags... " >&6; } - -# Check whether --with-usb-includes was given. -if test "${with_usb_includes+set}" = set; then : - withval=$with_usb_includes; - case "${withval}" in #( - yes|no) : - - as_fn_error $? "invalid option --with(out)-usb-includes - see docs/configure.txt" "$LINENO" 5 - ;; #( - *) : - CFLAGS="${withval}" - - ;; -esac - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 -$as_echo "${CFLAGS}" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb ldflags" >&5 -$as_echo_n "checking for libusb ldflags... " >&6; } - -# Check whether --with-usb-libs was given. -if test "${with_usb_libs+set}" = set; then : - withval=$with_usb_libs; - case "${withval}" in #( - yes|no) : - - as_fn_error $? "invalid option --with(out)-usb-libs - see docs/configure.txt" "$LINENO" 5 - ;; #( - *) : - LIBS="${withval}" - - ;; -esac - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 -$as_echo "${LIBS}" >&6; } - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test -n "${LIBUSB_VERSION}"; then - test -n "$PKG_CONFIG" \ - && test x"${nut_usb_lib}" = x"(libusb-1.0)" \ - && $PKG_CONFIG --silence-errors --atleast-version=1.0 libusb-1.0 2>/dev/null - if test "$?" = "0"; then - for ac_header in libusb.h -do : - ac_fn_c_check_header_compile "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default -" -if test "x$ac_cv_header_libusb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_H 1 -_ACEOF - nut_have_libusb=yes -else - nut_have_libusb=no -fi - -done - - for ac_func in libusb_init -do : - ac_fn_c_check_func "$LINENO" "libusb_init" "ac_cv_func_libusb_init" -if test "x$ac_cv_func_libusb_init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_INIT 1 -_ACEOF - -else - nut_have_libusb=no -fi -done - - for ac_func in libusb_strerror -do : - ac_fn_c_check_func "$LINENO" "libusb_strerror" "ac_cv_func_libusb_strerror" -if test "x$ac_cv_func_libusb_strerror" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_STRERROR 1 -_ACEOF - -else - nut_have_libusb=no; nut_have_libusb_strerror=no -fi -done - - if test "${nut_have_libusb_strerror}" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libusb_strerror() not found; install libusbx to use libusb 1.0 API. See https://github.com/networkupstools/nut/issues/509" >&5 -$as_echo "$as_me: WARNING: libusb_strerror() not found; install libusbx to use libusb 1.0 API. See https://github.com/networkupstools/nut/issues/509" >&2;} - fi - if test "${nut_have_libusb}" = "yes"; then - for ac_func in libusb_kernel_driver_active -do : - ac_fn_c_check_func "$LINENO" "libusb_kernel_driver_active" "ac_cv_func_libusb_kernel_driver_active" -if test "x$ac_cv_func_libusb_kernel_driver_active" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_KERNEL_DRIVER_ACTIVE 1 -_ACEOF - -fi -done - - for ac_func in libusb_set_auto_detach_kernel_driver -do : - ac_fn_c_check_func "$LINENO" "libusb_set_auto_detach_kernel_driver" "ac_cv_func_libusb_set_auto_detach_kernel_driver" -if test "x$ac_cv_func_libusb_set_auto_detach_kernel_driver" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_SET_AUTO_DETACH_KERNEL_DRIVER 1 -_ACEOF - -fi -done - - for ac_func in libusb_detach_kernel_driver -do : - ac_fn_c_check_func "$LINENO" "libusb_detach_kernel_driver" "ac_cv_func_libusb_detach_kernel_driver" -if test "x$ac_cv_func_libusb_detach_kernel_driver" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_DETACH_KERNEL_DRIVER 1 -_ACEOF - -fi -done - - for ac_func in libusb_detach_kernel_driver_np -do : - ac_fn_c_check_func "$LINENO" "libusb_detach_kernel_driver_np" "ac_cv_func_libusb_detach_kernel_driver_np" -if test "x$ac_cv_func_libusb_detach_kernel_driver_np" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_DETACH_KERNEL_DRIVER_NP 1 -_ACEOF - -fi -done - - - for ac_func in usb_detach_kernel_driver_np -do : - ac_fn_c_check_func "$LINENO" "usb_detach_kernel_driver_np" "ac_cv_func_usb_detach_kernel_driver_np" -if test "x$ac_cv_func_usb_detach_kernel_driver_np" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USB_DETACH_KERNEL_DRIVER_NP 1 -_ACEOF - -fi -done - - fi - else - for ac_header in usb.h -do : - ac_fn_c_check_header_compile "$LINENO" "usb.h" "ac_cv_header_usb_h" "$ac_includes_default -" -if test "x$ac_cv_header_usb_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USB_H 1 -_ACEOF - nut_have_libusb=yes -else - nut_have_libusb=no -fi - -done - - for ac_func in usb_init -do : - ac_fn_c_check_func "$LINENO" "usb_init" "ac_cv_func_usb_init" -if test "x$ac_cv_func_usb_init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USB_INIT 1 -_ACEOF - -else - - if test "${nut_have_libusb}" = "yes" && test "$LIBUSB_VERSION" = "none" && test -z "$LIBS"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libusb is just present in path" >&5 -$as_echo_n "checking if libusb is just present in path... " >&6; } - LIBS="-L/usr/lib -L/usr/local/lib -lusb" - unset ac_cv_func_usb_init || true - for ac_func in usb_init -do : - ac_fn_c_check_func "$LINENO" "usb_init" "ac_cv_func_usb_init" -if test "x$ac_cv_func_usb_init" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USB_INIT 1 -_ACEOF - -else - nut_have_libusb=no -fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_have_libusb}" >&5 -$as_echo "${nut_have_libusb}" >&6; } - -else - nut_have_libusb=no - -fi - -fi -done - - if test "${nut_have_libusb}" = "yes"; then - for ac_func in usb_detach_kernel_driver_np -do : - ac_fn_c_check_func "$LINENO" "usb_detach_kernel_driver_np" "ac_cv_func_usb_detach_kernel_driver_np" -if test "x$ac_cv_func_usb_detach_kernel_driver_np" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_USB_DETACH_KERNEL_DRIVER_NP 1 -_ACEOF - -fi -done - - - for ac_func in libusb_kernel_driver_active -do : - ac_fn_c_check_func "$LINENO" "libusb_kernel_driver_active" "ac_cv_func_libusb_kernel_driver_active" -if test "x$ac_cv_func_libusb_kernel_driver_active" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_KERNEL_DRIVER_ACTIVE 1 -_ACEOF - -fi -done - - for ac_func in libusb_set_auto_detach_kernel_driver -do : - ac_fn_c_check_func "$LINENO" "libusb_set_auto_detach_kernel_driver" "ac_cv_func_libusb_set_auto_detach_kernel_driver" -if test "x$ac_cv_func_libusb_set_auto_detach_kernel_driver" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_SET_AUTO_DETACH_KERNEL_DRIVER 1 -_ACEOF - -fi -done - - for ac_func in libusb_detach_kernel_driver -do : - ac_fn_c_check_func "$LINENO" "libusb_detach_kernel_driver" "ac_cv_func_libusb_detach_kernel_driver" -if test "x$ac_cv_func_libusb_detach_kernel_driver" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_DETACH_KERNEL_DRIVER 1 -_ACEOF - -fi -done - - for ac_func in libusb_detach_kernel_driver_np -do : - ac_fn_c_check_func "$LINENO" "libusb_detach_kernel_driver_np" "ac_cv_func_libusb_detach_kernel_driver_np" -if test "x$ac_cv_func_libusb_detach_kernel_driver_np" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUSB_DETACH_KERNEL_DRIVER_NP 1 -_ACEOF - -fi -done - - fi - fi - else - nut_have_libusb=no - fi - - if test "${nut_have_libusb}" = "yes"; then : - - - case "${target_os}" in #( - solaris2.1*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris 10 / 11 specific configuration for usb drivers" >&5 -$as_echo_n "checking for Solaris 10 / 11 specific configuration for usb drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 -$as_echo_n "checking for library containing nanosleep... " >&6; } -if ${ac_cv_search_nanosleep+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char nanosleep (); -int -main () -{ -return nanosleep (); - ; - return 0; -} -_ACEOF -for ac_lib in '' rt; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_nanosleep=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_nanosleep+:} false; then : - break -fi -done -if ${ac_cv_search_nanosleep+:} false; then : - -else - ac_cv_search_nanosleep=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 -$as_echo "$ac_cv_search_nanosleep" >&6; } -ac_res=$ac_cv_search_nanosleep -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - LIBS="-R/usr/sfw/lib ${LIBS}" - -$as_echo "#define SUN_LIBUSB 1" >>confdefs.h - - SUN_LIBUSB=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 -$as_echo "${LIBS}" >&6; } - ;; #( - hpux11*) : - - CFLAGS="${CFLAGS} -lpthread" - - ;; #( - *) : - ;; -esac - -fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - if test "${nut_have_libusb}" = "yes"; then : - - LIBUSB_CFLAGS="${CFLAGS}" - LIBUSB_LIBS="${LIBS}" - -else - - case "${nut_with_usb}" in #( - no|auto) : - ;; #( - yes|1.0|0.1|libusb-1.0|libusb-0.1) : - as_fn_error $? "USB drivers requested, but libusb not found." "$LINENO" 5 - - ;; #( - *) : - ;; -esac - -fi - - if test "${nut_with_usb}" = "no"; then - if test -n "${nut_usb_lib}" && test "${nut_usb_lib}" != none ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: libusb was detected ${nut_usb_lib}, but a build without USB drivers was requested" >&5 -$as_echo "$as_me: libusb was detected ${nut_usb_lib}, but a build without USB drivers was requested" >&6;} - fi - nut_usb_lib="" - else - nut_with_usb="${nut_have_libusb}" - fi - - - if test "${nut_with_usb}" = "yes" && test "${nut_usb_lib}" = "(libusb-1.0)"; then : - -$as_echo "#define WITH_LIBUSB_1_0 1" >>confdefs.h - -else - -$as_echo "#define WITH_LIBUSB_1_0 0" >>confdefs.h - - -fi - - if test "${nut_with_usb}" = "yes" && test "${nut_usb_lib}" = "(libusb-0.1)" -o "${nut_usb_lib}" = "(libusb-0.1-config)"; then : - -$as_echo "#define WITH_LIBUSB_0_1 1" >>confdefs.h - -else - -$as_echo "#define WITH_LIBUSB_0_1 0" >>confdefs.h - - -fi - - CFLAGS="${CFLAGS_ORIG}" - LIBS="${LIBS_ORIG}" -fi - - - -# Check whether --with-snmp was given. -if test "${with_snmp+set}" = set; then : - withval=$with_snmp; nut_with_snmp="${withval}" -else - nut_with_snmp="auto" - -fi - if test -z "${nut_have_libnetsnmp_seen}"; then nut_have_libnetsnmp_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - - # The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -$as_echo_n "checking size of void *... " >&6; } -if ${ac_cv_sizeof_void_p+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_void_p" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_void_p=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -$as_echo "$ac_cv_sizeof_void_p" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - - NET_SNMP_CONFIG="none" - case "${ac_cv_sizeof_void_p}" in #( - 4) : - for ac_prog in net-snmp-config-32 net-snmp-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NET_SNMP_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NET_SNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NET_SNMP_CONFIG="$NET_SNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NET_SNMP_CONFIG=$ac_cv_path_NET_SNMP_CONFIG -if test -n "$NET_SNMP_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NET_SNMP_CONFIG" >&5 -$as_echo "$NET_SNMP_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$NET_SNMP_CONFIG" && break -done -test -n "$NET_SNMP_CONFIG" || NET_SNMP_CONFIG="none" - ;; #( - 8) : - for ac_prog in net-snmp-config-64 net-snmp-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NET_SNMP_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NET_SNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NET_SNMP_CONFIG="$NET_SNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NET_SNMP_CONFIG=$ac_cv_path_NET_SNMP_CONFIG -if test -n "$NET_SNMP_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NET_SNMP_CONFIG" >&5 -$as_echo "$NET_SNMP_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$NET_SNMP_CONFIG" && break -done -test -n "$NET_SNMP_CONFIG" || NET_SNMP_CONFIG="none" - ;; #( - *) : - for ac_prog in net-snmp-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NET_SNMP_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $NET_SNMP_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_NET_SNMP_CONFIG="$NET_SNMP_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NET_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -NET_SNMP_CONFIG=$ac_cv_path_NET_SNMP_CONFIG -if test -n "$NET_SNMP_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NET_SNMP_CONFIG" >&5 -$as_echo "$NET_SNMP_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$NET_SNMP_CONFIG" && break -done -test -n "$NET_SNMP_CONFIG" || NET_SNMP_CONFIG="none" - - ;; -esac - - prefer_NET_SNMP_CONFIG=false - -# Check whether --with-net-snmp-config was given. -if test "${with_net_snmp_config+set}" = set; then : - withval=$with_net_snmp_config; - case "${withval}" in - ""|yes) prefer_NET_SNMP_CONFIG=true ;; - no) - prefer_NET_SNMP_CONFIG=false - ;; - *) - NET_SNMP_CONFIG="${withval}" - prefer_NET_SNMP_CONFIG=true - ;; - esac - -fi - - - if test x"$have_PKG_CONFIG" = xyes && ! "${prefer_NET_SNMP_CONFIG}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via pkg-config" >&5 -$as_echo_n "checking for Net-SNMP version via pkg-config... " >&6; } - SNMP_VERSION="`$PKG_CONFIG --silence-errors --modversion netsnmp 2>/dev/null`" - if test "$?" = "0" -a -n "${SNMP_VERSION}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 +$as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } + SNMP_VERSION=`net-snmp-config --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 $as_echo "${SNMP_VERSION} found" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none found" >&5 -$as_echo "none found" >&6; } - prefer_NET_SNMP_CONFIG=true - fi - fi - - if test "$NET_SNMP_CONFIG" = none ; then - prefer_NET_SNMP_CONFIG=false - fi - - if "${prefer_NET_SNMP_CONFIG}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via ${NET_SNMP_CONFIG}" >&5 -$as_echo_n "checking for Net-SNMP version via ${NET_SNMP_CONFIG}... " >&6; } - SNMP_VERSION="`${NET_SNMP_CONFIG} --version 2>/dev/null`" - if test "$?" != "0" -o -z "${SNMP_VERSION}"; then - SNMP_VERSION="none" - prefer_NET_SNMP_CONFIG=false - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 -$as_echo "${SNMP_VERSION} found" >&6; } - fi - - if test x"$have_PKG_CONFIG" != xyes && ! "${prefer_NET_SNMP_CONFIG}" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find either net-snmp-config or pkg-config for net-snmp" >&5 -$as_echo "$as_me: WARNING: did not find either net-snmp-config or pkg-config for net-snmp" >&2;} - fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 $as_echo_n "checking for Net-SNMP cflags... " >&6; } @@ -14768,16 +8028,7 @@ if test "${with_snmp_includes+set}" = set; then : esac else - if "${prefer_NET_SNMP_CONFIG}"; then : - CFLAGS="`${NET_SNMP_CONFIG} --base-cflags 2>/dev/null`" -else - if test x"$have_PKG_CONFIG" = xyes; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags netsnmp 2>/dev/null`" - -fi - -fi - + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -14799,17 +8050,7 @@ if test "${with_snmp_libs+set}" = set; then : esac else - if "${prefer_NET_SNMP_CONFIG}"; then : - LIBS="`${NET_SNMP_CONFIG} --libs 2>/dev/null`" -else - if test x"$have_PKG_CONFIG" = xyes; then : - LIBS="`$PKG_CONFIG --silence-errors --libs netsnmp 2>/dev/null`" -else - LIBS="-lnetsnmp" -fi - -fi - + LIBS="`net-snmp-config --libs 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 @@ -14844,475 +8085,241 @@ fi done - if test "${nut_have_libnetsnmp}" = "yes"; then : - + if test "${nut_have_libnetsnmp}" = "yes"; then LIBNETSNMP_CFLAGS="${CFLAGS}" LIBNETSNMP_LIBS="${LIBS}" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmAESPrivProtocol" >&5 -$as_echo_n "checking for defined usmAESPrivProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmAESPrivProtocol; - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAESPrivProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAESPrivProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmAES128PrivProtocol" >&5 -$as_echo_n "checking for defined usmAES128PrivProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmAES128PrivProtocol; - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES128PrivProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES128PrivProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmDESPrivProtocol" >&5 -$as_echo_n "checking for defined usmDESPrivProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmDESPrivProtocol; -#ifdef NETSNMP_DISABLE_DES -#error "NETSNMP_DISABLE_DES is defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmDESPrivProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmDESPrivProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmHMAC256SHA384AuthProtocol" >&5 -$as_echo_n "checking for defined usmHMAC256SHA384AuthProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmHMAC256SHA384AuthProtocol; -#ifndef HAVE_EVP_SHA384 -#error "HAVE_EVP_SHA384 is NOT defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC256SHA384AuthProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC256SHA384AuthProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmHMAC384SHA512AuthProtocol" >&5 -$as_echo_n "checking for defined usmHMAC384SHA512AuthProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmHMAC384SHA512AuthProtocol; -#ifndef HAVE_EVP_SHA384 -#error "HAVE_EVP_SHA384 is NOT defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC384SHA512AuthProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC384SHA512AuthProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmHMAC192SHA256AuthProtocol" >&5 -$as_echo_n "checking for defined usmHMAC192SHA256AuthProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmHMAC192SHA256AuthProtocol; -#ifndef HAVE_EVP_SHA224 -#error "HAVE_EVP_SHA224 is NOT defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC192SHA256AuthProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMAC192SHA256AuthProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmAES192PrivProtocol" >&5 -$as_echo_n "checking for defined usmAES192PrivProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmAES192PrivProtocol; -#ifndef NETSNMP_DRAFT_BLUMENTHAL_AES_04 -#error "NETSNMP_DRAFT_BLUMENTHAL_AES_04 is NOT defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES192PrivProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES192PrivProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmAES256PrivProtocol" >&5 -$as_echo_n "checking for defined usmAES256PrivProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmAES256PrivProtocol; -#ifndef NETSNMP_DRAFT_BLUMENTHAL_AES_04 -#error "NETSNMP_DRAFT_BLUMENTHAL_AES_04 is NOT defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES256PrivProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmAES256PrivProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmHMACMD5AuthProtocol" >&5 -$as_echo_n "checking for defined usmHMACMD5AuthProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmHMACMD5AuthProtocol; -#ifdef NETSNMP_DISABLE_MD5 -#error "NETSNMP_DISABLE_MD5 is defined" -#endif - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMACMD5AuthProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMACMD5AuthProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined usmHMACSHA1AuthProtocol" >&5 -$as_echo_n "checking for defined usmHMACSHA1AuthProtocol... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -oid * pProto = usmHMACSHA1AuthProtocol; - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMACSHA1AuthProtocol 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_usmHMACSHA1AuthProtocol 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for defined NETSNMP_DRAFT_BLUMENTHAL_AES_04" >&5 -$as_echo_n "checking for defined NETSNMP_DRAFT_BLUMENTHAL_AES_04... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -int num = NETSNMP_DRAFT_BLUMENTHAL_AES_04 + 1; /* if defined, NETSNMP_DRAFT_BLUMENTHAL_AES_04 is 1 */ - -int -main () -{ - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_DRAFT_BLUMENTHAL_AES_04 1 -_ACEOF - - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -cat >>confdefs.h <<_ACEOF -#define NUT_HAVE_LIBNETSNMP_DRAFT_BLUMENTHAL_AES_04 0 -_ACEOF - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - + fi CFLAGS="${CFLAGS_ORIG}" LIBS="${LIBS_ORIG}" fi +if test -z "${nut_have_libusb_seen}"; then + nut_have_libusb_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb version via pkg-config" >&5 +$as_echo_n "checking for libusb version via pkg-config... " >&6; } + LIBUSB_VERSION="`pkg-config --silence-errors --modversion libusb 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libusb 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libusb 2>/dev/null`" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking via libusb-config" >&5 +$as_echo_n "checking via libusb-config... " >&6; } + LIBUSB_VERSION="`libusb-config --version 2>/dev/null`" + if test "$?" = "0" -a -n "${LIBUSB_VERSION}"; then + CFLAGS="`libusb-config --cflags 2>/dev/null`" + LIBS="`libusb-config --libs 2>/dev/null`" + else + LIBUSB_VERSION="none" + CFLAGS="" + LIBS="-lusb" + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBUSB_VERSION} found" >&5 +$as_echo "${LIBUSB_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb cflags" >&5 +$as_echo_n "checking for libusb cflags... " >&6; } + +# Check whether --with-usb-includes was given. +if test "${with_usb_includes+set}" = set; then : + withval=$with_usb_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-usb-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb ldflags" >&5 +$as_echo_n "checking for libusb ldflags... " >&6; } + +# Check whether --with-usb-libs was given. +if test "${with_usb_libs+set}" = set; then : + withval=$with_usb_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-usb-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in usb.h +do : + ac_fn_c_check_header_compile "$LINENO" "usb.h" "ac_cv_header_usb_h" "$ac_includes_default +" +if test "x$ac_cv_header_usb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_USB_H 1 +_ACEOF + nut_have_libusb=yes +else + nut_have_libusb=no +fi + +done + + for ac_func in usb_init +do : + ac_fn_c_check_func "$LINENO" "usb_init" "ac_cv_func_usb_init" +if test "x$ac_cv_func_usb_init" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_USB_INIT 1 +_ACEOF + +else + nut_have_libusb=no +fi +done + + + if test "${nut_have_libusb}" = "yes"; then + for ac_func in usb_detach_kernel_driver_np +do : + ac_fn_c_check_func "$LINENO" "usb_detach_kernel_driver_np" "ac_cv_func_usb_detach_kernel_driver_np" +if test "x$ac_cv_func_usb_detach_kernel_driver_np" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_USB_DETACH_KERNEL_DRIVER_NP 1 +_ACEOF + +fi +done + + LIBUSB_CFLAGS="${CFLAGS}" + LIBUSB_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + + +# Check whether --with-snmp was given. +if test "${with_snmp+set}" = set; then : + withval=$with_snmp; nut_with_snmp="${withval}" +else + nut_with_snmp="auto" + +fi + + + +if test -z "${nut_have_libnetsnmp_seen}"; then + nut_have_libnetsnmp_seen=yes + + CFLAGS_ORIG="${CFLAGS}" + LIBS_ORIG="${LIBS}" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP version via net-snmp-config" >&5 +$as_echo_n "checking for Net-SNMP version via net-snmp-config... " >&6; } + SNMP_VERSION=`net-snmp-config --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SNMP_VERSION} found" >&5 +$as_echo "${SNMP_VERSION} found" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP cflags" >&5 +$as_echo_n "checking for Net-SNMP cflags... " >&6; } + +# Check whether --with-snmp-includes was given. +if test "${with_snmp_includes+set}" = set; then : + withval=$with_snmp_includes; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-snmp-includes - see docs/configure.txt" "$LINENO" 5 + ;; + *) + CFLAGS="${withval}" + ;; + esac + +else + CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 +$as_echo "${CFLAGS}" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Net-SNMP libs" >&5 +$as_echo_n "checking for Net-SNMP libs... " >&6; } + +# Check whether --with-snmp-libs was given. +if test "${with_snmp_libs+set}" = set; then : + withval=$with_snmp_libs; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-snmp-libs - see docs/configure.txt" "$LINENO" 5 + ;; + *) + LIBS="${withval}" + ;; + esac + +else + LIBS="`net-snmp-config --libs 2>/dev/null`" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 +$as_echo "${LIBS}" >&6; } + + for ac_header in net-snmp/net-snmp-config.h +do : + ac_fn_c_check_header_compile "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default +" +if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_SNMP_NET_SNMP_CONFIG_H 1 +_ACEOF + nut_have_libnetsnmp=yes +else + nut_have_libnetsnmp=no +fi + +done + + for ac_func in init_snmp +do : + ac_fn_c_check_func "$LINENO" "init_snmp" "ac_cv_func_init_snmp" +if test "x$ac_cv_func_init_snmp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INIT_SNMP 1 +_ACEOF + +else + nut_have_libnetsnmp=no +fi +done + + + if test "${nut_have_libnetsnmp}" = "yes"; then + LIBNETSNMP_CFLAGS="${CFLAGS}" + LIBNETSNMP_LIBS="${LIBS}" + fi + + CFLAGS="${CFLAGS_ORIG}" + LIBS="${LIBS_ORIG}" +fi + # Check whether --with-neon was given. if test "${with_neon+set}" = set; then : @@ -15327,260 +8334,18 @@ fi if test -z "${nut_have_neon_seen}"; then nut_have_neon_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon version via pkg-config (0.25.0 minimum required)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon version via pkg-config (0.25.0 minimum required)" >&5 $as_echo_n "checking for libneon version via pkg-config (0.25.0 minimum required)... " >&6; } - NEON_VERSION="`$PKG_CONFIG --silence-errors --modversion neon 2>/dev/null`" - if test "$?" != "0" -o -z "${NEON_VERSION}"; then - NEON_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 + NEON_VERSION="`pkg-config --silence-errors --modversion neon 2>/dev/null`" + if test "$?" != "0" -o -z "${NEON_VERSION}"; then + NEON_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NEON_VERSION} found" >&5 $as_echo "${NEON_VERSION} found" >&6; } -else - NEON_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libneon settings via pkg-config" >&5 -$as_echo "$as_me: can not check libneon settings via pkg-config" >&6;} - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libneon cflags" >&5 $as_echo_n "checking for libneon cflags... " >&6; } @@ -15597,14 +8362,7 @@ if test "${with_neon_includes+set}" = set; then : esac else - - if test x"$have_PKG_CONFIG" = xyes; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags neon 2>/dev/null`" || CFLAGS="-I/usr/include/neon -I/usr/local/include/neon" -else - CFLAGS="-I/usr/include/neon -I/usr/local/include/neon" - -fi - + CFLAGS="`pkg-config --silence-errors --cflags neon 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -15626,14 +8384,7 @@ if test "${with_neon_libs+set}" = set; then : esac else - - if test x"$have_PKG_CONFIG" = xyes; then : - LIBS="`$PKG_CONFIG --silence-errors --libs neon 2>/dev/null`" || LIBS="-lneon" -else - LIBS="-lneon" - -fi - + LIBS="`pkg-config --silence-errors --libs neon 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 @@ -15690,7 +8441,6 @@ done fi - # Check whether --with-powerman was given. if test "${with_powerman+set}" = set; then : withval=$with_powerman; nut_with_powerman="${withval}" @@ -15704,271 +8454,9 @@ fi if test -z "${nut_have_libpowerman_seen}"; then nut_have_libpowerman_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLNC libpowerman version via pkg-config" >&5 -$as_echo_n "checking for LLNC libpowerman version via pkg-config... " >&6; } - POWERMAN_VERSION="`$PKG_CONFIG --silence-errors --modversion libpowerman 2>/dev/null`" - if test "$?" != "0" ; then # -o -z "${POWERMAN_VERSION}"; then - POWERMAN_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: '${POWERMAN_VERSION}' found" >&5 -$as_echo "'${POWERMAN_VERSION}' found" >&6; } - -else - POWERMAN_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check LLNC libpowerman settings via pkg-config" >&5 -$as_echo "$as_me: can not check LLNC libpowerman settings via pkg-config" >&6;} - - -fi - - if test x"$POWERMAN_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libpowerman 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libpowerman 2>/dev/null`" - -else - CFLAGS="" - LIBS="" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpowerman cflags" >&5 $as_echo_n "checking for libpowerman cflags... " >&6; } @@ -15984,6 +8472,8 @@ if test "${with_powerman_includes+set}" = set; then : ;; esac +else + CFLAGS="`pkg-config --silence-errors --cflags libpowerman 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -16004,6 +8494,8 @@ if test "${with_powerman_libs+set}" = set; then : ;; esac +else + LIBS="`pkg-config --silence-errors --libs libpowerman 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 @@ -16032,34 +8524,8 @@ if test "x$ac_cv_func_pm_connect" = xyes; then : #define HAVE_PM_CONNECT 1 _ACEOF -else - - if test "${nut_have_libpowerman}" = "yes" && test "$POWERMAN_VERSION" = "none" && test -z "$LIBS"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libpowerman is just present in path" >&5 -$as_echo_n "checking if libpowerman is just present in path... " >&6; } - LIBS="-L/usr/lib -L/usr/local/lib -lpowerman" - unset ac_cv_func_pm_connect || true - for ac_func in pm_connect -do : - ac_fn_c_check_func "$LINENO" "pm_connect" "ac_cv_func_pm_connect" -if test "x$ac_cv_func_pm_connect" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PM_CONNECT 1 -_ACEOF - else nut_have_libpowerman=no -fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_have_libpowerman}" >&5 -$as_echo "${nut_have_libpowerman}" >&6; } - -else - nut_have_libpowerman=no - -fi - fi done @@ -16075,3220 +8541,30 @@ done fi - -# Check whether --with-modbus was given. -if test "${with_modbus+set}" = set; then : - withval=$with_modbus; nut_with_modbus="${withval}" -else - nut_with_modbus="auto" - -fi - - - -if test -z "${nut_have_libmodbus_seen}"; then - nut_have_libmodbus_seen=yes - - CFLAGS_ORIG="${CFLAGS}" - LIBS_ORIG="${LIBS}" - -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmodbus version via pkg-config" >&5 -$as_echo_n "checking for libmodbus version via pkg-config... " >&6; } - LIBMODBUS_VERSION="`$PKG_CONFIG --silence-errors --modversion libmodbus 2>/dev/null`" - if test "$?" != "0" -o -z "${LIBMODBUS_VERSION}"; then - LIBMODBUS_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBMODBUS_VERSION} found" >&5 -$as_echo "${LIBMODBUS_VERSION} found" >&6; } - -else - LIBMODBUS_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libmodbus settings via pkg-config" >&5 -$as_echo "$as_me: can not check libmodbus settings via pkg-config" >&6;} - - -fi - - if test x"$LIBMODBUS_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libmodbus 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libmodbus 2>/dev/null`" - -else - CFLAGS="-I/usr/include/modbus" - LIBS="-lmodbus" - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmodbus cflags" >&5 -$as_echo_n "checking for libmodbus cflags... " >&6; } - -# Check whether --with-modbus-includes was given. -if test "${with_modbus_includes+set}" = set; then : - withval=$with_modbus_includes; - case "${withval}" in - yes|no) - as_fn_error $? "invalid option --with(out)-modbus-includes - see docs/configure.txt" "$LINENO" 5 - ;; - *) - CFLAGS="${withval}" - ;; - esac - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 -$as_echo "${CFLAGS}" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmodbus ldflags" >&5 -$as_echo_n "checking for libmodbus ldflags... " >&6; } - -# Check whether --with-modbus-libs was given. -if test "${with_modbus_libs+set}" = set; then : - withval=$with_modbus_libs; - case "${withval}" in - yes|no) - as_fn_error $? "invalid option --with(out)-modbus-libs - see docs/configure.txt" "$LINENO" 5 - ;; - *) - LIBS="${withval}" - ;; - esac - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 -$as_echo "${LIBS}" >&6; } - - for ac_header in modbus.h -do : - ac_fn_c_check_header_compile "$LINENO" "modbus.h" "ac_cv_header_modbus_h" "$ac_includes_default -" -if test "x$ac_cv_header_modbus_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MODBUS_H 1 -_ACEOF - nut_have_libmodbus=yes -else - nut_have_libmodbus=no -fi - -done - - for ac_func in modbus_new_rtu -do : - ac_fn_c_check_func "$LINENO" "modbus_new_rtu" "ac_cv_func_modbus_new_rtu" -if test "x$ac_cv_func_modbus_new_rtu" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MODBUS_NEW_RTU 1 -_ACEOF - -else - nut_have_libmodbus=no -fi -done - - for ac_func in modbus_new_tcp -do : - ac_fn_c_check_func "$LINENO" "modbus_new_tcp" "ac_cv_func_modbus_new_tcp" -if test "x$ac_cv_func_modbus_new_tcp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MODBUS_NEW_TCP 1 -_ACEOF - -else - nut_have_libmodbus=no -fi -done - - for ac_func in modbus_set_byte_timeout -do : - ac_fn_c_check_func "$LINENO" "modbus_set_byte_timeout" "ac_cv_func_modbus_set_byte_timeout" -if test "x$ac_cv_func_modbus_set_byte_timeout" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MODBUS_SET_BYTE_TIMEOUT 1 -_ACEOF - -else - nut_have_libmodbus=no -fi -done - - for ac_func in modbus_set_response_timeout -do : - ac_fn_c_check_func "$LINENO" "modbus_set_response_timeout" "ac_cv_func_modbus_set_response_timeout" -if test "x$ac_cv_func_modbus_set_response_timeout" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MODBUS_SET_RESPONSE_TIMEOUT 1 -_ACEOF - -else - nut_have_libmodbus=no -fi -done - - - if test x"$nut_have_libmodbus" = xyes; then : - -if test -z "${nut_have_ax_c_pragmas_seen}"; then - nut_have_ax_c_pragmas_seen="yes" - - CFLAGS_SAVED="${CFLAGS}" - CXXFLAGS_SAVED="${CXXFLAGS}" - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - if test "${CLANG}" = "yes"; then : - CFLAGS="${CFLAGS_SAVED} -Werror=pragmas -Werror=unknown-pragmas -Werror=unknown-warning-option" - CXXFLAGS="${CXXFLAGS_SAVED} -Werror=pragmas -Werror=unknown-pragmas -Werror=unknown-warning-option" -else - if test "${GCC}" = "yes"; then : - CFLAGS="${CFLAGS_SAVED} -Wall -Wextra -Werror" - CXXFLAGS="${CXXFLAGS_SAVED} -Wall -Wextra -Werror" -else - CFLAGS="${CFLAGS_SAVED} -Wall -Wextra -Werror" - CXXFLAGS="${CXXFLAGS_SAVED} -Wall -Wextra -Werror" -fi - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic push and pop (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic push and pop (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_push_pop_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic pop - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_push_pop_besidefunc=yes -else - ax_cv__pragma__gcc__diags_push_pop_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_push_pop_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma clang diagnostic push and pop (outside functions)" >&5 -$as_echo_n "checking for pragma clang diagnostic push and pop (outside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_push_pop_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __clang__ -#endif -#pragma clang diagnostic push -#pragma clang diagnostic pop - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_push_pop_besidefunc=yes -else - ax_cv__pragma__clang__diags_push_pop_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_push_pop_besidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_push_pop_besidefunc" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic push and pop (inside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic push and pop (inside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_push_pop_insidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic push -#pragma GCC diagnostic pop -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_push_pop_insidefunc=yes -else - ax_cv__pragma__gcc__diags_push_pop_insidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_push_pop_insidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma clang diagnostic push and pop (inside functions)" >&5 -$as_echo_n "checking for pragma clang diagnostic push and pop (inside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_push_pop_insidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#ifdef __clang__ -#endif -#pragma clang diagnostic push -#pragma clang diagnostic pop -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_push_pop_insidefunc=yes -else - ax_cv__pragma__clang__diags_push_pop_insidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_push_pop_insidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_push_pop_insidefunc" >&6; } - - if test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_INSIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP_BESIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes" && test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_PUSH_POP 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP_INSIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP_BESIDEFUNC 1" >>confdefs.h - - -fi - - if test "$ax_cv__pragma__clang__diags_push_pop_besidefunc" = "yes" && test "$ax_cv__pragma__clang__diags_push_pop_insidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_PUSH_POP 1" >>confdefs.h - - -fi - - if test "${CLANG}" = "yes"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\"" >&5 -$as_echo_n "checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\"... " >&6; } -if ${ax_cv__pragma__clang__diags_ignored_unreachable_code_return+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma clang diagnostic ignored "-Wunreachable-code-return" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_ignored_unreachable_code_return=yes -else - ax_cv__pragma__clang__diags_ignored_unreachable_code_return=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_ignored_unreachable_code_return" >&5 -$as_echo "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return" >&6; } - if test "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\" (outside functions)" >&5 -$as_echo_n "checking for pragma CLANG diagnostic ignored \"-Wunreachable-code-return\" (outside functions)... " >&6; } -if ${ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma clang diagnostic ignored "-Wunreachable-code-return" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc=yes -else - ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" >&5 -$as_echo "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" >&6; } - if test "$ax_cv__pragma__clang__diags_ignored_unreachable_code_return_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_CLANG_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN_BESIDEFUNC 1" >>confdefs.h - - -fi - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunused-function\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunused-function\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unused_function+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunused-function" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unused_function=yes -else - ax_cv__pragma__gcc__diags_ignored_unused_function=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unused_function" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unused_function" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unused_function" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNUSED_FUNCTION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_nonliteral+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_nonliteral=yes -else - ax_cv__pragma__gcc__diags_ignored_format_nonliteral=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_nonliteral" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-nonliteral\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-nonliteral" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-security\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-security\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_security+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-security" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_security=yes -else - ax_cv__pragma__gcc__diags_ignored_format_security=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_security" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_security" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-security\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-security\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-security" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_security_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_SECURITY_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-truncation\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-truncation\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_truncation+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-truncation" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_truncation=yes -else - ax_cv__pragma__gcc__diags_ignored_format_truncation=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_truncation" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_truncation" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-truncation\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-truncation\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-truncation" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_stringop_truncation+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wstringop-truncation" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_stringop_truncation=yes -else - ax_cv__pragma__gcc__diags_ignored_stringop_truncation=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_stringop_truncation" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRINGOP_TRUNCATION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstringop-truncation\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wstringop-truncation" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRINGOP_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtype-limits\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtype-limits\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_type_limits+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtype-limits" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_type_limits=yes -else - ax_cv__pragma__gcc__diags_ignored_type_limits=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_type_limits" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_type_limits" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_type_limits" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtype-limits\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtype-limits\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtype-limits" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_type_limits_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TYPE_LIMITS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Warray-bounds\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Warray-bounds\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_array_bounds+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Warray-bounds" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_array_bounds=yes -else - ax_cv__pragma__gcc__diags_ignored_array_bounds=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_array_bounds" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_array_bounds" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_array_bounds" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ARRAY_BOUNDS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Warray-bounds\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Warray-bounds\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Warray-bounds" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_array_bounds_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ARRAY_BOUNDS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-type-limit-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-type-limit-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-type-limit-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_type_limit_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_TYPE_LIMIT_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-constant-out-of-range-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_constant_out_of_range_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_CONSTANT_OUT_OF_RANGE_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-unsigned-zero-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-unsigned-zero-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-unsigned-zero-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_unsigned_zero_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_UNSIGNED_ZERO_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wtautological-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wtautological-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wtautological-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wtautological-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_tautological_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_TAUTOLOGICAL_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-compare\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-compare\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_compare+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wsign-compare" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_compare=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_compare=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_compare" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_compare" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_compare" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-compare\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-compare\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wsign-compare" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_compare_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-conversion\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-conversion\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_conversion+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wsign-conversion" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_conversion=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_conversion=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_conversion" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_conversion" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_conversion" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wsign-conversion\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wsign-conversion\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wsign-conversion" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_sign_conversion_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_break+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code-break" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-break\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code-break" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BREAK_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_return+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code-return" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code-return\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code-return" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_return_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_RETURN_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wunreachable-code" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wunreachable-code\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wunreachable-code\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wunreachable-code" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-overflow\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-overflow\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_overflow+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wformat-overflow" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_overflow=yes -else - ax_cv__pragma__gcc__diags_ignored_format_overflow=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_overflow" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_overflow" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_overflow" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wformat-overflow\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wformat-overflow\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wformat-overflow" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_format_overflow_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_FORMAT_OVERFLOW_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_covered_switch_default+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wcovered-switch-default" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_covered_switch_default=yes -else - ax_cv__pragma__gcc__diags_ignored_covered_switch_default=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_covered_switch_default" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcovered-switch-default\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wcovered-switch-default" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_covered_switch_default_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_COVERED_SWITCH_DEFAULT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wextra-semi-stmt" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt=yes -else - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wextra-semi-stmt\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wextra-semi-stmt" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_extra_semi_stmt_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXTRA_SEMI_STMT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcast-align\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcast-align\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cast_align+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wcast-align" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cast_align=yes -else - ax_cv__pragma__gcc__diags_ignored_cast_align=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cast_align" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cast_align" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cast_align" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wcast-align\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wcast-align\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wcast-align" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cast_align_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CAST_ALIGN_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_strict_prototypes+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wstrict-prototypes" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_strict_prototypes=yes -else - ax_cv__pragma__gcc__diags_ignored_strict_prototypes=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_strict_prototypes" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wstrict-prototypes\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wstrict-prototypes" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_strict_prototypes_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_STRICT_PROTOTYPES_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wassign-enum\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wassign-enum\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_assign_enum+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wassign-enum" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_assign_enum=yes -else - ax_cv__pragma__gcc__diags_ignored_assign_enum=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_assign_enum" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_assign_enum" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_assign_enum" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-Wassign-enum\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-Wassign-enum\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wassign-enum" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_assign_enum_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_ASSIGN_ENUM_BESIDEFUNC 1" >>confdefs.h - - -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_PEDANTIC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat-pedantic\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wc++98-compat-pedantic" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_PEDANTIC_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wc++98-compat" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wc++98-compat\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wc++98-compat" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_global_constructors+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wglobal-constructors" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_global_constructors=yes -else - ax_cv__pragma__gcc__diags_ignored_global_constructors=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_global_constructors" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_global_constructors" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_global_constructors" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wglobal-constructors\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wglobal-constructors" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_global_constructors_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_GLOBAL_CONSTRUCTORS_BESIDEFUNC 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\"" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\"... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_exit_time_destructors+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-Wexit-time-destructors" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors=yes -else - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS 1" >>confdefs.h - - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\" (outside functions)" >&5 -$as_echo_n "checking for C++ pragma GCC diagnostic ignored \"-Wexit-time-destructors\" (outside functions)... " >&6; } -if ${ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-Wexit-time-destructors" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc=yes -else - ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" >&5 -$as_echo "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" >&6; } - if test "$ax_cv__pragma__gcc__diags_ignored_exit_time_destructors_besidefunc" = "yes"; then : - - -$as_echo "#define HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_EXIT_TIME_DESTRUCTORS_BESIDEFUNC 1" >>confdefs.h - - -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - if test "$ax_cv__pragma__gcc__diags_push_pop_insidefunc" = "yes"; then : - - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT 1" >>confdefs.h - - -fi - -fi - - if test "$ax_cv__pragma__gcc__diags_push_pop_besidefunc" = "yes"; then : - - if test "$ax_cv__pragma__gcc__diags_ignored_format_security" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_format_nonliteral" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_NONLITERAL_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_format_truncation" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_stringop_truncation" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_FORMAT_TRUNCATION_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_unreachable_code_break" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_UNREACHABLE_CODE_BESIDEFUNC 1" >>confdefs.h - - -fi - if test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat_pedantic" = "yes" || test "$ax_cv__pragma__gcc__diags_ignored_cxx98_compat" = "yes" ; then : - - -$as_echo "#define HAVE_PRAGMAS_FOR_GCC_DIAGNOSTIC_IGNORED_CXX98_COMPAT_BESIDEFUNC 1" >>confdefs.h - - -fi - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma BOGUSforTest" >&5 -$as_echo_n "checking for pragma BOGUSforTest... " >&6; } -if ${ax_cv__pragma__bogus+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma BOGUSforTest -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus=yes -else - ax_cv__pragma__bogus=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus" >&5 -$as_echo "$ax_cv__pragma__bogus" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma BOGUSforTest (outside functions)" >&5 -$as_echo_n "checking for pragma BOGUSforTest (outside functions)... " >&6; } -if ${ax_cv__pragma__bogus_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma BOGUSforTest -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_besidefunc=yes -else - ax_cv__pragma__bogus_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_besidefunc" >&5 -$as_echo "$ax_cv__pragma__bogus_besidefunc" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\"" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\"... " >&6; } -if ${ax_cv__pragma__bogus_diag+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -void func(void) { -#pragma GCC diagnostic ignored "-WBOGUSforTest" -} - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_diag=yes -else - ax_cv__pragma__bogus_diag=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_diag" >&5 -$as_echo "$ax_cv__pragma__bogus_diag" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\" (outside functions)" >&5 -$as_echo_n "checking for pragma GCC diagnostic ignored \"-WBOGUSforTest\" (outside functions)... " >&6; } -if ${ax_cv__pragma__bogus_diag_besidefunc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#pragma GCC diagnostic ignored "-WBOGUSforTest" -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ax_cv__pragma__bogus_diag_besidefunc=yes -else - ax_cv__pragma__bogus_diag_besidefunc=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv__pragma__bogus_diag_besidefunc" >&5 -$as_echo "$ax_cv__pragma__bogus_diag_besidefunc" >&6; } - - if test "${ax_cv__pragma__bogus}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus=$ax_cv__pragma__bogus (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus=$ax_cv__pragma__bogus (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_besidefunc}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_besidefunc=$ax_cv__pragma__bogus_besidefunc (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_besidefunc=$ax_cv__pragma__bogus_besidefunc (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_diag}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag=$ax_cv__pragma__bogus_diag (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag=$ax_cv__pragma__bogus_diag (not 'no')" >&2;} -fi - - if test "${ax_cv__pragma__bogus_diag_besidefunc}" != "no"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag_besidefunc=$ax_cv__pragma__bogus_diag_besidefunc (not 'no')" >&5 -$as_echo "$as_me: WARNING: A bogus test that was expected to fail did not! ax_cv__pragma__bogus_diag_besidefunc=$ax_cv__pragma__bogus_diag_besidefunc (not 'no')" >&2;} -fi - - CFLAGS="${CFLAGS_SAVED}" - CXXFLAGS="${CXXFLAGS_SAVED}" -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for modbus_set_byte_timeout" >&5 -$as_echo_n "checking types of arguments for modbus_set_byte_timeout... " >&6; } -if ${nut_cv_func_modbus_set_byte_timeout_args+:} false; then : - $as_echo_n "(cached) " >&6 -else - nut_cv_func_modbus_set_byte_timeout_args="unknown" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -modbus_t *ctx; struct timeval to = (struct timeval){0}; -modbus_set_byte_timeout(ctx, &to); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - nut_cv_func_modbus_set_byte_timeout_args="timeval" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ -modbus_t *ctx; uint32_t to_sec = 10, to_usec = 50; -struct timeval to = (struct timeval){0}; -/* TODO: Clarify and detect warning names and - * so pragmas for signed/unsigned assignment (e.g. - * for timeval definitions that have "long" fields) - */ -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE -# pragma GCC diagnostic ignored "-Wsign-compare" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION -# pragma GCC diagnostic ignored "-Wsign-conversion" -#endif -to.tv_sec = to_sec; -to.tv_usec = to_usec; -modbus_set_byte_timeout(ctx, &to); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - nut_cv_func_modbus_set_byte_timeout_args="timeval_numeric_fields" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ -modbus_t *ctx; struct timeval to = (struct timeval){0}; -/* TODO: Clarify and detect warning names and - * so pragmas for signed/unsigned assignment (e.g. - * for timeval definitions that have "long" fields) - */ -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_COMPARE -# pragma GCC diagnostic ignored "-Wsign-compare" -#endif -#ifdef HAVE_PRAGMA_GCC_DIAGNOSTIC_IGNORED_SIGN_CONVERSION -# pragma GCC diagnostic ignored "-Wsign-conversion" -#endif -uint32_t to_sec = to.tv_sec, to_usec = to.tv_usec; -modbus_set_byte_timeout(ctx, to_sec, to_usec); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - nut_cv_func_modbus_set_byte_timeout_args="sec_usec_uint32_cast_timeval_fields" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -modbus_t *ctx; uint32_t to_sec = 0, to_usec = 0; -modbus_set_byte_timeout(ctx, to_sec, to_usec); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - nut_cv_func_modbus_set_byte_timeout_args="sec_usec_uint32" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $nut_cv_func_modbus_set_byte_timeout_args" >&5 -$as_echo "$nut_cv_func_modbus_set_byte_timeout_args" >&6; } - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found types to use for modbus_set_byte_timeout: ${nut_cv_func_modbus_set_byte_timeout_args}" >&5 -$as_echo "Found types to use for modbus_set_byte_timeout: ${nut_cv_func_modbus_set_byte_timeout_args}" >&6; } - COMMENT="Define to specify timeout method args approach for libmodbus" - case "${nut_cv_func_modbus_set_byte_timeout_args}" in #( - timeval_numeric_fields) : - -$as_echo "#define NUT_MODBUS_TIMEOUT_ARG_timeval_numeric_fields 1" >>confdefs.h - ;; #( - timeval) : - -$as_echo "#define NUT_MODBUS_TIMEOUT_ARG_timeval 1" >>confdefs.h - ;; #( - sec_usec_uint32_cast_timeval_fields) : - -$as_echo "#define NUT_MODBUS_TIMEOUT_ARG_sec_usec_uint32_cast_timeval_fields 1" >>confdefs.h - ;; #( - sec_usec_uint32) : - -$as_echo "#define NUT_MODBUS_TIMEOUT_ARG_sec_usec_uint32 1" >>confdefs.h - ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find proper types to use for modbus_set_byte_timeout" >&5 -$as_echo "$as_me: WARNING: Cannot find proper types to use for modbus_set_byte_timeout" >&2;} - nut_have_libmodbus=no - ;; -esac - -fi - - if test x"${nut_have_libmodbus}" = x"yes"; then : - LIBMODBUS_CFLAGS="${CFLAGS}" - LIBMODBUS_LIBS="${LIBS}" - -fi - - CFLAGS="${CFLAGS_ORIG}" - LIBS="${LIBS_ORIG}" -fi - - - -# Check whether --with-avahi was given. -if test "${with_avahi+set}" = set; then : - withval=$with_avahi; nut_with_avahi="${withval}" -else - nut_with_avahi="auto" - -fi - - - if test -z "${nut_have_avahi_seen}"; then nut_have_avahi_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-core version via pkg-config (0.6.30 minimum required)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-core version via pkg-config (0.6.30 minimum required)" >&5 $as_echo_n "checking for avahi-core version via pkg-config (0.6.30 minimum required)... " >&6; } - AVAHI_CORE_VERSION="`$PKG_CONFIG --silence-errors --modversion avahi-core 2>/dev/null`" - if test "$?" != "0" -o -z "${AVAHI_CORE_VERSION}"; then - AVAHI_CORE_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CORE_VERSION} found" >&5 + AVAHI_CORE_VERSION="`pkg-config --silence-errors --modversion avahi-core 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CORE_VERSION}"; then + AVAHI_CORE_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CORE_VERSION} found" >&5 $as_echo "${AVAHI_CORE_VERSION} found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-client version via pkg-config (0.6.30 minimum required)" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi-client version via pkg-config (0.6.30 minimum required)" >&5 $as_echo_n "checking for avahi-client version via pkg-config (0.6.30 minimum required)... " >&6; } - AVAHI_CLIENT_VERSION="`$PKG_CONFIG --silence-errors --modversion avahi-client 2>/dev/null`" - if test "$?" != "0" -o -z "${AVAHI_CLIENT_VERSION}"; then - AVAHI_CLIENT_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CLIENT_VERSION} found" >&5 + AVAHI_CLIENT_VERSION="`pkg-config --silence-errors --modversion avahi-client 2>/dev/null`" + if test "$?" != "0" -o -z "${AVAHI_CLIENT_VERSION}"; then + AVAHI_CLIENT_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${AVAHI_CLIENT_VERSION} found" >&5 $as_echo "${AVAHI_CLIENT_VERSION} found" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check avahi settings via pkg-config" >&5 -$as_echo "$as_me: can not check avahi settings via pkg-config" >&6;} - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi cflags" >&5 $as_echo_n "checking for avahi cflags... " >&6; } @@ -19305,14 +8581,7 @@ if test "${with_avahi_includes+set}" = set; then : esac else - - if test x"$have_PKG_CONFIG" = xyes; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags avahi-core avahi-client 2>/dev/null`" || CFLAGS="-I/usr/local/include -I/usr/include -L/usr/local/lib -L/usr/lib" -else - CFLAGS="-I/usr/local/include -I/usr/include -L/usr/local/lib -L/usr/lib" - -fi - + CFLAGS="`pkg-config --silence-errors --cflags avahi-core avahi-client 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CFLAGS}" >&5 @@ -19334,14 +8603,7 @@ if test "${with_avahi_libs+set}" = set; then : esac else - - if test x"$have_PKG_CONFIG" = xyes; then : - LIBS="`$PKG_CONFIG --silence-errors --libs avahi-core avahi-client 2>/dev/null`" || LIBS="-lavahi-core -lavahi-client" -else - LIBS="-lavahi-core -lavahi-client" - -fi - + LIBS="`pkg-config --silence-errors --libs avahi-core avahi-client 2>/dev/null`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 @@ -19417,150 +8679,79 @@ fi -if test "${nut_with_serial}" != "no"; then : - if test "${nut_with_serial}" != "yes"; then : - nut_with_serial="auto" -fi - - CFLAGS_SAVED_SERIAL="${CFLAGS}" - if test "${GCC}" = yes; then : - CFLAGS_SAVED_WERROR="${CFLAGS} -Wall -Werror" - CFLAGS_SAVED_WNOERROR="${CFLAGS} -Wno-error" - +case ${target_os} in + solaris2.1* ) + echo Checking for Solaris 10 / 11 specific configuration for usb drivers + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 +$as_echo_n "checking for library containing nanosleep... " >&6; } +if ${ac_cv_search_nanosleep+:} false; then : + $as_echo_n "(cached) " >&6 else - CFLAGS_SAVED_WERROR="${CFLAGS}" - CFLAGS_SAVED_WNOERROR="${CFLAGS}" - -fi - - - CFLAGS="${CFLAGS_SAVED_WERROR}" - for ac_header in sys/termios.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_termios_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TERMIOS_H 1 -_ACEOF - -else - - CFLAGS="${CFLAGS_SAVED_WNOERROR}" - for ac_header in termios.h -do : - ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default -" -if test "x$ac_cv_header_termios_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TERMIOS_H 1 -_ACEOF - -else - - for ac_header in sys/termios.h -do : - ac_fn_c_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default -" -if test "x$ac_cv_header_sys_termios_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_TERMIOS_H 1 -_ACEOF - -fi - -done - - -fi - -done - - -fi - -done - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct termios and speed_t" >&5 -$as_echo_n "checking for struct termios and speed_t... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if defined(HAVE_SYS_TERMIOS_H) -# include /* for speed_t */ -#else -# if defined(HAVE_TERMIOS_H) -# include -# endif /* HAVE_TERMIOS_H */ -#endif /* HAVE_SYS_TERMIOS_H */ -void getspeed(speed_t* b) { *b = B19200; } - +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (); int main () { -struct termios tio; -if (!tcgetattr(0, &tio)) { return 1; } -speed_t baudrate; -getspeed(&baudrate); - - +return nanosleep (); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - nut_have_serial_types=yes +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_nanosleep=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nanosleep+:} false; then : + break +fi +done +if ${ac_cv_search_nanosleep+:} false; then : else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, struct termios and/or speed_t not found in discovered headers" >&5 -$as_echo "no, struct termios and/or speed_t not found in discovered headers" >&6; } - nut_have_serial_types=no - + ac_cv_search_nanosleep=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 +$as_echo "$ac_cv_search_nanosleep" >&6; } +ac_res=$ac_cv_search_nanosleep +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu + + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" + +$as_echo "#define SUN_LIBUSB 1" >>confdefs.h + + SUN_LIBUSB=1 + ;; + hpux11*) + CFLAGS="${CFLAGS} -lpthread" +esac - CFLAGS="${CFLAGS_SAVED_SERIAL}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build serial drivers" >&5 -$as_echo_n "checking whether we can build serial drivers... " >&6; } - if test "${nut_have_serial_types}" = yes; then : - if test "${nut_with_serial}" = "auto"; then : +if test "${nut_with_serial}" != "no"; then nut_with_serial="yes" -fi -else - if test "${nut_with_serial}" = "auto"; then : - nut_with_serial="no" -fi - if test "${nut_with_serial}" = "yes"; then : - as_fn_error $? "no, and were required to" "$LINENO" 5 -fi - -fi - if test "${nut_with_serial}" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - fi @@ -19596,28 +8787,19 @@ _ACEOF - if test "${nut_usb_lib}" = "(libusb-1.0)"; then - WITH_LIBUSB_1_0_TRUE= - WITH_LIBUSB_1_0_FALSE='#' -else - WITH_LIBUSB_1_0_TRUE='#' - WITH_LIBUSB_1_0_FALSE= +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + as_fn_error $? "\"USB drivers requested, but libusb not found.\"" "$LINENO" 5 fi - if test "${nut_usb_lib}" = "(libusb-0.1)" -o "${nut_usb_lib}" = "(libusb-0.1-config)"; then - WITH_LIBUSB_0_1_TRUE= - WITH_LIBUSB_0_1_FALSE='#' -else - WITH_LIBUSB_0_1_TRUE='#' - WITH_LIBUSB_0_1_FALSE= +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build USB drivers" >&5 $as_echo_n "checking whether to build USB drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb} ${nut_usb_lib}" >&5 -$as_echo "${nut_with_usb} ${nut_usb_lib}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_usb} " >&5 +$as_echo "${nut_with_usb} " >&6; } if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" @@ -19625,7 +8807,7 @@ $as_echo "${nut_with_usb} ${nut_usb_lib}" >&6; } echo "Configuration summary:" >> conf_nut_report_feature echo "======================" >> conf_nut_report_feature fi - echo "build USB drivers: ${nut_with_usb} ${nut_usb_lib}" >> conf_nut_report_feature + echo "build USB drivers: ${nut_with_usb} " >> conf_nut_report_feature if test "${nut_with_usb}" = "yes"; then @@ -19646,8 +8828,49 @@ _ACEOF +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + as_fn_error $? "\"Net-SNMP libraries not found, required for SNMP drivers\"" "$LINENO" 5 +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 +$as_echo_n "checking whether to build SNMP drivers... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp} " >&5 +$as_echo "${nut_with_snmp} " >&6; } + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "build SNMP drivers: ${nut_with_snmp} " >> conf_nut_report_feature + + + if test "${nut_with_snmp}" = "yes"; then + WITH_SNMP_TRUE= + WITH_SNMP_FALSE='#' +else + WITH_SNMP_TRUE='#' + WITH_SNMP_FALSE= +fi + + if test "${nut_with_snmp}" = "yes"; then + +cat >>confdefs.h <<_ACEOF +#define WITH_SNMP 1 +_ACEOF + + fi + + + if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - as_fn_error $? "neon libraries not found, required for neon based XML/HTTP driver" "$LINENO" 5 + as_fn_error $? "\"neon libraries not found, required for neon based XML/HTTP driver\"" "$LINENO" 5 fi if test "${nut_with_neon}" != "no"; then @@ -19685,18 +8908,10 @@ _ACEOF fi - if test "${nut_have_neon}" = "yes"; then - HAVE_NEON_TRUE= - HAVE_NEON_FALSE='#' -else - HAVE_NEON_TRUE='#' - HAVE_NEON_FALSE= -fi - if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then - as_fn_error $? "avahi libraries not found" "$LINENO" 5 + as_fn_error $? "\"avahi libraries not found\"" "$LINENO" 5 fi if test "${nut_with_avahi}" != "no"; then @@ -19738,7 +8953,7 @@ _ACEOF if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - as_fn_error $? "Powerman client libraries not found, required for Powerman PDU client driver" "$LINENO" 5 + as_fn_error $? "\"Powerman client libraries not found, required for Powerman PDU client driver\"" "$LINENO" 5 fi if test "${nut_with_powerman}" != "no"; then @@ -19778,46 +8993,6 @@ _ACEOF -if test "${nut_with_modbus}" = "yes" -a "${nut_have_libmodbus}" != "yes"; then - as_fn_error $? "modbus library not found, required for Modbus driver" "$LINENO" 5 -fi - -if test "${nut_with_modbus}" != "no"; then - nut_with_modbus="${nut_have_libmodbus}" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Modbus driver" >&5 -$as_echo_n "checking whether to build Modbus driver... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_modbus} " >&5 -$as_echo "${nut_with_modbus} " >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - echo "======================" >> conf_nut_report_feature - fi - echo "build Modbus driver: ${nut_with_modbus} " >> conf_nut_report_feature - - - if test "${nut_with_modbus}" = "yes"; then - WITH_MODBUS_TRUE= - WITH_MODBUS_FALSE='#' -else - WITH_MODBUS_TRUE='#' - WITH_MODBUS_FALSE= -fi - - if test "${nut_with_modbus}" = "yes"; then - -cat >>confdefs.h <<_ACEOF -#define WITH_MODBUS 1 -_ACEOF - - fi - - nut_ipmi_lib="" @@ -19847,271 +9022,23 @@ if test "${nut_with_ipmi}" != "no"; then if test -z "${nut_have_libfreeipmi_seen}"; then nut_have_libfreeipmi_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 $as_echo_n "checking for FreeIPMI version via pkg-config... " >&6; } - FREEIPMI_VERSION="`$PKG_CONFIG --silence-errors --modversion libfreeipmi 2>/dev/null`" - if test "$?" != "0" -o -z "${FREEIPMI_VERSION}"; then - FREEIPMI_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 + FREEIPMI_VERSION="`pkg-config --silence-errors --modversion libfreeipmi 2>/dev/null`" + if test "$?" = "0" -a -n "${FREEIPMI_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" + else + FREEIPMI_VERSION="none" + CFLAGS="" + LIBS="-lfreeipmi -lipmimonitoring" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 $as_echo "${FREEIPMI_VERSION} found" >&6; } -else - FREEIPMI_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check FreeIPMI settings via pkg-config" >&5 -$as_echo "$as_me: can not check FreeIPMI settings via pkg-config" >&6;} - - -fi - - if test x"$FREEIPMI_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" - -else - CFLAGS="" - LIBS="-lfreeipmi -lipmimonitoring" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI cflags" >&5 $as_echo_n "checking for FreeIPMI cflags... " >&6; } @@ -20559,7 +9486,7 @@ $as_echo "#define HAVE_FREEIPMI_MONITORING 1" >>confdefs.h fi if test "${nut_have_freeipmi}" != "yes"; then - as_fn_error $? "FreeIPMI not found, required for IPMI support" "$LINENO" 5 + as_fn_error $? "\"GNU FreeIPMI not found, required for IPMI support\"" "$LINENO" 5 fi nut_with_ipmi="yes" else @@ -20567,271 +9494,23 @@ fi if test -z "${nut_have_libfreeipmi_seen}"; then nut_have_libfreeipmi_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI version via pkg-config" >&5 $as_echo_n "checking for FreeIPMI version via pkg-config... " >&6; } - FREEIPMI_VERSION="`$PKG_CONFIG --silence-errors --modversion libfreeipmi 2>/dev/null`" - if test "$?" != "0" -o -z "${FREEIPMI_VERSION}"; then - FREEIPMI_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 + FREEIPMI_VERSION="`pkg-config --silence-errors --modversion libfreeipmi 2>/dev/null`" + if test "$?" = "0" -a -n "${FREEIPMI_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" + else + FREEIPMI_VERSION="none" + CFLAGS="" + LIBS="-lfreeipmi -lipmimonitoring" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${FREEIPMI_VERSION} found" >&5 $as_echo "${FREEIPMI_VERSION} found" >&6; } -else - FREEIPMI_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check FreeIPMI settings via pkg-config" >&5 -$as_echo "$as_me: can not check FreeIPMI settings via pkg-config" >&6;} - - -fi - - if test x"$FREEIPMI_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags libfreeipmi libipmimonitoring 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs libfreeipmi libipmimonitoring 2>/dev/null`" - -else - CFLAGS="" - LIBS="-lfreeipmi -lipmimonitoring" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeIPMI cflags" >&5 $as_echo_n "checking for FreeIPMI cflags... " >&6; } @@ -21280,7 +9959,7 @@ fi if test "${nut_have_freeipmi}" != "yes"; then if test "${nut_with_ipmi}" = "yes"; then - as_fn_error $? "FreeIPMI not found, required for IPMI support" "$LINENO" 5 + as_fn_error $? "\"FreeIPMI not found, required for IPMI support\"" "$LINENO" 5 fi nut_with_ipmi="no" else @@ -21351,9 +10030,6 @@ if test "${nut_with_macosx_ups}" != no; then if test -d /System/Library/Frameworks/IOKit.framework/ ; then nut_with_macosx_ups="yes" else - if test "${nut_with_macosx_ups}" = yes; then - as_fn_error $? "macosx-ups was required but can not be fulfilled for this build: not MacOS" "$LINENO" 5 - fi nut_with_macosx_ups="no" fi fi @@ -21403,115 +10079,8 @@ fi if test "${nut_with_linux_i2c}" != no; then case ${target_os} in linux* ) - ac_fn_c_check_header_mongrel "$LINENO" "linux/i2c-dev.h" "ac_cv_header_linux_i2c_dev_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_i2c_dev_h" = xyes; then : - -$as_echo "#define HAVE_LINUX_I2C_DEV_H 1" >>confdefs.h - - -fi - - - ac_fn_c_check_header_mongrel "$LINENO" "i2c/smbus.h" "ac_cv_header_i2c_smbus_h" "$ac_includes_default" -if test "x$ac_cv_header_i2c_smbus_h" = xyes; then : - -$as_echo "#define HAVE_LINUX_SMBUS_H 1" >>confdefs.h - - -fi - - - ac_fn_c_check_decl "$LINENO" "i2c_smbus_access" "ac_cv_have_decl_i2c_smbus_access" "#include - #ifdef HAVE_LINUX_I2C_DEV_H + ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_word_data" "ac_cv_have_decl_i2c_smbus_read_word_data" "#include #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif - - -" -if test "x$ac_cv_have_decl_i2c_smbus_access" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_I2C_SMBUS_ACCESS $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 -else - nut_with_linux_i2c="no" -fi -fi -ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_byte_data" "ac_cv_have_decl_i2c_smbus_read_byte_data" "#include - #ifdef HAVE_LINUX_I2C_DEV_H - #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif - - -" -if test "x$ac_cv_have_decl_i2c_smbus_read_byte_data" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_I2C_SMBUS_READ_BYTE_DATA $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 -else - nut_with_linux_i2c="no" -fi -fi -ac_fn_c_check_decl "$LINENO" "i2c_smbus_write_byte_data" "ac_cv_have_decl_i2c_smbus_write_byte_data" "#include - #ifdef HAVE_LINUX_I2C_DEV_H - #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif - - -" -if test "x$ac_cv_have_decl_i2c_smbus_write_byte_data" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_I2C_SMBUS_WRITE_BYTE_DATA $ac_have_decl -_ACEOF -if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 -else - nut_with_linux_i2c="no" -fi -fi -ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_word_data" "ac_cv_have_decl_i2c_smbus_read_word_data" "#include - #ifdef HAVE_LINUX_I2C_DEV_H - #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif " @@ -21525,21 +10094,12 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_I2C_SMBUS_READ_WORD_DATA $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 + nut_with_linux_i2c="yes" else nut_with_linux_i2c="no" fi -fi ac_fn_c_check_decl "$LINENO" "i2c_smbus_write_word_data" "ac_cv_have_decl_i2c_smbus_write_word_data" "#include - #ifdef HAVE_LINUX_I2C_DEV_H #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif " @@ -21553,21 +10113,12 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_I2C_SMBUS_WRITE_WORD_DATA $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 + nut_with_linux_i2c="yes" else nut_with_linux_i2c="no" fi -fi ac_fn_c_check_decl "$LINENO" "i2c_smbus_read_block_data" "ac_cv_have_decl_i2c_smbus_read_block_data" "#include - #ifdef HAVE_LINUX_I2C_DEV_H #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif " @@ -21581,83 +10132,13 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_I2C_SMBUS_READ_BLOCK_DATA $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : - -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 -else - nut_with_linux_i2c="no" -fi -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing i2c_smbus_read_byte, i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_datai2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data" >&5 -$as_echo_n "checking for library containing i2c_smbus_read_byte, i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_datai2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data... " >&6; } -if ${ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char i2c_smbus_read_byte, i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_datai2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data (); -int -main () -{ -return i2c_smbus_read_byte, i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_datai2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data (); - ; - return 0; -} -_ACEOF -for ac_lib in '' i2c; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data+:} false; then : - break -fi -done -if ${ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data+:} false; then : - -else - ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data" >&5 -$as_echo "$ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data" >&6; } -ac_res=$ac_cv_search_i2c_smbus_read_byte__i2c_smbus_access__i2c_smbus_read_byte_data__i2c_smbus_write_byte_datai2c_smbus_write_byte_data__i2c_smbus_read_word_data__i2c_smbus_write_word_data__i2c_smbus_read_block_data -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" nut_with_linux_i2c="yes" -else - if test "${nut_with_linux_i2c}" = "yes"; then : - as_fn_error $? "i2c was required but can not be fulfilled for this build" "$LINENO" 5 else nut_with_linux_i2c="no" -fi - fi ;; * ) - if test "${nut_with_linux_i2c}" = yes; then - as_fn_error $? "i2c was required but can not be fulfilled for this build: not linux" "$LINENO" 5 - fi nut_with_linux_i2c="no" ;; esac @@ -21734,284 +10215,23 @@ if test "${nut_with_ssl}" != "no"; then if test -z "${nut_have_libnss_seen}"; then nut_have_libnss_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - REQUIRES_ORIG="${REQUIRES}" - SAVED_GCC="$GCC" - SAVED_CC="$CC" - if ( test "${GCC}" = "yes" ) - then - case "$CFLAGS$LDFLAGS" in - *-m32*) CC="$CC -m32" ;; - *-m64*) CC="$CC -m64" ;; - esac - fi - - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS version via pkg-config" >&5 $as_echo_n "checking for Mozilla NSS version via pkg-config... " >&6; } - NSS_VERSION="`$PKG_CONFIG --silence-errors --modversion nss 2>/dev/null`" - if test "$?" != "0" -o -z "${NSS_VERSION}"; then - NSS_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NSS_VERSION} found" >&5 + NSS_VERSION="`pkg-config --silence-errors --modversion nss 2>/dev/null`" + if test "$?" = "0" -a -n "${NSS_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags nss 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs nss 2>/dev/null`" + else + NSS_VERSION="none" + CFLAGS="" + LIBS="-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NSS_VERSION} found" >&5 $as_echo "${NSS_VERSION} found" >&6; } -else - NSS_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libnss settings via pkg-config" >&5 -$as_echo "$as_me: can not check libnss settings via pkg-config" >&6;} - - -fi - - if test x"$NSS_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags nss 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs nss 2>/dev/null`" - REQUIRES="nss" - -else - CFLAGS="" - LIBS="-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4" - REQUIRES="nss" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS cflags" >&5 $as_echo_n "checking for Mozilla NSS cflags... " >&6; } @@ -22052,7 +10272,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 $as_echo "${LIBS}" >&6; } - for ac_func in NSS_Init + for ac_func in NSS_Init do : ac_fn_c_check_func "$LINENO" "NSS_Init" "ac_cv_func_NSS_Init" if test "x$ac_cv_func_NSS_Init" = xyes; then : @@ -22093,292 +10313,37 @@ $as_echo "#define WITH_NSS 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" LIBSSL_LIBS="${LIBS}" - LIBSSL_REQUIRES="${REQUIRES}" fi CFLAGS="${CFLAGS_ORIG}" LIBS="${LIBS_ORIG}" - REQUIRES="${REQUIRES_ORIG}" - GCC="$SAVED_GCC" - CC="$SAVED_CC" fi if test "${nut_have_libnss}" != "yes"; then - as_fn_error $? "Mozilla NSS not found (required for SSL support)" "$LINENO" 5 + as_fn_error $? "\"Mozilla NSS not found, required for SSL support\"" "$LINENO" 5 fi elif test "${nut_with_openssl}" = "yes"; then if test -z "${nut_have_libopenssl_seen}"; then nut_have_libopenssl_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - REQUIRES_ORIG="${REQUIRES}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version via pkg-config" >&5 $as_echo_n "checking for OpenSSL version via pkg-config... " >&6; } - OPENSSL_VERSION="`$PKG_CONFIG --silence-errors --modversion openssl 2>/dev/null`" - if test "$?" != "0" -o -z "${OPENSSL_VERSION}"; then - OPENSSL_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 + OPENSSL_VERSION="`pkg-config --silence-errors --modversion openssl 2>/dev/null`" + if test "$?" = "0" -a -n "${OPENSSL_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags openssl 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs openssl 2>/dev/null`" + else + OPENSSL_VERSION="none" + CFLAGS="" + LIBS="-lssl -lcrypto" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 $as_echo "${OPENSSL_VERSION} found" >&6; } -else - OPENSSL_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check OpenSSL settings via pkg-config" >&5 -$as_echo "$as_me: can not check OpenSSL settings via pkg-config" >&6;} - - -fi - - if test x"$OPENSSL_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags openssl 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs openssl 2>/dev/null`" - REQUIRES="openssl" - -else - CFLAGS="" - LIBS="-lssl -lcrypto" - REQUIRES="openssl" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL cflags" >&5 $as_echo_n "checking for OpenSSL cflags... " >&6; } @@ -22434,12 +10399,12 @@ fi done - for ac_func in SSL_CTX_new + for ac_func in SSL_library_init do : - ac_fn_c_check_func "$LINENO" "SSL_CTX_new" "ac_cv_func_SSL_CTX_new" -if test "x$ac_cv_func_SSL_CTX_new" = xyes; then : + ac_fn_c_check_func "$LINENO" "SSL_library_init" "ac_cv_func_SSL_library_init" +if test "x$ac_cv_func_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SSL_CTX_NEW 1 +#define HAVE_SSL_LIBRARY_INIT 1 _ACEOF else @@ -22459,290 +10424,37 @@ $as_echo "#define WITH_OPENSSL 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" LIBSSL_LIBS="${LIBS}" - LIBSSL_REQUIRES="${REQUIRES}" fi CFLAGS="${CFLAGS_ORIG}" LIBS="${LIBS_ORIG}" - REQUIRES="${REQUIRES_ORIG}" fi if test "${nut_have_openssl}" != "yes"; then - as_fn_error $? "OpenSSL not found (required for SSL support)" "$LINENO" 5 + as_fn_error $? "\"OpenSSL not found, required for SSL support\"" "$LINENO" 5 fi else if test -z "${nut_have_libopenssl_seen}"; then nut_have_libopenssl_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - REQUIRES_ORIG="${REQUIRES}" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL version via pkg-config" >&5 $as_echo_n "checking for OpenSSL version via pkg-config... " >&6; } - OPENSSL_VERSION="`$PKG_CONFIG --silence-errors --modversion openssl 2>/dev/null`" - if test "$?" != "0" -o -z "${OPENSSL_VERSION}"; then - OPENSSL_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 + OPENSSL_VERSION="`pkg-config --silence-errors --modversion openssl 2>/dev/null`" + if test "$?" = "0" -a -n "${OPENSSL_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags openssl 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs openssl 2>/dev/null`" + else + OPENSSL_VERSION="none" + CFLAGS="" + LIBS="-lssl -lcrypto" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OPENSSL_VERSION} found" >&5 $as_echo "${OPENSSL_VERSION} found" >&6; } -else - OPENSSL_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check OpenSSL settings via pkg-config" >&5 -$as_echo "$as_me: can not check OpenSSL settings via pkg-config" >&6;} - - -fi - - if test x"$OPENSSL_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags openssl 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs openssl 2>/dev/null`" - REQUIRES="openssl" - -else - CFLAGS="" - LIBS="-lssl -lcrypto" - REQUIRES="openssl" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL cflags" >&5 $as_echo_n "checking for OpenSSL cflags... " >&6; } @@ -22798,12 +10510,12 @@ fi done - for ac_func in SSL_CTX_new + for ac_func in SSL_library_init do : - ac_fn_c_check_func "$LINENO" "SSL_CTX_new" "ac_cv_func_SSL_CTX_new" -if test "x$ac_cv_func_SSL_CTX_new" = xyes; then : + ac_fn_c_check_func "$LINENO" "SSL_library_init" "ac_cv_func_SSL_library_init" +if test "x$ac_cv_func_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_SSL_CTX_NEW 1 +#define HAVE_SSL_LIBRARY_INIT 1 _ACEOF else @@ -22823,12 +10535,10 @@ $as_echo "#define WITH_OPENSSL 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" LIBSSL_LIBS="${LIBS}" - LIBSSL_REQUIRES="${REQUIRES}" fi CFLAGS="${CFLAGS_ORIG}" LIBS="${LIBS_ORIG}" - REQUIRES="${REQUIRES_ORIG}" fi if test "${nut_have_openssl}" != "yes"; then @@ -22836,284 +10546,23 @@ fi if test -z "${nut_have_libnss_seen}"; then nut_have_libnss_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LIBS_ORIG="${LIBS}" - REQUIRES_ORIG="${REQUIRES}" - SAVED_GCC="$GCC" - SAVED_CC="$CC" - if ( test "${GCC}" = "yes" ) - then - case "$CFLAGS$LDFLAGS" in - *-m32*) CC="$CC -m32" ;; - *-m64*) CC="$CC -m64" ;; - esac - fi - - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS version via pkg-config" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS version via pkg-config" >&5 $as_echo_n "checking for Mozilla NSS version via pkg-config... " >&6; } - NSS_VERSION="`$PKG_CONFIG --silence-errors --modversion nss 2>/dev/null`" - if test "$?" != "0" -o -z "${NSS_VERSION}"; then - NSS_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NSS_VERSION} found" >&5 + NSS_VERSION="`pkg-config --silence-errors --modversion nss 2>/dev/null`" + if test "$?" = "0" -a -n "${NSS_VERSION}"; then + CFLAGS="`pkg-config --silence-errors --cflags nss 2>/dev/null`" + LIBS="`pkg-config --silence-errors --libs nss 2>/dev/null`" + else + NSS_VERSION="none" + CFLAGS="" + LIBS="-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${NSS_VERSION} found" >&5 $as_echo "${NSS_VERSION} found" >&6; } -else - NSS_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libnss settings via pkg-config" >&5 -$as_echo "$as_me: can not check libnss settings via pkg-config" >&6;} - - -fi - - if test x"$NSS_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags nss 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs nss 2>/dev/null`" - REQUIRES="nss" - -else - CFLAGS="" - LIBS="-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4" - REQUIRES="nss" - - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mozilla NSS cflags" >&5 $as_echo_n "checking for Mozilla NSS cflags... " >&6; } @@ -23154,7 +10603,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBS}" >&5 $as_echo "${LIBS}" >&6; } - for ac_func in NSS_Init + for ac_func in NSS_Init do : ac_fn_c_check_func "$LINENO" "NSS_Init" "ac_cv_func_NSS_Init" if test "x$ac_cv_func_NSS_Init" = xyes; then : @@ -23195,22 +10644,18 @@ $as_echo "#define WITH_NSS 1" >>confdefs.h LIBSSL_CFLAGS="${CFLAGS}" LIBSSL_LIBS="${LIBS}" - LIBSSL_REQUIRES="${REQUIRES}" fi CFLAGS="${CFLAGS_ORIG}" LIBS="${LIBS_ORIG}" - REQUIRES="${REQUIRES_ORIG}" - GCC="$SAVED_GCC" - CC="$SAVED_CC" fi if test "${nut_have_libnss}" != "yes"; then if test "${nut_with_ssl}" = "yes"; then - as_fn_error $? "Neither Mozilla NSS nor OpenSSL was found, but one is needed for the requested SSL support." "$LINENO" 5 + as_fn_error $? "\"Mozilla NSS and OpenSSL neither found, but are needed for the requested SSL support\"" "$LINENO" 5 else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Neither Mozilla NSS nor OpenSSL was found (required for SSL support)" >&5 -$as_echo "$as_me: WARNING: Neither Mozilla NSS nor OpenSSL was found (required for SSL support)" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Mozilla NSS and OpenSSL neither found, required for SSL support\"" >&5 +$as_echo "$as_me: WARNING: \"Mozilla NSS and OpenSSL neither found, required for SSL support\"" >&2;} fi nut_with_ssl="no" else @@ -23367,12 +10812,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing request_init" >&5 $as_echo_n "checking for library containing request_init... " >&6; } - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23427,12 +10866,6 @@ rm -f core conftest.err conftest.$ac_objext \ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - if test "${nut_have_libwrap}" = "yes"; then @@ -23448,7 +10881,7 @@ fi fi if test "${nut_with_wrap}" = "yes" -a "${nut_have_libwrap}" != "yes"; then - as_fn_error $? "libwrap not found" "$LINENO" 5 + as_fn_error $? "\"libwrap not found\"" "$LINENO" 5 fi if test "${nut_with_wrap}" != "no"; then @@ -23636,7 +11069,7 @@ fi fi if test "${nut_with_libltdl}" = "yes" -a "${nut_have_libltdl}" != "yes"; then - as_fn_error $? "libltdl not found" "$LINENO" 5 + as_fn_error $? "\"libltdl not found\"" "$LINENO" 5 fi if test "${nut_with_libltdl}" != "no"; then @@ -23702,369 +11135,38 @@ if test "${nut_with_cgi}" != "no"; then if test -z "${nut_have_libgd_seen}"; then nut_have_libgd_seen=yes -if test -z "${nut_have_pkg_config_seen}"; then : - - nut_have_pkg_config_seen=yes - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG was already detected by autoconf" >&5 -$as_echo_n "checking whether usable PKG_CONFIG was already detected by autoconf... " >&6; } - if test -n "${PKG_CONFIG-}" && test x"${PKG_CONFIG-}" != x"false" && $PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${PKG_CONFIG}" >&5 -$as_echo "yes: ${PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - - if test x"${PKG_CONFIG-}" = x"false"; then : - have_PKG_CONFIG=yes - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_dummy_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $dummy_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_dummy_PKG_CONFIG="$dummy_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_dummy_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -dummy_PKG_CONFIG=$ac_cv_path_dummy_PKG_CONFIG -if test -n "$dummy_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dummy_PKG_CONFIG" >&5 -$as_echo "$dummy_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - -# Check whether --with-pkg-config was given. -if test "${with_pkg_config+set}" = set; then : - withval=$with_pkg_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-pkg-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - dummy_PKG_CONFIG="${withval}" - ;; - esac - -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether usable PKG_CONFIG is present in PATH or was set by caller" >&5 -$as_echo_n "checking whether usable PKG_CONFIG is present in PATH or was set by caller... " >&6; } - if test x"$dummy_PKG_CONFIG" = xno || test -z "$dummy_PKG_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - -else - if $dummy_PKG_CONFIG --help 2>&1 | grep -E '(--cflags|--libs)' >/dev/null; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: ${dummy_PKG_CONFIG}" >&5 -$as_echo "yes: ${dummy_PKG_CONFIG}" >&6; } - have_PKG_CONFIG=yes - PKG_CONFIG="$dummy_PKG_CONFIG" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG=false - have_PKG_CONFIG=no - - -fi - -fi - -fi - - have_PKG_CONFIG_MACROS=no - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config (${PKG_CONFIG})" >&6;} - dummy_RES=0 - - - if test "${dummy_RES}" = 0; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for autoconf macro support of pkg-config module checker" >&5 -$as_echo "$as_me: checking for autoconf macro support of pkg-config module checker" >&6;} - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config" >&5 -$as_echo_n "checking for pkg-config... " >&6; } - -if test -n "$dummy_PKG_CONFIG_CFLAGS"; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS="$dummy_PKG_CONFIG_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_CFLAGS=`$PKG_CONFIG --cflags "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$dummy_PKG_CONFIG_LIBS"; then - pkg_cv_dummy_PKG_CONFIG_LIBS="$dummy_PKG_CONFIG_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pkg-config\""; } >&5 - ($PKG_CONFIG --exists --print-errors "pkg-config") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_dummy_PKG_CONFIG_LIBS=`$PKG_CONFIG --libs "pkg-config" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pkg-config" 2>&1` - else - dummy_PKG_CONFIG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pkg-config" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$dummy_PKG_CONFIG_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (pkg-config) were not met: - -$dummy_PKG_CONFIG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables dummy_PKG_CONFIG_CFLAGS -and dummy_PKG_CONFIG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - dummy_PKG_CONFIG_CFLAGS=$pkg_cv_dummy_PKG_CONFIG_CFLAGS - dummy_PKG_CONFIG_LIBS=$pkg_cv_dummy_PKG_CONFIG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_PKG_CONFIG_MACROS=yes -fi - - -fi - -fi - - if test x"$have_PKG_CONFIG" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&5 -$as_echo "$as_me: WARNING: pkg-config program is needed to look for further dependencies (will be skipped)" >&2;} - PKG_CONFIG="false" - -else - if test x"$have_PKG_CONFIG_MACROS" = xno; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&5 -$as_echo "$as_me: WARNING: pkg-config macros are needed to look for further dependencies, but in some cases pkg-config program can be used directly" >&2;} - -fi - -fi - - -fi - CFLAGS_ORIG="${CFLAGS}" LDFLAGS_ORIG="${LDFLAGS}" LIBS_ORIG="${LIBS}" - CFLAGS="" - LDFLAGS="" - LIBS="" - if test x"$have_PKG_CONFIG" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd version via pkg-config" >&5 -$as_echo_n "checking for gd version via pkg-config... " >&6; } - GD_VERSION="`$PKG_CONFIG --silence-errors --modversion gdlib 2>/dev/null`" - if test "$?" != "0" -o -z "${GD_VERSION}"; then - GD_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION} found" >&5 + CFLAGS="" + LDFLAGS="-L/usr/X11R6/lib" + LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd version via gdlib-config" >&5 +$as_echo_n "checking for gd version via gdlib-config... " >&6; } + GD_VERSION=`gdlib-config --version 2>/dev/null` + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION} found" >&5 $as_echo "${GD_VERSION} found" >&6; } -else - GD_VERSION="none" - { $as_echo "$as_me:${as_lineno-$LINENO}: can not check libgd settings via pkg-config" >&5 -$as_echo "$as_me: can not check libgd settings via pkg-config" >&6;} - - -fi - - if test x"$GD_VERSION" != xnone; then : - CFLAGS="`$PKG_CONFIG --silence-errors --cflags gdlib 2>/dev/null`" - LIBS="`$PKG_CONFIG --silence-errors --libs gdlib 2>/dev/null`" - -else - CFLAGS="" - LDFLAGS="-L/usr/X11R6/lib" - LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" - - for ac_prog in gdlib-config -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GDLIB_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $GDLIB_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_GDLIB_CONFIG="$GDLIB_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GDLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -GDLIB_CONFIG=$ac_cv_path_GDLIB_CONFIG -if test -n "$GDLIB_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GDLIB_CONFIG" >&5 -$as_echo "$GDLIB_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$GDLIB_CONFIG" && break -done -test -n "$GDLIB_CONFIG" || GDLIB_CONFIG="none" - - -# Check whether --with-gdlib-config was given. -if test "${with_gdlib_config+set}" = set; then : - withval=$with_gdlib_config; - case "${withval}" in - "") ;; - yes|no) - as_fn_error $? "invalid option --with(out)-gdlib-config - see docs/configure.txt" "$LINENO" 5 - ;; - *) - GDLIB_CONFIG="${withval}" - ;; - esac - -fi - - - if test x"$GDLIB_CONFIG" != xnone; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd version via ${GDLIB_CONFIG}" >&5 -$as_echo_n "checking for gd version via ${GDLIB_CONFIG}... " >&6; } - GD_VERSION="`${GDLIB_CONFIG} --version 2>/dev/null`" - if test "$?" != "0" -o -z "${GD_VERSION}"; then - GD_VERSION="none" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${GD_VERSION} found" >&5 -$as_echo "${GD_VERSION} found" >&6; } - -else - GD_VERSION="none" - -fi - - case "${GD_VERSION}" in - none) - ;; - 2.0.5 | 2.0.6 | 2.0.7) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gd ${GD_VERSION} detected, unable to use ${GDLIB_CONFIG} script" >&5 -$as_echo "$as_me: WARNING: gd ${GD_VERSION} detected, unable to use ${GDLIB_CONFIG} script" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs" >&5 + case "${GD_VERSION}" in + none) + ;; + 2.0.5 | 2.0.6 | 2.0.7) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config script" >&5 +$as_echo "$as_me: WARNING: gd ${GD_VERSION} detected, unable to use gdlib-config script" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs" >&5 $as_echo "$as_me: WARNING: If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs" >&2;} - ;; - *) - CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`" - LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`" - LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`" - ;; - esac - - -fi + ;; + *) + CFLAGS="`gdlib-config --includes 2>/dev/null`" + LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" + LIBS="`gdlib-config --libs 2>/dev/null`" + ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gd include flags" >&5 $as_echo_n "checking for gd include flags... " >&6; } @@ -24178,86 +11280,7 @@ if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for more gd library flags" >&5 -$as_echo_n "checking for more gd library flags... " >&6; } - if test -n "${with_gd_libs}" || test x"$have_PKG_CONFIG" != xyes; then : nut_have_libgd=no -else - - _LIBS_PRIVATE="`$PKG_CONFIG --silence-errors --libs gdlib --static 2>/dev/null`" - if test -z "${_LIBS_PRIVATE}"; then : - nut_have_libgd=no -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking with gdlib.pc Libs.private" >&5 -$as_echo_n "checking with gdlib.pc Libs.private... " >&6; } - LDFLAGS="$LDFLAGS $_LIBS_PRIVATE" - unset ac_cv_search_gdImagePng - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gdImagePng" >&5 -$as_echo_n "checking for library containing gdImagePng... " >&6; } -if ${ac_cv_search_gdImagePng+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gdImagePng (); -int -main () -{ -return gdImagePng (); - ; - return 0; -} -_ACEOF -for ac_lib in '' gd; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_gdImagePng=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_gdImagePng+:} false; then : - break -fi -done -if ${ac_cv_search_gdImagePng+:} false; then : - -else - ac_cv_search_gdImagePng=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gdImagePng" >&5 -$as_echo "$ac_cv_search_gdImagePng" >&6; } -ac_res=$ac_cv_search_gdImagePng -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - nut_have_libgd=no -fi - - -fi - unset _LIBS_PRIVATE - -fi - fi @@ -24318,200 +11341,10 @@ _ACEOF - # Check whether --enable-cppcheck was given. -if test "${enable_cppcheck+set}" = set; then : - enableval=$enable_cppcheck; nut_enable_cppcheck="${enableval}" -else - nut_enable_cppcheck="no" - -fi - - - -if test -z "${nut_have_cppcheck_seen}"; then - nut_have_cppcheck_seen=yes - CPPCHECK_MIN_VERSION="1.0" - - for ac_prog in cppcheck -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CPPCHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CPPCHECK in - [\\/]* | ?:[\\/]*) - ac_cv_path_CPPCHECK="$CPPCHECK" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CPPCHECK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -CPPCHECK=$ac_cv_path_CPPCHECK -if test -n "$CPPCHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPPCHECK" >&5 -$as_echo "$CPPCHECK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CPPCHECK" && break -done - - if test -n "${CPPCHECK}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cppcheck version" >&5 -$as_echo_n "checking for cppcheck version... " >&6; } - CPPCHECK_VERSION="`${CPPCHECK} --version 2>/dev/null`" - CPPCHECK_VERSION="${CPPCHECK_VERSION##* }" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${CPPCHECK_VERSION} found" >&5 -$as_echo "${CPPCHECK_VERSION} found" >&6; } - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if cppcheck version is okay (minimum required ${CPPCHECK_MIN_VERSION})" >&5 -$as_echo_n "checking if cppcheck version is okay (minimum required ${CPPCHECK_MIN_VERSION})... " >&6; } - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "${CPPCHECK_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "${CPPCHECK_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - nut_have_cppcheck="yes" - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - nut_have_cppcheck="no" - - fi - - - if test "${nut_have_cppcheck}" = "yes"; then - HAVE_CPPCHECK_TRUE= - HAVE_CPPCHECK_FALSE='#' -else - HAVE_CPPCHECK_TRUE='#' - HAVE_CPPCHECK_FALSE= -fi - -fi - - -case "${nut_enable_cppcheck}" in - yes) if test "${nut_have_cppcheck}" = "no" ; then - as_fn_error $? "Requested to --enable-cppcheck but did not find a good one" "$LINENO" 5 - fi - WITH_CPPCHECK=yes - ;; - no) WITH_CPPCHECK=no ;; - auto) if test "${nut_have_cppcheck}" = "yes" ; then - WITH_CPPCHECK=no - else - WITH_CPPCHECK=no - fi - ;; -esac - - if test "${WITH_CPPCHECK}" = "yes"; then - WITH_CPPCHECK_TRUE= - WITH_CPPCHECK_FALSE='#' -else - WITH_CPPCHECK_TRUE='#' - WITH_CPPCHECK_FALSE= -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to run NIT among default make check target" >&5 -$as_echo_n "checking whether to run NIT among default make check target... " >&6; } -nut_enable_check_NIT="no" -# Check whether --enable-check-NIT was given. -if test "${enable_check_NIT+set}" = set; then : - enableval=$enable_check_NIT; - case "${enableval}" in - no) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - nut_enable_check_NIT="yes" - ;; - esac - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - - if test "${nut_enable_check_NIT}" = "yes"; then - WITH_CHECK_NIT_TRUE= - WITH_CHECK_NIT_FALSE='#' -else - WITH_CHECK_NIT_TRUE='#' - WITH_CHECK_NIT_FALSE= -fi - - if test -z "${nut_have_asciidoc_seen}"; then nut_have_asciidoc_seen=yes - # Note: this is for both asciidoc and a2x at this time - ASCIIDOC_MIN_VERSION="8.6.3" - # Note: this is checked in the configure script if PDF is of interest at all - DBLATEX_MIN_VERSION="0.2.5" for ac_prog in asciidoc do @@ -24566,14 +11399,6 @@ $as_echo_n "checking for asciiDoc version... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ASCIIDOC_VERSION} found" >&5 $as_echo "${ASCIIDOC_VERSION} found" >&6; } fi - if test -n "${ASCIIDOC}"; then - MANUALUPDATE_TRUE= - MANUALUPDATE_FALSE='#' -else - MANUALUPDATE_TRUE='#' - MANUALUPDATE_FALSE= -fi - for ac_prog in a2x do @@ -24787,10 +11612,6 @@ done $as_echo_n "checking for xmllint version... " >&6; } XMLLINT_VERSION="`${XMLLINT} --version 2>/dev/null`" XMLLINT_VERSION="${XMLLINT_VERSION##* }" - if test -z "${XMLLINT_VERSION}" ; then - XMLLINT_VERSION="`${XMLLINT} --version 2>&1 | grep version`" - XMLLINT_VERSION="${XMLLINT_VERSION##* }" - fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${XMLLINT_VERSION} found" >&5 $as_echo "${XMLLINT_VERSION} found" >&6; } fi @@ -24840,71 +11661,27 @@ fi test -n "$SOURCE_HIGHLIGHT" && break done - if test -n "$SOURCE_HIGHLIGHT"; then - HAVE_SOURCE_HIGHLIGHT_TRUE= - HAVE_SOURCE_HIGHLIGHT_FALSE='#' -else - HAVE_SOURCE_HIGHLIGHT_TRUE='#' - HAVE_SOURCE_HIGHLIGHT_FALSE= + fi - for ac_prog in aspell -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ASPELL+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ASPELL in - [\\/]* | ?:[\\/]*) - ac_cv_path_ASPELL="$ASPELL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ASPELL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; +case "${nut_with_doc}" in + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" + ;; + no) + nut_doc_build_list="" + ;; + *) + nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" + ;; esac -fi -ASPELL=$ac_cv_path_ASPELL -if test -n "$ASPELL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASPELL" >&5 -$as_echo "$ASPELL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - test -n "$ASPELL" && break -done - - if test -n "$ASPELL"; then - HAVE_ASPELL_TRUE= - HAVE_ASPELL_FALSE='#' -else - HAVE_ASPELL_TRUE='#' - HAVE_ASPELL_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build manpages (minimum required ${ASCIIDOC_MIN_VERSION})" >&5 -$as_echo_n "checking if asciidoc version can build manpages (minimum required ${ASCIIDOC_MIN_VERSION})... " >&6; } +for nut_doc_build_target in ${nut_doc_build_list}; do + case "${nut_doc_build_target}" in + html-single) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -24924,7 +11701,7 @@ $as_echo_n "checking if asciidoc version can build manpages (minimum required ${ -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "${ASCIIDOC_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -24938,20 +11715,22 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - nut_have_asciidoc="yes" + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - nut_have_asciidoc="no" + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" fi + ;; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build manpages (minimum required ${ASCIIDOC_MIN_VERSION})" >&5 -$as_echo_n "checking if a2x version can build manpages (minimum required ${ASCIIDOC_MIN_VERSION})... " >&6; } + html-chunked) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)... " >&6; } @@ -24971,7 +11750,7 @@ $as_echo_n "checking if a2x version can build manpages (minimum required ${ASCII -e 's/[^0-9]//g'` - ax_compare_version_B=`echo "${ASCIIDOC_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ @@ -24985,65 +11764,213 @@ x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version if test "$ax_compare_version" = "true" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - nut_have_asciidoc="no" + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + + pdf) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)" >&5 +$as_echo_n "checking if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${DBLATEX_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "0.2.5" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + + fi + + ;; + esac +done + +case "${nut_with_doc}" in +auto) + if test -n "${DOC_BUILD_LIST}"; then + nut_with_doc="yes" + else + nut_with_doc="no" + fi + ;; +no) + ;; +*) + if test -z "${DOC_NOBUILD_LIST}"; then + nut_with_doc="yes" + else + as_fn_error $? "\"Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)\"" "$LINENO" 5 + fi + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build manpages (minimum required 8.6.3)" >&5 +$as_echo_n "checking if asciidoc version can build manpages (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + nut_have_asciidoc="yes" + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if xsltproc is present (mandatory for man page regeneration)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build manpages (minimum required 8.6.3)" >&5 +$as_echo_n "checking if a2x version can build manpages (minimum required 8.6.3)... " >&6; } + + + + # Used to indicate true or false condition + ax_compare_version=false + + # Convert the two version strings to be compared into a format that + # allows a simple string comparison. The end result is that a version + # string of the form 1.12.5-r617 will be converted to the form + # 0001001200050617. In other words, each number is zero padded to four + # digits, and non digits are removed. + + ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version_B=`echo "8.6.3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ + -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ + -e 's/[^0-9]//g'` + + + ax_compare_version=`echo "x$ax_compare_version_A +x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` + + + + if test "$ax_compare_version" = "true" ; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" + + fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xsltproc is present (mandatory for man page regeneration)" >&5 $as_echo_n "checking if xsltproc is present (mandatory for man page regeneration)... " >&6; } - if test -n "${XSLTPROC}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +if test -n "${XSLTPROC}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - nut_have_asciidoc="no" - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if xmllint is present (mandatory for man page regeneration)" >&5 -$as_echo_n "checking if xmllint is present (mandatory for man page regeneration)... " >&6; } - if test -n "${XMLLINT}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - nut_have_asciidoc="no" - fi - - if test "${nut_have_asciidoc}" = "yes"; then - HAVE_ASCIIDOC_TRUE= - HAVE_ASCIIDOC_FALSE='#' else - HAVE_ASCIIDOC_TRUE='#' - HAVE_ASCIIDOC_FALSE= -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have all the tools mandatory for man page regeneration" >&5 -$as_echo_n "checking if we have all the tools mandatory for man page regeneration... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_have_asciidoc}" >&5 -$as_echo "${nut_have_asciidoc}" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if source-highlight is present (preferable for documentation generation)" >&5 -$as_echo_n "checking if source-highlight is present (preferable for documentation generation)... " >&6; } - if test -n "${SOURCE_HIGHLIGHT}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi - + nut_have_asciidoc="no" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if xmllint is present (mandatory for man page regeneration)" >&5 +$as_echo_n "checking if xmllint is present (mandatory for man page regeneration)... " >&6; } +if test -n "${XMLLINT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + nut_have_asciidoc="no" +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if source-highlight is present (preferable for documentation generation)" >&5 +$as_echo_n "checking if source-highlight is present (preferable for documentation generation)... " >&6; } +if test -n "${SOURCE_HIGHLIGHT}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build and install documentation" >&5 @@ -25077,429 +12004,28 @@ _ACEOF fi -DOC_INSTALL_DISTED_MANS=no - -case "${nut_with_doc}" in - yes|all|all=yes) - nut_doc_build_list="man html-single html-chunked pdf" - ;; - auto|all=auto) - nut_doc_build_list="man=auto html-single=auto html-chunked=auto pdf=auto" - ;; - skip|all=skip) - nut_doc_build_list="man=skip html-single=skip html-chunked=skip pdf=skip" - ;; - no|all=no) - nut_doc_build_list="" - ;; - "") - nut_doc_build_list="" - { $as_echo "$as_me:${as_lineno-$LINENO}: Got explicit empty list of document formats to build; nothing will be generated" >&5 -$as_echo "$as_me: Got explicit empty list of document formats to build; nothing will be generated" >&6;} - ;; - *) - nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: Got explicit list of document formats to build or not: ${nut_doc_build_list}; formats not listed will be silently skipped" >&5 -$as_echo "$as_me: Got explicit list of document formats to build or not: ${nut_doc_build_list}; formats not listed will be silently skipped" >&6;} - ;; -esac - -if test -z "${abs_srcdir}" ; then - case "${srcdir}" in - /*) abs_srcdir="${srcdir}";; - "") as_fn_error $? "Can not detect 'srcdir'" "$LINENO" 5 ;; - *) abs_srcdir="$(cd "${srcdir}" && pwd)" || as_fn_error $? "Can not detect 'srcdir'" "$LINENO" 5 ;; - esac + if test "${nut_have_asciidoc}" = "yes"; then + HAVE_ASCIIDOC_TRUE= + HAVE_ASCIIDOC_FALSE='#' +else + HAVE_ASCIIDOC_TRUE='#' + HAVE_ASCIIDOC_FALSE= fi -DOCTESTDIR="$(mktemp -d configure-test.docbuild.$$.XXXXXXX)" && \ -DOCTESTDIR="$(cd "$DOCTESTDIR" && pwd)" - -for nut_doc_build_target in $nut_doc_build_list; do - case "${nut_doc_build_target}" in - *=*=*) rm -rf "${DOCTESTDIR}" - as_fn_error $? "Invalid documentation format option: ${nut_doc_build_target}" "$LINENO" 5 ;; - *=*) - nut_doc_build_target_base="`echo "${nut_doc_build_target}" | sed 's,=.*$,,'`" - nut_doc_build_target_flag="`echo "${nut_doc_build_target}" | sed 's,^.*=,,'`" - ;; - *) - nut_doc_build_target_base="${nut_doc_build_target}" - nut_doc_build_target_flag="yes" - ;; - esac - case "${nut_doc_build_target_flag}" in - yes|no|auto|skip) ;; - "") nut_doc_build_target_flag="yes" ;; - *) rm -rf "${DOCTESTDIR}" - as_fn_error $? "Invalid documentation format option: ${nut_doc_build_target}" "$LINENO" 5 ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking desire and ability to build ${nut_doc_build_target_base} documentation" >&5 -$as_echo_n "checking desire and ability to build ${nut_doc_build_target_base} documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_doc_build_target_flag}" >&5 -$as_echo "${nut_doc_build_target_flag}" >&6; } - - case "${nut_doc_build_target}" in - *=no|*=skip) - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - ;; - html-single*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asciidoc version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})" >&5 -$as_echo_n "checking if asciidoc version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})... " >&6; } - can_build_doc_html_single=no - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "${ASCIIDOC_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "${ASCIIDOC_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - - ( cd "$DOCTESTDIR" && ${A2X} --attribute=xhtml11_format --format=xhtml --xsl-file="${abs_srcdir}"/docs/xhtml.xsl --destination-dir=. "${abs_srcdir}"/docs/asciidoc.txt && test -s asciidoc.html ) && can_build_doc_html_single=yes - rm -f "$DOCTESTDIR"/asciidoc*.htm* - - fi - - if test "${can_build_doc_html_single}" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&2;} - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi - ;; - - html-chunked*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a2x version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})" >&5 -$as_echo_n "checking if a2x version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})... " >&6; } - can_build_doc_html_chunked=no - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "${A2X_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "${ASCIIDOC_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - - ( cd "$DOCTESTDIR" && ${A2X} --attribute=chunked_format --format=chunked --xsl-file="${abs_srcdir}"/docs/chunked.xsl --destination-dir=. "${abs_srcdir}"/docs/FAQ.txt && test -s FAQ.chunked/index.html ) && can_build_doc_html_chunked=yes - rm -rf "${DOCTESTDIR}"/FAQ*.chunked* - - fi - - if test "${can_build_doc_html_chunked}" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&2;} - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi - ;; - - pdf*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dblatex version can build ${nut_doc_build_target_base} (minimum required ${DBLATEX_MIN_VERSION})" >&5 -$as_echo_n "checking if dblatex version can build ${nut_doc_build_target_base} (minimum required ${DBLATEX_MIN_VERSION})... " >&6; } - can_build_doc_pdf=no - - - - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - - ax_compare_version_A=`echo "${DBLATEX_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version_B=`echo "${DBLATEX_MIN_VERSION}" | sed -e 's/\([0-9]*\)/Z\1Z/g' \ - -e 's/Z\([0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \ - -e 's/[^0-9]//g'` - - - ax_compare_version=`echo "x$ax_compare_version_A -x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"` - - - - if test "$ax_compare_version" = "true" ; then - - ( cd "$DOCTESTDIR" && ${A2X} --format=pdf --destination-dir=. "${abs_srcdir}"/docs/asciidoc.txt && test -s asciidoc.pdf ) && can_build_doc_pdf=yes - rm -f "${DOCTESTDIR}"/asciidoc.pdf - - fi - - if test "${can_build_doc_pdf}" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&2;} - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi - ;; - - man*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can build ${nut_doc_build_target_base}" >&5 -$as_echo_n "checking if we can build ${nut_doc_build_target_base}... " >&6; } - can_build_doc_man=no - if test "${nut_have_asciidoc}" = yes ; then - ( cd "$DOCTESTDIR" && ${A2X} --format manpage --destination-dir=. --xsltproc-opts="--nonet" "${abs_srcdir}"/docs/man/snmp-ups.txt && test -s snmp-ups.8 ) && can_build_doc_man=yes - rm -f "${DOCTESTDIR}"/snmp-ups.8 - fi - if test "${can_build_doc_man}" = yes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation which you requested" >&2;} - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - if test "${nut_doc_build_target_flag}" = "auto" ; then - if test -s "${abs_srcdir}"/docs/man/snmp-ups.8 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation, but can install pre-built distributed copies" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation, but can install pre-built distributed copies" >&2;} - DOC_INSTALL_DISTED_MANS="yes" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to build ${nut_doc_build_target_base} documentation, and unable to install pre-built distributed copies because they are absent" >&5 -$as_echo "$as_me: WARNING: Unable to build ${nut_doc_build_target_base} documentation, and unable to install pre-built distributed copies because they are absent" >&2;} - fi - fi # Other variants include "no", "skip"... - fi - fi - ;; - - *) rm -rf "${DOCTESTDIR}" - as_fn_error $? "--with-doc option refers to unknown documentation format: $nut_doc_build_target" "$LINENO" 5 ;; - - esac -done -rm -rf "${DOCTESTDIR}" - -case "${nut_with_doc}" in -auto) - if test -n "${DOC_BUILD_LIST}"; then - nut_with_doc="yes" - else - nut_with_doc="no" - fi - ;; -no) - ;; -*) - if test -n "${DOC_CANNOTBUILD_LIST}"; then - as_fn_error $? "Unable to build${DOC_CANNOTBUILD_LIST} documentation (check for 'no' results above)" "$LINENO" 5 - fi - - if test -n "${DOC_SKIPBUILD_LIST}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Skipping build of${DOC_SKIPBUILD_LIST} documentation (check for 'skip' results above)" >&5 -$as_echo "$as_me: Skipping build of${DOC_SKIPBUILD_LIST} documentation (check for 'skip' results above)" >&6;} - fi - - if test -n "${DOC_BUILD_LIST}"; then - nut_with_doc="yes" - else - nut_with_doc="no" - fi - ;; -esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build specific documentation format(s)" >&5 -$as_echo_n "checking whether to build specific documentation format(s)... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_doc} ${DOC_BUILD_LIST}" >&5 -$as_echo "${nut_with_doc} ${DOC_BUILD_LIST}" >&6; } - if test -z "${nut_report_feature_flag}"; then +if test "${nut_with_doc}" = "yes"; then + if test -z "${nut_report_feature_flag}"; then nut_report_feature_flag="1" ac_clean_files="${ac_clean_files} conf_nut_report_feature" echo > conf_nut_report_feature echo "Configuration summary:" >> conf_nut_report_feature echo "======================" >> conf_nut_report_feature fi - echo "build specific documentation format(s): ${nut_with_doc} ${DOC_BUILD_LIST}" >> conf_nut_report_feature + echo "only build specific documentation format: ${DOC_BUILD_LIST}" >> conf_nut_report_feature - - if test "${nut_with_doc}" = "yes"; then - WITH_DOCS_TRUE= - WITH_DOCS_FALSE='#' -else - WITH_DOCS_TRUE='#' - WITH_DOCS_FALSE= -fi - - if test "${nut_with_doc}" = "yes"; then - -cat >>confdefs.h <<_ACEOF -#define WITH_DOCS 1 -_ACEOF - - fi - - -# To cater for less portable make's, precalculate the target list -# for "make check" in "docs/" here... -DOC_CHECK_LIST="" -if test "${nut_with_doc}" = yes ; then - for V in $DOC_BUILD_LIST ; do - DOC_CHECK_LIST="$DOC_CHECK_LIST check-$V" - done -fi - -WITH_MANS=no -SKIP_MANS=no -if echo "${DOC_BUILD_LIST}" | grep -w "man" >/dev/null || test "${DOC_INSTALL_DISTED_MANS}" = "yes" ; then - WITH_MANS=yes -fi -if echo "${DOC_SKIPBUILD_LIST}" | grep -w "man" >/dev/null ; then - SKIP_MANS=yes -fi - if test "${WITH_MANS}" = "yes"; then - WITH_MANS_TRUE= - WITH_MANS_FALSE='#' -else - WITH_MANS_TRUE='#' - WITH_MANS_FALSE= -fi - - if test "${SKIP_MANS}" = "yes"; then - SKIP_MANS_TRUE= - SKIP_MANS_FALSE='#' -else - SKIP_MANS_TRUE='#' - SKIP_MANS_FALSE= -fi - - if test "${DOC_INSTALL_DISTED_MANS}" = "yes"; then - DOC_INSTALL_DISTED_MANS_TRUE= - DOC_INSTALL_DISTED_MANS_FALSE='#' -else - DOC_INSTALL_DISTED_MANS_TRUE='#' - DOC_INSTALL_DISTED_MANS_FALSE= fi - -if ( test "${GCC}" = "yes" ) -then - - CFLAGS_SAVED_NOPEDANTIC="$CFLAGS" - case "${CFLAGS}" in #( - *"-pedantic"*) : - CFLAGS="${CFLAGS} -Wno-pedantic" ;; #( - *) : - ;; -esac - case "${CFLAGS}" in #( - *"-Werror"*) : - CFLAGS="${CFLAGS} -Wno-error" ;; #( - *) : - ;; -esac - case "${CFLAGS}" in #( - *"-flto"*) : - CFLAGS="${CFLAGS} -ffat-lto-objects" ;; #( - *) : - ;; -esac -fi - - -SAVED_GCC="$GCC" -SAVED_CC="$CC" -if ( test "${GCC}" = "yes" ) -then - case "$CFLAGS$LDFLAGS" in - *-m32*) CC="$CC -m32" ;; - *-m64*) CC="$CC -m64" ;; - esac -fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -25508,8 +12034,8 @@ esac -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.2' +macro_revision='1.3337' @@ -25523,7 +12049,7 @@ macro_revision='2.4.6' -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. @@ -25572,7 +12098,7 @@ func_echo_all () $ECHO "" } -case $ECHO in +case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -25765,19 +12291,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -25791,7 +12317,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD=$ac_prog + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -25802,7 +12328,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -25813,32 +12339,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog + lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -25881,38 +12407,33 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM=$NM + lt_cv_path_NM="$NM" else - lt_nm_to_check=${ac_tool_prefix}nm + lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty - case $build_os in - mingw*) lt_bad_file=conftest.nm/nofile ;; - *) lt_bad_file=/dev/null ;; - esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in - *$lt_bad_file* | *'Invalid file or object type'*) + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break 2 + break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break 2 + break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -25923,15 +12444,15 @@ else esac fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -26037,9 +12558,9 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" + DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: @@ -26047,8 +12568,8 @@ fi esac fi - if test : != "$DUMPBIN"; then - NM=$DUMPBIN + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm @@ -26081,6 +12602,17 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } +fi + # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } @@ -26088,7 +12620,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 - teststring=ABCD + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -26128,7 +12660,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -26179,22 +12711,22 @@ else *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do + for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough + test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -26212,7 +12744,7 @@ else fi -if test -n "$lt_cv_sys_max_cmd_len"; then +if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -26230,6 +12762,30 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -26352,13 +12908,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then + if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -26486,13 +13042,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. +# `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -26519,7 +13075,8 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -26615,8 +13172,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -26669,9 +13226,6 @@ sysv4 | sysv4.3*) tpf*) lt_cv_deplibs_check_method=pass_all ;; -os2*) - lt_cv_deplibs_check_method=pass_all - ;; esac fi @@ -26829,8 +13383,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -26842,7 +13396,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac @@ -26959,7 +13513,7 @@ esac fi : ${AR=ar} -: ${AR_FLAGS=cr} +: ${AR_FLAGS=cru} @@ -26996,7 +13550,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -eq "$ac_status"; then + if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -27004,7 +13558,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -ne "$ac_status"; then + if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi @@ -27017,7 +13571,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test no = "$lt_cv_ar_at_file"; then +if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -27234,7 +13788,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - bitrig* | openbsd*) + openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -27324,7 +13878,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; @@ -27357,44 +13911,14 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -27412,24 +13936,21 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -27460,8 +13981,11 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 - if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -27474,11 +13998,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -27504,7 +14028,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -27524,13 +14048,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext + LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -27551,7 +14075,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then + if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= @@ -27593,16 +14117,6 @@ fi - - - - - - - - - - @@ -27626,9 +14140,9 @@ fi lt_sysroot= -case $with_sysroot in #( +case ${with_sysroot} in #( yes) - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -27638,8 +14152,8 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -27651,99 +14165,18 @@ $as_echo "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -: ${lt_DD:=$DD} -if test -z "$lt_DD"; then - ac_path_lt_DD_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_lt_DD" || continue -if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: -fi - $ac_path_lt_DD_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_lt_DD"; then - : - fi -else - ac_cv_path_lt_DD=$lt_DD -fi - -rm -f conftest.i conftest2.i conftest.out -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else - printf 0123456789abcdef0123456789abcdef >conftest.i -cat conftest.i conftest.i >conftest2.i -lt_cv_truncate_bin= -if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then - cmp -s conftest.i conftest.out \ - && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" -fi -rm -f conftest.i conftest2.i conftest.out -test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } - - - - - - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test no = "$enable_libtool_lock" || enable_libtool_lock=yes +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -27752,25 +14185,24 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE=32 + HPUX_IA64_MODE="32" ;; *ELF-64*) - HPUX_IA64_MODE=64 + HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -27799,50 +14231,9 @@ ia64-*-hpux*) rm -rf conftest* ;; -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -27865,10 +14256,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - powerpc64le-*linux*) + powerpc64le-*) LD="${LD-ld} -m elf32lppclinux" ;; - powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -27887,10 +14278,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*) + powerpcle-*) LD="${LD-ld} -m elf64lppc" ;; - powerpc-*linux*) + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -27908,7 +14299,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -27948,14 +14339,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then + if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS + CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -27967,7 +14357,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*|x86_64-*-solaris*) + i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -27976,7 +14366,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 + LD="${LD-ld}_sol2" fi ;; *) @@ -27992,7 +14382,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks=$enable_libtool_lock +need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -28103,7 +14493,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then +if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi @@ -28606,7 +14996,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then + if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -28624,7 +15014,7 @@ else cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -28663,7 +15053,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -28680,8 +15070,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cr libconftest.a conftest.o" >&5 - $AR cr libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -28692,7 +15082,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -28705,32 +15095,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[912]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[012][,.]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*|11.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test yes = "$lt_cv_apple_cc_single_mod"; then + if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -28738,41 +15128,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; } ;; esac -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default @@ -28788,11 +15143,12 @@ done + func_stripname_cnf () { - case $2 in - .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; - *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf @@ -28819,14 +15175,14 @@ if test "${enable_shared+set}" = set; then : *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -28850,14 +15206,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -28881,14 +15237,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -28896,6 +15252,8 @@ else fi +test -z "$pic_mode" && pic_mode=default + @@ -28911,14 +15269,14 @@ if test "${enable_fast_install+set}" = set; then : *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -28932,63 +15290,11 @@ fi - shared_archive_member_spec= -case $host,$enable_shared in -power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } - -# Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : - withval=$with_aix_soname; case $withval in - aix|svr4|both) - ;; - *) - as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 - ;; - esac - lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_with_aix_soname=aix -fi - - with_aix_soname=$lt_cv_with_aix_soname -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } - if test aix != "$with_aix_soname"; then - # For the AIX way of multilib, we name the shared archive member - # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', - # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. - # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, - # the AIX toolchain works better with OBJECT_MODE set (default 32). - if test 64 = "${OBJECT_MODE-32}"; then - shared_archive_member_spec=shr_64 - else - shared_archive_member_spec=shr - fi - fi - ;; -*) - with_aix_soname=aix - ;; -esac - - - - - - - # This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -29037,7 +15343,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}"; then +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi @@ -29076,7 +15382,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -29087,14 +15393,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld=$lt_cv_prog_gnu_ld +with_gnu_ld="$lt_cv_prog_gnu_ld" -old_CC=$CC -old_CFLAGS=$CFLAGS +old_CC="$CC" +old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -29103,8 +15409,15 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -func_cc_basename $compiler -cc_basename=$func_cc_basename_result +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -29119,22 +15432,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/${ac_tool_prefix}file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -29157,13 +15470,13 @@ _LT_EOF break fi done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi -MAGIC_CMD=$lt_cv_path_MAGIC_CMD +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -29185,22 +15498,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then : else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD=$MAGIC_CMD - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/file"; then - lt_cv_path_MAGIC_CMD=$ac_dir/"file" + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD=$lt_cv_path_MAGIC_CMD + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -29223,13 +15536,13 @@ _LT_EOF break fi done - IFS=$lt_save_ifs - MAGIC_CMD=$lt_save_MAGIC_CMD + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi -MAGIC_CMD=$lt_cv_path_MAGIC_CMD +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -29250,7 +15563,7 @@ esac # Use C for the default configuration in the libtool script -lt_save_CC=$CC +lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -29312,7 +15625,7 @@ if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -29328,7 +15641,7 @@ else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -29358,7 +15671,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -29376,18 +15689,17 @@ lt_prog_compiler_pic= lt_prog_compiler_static= - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi - lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -29398,8 +15710,8 @@ lt_prog_compiler_static= ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -29415,11 +15727,6 @@ lt_prog_compiler_static= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac ;; darwin* | rhapsody*) @@ -29490,7 +15797,7 @@ lt_prog_compiler_static= case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -29498,29 +15805,10 @@ lt_prog_compiler_static= fi ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - case $cc_basename in - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - esac - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static='$wl-static' - ;; - esac ;; hpux9* | hpux10* | hpux11*) @@ -29536,7 +15824,7 @@ lt_prog_compiler_static= ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='$wl-a ${wl}archive' + lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -29547,18 +15835,12 @@ lt_prog_compiler_static= linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64, which still supported -KPIC. + # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - # flang / f18. f95 an alias for gfortran or flang on Debian - flang* | f18* | f95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -29578,12 +15860,6 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -29681,7 +15957,7 @@ lt_prog_compiler_static= ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -29710,7 +15986,7 @@ lt_prog_compiler_static= fi case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: + # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -29742,7 +16018,7 @@ else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -29772,7 +16048,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works"; then +if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -29804,7 +16080,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -29823,13 +16099,13 @@ else fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works"; then +if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= @@ -29949,8 +16225,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -29962,9 +16238,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -30007,9 +16283,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ' (' and ')$', so one must not match beginning or - # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', - # as well as any symbol that contains 'd'. + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -30024,7 +16300,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test yes != "$GCC"; then + if test "$GCC" != yes; then with_gnu_ld=no fi ;; @@ -30032,7 +16308,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd* | bitrig*) + openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) @@ -30045,7 +16321,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -30067,24 +16343,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie esac fi - if test yes = "$lt_use_gnu_ld_interface"; then + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='$wl' + wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - export_dynamic_flag_spec='$wl--export-dynamic' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in + case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -30097,7 +16373,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test ia64 != "$host_cpu"; then + if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -30116,7 +16392,7 @@ _LT_EOF case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -30132,7 +16408,7 @@ _LT_EOF allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -30142,7 +16418,7 @@ _LT_EOF # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='$wl--export-all-symbols' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -30150,89 +16426,61 @@ _LT_EOF exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes - ;; - interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test linux-dietlibc = "$host_os"; then + if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test no = "$tmp_diet" + && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -30243,47 +16491,42 @@ _LT_EOF lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - nagfor*) # NAGFOR 5.3 - tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then + if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in - tcc*) - export_dynamic_flag_spec='-rdynamic' - ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test yes = "$supports_anon_versioning"; then + if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -30297,8 +16540,8 @@ _LT_EOF archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -30316,8 +16559,8 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -30329,7 +16572,7 @@ _LT_EOF ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -30344,9 +16587,9 @@ _LT_EOF # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -30363,15 +16606,15 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test no = "$ld_shlibs"; then + if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -30387,7 +16630,7 @@ _LT_EOF # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -30395,57 +16638,34 @@ _LT_EOF ;; aix[4-9]*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag= + no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive + # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi ;; esac @@ -30464,21 +16684,13 @@ _LT_EOF hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # traditional, no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct=no - hardcode_direct_absolute=no - ;; - esac + file_list_spec='${wl}-f,' - if test yes = "$GCC"; then + if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` + collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -30497,42 +16709,36 @@ _LT_EOF ;; esac shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag="$shared_flag "'$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' + link_all_deplibs=no else # not using gcc - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' else - shared_flag='$wl-bM:SRE' + shared_flag='${wl}-bM:SRE' fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='$wl-bexpall' + export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -30567,7 +16773,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib + lt_cv_aix_libpath_="/usr/lib:/lib" fi fi @@ -30575,17 +16781,17 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -30620,7 +16826,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=/usr/lib:/lib + lt_cv_aix_libpath_="/usr/lib:/lib" fi fi @@ -30628,33 +16834,21 @@ fi aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' $wl-bernotok' - allow_undefined_flag=' $wl-berok' - if test yes = "$with_gnu_ld"; then + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -30663,7 +16857,7 @@ fi case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -30693,17 +16887,16 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -30712,18 +16905,18 @@ fi # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -30732,7 +16925,7 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -30751,24 +16944,24 @@ fi hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag=$_lt_dar_allow_undefined + allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; + ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test yes = "$_lt_dar_can_shared"; then + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no @@ -30810,33 +17003,33 @@ fi ;; hpux9*) - if test yes = "$GCC"; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + if test "$GCC" = yes; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='$wl+b $wl$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='$wl-E' + export_dynamic_flag_spec='${wl}-E' ;; hpux10*) - if test yes,no = "$GCC,$with_gnu_ld"; then - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' + export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -30844,25 +17037,25 @@ fi ;; hpux11*) - if test yes,no = "$GCC,$with_gnu_ld"; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -30874,7 +17067,7 @@ if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -30893,14 +17086,14 @@ else fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test yes = "$lt_cv_prog_compiler__b"; then - archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -30908,8 +17101,8 @@ fi ;; esac fi - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec='$wl+b $wl$libdir' + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -30920,7 +17113,7 @@ fi *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='$wl-E' + export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -30931,8 +17124,8 @@ fi ;; irix5* | irix6* | nonstopux*) - if test yes = "$GCC"; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -30942,8 +17135,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " > if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -30955,35 +17148,24 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test yes = "$lt_cv_irix_exported_symbol"; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi - link_all_deplibs=no else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; - linux*) - case $cc_basename in - tcc*) - # Fabrice Bellard et al's Tiny C Compiler - ld_shlibs=yes - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -30998,7 +17180,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -31006,19 +17188,27 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } *nto* | *qnx*) ;; - openbsd* | bitrig*) + openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' - export_dynamic_flag_spec='$wl-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' else - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='$wl-rpath,$libdir' + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac fi else ld_shlibs=no @@ -31029,53 +17219,33 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - shrext_cmds=.dll - archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes=yes + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test yes = "$GCC"; then - allow_undefined_flag=' $wl-expect_unresolved $wl\*' - archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -31086,24 +17256,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris*) no_undefined_flag=' -z defs' - if test yes = "$GCC"; then - wlarc='$wl' - archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='$wl' - archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='${wl}' + archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -31113,11 +17283,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. GCC discards it without '$wl', + # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test yes = "$GCC"; then - whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + if test "$GCC" = yes; then + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -31127,10 +17297,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sunos4*) - if test sequent = "$host_vendor"; then + if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -31179,43 +17349,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='$wl-z,text' + no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not + # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='$wl-z,text' - allow_undefined_flag='$wl-z,nodefs' + no_undefined_flag='${wl}-z,text' + allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='$wl-R,$libdir' + hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='$wl-Bexport' + export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' - if test yes = "$GCC"; then - archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -31230,10 +17400,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } ;; esac - if test sni = "$host_vendor"; then + if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='$wl-Blargedynsym' + export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi @@ -31241,7 +17411,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test no = "$ld_shlibs" && can_build_shared=no +test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -31267,7 +17437,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes - if test yes,yes = "$GCC,$enable_shared"; then + if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -31482,14 +17652,14 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test yes = "$GCC"; then +if test "$GCC" = yes; then case $host_os in - darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; - *) lt_awk_arg='/^libraries:/' ;; + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; - *) lt_sed_strip_eq='s|=/|/|g' ;; + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -31505,35 +17675,28 @@ if test yes = "$GCC"; then ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary... + # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= - lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - # ...but if some path component already ends with the multilib dir we assume - # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). - case "$lt_multi_os_dir; $lt_search_path_spec " in - "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) - lt_multi_os_dir= - ;; - esac + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" - elif test -n "$lt_multi_os_dir"; then + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS = " "; FS = "/|\n";} { - lt_foo = ""; - lt_count = 0; +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo = "/" $lt_i lt_foo; + lt_foo="/" $lt_i lt_foo; } else { lt_count--; } @@ -31547,7 +17710,7 @@ BEGIN {RS = " "; FS = "/|\n";} { # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's|/\([A-Za-z]:\)|\1|g'` ;; + $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -31556,7 +17719,7 @@ fi library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=.so +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -31573,16 +17736,14 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown - - case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' + soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) @@ -31590,91 +17751,41 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' + if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi shlibpath_var=LIBPATH fi ;; @@ -31684,18 +17795,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='$libname$shared_ext' + library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -31703,8 +17814,8 @@ beos*) bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -31716,7 +17827,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=.dll + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -31725,8 +17836,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -31742,17 +17853,17 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' @@ -31761,8 +17872,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' case $build_os in mingw*) @@ -31789,7 +17900,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec=$LIB + sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -31802,8 +17913,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -31816,7 +17927,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -31829,8 +17940,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -31843,8 +17954,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -31862,13 +17973,12 @@ freebsd* | dragonfly*) version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac @@ -31898,10 +18008,10 @@ haiku*) need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no + shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -31919,15 +18029,14 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -31935,8 +18044,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -31945,8 +18054,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -31959,8 +18068,8 @@ interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -31971,7 +18080,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -31979,8 +18088,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -31999,8 +18108,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; @@ -32009,33 +18118,13 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec='-L$libdir' - ;; - # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -32079,12 +18168,7 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -32116,12 +18200,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -32131,7 +18215,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -32140,68 +18224,58 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi ;; os2*) libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no + shrext_cmds=".dll" need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' + library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' + shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) @@ -32212,8 +18286,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -32223,11 +18297,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes @@ -32235,8 +18309,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -32257,24 +18331,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco + version_type=freebsd-elf need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -32292,7 +18366,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -32300,8 +18374,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -32311,35 +18385,20 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no +test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then +if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - - - - @@ -32436,15 +18495,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test yes = "$hardcode_automatic"; then + test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. - if test no != "$hardcode_direct" && + if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && - test no != "$hardcode_minus_L"; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -32459,12 +18518,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test relink = "$hardcode_action" || - test yes = "$inherit_rpath"; then +if test "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi @@ -32474,7 +18533,7 @@ fi - if test yes != "$enable_dlopen"; then + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -32484,23 +18543,23 @@ else case $host_os in beos*) - lt_cv_dlopen=load_add_on + lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen=LoadLibrary + lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen=dlopen + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -32538,10 +18597,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - lt_cv_dlopen=dyld + lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -32549,18 +18608,10 @@ fi ;; - tpf*) - # Don't try to run any link tests for TPF. We know it's impossible - # because TPF is a cross-compiler, and we know how we open DSOs. - lt_cv_dlopen=dlopen - lt_cv_dlopen_libs= - lt_cv_dlopen_self=no - ;; - *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen=shl_load + lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -32599,11 +18650,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen=dlopen + lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -32642,7 +18693,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -32681,7 +18732,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -32720,7 +18771,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -32741,21 +18792,21 @@ fi ;; esac - if test no = "$lt_cv_dlopen"; then - enable_dlopen=no - else + if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes + else + enable_dlopen=no fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS=$CPPFLAGS - test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS=$LIBS + save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -32763,7 +18814,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test yes = "$cross_compiling"; then : + if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -32810,9 +18861,9 @@ else # endif #endif -/* When -fvisibility=hidden is used, assume the code has been annotated +/* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -32842,7 +18893,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -32862,14 +18913,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test yes = "$lt_cv_dlopen_self"; then + if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test yes = "$cross_compiling"; then : + if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -32916,9 +18967,9 @@ else # endif #endif -/* When -fvisibility=hidden is used, assume the code has been annotated +/* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -32948,7 +18999,7 @@ _LT_EOF (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -32969,9 +19020,9 @@ fi $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS=$save_CPPFLAGS - LDFLAGS=$save_LDFLAGS - LIBS=$save_LIBS + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" ;; esac @@ -33015,7 +19066,7 @@ else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP"; then + if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -33043,7 +19094,7 @@ fi - # Report what library types will actually be built + # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -33051,13 +19102,13 @@ $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test no = "$can_build_shared" && enable_shared=no + test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test yes = "$enable_shared" && enable_static=no + test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -33065,12 +19116,8 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } ;; aix[4-9]*) - if test ia64 != "$host_cpu"; then - case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in - yes,aix,yes) ;; # shared object as lib.so file only - yes,svr4,*) ;; # shared object as lib.so archive member only - yes,*) enable_static=no ;; # shared object in lib.a archive as well - esac + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no fi ;; esac @@ -33080,7 +19127,7 @@ $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test yes = "$enable_shared" || enable_static=yes + test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -33094,11 +19141,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC=$lt_save_CC +CC="$lt_save_CC" - if test -n "$CXX" && ( test no != "$CXX" && - ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || - (test g++ != "$CXX"))); then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -33277,7 +19324,7 @@ objext_CXX=$objext # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test yes != "$_lt_caught_CXX_error"; then +if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -33338,39 +19385,46 @@ $RM -r conftest* CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC - func_cc_basename $compiler -cc_basename=$func_cc_basename_result + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test yes = "$GXX"; then + if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi - if test yes = "$GXX"; then + if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -33384,7 +19438,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD=$ac_prog + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -33395,7 +19449,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; } with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -33406,32 +19460,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog + lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -33467,22 +19521,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test yes = "$with_gnu_ld"; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='$wl' + wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi @@ -33501,7 +19555,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -33519,30 +19573,18 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ld_shlibs_CXX=no ;; aix[4-9]*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag= + no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # have runtime linking enabled, and use it for executables. - # For shared libraries, we enable/disable runtime linking - # depending on the kind of the shared library created - - # when "with_aix_soname,aix_use_runtimelinking" is: - # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables - # "aix,yes" lib.so shared, rtl:yes, for executables - # lib.a static archive - # "both,no" lib.so.V(shr.o) shared, rtl:yes - # lib.a(lib.so.V) shared, rtl:no, for executables - # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a(lib.so.V) shared, rtl:no - # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables - # lib.a static archive + # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -33552,13 +19594,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; esac done - if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then - # With aix-soname=svr4, we create the lib.so.V shared archives only, - # so we don't have lib.a shared libs to link our executables. - # We have to force runtime linking in this case. - aix_use_runtimelinking=yes - LDFLAGS="$LDFLAGS -Wl,-brtl" - fi ;; esac @@ -33577,21 +19612,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - file_list_spec_CXX='$wl-f,' - case $with_aix_soname,$aix_use_runtimelinking in - aix,*) ;; # no import file - svr4,* | *,yes) # use import file - # The Import File defines what to hardcode. - hardcode_direct_CXX=no - hardcode_direct_absolute_CXX=no - ;; - esac + file_list_spec_CXX='${wl}-f,' - if test yes = "$GXX"; then + if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`$CC -print-prog-name=collect2` + collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -33609,44 +19636,36 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie fi esac shared_flag='-shared' - if test yes = "$aix_use_runtimelinking"; then - shared_flag=$shared_flag' $wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' fi - # Need to ensure runtime linking is disabled for the traditional - # shared library, or the linker may eventually find shared libraries - # /with/ Import File - we do not want to mix them. - shared_flag_aix='-shared' - shared_flag_svr4='-shared $wl-G' else # not using gcc - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test yes = "$aix_use_runtimelinking"; then - shared_flag='$wl-G' + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' else - shared_flag='$wl-bM:SRE' + shared_flag='${wl}-bM:SRE' fi - shared_flag_aix='$wl-bM:SRE' - shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec_CXX='$wl-bexpall' + export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes - if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then + if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - # The "-G" linker flag allows undefined symbols. - no_undefined_flag_CXX='-bernotok' + allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -33681,7 +19700,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib + lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi @@ -33689,18 +19708,18 @@ fi aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else - if test ia64 = "$host_cpu"; then - hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test set = "${lt_cv_aix_libpath+set}"; then + if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -33735,7 +19754,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX=/usr/lib:/lib + lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi @@ -33743,34 +19762,22 @@ fi aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' $wl-bernotok' - allow_undefined_flag_CXX=' $wl-berok' - if test yes = "$with_gnu_ld"; then + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes - archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' - # -brtl affects multiple linker settings, -berok does not and is overridden later - compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' - if test svr4 != "$with_aix_soname"; then - # This is similar to how AIX traditionally builds its shared - # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' - fi - if test aix != "$with_aix_soname"; then - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' - else - # used by -dlpreopen to get the symbols - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' - fi - archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; @@ -33780,7 +19787,7 @@ fi allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi @@ -33808,58 +19815,57 @@ fi # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=.dll + shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp "$export_symbols" "$output_objdir/$soname.def"; - echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; - else - $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile=$lt_outputfile.exe - lt_tool_outputfile=$lt_tool_outputfile.exe - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='$wl--export-all-symbols' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file, use it as - # is; otherwise, prepend EXPORTS... - archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi @@ -33873,27 +19879,27 @@ fi hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - if test yes = "$lt_cv_ld_force_load"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes - allow_undefined_flag_CXX=$_lt_dar_allow_undefined + allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in - ifort*|nagfor*) _lt_dar_can_shared=yes ;; + ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test yes = "$_lt_dar_can_shared"; then + if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" - if test yes != "$lt_cv_apple_cc_single_mod"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else @@ -33902,34 +19908,6 @@ fi ;; - os2*) - hardcode_libdir_flag_spec_CXX='-L$libdir' - hardcode_minus_L_CXX=yes - allow_undefined_flag_CXX=unsupported - shrext_cmds=.dll - archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ - $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ - $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ - $ECHO EXPORTS >> $output_objdir/$libname.def~ - prefix_cmds="$SED"~ - if test EXPORTS = "`$SED 1q $export_symbols`"; then - prefix_cmds="$prefix_cmds -e 1d"; - fi~ - prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ - cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ - $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ - emximp -o $lib $output_objdir/$libname.def' - old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' - enable_shared_with_static_runtimes_CXX=yes - ;; - dgux*) case $cc_basename in ec++*) @@ -33965,14 +19943,14 @@ fi ;; haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='$wl-E' + export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default @@ -33984,7 +19962,7 @@ fi ld_shlibs_CXX=no ;; aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -33993,11 +19971,11 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes = "$GXX"; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' + if test "$GXX" = yes; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -34007,15 +19985,15 @@ fi ;; hpux10*|hpux11*) - if test no = "$with_gnu_ld"; then - hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) - export_dynamic_flag_spec_CXX='$wl-E' + export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi @@ -34041,13 +20019,13 @@ fi aCC*) case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -34058,20 +20036,20 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -34086,22 +20064,22 @@ fi interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl-E' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -34110,17 +20088,17 @@ fi old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test yes = "$GXX"; then - if test no = "$with_gnu_ld"; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; @@ -34133,8 +20111,8 @@ fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -34143,10 +20121,10 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -34160,59 +20138,59 @@ fi # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -34226,18 +20204,18 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' - export_dynamic_flag_spec_CXX='$wl--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test yes = "$supports_anon_versioning"; then + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -34245,10 +20223,10 @@ fi *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on @@ -34306,17 +20284,22 @@ fi ld_shlibs_CXX=yes ;; - openbsd* | bitrig*) + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='$wl-E' - whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -34332,9 +20315,9 @@ fi # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using @@ -34352,17 +20335,17 @@ fi cxx*) case $host in osf3*) - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ + $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac @@ -34377,27 +20360,27 @@ fi # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test yes,no = "$GXX,$with_gnu_ld"; then - allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -34437,9 +20420,9 @@ fi # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -34447,7 +20430,7 @@ fi solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands '-z linker_flag'. + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; @@ -34464,42 +20447,42 @@ fi ;; gcx*) # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test yes,no = "$GXX,$with_gnu_ld"; then - no_undefined_flag_CXX=' $wl-z ${wl}defs' + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require '-G' NOT '-shared' on this + # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. - archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi @@ -34508,52 +20491,52 @@ fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='$wl-z,text' + no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We CANNOT use -z defs as we might desire, because we do not + # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag_CXX='$wl-z,text' - allow_undefined_flag_CXX='$wl-z,nodefs' + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' + hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='$wl-Bexport' + export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" + '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" + '"$reload_cmds_CXX" ;; *) - archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -34585,10 +20568,10 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } - test no = "$ld_shlibs_CXX" && can_build_shared=no + test "$ld_shlibs_CXX" = no && can_build_shared=no - GCC_CXX=$GXX - LD_CXX=$LD + GCC_CXX="$GXX" + LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -34632,13 +20615,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test x-L = "$p" || - test x-R = "$p"; then + if test $p = "-L" || + test $p = "-R"; then prev=$p continue fi @@ -34654,16 +20637,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test no = "$pre_test_object_deps_done"; then - case $prev in + if test "$pre_test_object_deps_done" = no; then + case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX=$prev$p + compiler_lib_search_path_CXX="${prev}${p}" else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being @@ -34671,9 +20654,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 esac else if test -z "$postdeps_CXX"; then - postdeps_CXX=$prev$p + postdeps_CXX="${prev}${p}" else - postdeps_CXX="${postdeps_CXX} $prev$p" + postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= @@ -34688,15 +20671,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 continue fi - if test no = "$pre_test_object_deps_done"; then + if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then - predep_objects_CXX=$p + predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX=$p + postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi @@ -34726,6 +20709,51 @@ interix[3-9]*) postdep_objects_CXX= postdeps_CXX= ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; esac @@ -34734,7 +20762,7 @@ case " $postdeps_CXX " in esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi @@ -34773,18 +20801,17 @@ lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. - if test yes = "$GXX"; then + if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi - lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) @@ -34795,8 +20822,8 @@ lt_prog_compiler_static_CXX= ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the '-m68020' flag to GCC prevents building anything better, - # like '-m68040'. + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -34811,11 +20838,6 @@ lt_prog_compiler_static_CXX= # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' - case $host_os in - os2*) - lt_prog_compiler_static_CXX='$wl-static' - ;; - esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -34865,7 +20887,7 @@ lt_prog_compiler_static_CXX= case $host_os in aix[4-9]*) # All AIX code is PIC. - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else @@ -34905,14 +20927,14 @@ lt_prog_compiler_static_CXX= case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' - if test ia64 != "$host_cpu"; then + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -34949,7 +20971,7 @@ lt_prog_compiler_static_CXX= lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64, which still supported -KPIC. + # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' @@ -35094,7 +21116,7 @@ lt_prog_compiler_static_CXX= fi case $host_os in - # For platforms that do not support PIC, -DPIC is meaningless: + # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -35126,7 +21148,7 @@ else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -35156,7 +21178,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then +if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -35182,7 +21204,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS=$LDFLAGS + save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -35201,13 +21223,13 @@ else fi fi $RM -r conftest* - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then +if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= @@ -35321,8 +21343,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } -hard_links=nottested -if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -35334,9 +21356,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + if test "$hard_links" = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -35353,21 +21375,17 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to GNU nm, but means don't demangle to AIX nm. - # Without the "-l" option, or with the "-B" option, AIX nm treats - # weak defined symbols like other global defined symbols, whereas - # GNU nm marks them as "W". - # While the 'weak' keyword is ignored in the Export File, we need - # it in the Import File for the 'aix-soname' feature, so we have - # to replace the "-B" option with "-P" for AIX nm. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - export_symbols_cmds_CXX=$ltdll_cmds + export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -35390,7 +21408,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } -test no = "$ld_shlibs_CXX" && can_build_shared=no +test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -35407,7 +21425,7 @@ x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes - if test yes,yes = "$GCC,$enable_shared"; then + if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -35535,7 +21553,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=.so +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -35552,16 +21570,14 @@ hardcode_into_libs=no # flags to be left without arguments need_version=unknown - - case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname.a' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='$libname$release$shared_ext$major' + soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) @@ -35569,91 +21585,41 @@ aix[4-9]*) need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then # AIX 5 supports IA64 - library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line '#! .'. This would cause the generated library to - # depend on '.', always an invalid library. This was fixed in + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # Using Import Files as archive members, it is possible to support - # filename-based versioning of shared library archives on AIX. While - # this would work for both with and without runtime linking, it will - # prevent static linking of such archives. So we do filename-based - # shared library versioning with .so extension only, which is used - # when both runtime linking and shared linking is enabled. - # Unfortunately, runtime linking may impact performance, so we do - # not want this to be the default eventually. Also, we use the - # versioned .so libs for executables only if there is the -brtl - # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. - # To allow for filename-based versioning support, we need to create - # libNAME.so.V as an archive file, containing: - # *) an Import File, referring to the versioned filename of the - # archive as well as the shared archive member, telling the - # bitwidth (32 or 64) of that shared object, and providing the - # list of exported symbols of that shared object, eventually - # decorated with the 'weak' keyword - # *) the shared object with the F_LOADONLY flag set, to really avoid - # it being seen by the linker. - # At run time we better use the real file rather than another symlink, - # but for link time we create the symlink libNAME.so -> libNAME.so.V - - case $with_aix_soname,$aix_use_runtimelinking in - # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - aix,yes) # traditional libtool - dynamic_linker='AIX unversionable lib.so' + if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - ;; - aix,no) # traditional AIX only - dynamic_linker='AIX lib.a(lib.so.V)' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - ;; - svr4,*) # full svr4 only - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,yes) # both, prefer svr4 - dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" - library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' - # unpreferred sharedlib libNAME.a needs extra handling - postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' - postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' - # We do not specify a path in Import Files, so LIBPATH fires. - shlibpath_overrides_runpath=yes - ;; - *,no) # both, prefer aix - dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" - library_names_spec='$libname$release.a $libname.a' - soname_spec='$libname$release$shared_ext$major' - # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling - postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' - postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' - ;; - esac + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi shlibpath_var=LIBPATH fi ;; @@ -35663,18 +21629,18 @@ amigaos*) powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='$libname$shared_ext' + library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -35682,8 +21648,8 @@ beos*) bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -35695,7 +21661,7 @@ bsdi[45]*) cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=.dll + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -35704,8 +21670,8 @@ cygwin* | mingw* | pw32* | cegcc*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -35721,16 +21687,16 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' @@ -35739,8 +21705,8 @@ cygwin* | mingw* | pw32* | cegcc*) *,cl*) # Native MSVC libname_spec='$name' - soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' - library_names_spec='$libname.dll.lib' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' case $build_os in mingw*) @@ -35767,7 +21733,7 @@ cygwin* | mingw* | pw32* | cegcc*) sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec=$LIB + sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -35780,8 +21746,8 @@ cygwin* | mingw* | pw32* | cegcc*) esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -35794,7 +21760,7 @@ cygwin* | mingw* | pw32* | cegcc*) *) # Assume MSVC wrapper - library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -35807,8 +21773,8 @@ darwin* | rhapsody*) version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' - soname_spec='$libname$release$major$shared_ext' + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -35820,8 +21786,8 @@ dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -35839,13 +21805,12 @@ freebsd* | dragonfly*) version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac @@ -35875,10 +21840,10 @@ haiku*) need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=no + shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -35896,15 +21861,14 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' - if test 32 = "$HPUX_IA64_MODE"; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -35912,8 +21876,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -35922,8 +21886,8 @@ hpux9* | hpux10* | hpux11*) dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -35936,8 +21900,8 @@ interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -35948,7 +21912,7 @@ irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -35956,8 +21920,8 @@ irix5* | irix6* | nonstopux*) esac need_lib_prefix=no need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -35976,8 +21940,8 @@ irix5* | irix6* | nonstopux*) esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" - sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; @@ -35986,33 +21950,13 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -linux*android*) - version_type=none # Android doesn't support versioned libraries. - need_lib_prefix=no - need_version=no - library_names_spec='$libname$release$shared_ext' - soname_spec='$libname$release$shared_ext' - finish_cmds= - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - dynamic_linker='Android linker' - # Don't embed -rpath directories since the linker doesn't support them. - hardcode_libdir_flag_spec_CXX='-L$libdir' - ;; - # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -36056,12 +22000,7 @@ fi # before this can be enabled. hardcode_into_libs=yes - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command - # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, - # even though it is searched at run-time. Try to do the best guess by - # appending ld.so.conf contents (and includes) to the search path. + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -36093,12 +22032,12 @@ netbsd*) need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -36108,7 +22047,7 @@ netbsd*) newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -36117,68 +22056,58 @@ newsos6) version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd* | bitrig*) +openbsd*) version_type=sunos - sys_lib_dlsearch_path_spec=/usr/lib + sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then - need_version=no - else - need_version=yes - fi - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi ;; os2*) libname_spec='$name' - version_type=windows - shrext_cmds=.dll - need_version=no + shrext_cmds=".dll" need_lib_prefix=no - # OS/2 can only load a DLL with a base name of 8 characters or less. - soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; - v=$($ECHO $release$versuffix | tr -d .-); - n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); - $ECHO $n$v`$shared_ext' - library_names_spec='${libname}_dll.$libext' + library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' - shlibpath_var=BEGINLIBPATH - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - postinstall_cmds='base_file=`basename \$file`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' + shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='$libname$release$shared_ext$major' - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) @@ -36189,8 +22118,8 @@ solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -36200,11 +22129,11 @@ solaris*) sunos4*) version_type=sunos - library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes @@ -36212,8 +22141,8 @@ sunos4*) sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -36234,24 +22163,24 @@ sysv4 | sysv4.3*) ;; sysv4*MP*) - if test -d /usr/nec; then + if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' - soname_spec='$libname$shared_ext.$major' + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=sco + version_type=freebsd-elf need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test yes = "$with_gnu_ld"; then + if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -36269,7 +22198,7 @@ tpf*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -36277,8 +22206,8 @@ tpf*) uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' - soname_spec='$libname$release$shared_ext$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -36288,32 +22217,20 @@ uts4*) esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test no = "$dynamic_linker" && can_build_shared=no +test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test yes = "$GCC"; then +if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then - sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi - -if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then - sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi -# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... -configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec - -# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - -# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool -configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH - - - @@ -36356,15 +22273,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || - test yes = "$hardcode_automatic_CXX"; then + test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. - if test no != "$hardcode_direct_CXX" && + if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && - test no != "$hardcode_minus_L_CXX"; then + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else @@ -36379,12 +22296,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } -if test relink = "$hardcode_action_CXX" || - test yes = "$inherit_rpath_CXX"; then +if test "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no -elif test yes = "$shlibpath_overrides_runpath" || - test no = "$enable_shared"; then +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi @@ -36407,7 +22324,7 @@ fi lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test yes != "$_lt_caught_CXX_error" +fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -36438,14 +22355,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -GCC="$SAVED_GCC" -CC="$SAVED_CC" - -if ( test "${GCC}" = "yes" ) -then - CFLAGS="$CFLAGS_SAVED_NOPEDANTIC" -fi - if test "${nut_with_dev}" != "no"; then nut_with_dev="yes" else @@ -36458,14 +22367,14 @@ if test "${enable_static+set}" = set; then : *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -36774,9 +22683,9 @@ _ACEOF $as_echo "${RUN_AS_GROUP}" >&6; } if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then - as_fn_error $? "If you specify --with-user, you also must specify --with-group" "$LINENO" 5 + as_fn_error $? "\"If you specify --with-user, you also must specify --with-group\"" "$LINENO" 5 elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then - as_fn_error $? "If you specify --with-group, you also must specify --with-user" "$LINENO" 5 + as_fn_error $? "\"If you specify --with-group, you also must specify --with-user\"" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking facility for syslog" >&5 @@ -36808,27 +22717,67 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LOGFACILITY}" >&5 $as_echo "${LOGFACILITY}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which drivers to build" >&5 +$as_echo_n "checking which drivers to build... " >&6; } + +# Check whether --with-drivers was given. +if test "${with_drivers+set}" = set; then : + withval=$with_drivers; + case "${withval}" in + yes|no) + as_fn_error $? "invalid option --with(out)-drivers - see docs/configure.txt" "$LINENO" 5 + ;; + *) + DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_BUILD_LIST}" >&5 +$as_echo "${DRIVER_BUILD_LIST}" >&6; } + ;; + esac + +else + + DRIVER_BUILD_LIST="all" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 +$as_echo "all available" >&6; } + +fi + + if test "${DRIVER_BUILD_LIST}" != "all"; then + SOME_DRIVERS_TRUE= + SOME_DRIVERS_FALSE='#' +else + SOME_DRIVERS_TRUE='#' + SOME_DRIVERS_FALSE= +fi + + +if test "${DRIVER_BUILD_LIST}" != "all"; then + if test -z "${nut_report_feature_flag}"; then + nut_report_feature_flag="1" + ac_clean_files="${ac_clean_files} conf_nut_report_feature" + echo > conf_nut_report_feature + echo "Configuration summary:" >> conf_nut_report_feature + echo "======================" >> conf_nut_report_feature + fi + echo "only build specific drivers: ${DRIVER_BUILD_LIST}" >> conf_nut_report_feature + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which driver man pages to install" >&5 $as_echo_n "checking which driver man pages to install... " >&6; } -if test "${WITH_MANS}" = "yes"; then - if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 +if test "${DRIVER_BUILD_LIST}" = "all"; then + DRIVER_MAN_LIST=all + { $as_echo "$as_me:${as_lineno-$LINENO}: result: all available" >&5 $as_echo "all available" >&6; } - else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/docs/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 -$as_echo "${DRIVER_MAN_LIST}" >&6; } - fi else DRIVER_MAN_LIST="" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none (manpages disabled)" >&5 -$as_echo "none (manpages disabled)" >&6; } + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${DRIVER_MAN_LIST}" >&5 +$as_echo "${DRIVER_MAN_LIST}" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to strip debug symbols" >&5 @@ -36836,7 +22785,7 @@ $as_echo_n "checking whether to strip debug symbols... " >&6; } # Check whether --enable-strip was given. if test "${enable_strip+set}" = set; then : enableval=$enable_strip; - case "${enableval}" in + case "${withval}" in no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -36891,147 +22840,135 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install Solaris SMF files" >&5 -$as_echo_n "checking whether to install Solaris SMF files... " >&6; } -solarissmf="auto" -# Check whether --with-solaris-smf was given. -if test "${with_solaris_smf+set}" = set; then : - withval=$with_solaris_smf; - case "${withval}" in - auto|"") - solarissmf="auto" - ;; - yes|no) - solarissmf="${withval}" - ;; - *) - as_fn_error $? "Unexpected argument for --with-solaris-smf=${withval}" "$LINENO" 5 - ;; - esac + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -if test x"$solarissmf" = xauto ; then - if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x /usr/bin/svcs ; then - solarissmf="yes" +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - solarissmf="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${solarissmf}" >&5 -$as_echo "${solarissmf}" >&6; } - if test x"$solarissmf" = x"yes"; then - WITH_SOLARIS_SMF_TRUE= - WITH_SOLARIS_SMF_FALSE='#' -else - WITH_SOLARIS_SMF_TRUE='#' - WITH_SOLARIS_SMF_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to make Solaris SVR4 packages" >&5 -$as_echo_n "checking whether to make Solaris SVR4 packages... " >&6; } -solarispkg_svr4="auto" - -# Check whether --with-solaris-pkg-svr4 was given. -if test "${with_solaris_pkg_svr4+set}" = set; then : - withval=$with_solaris_pkg_svr4; - case "${withval}" in - auto|"") - solarispkg_svr4="auto" - ;; - yes|no) - solarispkg_svr4="${withval}" - ;; - *) - as_fn_error $? "Unexpected argument for --with-solaris-pkg-svr4=${withval}" "$LINENO" 5 - ;; - esac - -fi - - -if test x"$solarispkg_svr4" = xauto ; then - if test -x /usr/bin/pkgtrans && test -x /usr/bin/pkgmk && test -x /usr/bin/pkgproto ; then - solarispkg_svr4="yes" - else - solarispkg_svr4="no" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${solarispkg_svr4}" >&5 -$as_echo "${solarispkg_svr4}" >&6; } - if test x"$solarispkg_svr4" = x"yes"; then - WITH_SOLARIS_PKG_SVR4_TRUE= - WITH_SOLARIS_PKG_SVR4_FALSE='#' -else - WITH_SOLARIS_PKG_SVR4_TRUE='#' - WITH_SOLARIS_PKG_SVR4_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to make Solaris IPS packages" >&5 -$as_echo_n "checking whether to make Solaris IPS packages... " >&6; } -solarispkg_ips="auto" - -# Check whether --with-solaris-pkg-ips was given. -if test "${with_solaris_pkg_ips+set}" = set; then : - withval=$with_solaris_pkg_ips; - case "${withval}" in - auto|"") - solarispkg_ips="auto" - ;; - yes|no) - solarispkg_ips="${withval}" - ;; - *) - as_fn_error $? "Unexpected argument for --with-solaris-pkg-ips=${withval}" "$LINENO" 5 - ;; - esac - -fi - - -if test x"$solarispkg_ips" = xauto ; then - if test -x /usr/bin/pkg && test -x /usr/bin/pkgmogrify && test -x /usr/bin/pkgdepend ; then - solarispkg_ips="yes" - else - solarispkg_ips="no" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${solarispkg_ips}" >&5 -$as_echo "${solarispkg_ips}" >&6; } - if test x"$solarispkg_ips" = x"yes"; then - WITH_SOLARIS_PKG_IPS_TRUE= - WITH_SOLARIS_PKG_IPS_FALSE='#' -else - WITH_SOLARIS_PKG_IPS_TRUE='#' - WITH_SOLARIS_PKG_IPS_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install systemd unit files" >&5 -$as_echo_n "checking whether to install systemd unit files... " >&6; } +systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install systemd files" >&5 +$as_echo_n "checking whether to install systemd files... " >&6; } # Check whether --with-systemdsystemunitdir was given. if test "${with_systemdsystemunitdir+set}" = set; then : - withval=$with_systemdsystemunitdir; systemdsystemunitdir="${withval}" -else - systemdsystemunitdir="auto" -fi - -case "${systemdsystemunitdir}" in - yes|auto|"") - if test x"$have_PKG_CONFIG" = xyes; then : - systemdsystemunitdir="`$PKG_CONFIG --variable=systemdsystemunitdir systemd 2>/dev/null`" && test -n "$systemdsystemunitdir" || systemdsystemunitdir="`$PKG_CONFIG --variable=systemdsystemunitdir libsystemd 2>/dev/null`" -else - if test "${withval}" = yes; then : - as_fn_error $? "--with-systemdsystemunitdir=${withval} was requested, but PKG_CONFIG could not be queried for the system settings" "$LINENO" 5 -fi - systemdsystemunitdir="" - -fi + withval=$with_systemdsystemunitdir; + case "${withval}" in + yes|auto) ;; no) systemdsystemunitdir="" @@ -37039,9 +22976,12 @@ fi *) systemdsystemunitdir="${withval}" ;; -esac -if test "${systemdsystemunitdir}" = "auto" ; then systemdsystemunitdir=""; fi + esac + +fi + if test -n "${systemdsystemunitdir}"; then + systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdsystemunitdir}" >&5 $as_echo "using ${systemdsystemunitdir}" >&6; } else @@ -37057,561 +22997,6 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install systemd shutdown files" >&5 -$as_echo_n "checking whether to install systemd shutdown files... " >&6; } - -# Check whether --with-systemdshutdowndir was given. -if test "${with_systemdshutdowndir+set}" = set; then : - withval=$with_systemdshutdowndir; systemdshutdowndir="${withval}" -else - systemdshutdowndir="auto" -fi - -if test -n "${systemdsystemunitdir}"; then - case "${systemdshutdowndir}" in - yes|auto|"") - if test x"$have_PKG_CONFIG" = xyes; then : - systemdshutdowndir="`$PKG_CONFIG --variable=systemdshutdowndir systemd 2>/dev/null`" && test -n "$systemdshutdowndir" || systemdshutdowndir="`$PKG_CONFIG --variable=systemdshutdowndir libsystemd 2>/dev/null`" -else - if test "${systemdshutdowndir}" = yes; then : - as_fn_error $? "--with-systemdshutdowndir=${systemdshutdowndir} was requested, but PKG_CONFIG could not be queried for the system settings" "$LINENO" 5 -fi - systemdshutdowndir="" - -fi - ;; - no) - systemdshutdowndir="" - ;; - *) - systemdshutdowndir="${withval}" - ;; - esac -fi -if test "${systemdshutdowndir}" = "auto" ; then systemdshutdowndir=""; fi -if test -n "${systemdshutdowndir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdshutdowndir}" >&5 -$as_echo "using ${systemdshutdowndir}" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install systemd tmpfiles files" >&5 -$as_echo_n "checking whether to install systemd tmpfiles files... " >&6; } - -# Check whether --with-systemdtmpfilesdir was given. -if test "${with_systemdtmpfilesdir+set}" = set; then : - withval=$with_systemdtmpfilesdir; systemdtmpfilesdir="${withval}" -else - systemdtmpfilesdir="auto" -fi - -case "${systemdtmpfilesdir}" in - yes|auto|"") - if test x"$have_PKG_CONFIG" = xyes; then : - systemdtmpfilesdir="`$PKG_CONFIG --variable=tmpfilesdir systemd 2>/dev/null`" && test -n "$systemdtmpfilesdir" || systemdtmpfilesdir="`$PKG_CONFIG --variable=tmpfilesdir libsystemd 2>/dev/null`" -else - if test "${systemdtmpfilesdir}" = yes; then : - as_fn_error $? "--with-systemdtmpfilesdir=${systemdtmpfilesdir} was requested, but PKG_CONFIG could not be queried for the system settings" "$LINENO" 5 -fi - systemdtmpfilesdir="" - -fi - ;; - no) - systemdtmpfilesdir="" - ;; - *) - systemdtmpfilesdir="${withval}" - ;; -esac -if test "${systemdtmpfilesdir}" = "auto" ; then systemdtmpfilesdir=""; fi -if test -n "${systemdtmpfilesdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${systemdtmpfilesdir}" >&5 -$as_echo "using ${systemdtmpfilesdir}" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11 support in current compiler" >&5 -$as_echo_n "checking for C++11 support in current compiler... " >&6; } -have_cxx11=unknown -my_CXXFLAGS="$CXXFLAGS" -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -CPLUSPLUS_DECL=' -#include -#if __cplusplus < 201103L - #error This library needs at least a C++11 compliant compiler -#endif -' -CPLUSPLUS_MAIN='printf("%ld\n", __cplusplus);' - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -${CPLUSPLUS_DECL} -int -main () -{ -${CPLUSPLUS_MAIN} - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, out of the box" >&5 -$as_echo "yes, out of the box" >&6; } - have_cxx11=yes -else - case "${CXXFLAGS}" in #( - *"-std="*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not with the standard already set in CXXFLAGS='${CXXFLAGS}'" >&5 -$as_echo "no, not with the standard already set in CXXFLAGS='${CXXFLAGS}'" >&6; } - have_cxx11=no, - ;; #( - *) : - - CXXFLAGS="$CXXFLAGS -std=c++11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -${CPLUSPLUS_DECL} -int -main () -{ -${CPLUSPLUS_MAIN} - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, GCC-style (as C++11)" >&5 -$as_echo "yes, GCC-style (as C++11)" >&6; } - have_cxx11=yes -else - CXXFLAGS="$CXXFLAGS -std=c++0x" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -${CPLUSPLUS_DECL} -int -main () -{ -${CPLUSPLUS_MAIN} - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, GCC-style (as C++0X)" >&5 -$as_echo "yes, GCC-style (as C++0X)" >&6; } - have_cxx11=yes -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - CXXFLAGS="$my_CXXFLAGS" - have_cxx11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; -esac -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test "${have_cxx11}" = "yes"; then - HAVE_CXX11_TRUE= - HAVE_CXX11_FALSE='#' -else - HAVE_CXX11_TRUE='#' - HAVE_CXX11_FALSE= -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -unset CPLUSPLUS_MAIN -unset CPLUSPLUS_DECL - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for have_cppunit" >&5 -$as_echo_n "checking for have_cppunit... " >&6; } -have_cppunit="no" -CPPUNIT_NUT_CXXFLAGS="" -if test x"$have_PKG_CONFIG" = xyes; then : - if test x"${have_cxx11}" = xyes; then : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cppunit" >&5 -$as_echo_n "checking for cppunit... " >&6; } - -if test -n "$CPPUNIT_CFLAGS"; then - pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$CPPUNIT_LIBS"; then - pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit\""; } >&5 - ($PKG_CONFIG --exists --print-errors "cppunit") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cppunit" 2>&1` - else - CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cppunit" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$CPPUNIT_PKG_ERRORS" >&5 - - have_cppunit=no -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - have_cppunit=no -else - CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS - CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - have_cppunit=yes -fi - if test "${have_cppunit}" != "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcppunit not found - those C++ tests will not be built." >&5 -$as_echo "$as_me: WARNING: libcppunit not found - those C++ tests will not be built." >&2;} - have_cppunit=no -else - if test -n "$CXX"; then : - if $CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null; then : - CPPUNIT_NUT_CXXFLAGS="-g -O0" -fi -fi - -fi - -fi - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, can not look properly for libcppunit - those C++ tests will not be built." >&5 -$as_echo "$as_me: WARNING: pkg-config not found, can not look properly for libcppunit - those C++ tests will not be built." >&2;} - have_cppunit=no - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_cppunit}" >&5 -$as_echo "${have_cppunit}" >&6; } - -if test "${have_cppunit}" = "yes"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if current toolkit can build and run cppunit tests (e.g. no ABI issues, related segfaults, etc.)" >&5 -$as_echo_n "checking if current toolkit can build and run cppunit tests (e.g. no ABI issues, related segfaults, etc.)... " >&6; } - CPLUSPLUS_DECL=' -#include -#include -#include -#include -#include - -class ExampleTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE( ExampleTest ); - CPPUNIT_TEST( testOne ); - CPPUNIT_TEST_SUITE_END(); -public: - void setUp() {}; - void tearDown() {}; - void testOne(); -}; -CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTest ); -void ExampleTest::testOne() -{ - int i = 1; - float f = 1.0; - int cast = static_cast(f); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Casted float is not the expected int (assert_eq)", i, cast ); - CPPUNIT_ASSERT_MESSAGE("Casted float is not the expected int (assert)", (i == cast) ); -} -' - - CPLUSPLUS_MAIN=' -CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); -CppUnit::TextUi::TestRunner runner; -runner.addTest( suite ); -runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), std::cerr ) ); -bool res = runner.run(); -return res ? 0 : 1; -' - - my_CXXFLAGS="$CXXFLAGS" - my_LDFLAGS="$LDFLAGS" - my_LIBS="$LIBS" - CXXFLAGS="$myCXXFLAGS $pkg_cv_CPPUNIT_CFLAGS $pkg_cv_CPPUNIT_CXXFLAGS" - LDFLAGS="$my_LDFLAGS $pkg_cv_CPPUNIT_LDFLAGS" - LIBS="$my_LIBS $pkg_cv_CPPUNIT_LIBS" - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - if test "$cross_compiling" = yes; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&5 -$as_echo "$as_me: WARNING: Current build is a cross-build, so not running test binaries, just linking them" >&2;} - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -${CPLUSPLUS_DECL} -int -main () -{ -${CPLUSPLUS_MAIN} - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - have_cppunit=yes -else - have_cppunit=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -${CPLUSPLUS_DECL} -int -main () -{ -${CPLUSPLUS_MAIN} - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_run "$LINENO"; then : - have_cppunit=yes -else - have_cppunit=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - - CXXFLAGS="$my_CXXFLAGS" - LDFLAGS="$my_LDFLAGS" - LIBS="$my_LIBS" - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - unset CPLUSPLUS_MAIN - unset CPLUSPLUS_DECL - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_cppunit}" >&5 -$as_echo "${have_cppunit}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for impact from --enable-cppunit option - should we build cppunit tests?" >&5 -$as_echo_n "checking for impact from --enable-cppunit option - should we build cppunit tests?... " >&6; } -# Check whether --enable-cppunit was given. -if test "${enable_cppunit+set}" = set; then : - enableval=$enable_cppunit; case "${enableval}" in #( - "yes") : - if test x"${have_cppunit}" = xyes; then : - -else - as_fn_error $? "--with-cppunit=yes can not be satisfied" "$LINENO" 5 -fi ;; #( - "no") : - have_cppunit=no - ;; #( - *) : - ;; -esac -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${have_cppunit}" >&5 -$as_echo "${have_cppunit}" >&6; } - - if test "${have_cppunit}" = "yes"; then - HAVE_CPPUNIT_TRUE= - HAVE_CPPUNIT_FALSE='#' -else - HAVE_CPPUNIT_TRUE='#' - HAVE_CPPUNIT_FALSE= -fi - - -cat >>confdefs.h <<_ACEOF -#define CPPUNIT_NUT_CXXFLAGS $CPPUNIT_NUT_CXXFLAGS -_ACEOF - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install Augeas configuration-management lenses" >&5 -$as_echo_n "checking whether to install Augeas configuration-management lenses... " >&6; } - -# Check whether --with-augeas-lenses-dir was given. -if test "${with_augeas_lenses_dir+set}" = set; then : - withval=$with_augeas_lenses_dir; - case "${withval}" in - yes) - if test -z "${auglensdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "augeas lenses directory requested but not found in default location" "$LINENO" 5 - fi - if ! test -s scripts/augeas/nutupsconf.aug.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "augeas lenses directory requested but a non-trivial scripts/augeas/nutupsconf.aug.in was not provided by autogen.sh or dist archive" "$LINENO" 5 - fi - ;; - auto) - if ! test -s scripts/augeas/nutupsconf.aug.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: augeas lenses directory skipped because a non-trivial scripts/augeas/nutupsconf.aug.in was not provided by autogen.sh or dist archive" >&5 -$as_echo "$as_me: WARNING: augeas lenses directory skipped because a non-trivial scripts/augeas/nutupsconf.aug.in was not provided by autogen.sh or dist archive" >&2;} - auglensdir="" - fi - ;; - no) - auglensdir="" - ;; - *) - auglensdir="${withval}" - ;; - esac - -fi - -if test -n "${auglensdir}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${auglensdir}" >&5 -$as_echo "using ${auglensdir}" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test -n "${auglensdir}"; then - WITH_AUGLENS_TRUE= - WITH_AUGLENS_FALSE='#' -else - WITH_AUGLENS_TRUE='#' - WITH_AUGLENS_FALSE= -fi - - -for ac_prog in augparse -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AUGPARSE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $AUGPARSE in - [\\/]* | ?:[\\/]*) - ac_cv_path_AUGPARSE="$AUGPARSE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AUGPARSE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -AUGPARSE=$ac_cv_path_AUGPARSE -if test -n "$AUGPARSE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUGPARSE" >&5 -$as_echo "$AUGPARSE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AUGPARSE" && break -done -test -n "$AUGPARSE" || AUGPARSE="none" - - if test "x${AUGPARSE}" != "xnone"; then - HAVE_AUGPARSE_TRUE= - HAVE_AUGPARSE_FALSE='#' -else - HAVE_AUGPARSE_TRUE='#' - HAVE_AUGPARSE_FALSE= -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable Augeas configuration-management lenses tests" >&5 -$as_echo_n "checking whether to enable Augeas configuration-management lenses tests... " >&6; } -if test "x${AUGPARSE}" != xnone ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install hotplug rules" >&5 $as_echo_n "checking whether to install hotplug rules... " >&6; } @@ -37623,7 +23008,7 @@ if test "${with_hotplug_dir+set}" = set; then : if test -z "${hotplugdir}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "hotplug directory requested but not found" "$LINENO" 5 + as_fn_error $? "\"hotplug directory requested but not found\"" "$LINENO" 5 fi ;; auto) @@ -37665,20 +23050,10 @@ if test "${with_udev_dir+set}" = set; then : if test -z "${udevdir}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "udev directory requested but not found" "$LINENO" 5 - fi - if test "${nut_with_usb}" = yes && ! test -s scripts/udev/nut-usbups.rules.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "udev directory and USB driver support requested but a non-trivial scripts/udev/nut-usbups.rules.in was not provided by autogen.sh or dist archive" "$LINENO" 5 + as_fn_error $? "\"udev directory requested but not found\"" "$LINENO" 5 fi ;; auto) - if test "${nut_with_usb}" = yes && ! test -s scripts/udev/nut-usbups.rules.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: udev directory skipped because a non-trivial scripts/udev/nut-usbups.rules.in was not provided by autogen.sh or dist archive" >&5 -$as_echo "$as_me: WARNING: udev directory skipped because a non-trivial scripts/udev/nut-usbups.rules.in was not provided by autogen.sh or dist archive" >&2;} - udevdir="" - fi ;; no) udevdir="" @@ -37718,20 +23093,10 @@ if test "${with_devd_dir+set}" = set; then : if test -z "${devddir}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - as_fn_error $? "devd directory requested but not found" "$LINENO" 5 - fi - if test "${nut_with_usb}" = yes && ! test -s scripts/devd/nut-usbups.rules.in -a -s scripts/devd/nut-usb.conf.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "devd directory and USB driver support requested but non-trivial scripts/devd/nut-usbups.rules.in and scripts/devd/nut-usb.conf.in were not provided by autogen.sh or dist archive" "$LINENO" 5 + as_fn_error $? "\"devd directory requested but not found\"" "$LINENO" 5 fi ;; auto) - if test "${nut_with_usb}" = yes && ! test -s scripts/devd/nut-usbups.rules.in -a -s scripts/devd/nut-usb.conf.in ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: devd directory skipped because non-trivial scripts/devd/nut-usbups.rules.in and scripts/devd/nut-usb.conf.in were not provided by autogen.sh or dist archive" >&5 -$as_echo "$as_me: WARNING: devd directory skipped because non-trivial scripts/devd/nut-usbups.rules.in and scripts/devd/nut-usb.conf.in were not provided by autogen.sh or dist archive" >&2;} - devddir="" - fi ;; no) devddir="" @@ -37760,6 +23125,162 @@ fi +for ac_prog in asciidoc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ASCIIDOC+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ASCIIDOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ASCIIDOC=$ac_cv_path_ASCIIDOC +if test -n "$ASCIIDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 +$as_echo "$ASCIIDOC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASCIIDOC" && break +done +test -n "$ASCIIDOC" || ASCIIDOC="none" + + if test "x$ASCIIDOC" != "xnone"; then + MANUALUPDATE_TRUE= + MANUALUPDATE_FALSE='#' +else + MANUALUPDATE_TRUE='#' + MANUALUPDATE_FALSE= +fi + +for ac_prog in a2x +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_A2X+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $A2X in + [\\/]* | ?:[\\/]*) + ac_cv_path_A2X="$A2X" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_A2X="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +A2X=$ac_cv_path_A2X +if test -n "$A2X"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5 +$as_echo "$A2X" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$A2X" && break +done +test -n "$A2X" || A2X="none" + + +for ac_prog in aspell +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ASPELL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ASPELL in + [\\/]* | ?:[\\/]*) + ac_cv_path_ASPELL="$ASPELL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ASPELL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ASPELL=$ac_cv_path_ASPELL +if test -n "$ASPELL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASPELL" >&5 +$as_echo "$ASPELL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ASPELL" && break +done +test -n "$ASPELL" || ASPELL="none" + + if test "x$ASPELL" != "xnone"; then + HAVE_ASPELL_TRUE= + HAVE_ASPELL_FALSE='#' +else + HAVE_ASPELL_TRUE='#' + HAVE_ASPELL_FALSE= +fi + + if test "xAIX" = "x`uname -s 2>/dev/null`"; then SYSTEM_AIX_TRUE= SYSTEM_AIX_FALSE='#' @@ -37771,202 +23292,10 @@ fi cat >>confdefs.h <<_ACEOF -#define CPU_TYPE "$target_cpu" +#define CPU_TYPE $target_cpu _ACEOF -for ac_prog in valgrind -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_VALGRIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $VALGRIND in - [\\/]* | ?:[\\/]*) - ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -VALGRIND=$ac_cv_path_VALGRIND -if test -n "$VALGRIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 -$as_echo "$VALGRIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$VALGRIND" && break -done -test -n "$VALGRIND" || VALGRIND="none" - -if test -n "${VALGRIND}"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether valgrind is usable on current platform" >&5 -$as_echo_n "checking whether valgrind is usable on current platform... " >&6; } - if ( ${VALGRIND} --help >/dev/null 2>/dev/null ); then : - if ( ${VALGRIND} /bin/sh -c true >/dev/null 2>/dev/null ); then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - VALGRIND="none" - -fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - VALGRIND="none" - -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use valgrind for memory-leak testing" >&5 -$as_echo_n "checking whether to use valgrind for memory-leak testing... " >&6; } - -# Check whether --with-valgrind was given. -if test "${with_valgrind+set}" = set; then : - withval=$with_valgrind; - case "${withval}" in - yes) - if test "x$VALGRIND" = "xnone"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "valgrind requested but not found" "$LINENO" 5 - fi - with_valgrind="yes" - ;; - auto) - with_valgrind="auto" - ;; - no) - with_valgrind="no" - ;; - *) - for ac_prog in "${withval}" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_VALGRIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $VALGRIND in - [\\/]* | ?:[\\/]*) - ac_cv_path_VALGRIND="$VALGRIND" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_VALGRIND="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -VALGRIND=$ac_cv_path_VALGRIND -if test -n "$VALGRIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 -$as_echo "$VALGRIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$VALGRIND" && break -done -test -n "$VALGRIND" || VALGRIND="none" - - if test "x$VALGRIND" = "xnone"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "valgrind requested but not found" "$LINENO" 5 - fi - with_valgrind="yes" - ;; - esac - -fi - - -if test "x${with_valgrind}" = xauto; then - if test "x$VALGRIND" = "xnone"; then - with_valgrind="no" - else - with_valgrind="yes" - fi -fi - -if test "x${with_valgrind}" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${VALGRIND}" >&5 -$as_echo "using ${VALGRIND}" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Do not forget to build with debug (e.g. pass '-g' in CFLAGS for GCC) for best results with valgrind tests" >&5 -$as_echo "$as_me: Do not forget to build with debug (e.g. pass '-g' in CFLAGS for GCC) for best results with valgrind tests" >&6;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x${VALGRIND}" != "xnone"; then - HAVE_VALGRIND_TRUE= - HAVE_VALGRIND_FALSE='#' -else - HAVE_VALGRIND_TRUE='#' - HAVE_VALGRIND_FALSE= -fi - - if test "x${with_valgrind}" = "xyes"; then - WITH_VALGRIND_TRUE= - WITH_VALGRIND_FALSE='#' -else - WITH_VALGRIND_TRUE='#' - WITH_VALGRIND_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build cppunit tests using valgrind support" >&5 -$as_echo_n "checking whether to build cppunit tests using valgrind support... " >&6; } -if test "x${with_valgrind}" = xyes && test "x${have_cppunit}" = xyes ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -37981,7 +23310,6 @@ conftemp="${datadir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" DATADIR=${conftemp} -NUT_DATADIR=${conftemp} cat >>confdefs.h <<_ACEOF #define DATADIR "${conftemp}" @@ -38018,136 +23346,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -conftemp="${libexecdir}" -eval conftemp=\"${conftemp}\" -eval conftemp=\"${conftemp}\" -LIBEXECDIR=${conftemp} - -cat >>confdefs.h <<_ACEOF -#define LIBEXECDIR "${conftemp}" -_ACEOF - - - - -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - as_fn_error $? "Net-SNMP libraries not found, required for SNMP drivers" "$LINENO" 5 -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build SNMP drivers" >&5 -$as_echo_n "checking whether to build SNMP drivers... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${nut_with_snmp} " >&5 -$as_echo "${nut_with_snmp} " >&6; } - if test -z "${nut_report_feature_flag}"; then - nut_report_feature_flag="1" - ac_clean_files="${ac_clean_files} conf_nut_report_feature" - echo > conf_nut_report_feature - echo "Configuration summary:" >> conf_nut_report_feature - echo "======================" >> conf_nut_report_feature - fi - echo "build SNMP drivers: ${nut_with_snmp} " >> conf_nut_report_feature - - - if test "${nut_with_snmp}" = "yes"; then - WITH_SNMP_TRUE= - WITH_SNMP_FALSE='#' -else - WITH_SNMP_TRUE='#' - WITH_SNMP_FALSE= -fi - - if test "${nut_with_snmp}" = "yes"; then - -cat >>confdefs.h <<_ACEOF -#define WITH_SNMP 1 -_ACEOF - - fi - - if test "${nut_have_libsnmp}" = "yes"; then - HAVE_SNMP_TRUE= - HAVE_SNMP_FALSE='#' -else - HAVE_SNMP_TRUE='#' - HAVE_SNMP_FALSE= -fi - - - -if test -n "${host_alias}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_HOST_ALIAS "${host_alias}" -_ACEOF - -else - if test -n "${host}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_HOST_ALIAS "${host}" -_ACEOF - - fi -fi -if test -n "${build_alias}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_BUILD_ALIAS "${build_alias}" -_ACEOF - -else - if test -n "${build}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_BUILD_ALIAS "${build}" -_ACEOF - - fi -fi -if test -n "${target_alias}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_TARGET_ALIAS "${target_alias}" -_ACEOF - -else - if test -n "${target}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_TARGET_ALIAS "${target}" -_ACEOF - - fi -fi - -if test -n "${host_cpu}" -a -n "${host_os}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_HOST_SHORT_ALIAS "${host_cpu}-${host_os}" -_ACEOF - -fi -if test -n "${build_cpu}" -a -n "${build_os}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_BUILD_SHORT_ALIAS "${build_cpu}-${build_os}" -_ACEOF - -fi -if test -n "${target_cpu}" -a -n "${target_os}" ; then - -cat >>confdefs.h <<_ACEOF -#define AUTOTOOLS_TARGET_SHORT_ALIAS "${target_cpu}-${target_os}" -_ACEOF - -fi - - now=`TZ=UTC date +%Y-%m-%d` @@ -38189,9 +23387,7 @@ now=`TZ=UTC date +%Y-%m-%d` -NUT_DATADIR=`eval echo "${DATADIR}"` -NUT_LIBEXECDIR=`eval echo "${LIBEXECDIR}"` @@ -38204,736 +23400,7 @@ NUT_LIBEXECDIR=`eval echo "${LIBEXECDIR}"` - - - - - - - - - - if test "x$GCC" = xyes -o "x$CLANGCC" = xyes; then : - case "${CFLAGS}" in #( - *-std=*) : - ;; #( - *) : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu99" >&5 -$as_echo_n "checking whether C compiler accepts -std=gnu99... " >&6; } -if ${ax_cv_check_cflags__Werror__std_gnu99+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CFLAGS - CFLAGS="$CFLAGS -Werror -std=gnu99" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - ax_cv_check_cflags__Werror__std_gnu99=no -else - ax_cv_check_cflags__Werror__std_gnu99=yes -fi -else - ax_cv_check_cflags__Werror__std_gnu99=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__std_gnu99" >&5 -$as_echo "$ax_cv_check_cflags__Werror__std_gnu99" >&6; } -if test "x$ax_cv_check_cflags__Werror__std_gnu99" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Defaulting C standard support to GNU C99 on a GCC or CLANG compatible compiler" >&5 -$as_echo "$as_me: Defaulting C standard support to GNU C99 on a GCC or CLANG compatible compiler" >&6;} - CFLAGS="$CFLAGS -std=gnu99" - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ;; -esac - -fi - - if test "x$GCC" = xyes -o "x$CLANGCC" = xyes; then : - case "${CXXFLAGS}" in #( - *-std=*) : - ;; #( - *) : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=gnu++11" >&5 -$as_echo_n "checking whether C++ compiler accepts -std=gnu++11... " >&6; } -if ${ax_cv_check_cxxflags__Werror__std_gnupp11+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ax_check_save_flags=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -Werror -std=gnu++11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - if grep -E '(unrecognized.* option|did you mean|unknown argument:)' < conftest.err >/dev/null 2>/dev/null; then : - ax_cv_check_cxxflags__Werror__std_gnupp11=no -else - ax_cv_check_cxxflags__Werror__std_gnupp11=yes -fi -else - ax_cv_check_cxxflags__Werror__std_gnupp11=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CXXFLAGS=$ax_check_save_flags -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags__Werror__std_gnupp11" >&5 -$as_echo "$ax_cv_check_cxxflags__Werror__std_gnupp11" >&6; } -if test "x$ax_cv_check_cxxflags__Werror__std_gnupp11" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Defaulting C++ standard support to GNU C++11 on a GCC or CLANG compatible compiler" >&5 -$as_echo "$as_me: Defaulting C++ standard support to GNU C++11 on a GCC or CLANG compatible compiler" >&6;} - CXXFLAGS="$CXXFLAGS -std=gnu++11" - -else - : -fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ;; -esac - -fi - - - -nut_warning_difficulty="medium" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to pre-set warnings (from '${nut_enable_warnings}')" >&5 -$as_echo_n "checking whether to pre-set warnings (from '${nut_enable_warnings}')... " >&6; } -case "${nut_enable_warnings}" in #( - no|all|gcc-legacy|gcc-minimal|clang-minimal|gcc-medium|clang-medium|gcc-hard|clang-hard) : - ;; #( - clang) : - nut_enable_warnings="${nut_enable_warnings}-${nut_warning_difficulty}" ;; #( - gcc) : - - case "${CFLAGS}" in #( - *89*|*90*|*ansi*) : - nut_enable_warnings="${nut_enable_warnings}-minimal" ;; #( - *) : - nut_enable_warnings="${nut_enable_warnings}-${nut_warning_difficulty}" - ;; -esac ;; #( - yes|auto|"") : - - if test "${CLANGCC}" = "yes"; then : - nut_enable_warnings="clang-${nut_warning_difficulty}" -else - if test "${GCC}" = "yes"; then : - - case "${CFLAGS}" in #( - *89*|*90*|*ansi*) : - nut_enable_warnings="gcc-minimal" ;; #( - *) : - case "`$CC --version | grep -i gcc`" in #( - *" "1.*|*" "2.*|3.*|*" "4.0*|*" "4.1*|*" "4.2*|*" "4.3*) : - - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Very old GCC in use, disabling warnings" >&5 -$as_echo "$as_me: WARNING: Very old GCC in use, disabling warnings" >&2;} - nut_enable_Werror="no" - nut_enable_warnings="no" ;; #( - *" "4.4*|*" "4.5*|*" "4.6*|*" "4.7*|*" "4.8*) : - nut_enable_warnings="gcc-legacy" ;; #( - *) : - nut_enable_warnings="gcc-${nut_warning_difficulty}" - ;; -esac - ;; -esac -else - nut_enable_warnings="all" -fi - -fi - ;; #( - hard|auto-hard|auto=hard) : - - if test "${CLANGCC}" = "yes"; then : - nut_enable_warnings="clang-hard" -else - if test "${GCC}" = "yes"; then : - nut_enable_warnings="gcc-hard" -else - nut_enable_warnings="all" -fi - -fi - ;; #( - medium|auto-medium|auto=medium) : - - if test "${CLANGCC}" = "yes"; then : - nut_enable_warnings="clang-medium" -else - if test "${GCC}" = "yes"; then : - nut_enable_warnings="gcc-medium" -else - nut_enable_warnings="all" -fi - -fi - ;; #( - minimal|auto-minimal|auto=minimal) : - - if test "${CLANGCC}" = "yes"; then : - nut_enable_warnings="clang-minimal" -else - if test "${GCC}" = "yes"; then : - nut_enable_warnings="gcc-minimal" -else - nut_enable_warnings="all" -fi - -fi - ;; #( - legacy) : - if test "${GCC}" = "yes"; then : - nut_enable_warnings="gcc-legacy" -else - nut_enable_warnings="no" -fi ;; #( - *) : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unsupported variant for --enable-warnings=${nut_enable_warnings}, ignored" >&5 -$as_echo "$as_me: WARNING: Unsupported variant for --enable-warnings=${nut_enable_warnings}, ignored" >&2;} - nut_enable_warnings="no" - - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${nut_enable_warnings}\"" >&5 -$as_echo "\"${nut_enable_warnings}\"" >&6; } - -case "${nut_enable_warnings}" in #( - all) : - - CFLAGS="${CFLAGS} -Wall" - CXXFLAGS="${CXXFLAGS} -Wall" - ;; #( - clang-hard) : - - CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -pedantic" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat" - ;; #( - clang-medium) : - - CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -pedantic -Wno-float-conversion -Wno-double-promotion -Wno-implicit-float-conversion -Wno-conversion -Wno-incompatible-pointer-types-discards-qualifiers" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat" - ;; #( - clang-minimal) : - - CFLAGS="${CFLAGS} -ferror-limit=0 -Wall -Wextra -Wno-documentation" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wall -Wextra -Wno-documentation" - ;; #( - gcc-legacy) : - CFLAGS="${CFLAGS} -Wall -Wsign-compare" ;; #( - gcc-minimal) : - - CFLAGS="${CFLAGS} -Wall -Wsign-compare" - CXXFLAGS="${CXXFLAGS} -Wall -Wextra" - case "${CFLAGS}" in #( - *89*|*90*|*ansi*) : - ;; #( - *) : - CFLAGS="${CFLAGS} -Wextra -pedantic" - ;; -esac - ;; #( - gcc-medium|gcc-hard) : - - CFLAGS="${CFLAGS} -Wno-system-headers -Wall -Wextra -Wsign-compare" - CXXFLAGS="${CXXFLAGS} -Wno-system-headers -Wall -Wextra" - case "${CFLAGS}" in #( - *89*|*90*|*ansi*) : - ;; #( - *) : - CFLAGS="${CFLAGS} -pedantic" - ;; -esac - - ;; #( - *) : - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to make warnings fatal" >&5 -$as_echo_n "checking whether to make warnings fatal... " >&6; } -case "${nut_enable_Werror}" in #( - yes|auto) : - - CFLAGS="${CFLAGS} -Werror" - CXXFLAGS="${CXXFLAGS} -Werror" - ;; #( - no) : - - CFLAGS="${CFLAGS} -Wno-error" - CXXFLAGS="${CXXFLAGS} -Wno-error" - - ;; #( - *) : - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${nut_enable_Werror}\"" >&5 -$as_echo "\"${nut_enable_Werror}\"" >&6; } - -ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - CFLAGS_SAVED="${CFLAGS}" - CFLAGS_BUILTIN_STR="-fno-builtin-strchr -fno-builtin-strcmp -fno-builtin-strncmp" - CFLAGS="${CFLAGS} -Werror -Wunreachable-code ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should disable string built-ins" >&5 -$as_echo_n "checking whether we should disable string built-ins... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -char *s = "v1", c = '%'; -if (strcmp(s, "v1") != 0) return 1; -if (strchr(s, '1') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, they are not a problem" >&5 -$as_echo "no, they are not a problem" >&6; } -else - CFLAGS="${CFLAGS_BUILTIN_STR} ${CFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -char *s = "v1", c = '%'; -if (strcmp(s, "v1") != 0) return 1; -if (strchr(s, '1') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_BUILTIN_STR} ${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, this solves a problem" >&5 -$as_echo "yes, this solves a problem" >&6; } -else - CFLAGS="${CFLAGS_SAVED} -Werror -Wno-unreachable-code ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -char *s = "mibs", c = '%'; -/* Macro version of strcmp() has problems with strings shorter than - * 3 or 4 bytes, so to avoid nailing "-Warray-bounds" as well, - * here we just test for longer strings - existing NUT sources were - * fixed for this situation already */ -if (strcmp(s, "mibs") != 0) return 1; -if (strchr(s, 'b') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_SAVED}" - LIBLTDL_CFLAGS="${LIBLTDL_CFLAGS} -Wno-unreachable-code" - LIBNETSNMP_CFLAGS="${LIBNETSNMP_CFLAGS} -Wno-unreachable-code" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, but -Wno-unreachable-code solves the problem for this compiler" >&5 -$as_echo "no, but -Wno-unreachable-code solves the problem for this compiler" >&6; } -else - CFLAGS="${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, this does not solve the problem or is not supported" >&5 -$as_echo "no, this does not solve the problem or is not supported" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi - - - -ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - CFLAGS_SAVED="${CFLAGS}" - CFLAGS_BUILTIN_NTOHL="-fno-builtin-htonl -fno-builtin-ntohl" - CFLAGS="${CFLAGS} -Werror -Wunreachable-code -Wshadow ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should disable htonl/ntohl built-ins" >&5 -$as_echo_n "checking whether we should disable htonl/ntohl built-ins... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) -/* no ";return 0;" here - autoconf adds one */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, they are not a problem" >&5 -$as_echo "no, they are not a problem" >&6; } -else - CFLAGS="${CFLAGS_BUILTIN_NTOHL} ${CFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) -/* no ";return 0;" here - autoconf adds one */ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_BUILTIN_NTOHL} ${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, this solves a problem" >&5 -$as_echo "yes, this solves a problem" >&6; } -else - CFLAGS="${CFLAGS_SAVED} -Werror -Wno-shadow ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - CFLAGS="${CFLAGS_SAVED}" - LIBLTDL_CFLAGS="${LIBLTDL_CFLAGS} -Wno-shadow" - LIBNETSNMP_CFLAGS="${LIBNETSNMP_CFLAGS} -Wno-shadow" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, but -Wno-shadow solves the problem for this compiler" >&5 -$as_echo "no, but -Wno-shadow solves the problem for this compiler" >&6; } -else - CFLAGS="${CFLAGS_SAVED}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, this does not solve the problem or is not supported" >&5 -$as_echo "no, this does not solve the problem or is not supported" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -fi - - - - - if test -n "${CFLAGS_STASHED_WARNINGS}"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Applying back the stashed CFLAGS warnings" >&5 -$as_echo "$as_me: Applying back the stashed CFLAGS warnings" >&6;} - CFLAGS="${CFLAGS} ${CFLAGS_STASHED_WARNINGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: Ended up with: '${CFLAGS}'" >&5 -$as_echo "$as_me: Ended up with: '${CFLAGS}'" >&6;} - -fi - - if test -n "${CPPFLAGS_STASHED_WARNINGS}"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Applying back the stashed CPPFLAGS warnings" >&5 -$as_echo "$as_me: Applying back the stashed CPPFLAGS warnings" >&6;} - CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_STASHED_WARNINGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: Ended up with: '${CPPFLAGS}'" >&5 -$as_echo "$as_me: Ended up with: '${CPPFLAGS}'" >&6;} - -fi - - if test -n "${CXXFLAGS_STASHED_WARNINGS}"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: Applying back the stashed CXXFLAGS warnings" >&5 -$as_echo "$as_me: Applying back the stashed CXXFLAGS warnings" >&6;} - CXXFLAGS="${CXXFLAGS} ${CXXFLAGS_STASHED_WARNINGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: Ended up with: '${CXXFLAGS}'" >&5 -$as_echo "$as_me: Ended up with: '${CXXFLAGS}'" >&6;} - -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for top build dir for this configure run" >&5 -$as_echo_n "checking for top build dir for this configure run... " >&6; } -TOP_BUILDDIR="" -if test -n "${ac_abs_top_builddir}" && test -d "${ac_abs_top_builddir}"; then : - TOP_BUILDDIR="${ac_abs_top_builddir}" -else - if test -n "${ac_pwd}" && test -d "${ac_pwd}"; then : - TOP_BUILDDIR="${ac_pwd}" -else - TOP_BUILDDIR="`dirname "$0"`" - TOP_BUILDDIR="`cd "$TOP_BUILDDIR" && pwd`" || as_fn_error $? "Can not detect TOP_BUILDDIR" "$LINENO" 5 - -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"${TOP_BUILDDIR}\"" >&5 -$as_echo "\"${TOP_BUILDDIR}\"" >&6; } - -ABS_TOP_BUILDDIR="`cd "${TOP_BUILDDIR}" && pwd`" || as_fn_error $? "Can not detect ABS_TOP_BUILDDIR" "$LINENO" 5 -ABS_TOP_SRCDIR="`cd "${abs_srcdir}" && pwd`" || as_fn_error $? "Can not detect ABS_TOP_SRCDIR" "$LINENO" 5 - if test "${ABS_TOP_BUILDDIR}" = "${ABS_TOP_SRCDIR}"; then - BUILDING_IN_TREE_TRUE= - BUILDING_IN_TREE_FALSE='#' -else - BUILDING_IN_TREE_TRUE='#' - BUILDING_IN_TREE_FALSE= -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to customize ${TOP_BUILDDIR}/scripts/systemd/nut-common.tmpfiles.in for this system" >&5 -$as_echo_n "checking whether to customize ${TOP_BUILDDIR}/scripts/systemd/nut-common.tmpfiles.in for this system... " >&6; } -if test -n "$systemdtmpfilesdir"; then : - mkdir -p "${TOP_BUILDDIR}"/scripts/systemd - cat > "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -# State file (e.g. upsd to driver) and pidfile location for NUT: -d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @STATEPATH@/nut -EOF - if test "$STATEPATH" != "$PIDPATH"; then : - cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @PIDPATH@/nut -EOF -fi - if test -n "$ALTPIDPATH" && test "$STATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTPIDPATH"; then : - cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @ALTPIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @ALTPIDPATH@/nut -EOF -fi - if test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"; then : - cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @ALTSTATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @ALTSTATEPATH@/nut -EOF -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Generating \"data\" files from templates, see below for executable scripts" >&5 -$as_echo "$as_me: Generating \"data\" files from templates, see below for executable scripts" >&6;} -ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/cables/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutclientstub.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/python/Makefile scripts/python/module/PyNUT.py scripts/upsdrvsvcctl/Makefile scripts/systemd/Makefile scripts/systemd/nut-common.tmpfiles scripts/systemd/nut-driver@.service scripts/systemd/nut-monitor.service scripts/systemd/nut-server.service scripts/systemd/nut-driver-enumerator.service scripts/systemd/nut-driver-enumerator.path scripts/Solaris/nut-driver-enumerator.xml scripts/Solaris/nut-driver.xml scripts/Solaris/nut-monitor.xml scripts/Solaris/nut-server.xml scripts/Solaris/nut.xml scripts/Solaris/Makefile scripts/Solaris/pkginfo scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/ufw/Makefile scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile tests/NIT/Makefile Makefile" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Generating templated script files that should be marked executable" >&5 -$as_echo "$as_me: Generating templated script files that should be marked executable" >&6;} - - ac_config_files="$ac_config_files scripts/Aix/nut.init" - - - ac_config_files="$ac_config_files scripts/HP-UX/postinstall" - - - ac_config_files="$ac_config_files scripts/python/app/NUT-Monitor-py2gtk2" - - - ac_config_files="$ac_config_files scripts/python/app/NUT-Monitor-py3qt5" - - - ac_config_files="$ac_config_files scripts/augeas/gen-nutupsconf-aug.py" - - - ac_config_files="$ac_config_files scripts/python/module/test_nutclient.py" - - - ac_config_files="$ac_config_files scripts/upsdrvsvcctl/nut-driver-enumerator.sh" - - - ac_config_files="$ac_config_files scripts/upsdrvsvcctl/upsdrvsvcctl" - - - ac_config_files="$ac_config_files scripts/systemd/nutshutdown" - - - ac_config_files="$ac_config_files scripts/Solaris/svc-nut-server" - - - ac_config_files="$ac_config_files scripts/Solaris/svc-nut-monitor" - - - ac_config_files="$ac_config_files scripts/Solaris/precheck.py" - - - ac_config_files="$ac_config_files scripts/Solaris/preinstall" - - - ac_config_files="$ac_config_files scripts/Solaris/postinstall" - - - ac_config_files="$ac_config_files scripts/Solaris/preremove" - - - ac_config_files="$ac_config_files scripts/Solaris/postremove" - - - ac_config_files="$ac_config_files scripts/Solaris/preproto.pl" - - - ac_config_files="$ac_config_files scripts/Solaris/nut" - - - ac_config_files="$ac_config_files tools/gitlog2changelog.py" - - - ac_config_files="$ac_config_files tools/nut-snmpinfo.py" - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: Generating templated script files whose templates might have been generated (or not) by autogen.sh calling our helper scripts" >&5 -$as_echo "$as_me: Generating templated script files whose templates might have been generated (or not) by autogen.sh calling our helper scripts" >&6;} - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to generate scripts/augeas/nutupsconf.aug" >&5 -$as_echo_n "checking whether to generate scripts/augeas/nutupsconf.aug... " >&6; } - if test -s scripts/augeas/nutupsconf.aug.in && ! test -f scripts/augeas/nutupsconf.aug.in.AUTOGEN_WITHOUT; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_config_files="$ac_config_files scripts/augeas/nutupsconf.aug" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to generate scripts/udev/nut-usbups.rules" >&5 -$as_echo_n "checking whether to generate scripts/udev/nut-usbups.rules... " >&6; } - if test -s scripts/udev/nut-usbups.rules.in && ! test -f scripts/udev/nut-usbups.rules.in.AUTOGEN_WITHOUT; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_config_files="$ac_config_files scripts/udev/nut-usbups.rules" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to generate scripts/devd/nut-usb.conf" >&5 -$as_echo_n "checking whether to generate scripts/devd/nut-usb.conf... " >&6; } - if test -s scripts/devd/nut-usb.conf.in && ! test -f scripts/devd/nut-usb.conf.in.AUTOGEN_WITHOUT; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - ac_config_files="$ac_config_files scripts/devd/nut-usb.conf" - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -fi - +ac_config_files="$ac_config_files clients/Makefile common/Makefile conf/Makefile conf/upsmon.conf.sample conf/upssched.conf.sample data/html/header.html data/html/Makefile data/Makefile data/driver.list docs/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug scripts/augeas/nutupsschedconf.aug scripts/augeas/nuthostsconf.aug scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf scripts/HP-UX/postinstall scripts/python/Makefile scripts/systemd/Makefile scripts/systemd/nut-driver.service scripts/systemd/nut-monitor.service scripts/systemd/nut-server.service scripts/systemd/nutshutdown scripts/Solaris/Makefile scripts/Solaris/pkginfo scripts/Solaris/postinstall scripts/Solaris/preremove scripts/Solaris/nut scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -39072,49 +23539,33 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PYTHON2_TRUE}" && test -z "${HAVE_PYTHON2_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON2\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_PYTHON3_TRUE}" && test -z "${HAVE_PYTHON3_FALSE}"; then - as_fn_error $? "conditional \"HAVE_PYTHON3\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SOME_DRIVERS_TRUE}" && test -z "${SOME_DRIVERS_FALSE}"; then - as_fn_error $? "conditional \"SOME_DRIVERS\" was never defined. +if test -z "${HAVE_CPPUNIT_TRUE}" && test -z "${HAVE_CPPUNIT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_CPPUNIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_SERIAL_TRUE}" && test -z "${WITH_SERIAL_FALSE}"; then as_fn_error $? "conditional \"WITH_SERIAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_LIBUSB_1_0_TRUE}" && test -z "${WITH_LIBUSB_1_0_FALSE}"; then - as_fn_error $? "conditional \"WITH_LIBUSB_1_0\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_LIBUSB_0_1_TRUE}" && test -z "${WITH_LIBUSB_0_1_FALSE}"; then - as_fn_error $? "conditional \"WITH_LIBUSB_0_1\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_USB_TRUE}" && test -z "${WITH_USB_FALSE}"; then as_fn_error $? "conditional \"WITH_USB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_NEON_TRUE}" && test -z "${WITH_NEON_FALSE}"; then - as_fn_error $? "conditional \"WITH_NEON\" was never defined. +if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then + as_fn_error $? "conditional \"WITH_SNMP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_NEON_TRUE}" && test -z "${HAVE_NEON_FALSE}"; then - as_fn_error $? "conditional \"HAVE_NEON\" was never defined. +if test -z "${WITH_NEON_TRUE}" && test -z "${WITH_NEON_FALSE}"; then + as_fn_error $? "conditional \"WITH_NEON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_AVAHI_TRUE}" && test -z "${WITH_AVAHI_FALSE}"; then @@ -39125,10 +23576,6 @@ if test -z "${WITH_LIBPOWERMAN_TRUE}" && test -z "${WITH_LIBPOWERMAN_FALSE}"; th as_fn_error $? "conditional \"WITH_LIBPOWERMAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_MODBUS_TRUE}" && test -z "${WITH_MODBUS_FALSE}"; then - as_fn_error $? "conditional \"WITH_MODBUS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_IPMI_TRUE}" && test -z "${WITH_IPMI_FALSE}"; then as_fn_error $? "conditional \"WITH_IPMI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -39169,54 +23616,14 @@ if test -z "${WITH_CGI_TRUE}" && test -z "${WITH_CGI_FALSE}"; then as_fn_error $? "conditional \"WITH_CGI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_CPPCHECK_TRUE}" && test -z "${HAVE_CPPCHECK_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CPPCHECK\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_CPPCHECK_TRUE}" && test -z "${WITH_CPPCHECK_FALSE}"; then - as_fn_error $? "conditional \"WITH_CPPCHECK\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_CHECK_NIT_TRUE}" && test -z "${WITH_CHECK_NIT_FALSE}"; then - as_fn_error $? "conditional \"WITH_CHECK_NIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${MANUALUPDATE_TRUE}" && test -z "${MANUALUPDATE_FALSE}"; then - as_fn_error $? "conditional \"MANUALUPDATE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_SOURCE_HIGHLIGHT_TRUE}" && test -z "${HAVE_SOURCE_HIGHLIGHT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SOURCE_HIGHLIGHT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_ASPELL_TRUE}" && test -z "${HAVE_ASPELL_FALSE}"; then - as_fn_error $? "conditional \"HAVE_ASPELL\" was never defined. +if test -z "${WITH_ASCIIDOC_TRUE}" && test -z "${WITH_ASCIIDOC_FALSE}"; then + as_fn_error $? "conditional \"WITH_ASCIIDOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_ASCIIDOC_TRUE}" && test -z "${HAVE_ASCIIDOC_FALSE}"; then as_fn_error $? "conditional \"HAVE_ASCIIDOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_ASCIIDOC_TRUE}" && test -z "${WITH_ASCIIDOC_FALSE}"; then - as_fn_error $? "conditional \"WITH_ASCIIDOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_DOCS_TRUE}" && test -z "${WITH_DOCS_FALSE}"; then - as_fn_error $? "conditional \"WITH_DOCS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_MANS_TRUE}" && test -z "${WITH_MANS_FALSE}"; then - as_fn_error $? "conditional \"WITH_MANS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${SKIP_MANS_TRUE}" && test -z "${SKIP_MANS_FALSE}"; then - as_fn_error $? "conditional \"SKIP_MANS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${DOC_INSTALL_DISTED_MANS_TRUE}" && test -z "${DOC_INSTALL_DISTED_MANS_FALSE}"; then - as_fn_error $? "conditional \"DOC_INSTALL_DISTED_MANS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then as_fn_error $? "conditional \"WITH_DEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -39225,42 +23632,18 @@ if test -z "${WITH_DEV_TRUE}" && test -z "${WITH_DEV_FALSE}"; then as_fn_error $? "conditional \"WITH_DEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${SOME_DRIVERS_TRUE}" && test -z "${SOME_DRIVERS_FALSE}"; then + as_fn_error $? "conditional \"SOME_DRIVERS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WITH_PKG_CONFIG_TRUE}" && test -z "${WITH_PKG_CONFIG_FALSE}"; then as_fn_error $? "conditional \"WITH_PKG_CONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${WITH_SOLARIS_SMF_TRUE}" && test -z "${WITH_SOLARIS_SMF_FALSE}"; then - as_fn_error $? "conditional \"WITH_SOLARIS_SMF\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SOLARIS_PKG_SVR4_TRUE}" && test -z "${WITH_SOLARIS_PKG_SVR4_FALSE}"; then - as_fn_error $? "conditional \"WITH_SOLARIS_PKG_SVR4\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SOLARIS_PKG_IPS_TRUE}" && test -z "${WITH_SOLARIS_PKG_IPS_FALSE}"; then - as_fn_error $? "conditional \"WITH_SOLARIS_PKG_IPS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_CXX11_TRUE}" && test -z "${HAVE_CXX11_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CXX11\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_CPPUNIT_TRUE}" && test -z "${HAVE_CPPUNIT_FALSE}"; then - as_fn_error $? "conditional \"HAVE_CPPUNIT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_AUGLENS_TRUE}" && test -z "${WITH_AUGLENS_FALSE}"; then - as_fn_error $? "conditional \"WITH_AUGLENS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_AUGPARSE_TRUE}" && test -z "${HAVE_AUGPARSE_FALSE}"; then - as_fn_error $? "conditional \"HAVE_AUGPARSE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${WITH_HOTPLUG_TRUE}" && test -z "${WITH_HOTPLUG_FALSE}"; then as_fn_error $? "conditional \"WITH_HOTPLUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -39273,30 +23656,18 @@ if test -z "${WITH_DEVD_TRUE}" && test -z "${WITH_DEVD_FALSE}"; then as_fn_error $? "conditional \"WITH_DEVD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MANUALUPDATE_TRUE}" && test -z "${MANUALUPDATE_FALSE}"; then + as_fn_error $? "conditional \"MANUALUPDATE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_ASPELL_TRUE}" && test -z "${HAVE_ASPELL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_ASPELL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${SYSTEM_AIX_TRUE}" && test -z "${SYSTEM_AIX_FALSE}"; then as_fn_error $? "conditional \"SYSTEM_AIX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_VALGRIND_TRUE}" && test -z "${HAVE_VALGRIND_FALSE}"; then - as_fn_error $? "conditional \"HAVE_VALGRIND\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_VALGRIND_TRUE}" && test -z "${WITH_VALGRIND_FALSE}"; then - as_fn_error $? "conditional \"WITH_VALGRIND\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_SNMP_TRUE}" && test -z "${WITH_SNMP_FALSE}"; then - as_fn_error $? "conditional \"WITH_SNMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_SNMP_TRUE}" && test -z "${HAVE_SNMP_FALSE}"; then - as_fn_error $? "conditional \"HAVE_SNMP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${BUILDING_IN_TREE_TRUE}" && test -z "${BUILDING_IN_TREE_FALSE}"; then - as_fn_error $? "conditional \"BUILDING_IN_TREE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -39694,7 +24065,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by nut $as_me 2.8.0, which was +This file was extended by nut $as_me 2.7.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -39760,7 +24131,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -nut config.status 2.8.0 +nut config.status 2.7.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -39879,7 +24250,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -39895,7 +24266,6 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' -shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -39945,13 +24315,10 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -40016,8 +24383,7 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' -configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -40122,12 +24488,9 @@ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -lt_cv_nm_interface \ nm_file_list_spec \ -lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -40193,7 +24556,7 @@ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -40220,8 +24583,7 @@ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -configure_time_dlsearch_path \ -configure_time_lt_sys_library_path \ +sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ @@ -40235,7 +24597,7 @@ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -40244,16 +24606,19 @@ postlink_cmds_CXX; do done ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options that allow our +# See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}"; then +if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' + TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -40283,7 +24648,6 @@ do "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/driver.list") CONFIG_FILES="$CONFIG_FILES data/driver.list" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "docs/cables/Makefile") CONFIG_FILES="$CONFIG_FILES docs/cables/Makefile" ;; "docs/docinfo.xml") CONFIG_FILES="$CONFIG_FILES docs/docinfo.xml" ;; "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; @@ -40291,12 +24655,12 @@ do "lib/libupsclient-config") CONFIG_FILES="$CONFIG_FILES lib/libupsclient-config" ;; "lib/libupsclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libupsclient.pc" ;; "lib/libnutclient.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutclient.pc" ;; - "lib/libnutclientstub.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutclientstub.pc" ;; "lib/libnutscan.pc") CONFIG_FILES="$CONFIG_FILES lib/libnutscan.pc" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "scripts/Aix/nut-aix.spec") CONFIG_FILES="$CONFIG_FILES scripts/Aix/nut-aix.spec" ;; "scripts/augeas/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/augeas/Makefile" ;; "scripts/augeas/nutnutconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutnutconf.aug" ;; + "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; "scripts/augeas/nutupsdconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdconf.aug" ;; "scripts/augeas/nutupsdusers.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsdusers.aug" ;; "scripts/augeas/nutupsmonconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsmonconf.aug" ;; @@ -40305,60 +24669,32 @@ do "scripts/augeas/nutupssetconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupssetconf.aug" ;; "scripts/avahi/nut.service") CONFIG_FILES="$CONFIG_FILES scripts/avahi/nut.service" ;; "scripts/devd/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/devd/Makefile" ;; + "scripts/devd/nut-usb.conf") CONFIG_FILES="$CONFIG_FILES scripts/devd/nut-usb.conf" ;; "scripts/hotplug/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/Makefile" ;; "scripts/hotplug/libhidups") CONFIG_FILES="$CONFIG_FILES scripts/hotplug/libhidups" ;; "scripts/HP-UX/nut.psf") CONFIG_FILES="$CONFIG_FILES scripts/HP-UX/nut.psf" ;; + "scripts/HP-UX/postinstall") CONFIG_FILES="$CONFIG_FILES scripts/HP-UX/postinstall" ;; "scripts/python/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/python/Makefile" ;; - "scripts/python/module/PyNUT.py") CONFIG_FILES="$CONFIG_FILES scripts/python/module/PyNUT.py" ;; - "scripts/upsdrvsvcctl/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/upsdrvsvcctl/Makefile" ;; "scripts/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/systemd/Makefile" ;; - "scripts/systemd/nut-common.tmpfiles") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-common.tmpfiles" ;; - "scripts/systemd/nut-driver@.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-driver@.service" ;; + "scripts/systemd/nut-driver.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-driver.service" ;; "scripts/systemd/nut-monitor.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-monitor.service" ;; "scripts/systemd/nut-server.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-server.service" ;; - "scripts/systemd/nut-driver-enumerator.service") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-driver-enumerator.service" ;; - "scripts/systemd/nut-driver-enumerator.path") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nut-driver-enumerator.path" ;; - "scripts/Solaris/nut-driver-enumerator.xml") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut-driver-enumerator.xml" ;; - "scripts/Solaris/nut-driver.xml") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut-driver.xml" ;; - "scripts/Solaris/nut-monitor.xml") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut-monitor.xml" ;; - "scripts/Solaris/nut-server.xml") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut-server.xml" ;; - "scripts/Solaris/nut.xml") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut.xml" ;; + "scripts/systemd/nutshutdown") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nutshutdown" ;; "scripts/Solaris/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/Makefile" ;; "scripts/Solaris/pkginfo") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/pkginfo" ;; + "scripts/Solaris/postinstall") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/postinstall" ;; + "scripts/Solaris/preremove") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/preremove" ;; + "scripts/Solaris/nut") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut" ;; "scripts/udev/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/udev/Makefile" ;; "scripts/udev/nut-ipmipsu.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-ipmipsu.rules" ;; - "scripts/ufw/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ufw/Makefile" ;; + "scripts/udev/nut-usbups.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-usbups.rules" ;; "scripts/ufw/nut.ufw.profile") CONFIG_FILES="$CONFIG_FILES scripts/ufw/nut.ufw.profile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "server/Makefile") CONFIG_FILES="$CONFIG_FILES server/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/nut-scanner/Makefile") CONFIG_FILES="$CONFIG_FILES tools/nut-scanner/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/NIT/Makefile") CONFIG_FILES="$CONFIG_FILES tests/NIT/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "scripts/Aix/nut.init") CONFIG_FILES="$CONFIG_FILES scripts/Aix/nut.init" ;; - "scripts/HP-UX/postinstall") CONFIG_FILES="$CONFIG_FILES scripts/HP-UX/postinstall" ;; - "scripts/python/app/NUT-Monitor-py2gtk2") CONFIG_FILES="$CONFIG_FILES scripts/python/app/NUT-Monitor-py2gtk2" ;; - "scripts/python/app/NUT-Monitor-py3qt5") CONFIG_FILES="$CONFIG_FILES scripts/python/app/NUT-Monitor-py3qt5" ;; - "scripts/augeas/gen-nutupsconf-aug.py") CONFIG_FILES="$CONFIG_FILES scripts/augeas/gen-nutupsconf-aug.py" ;; - "scripts/python/module/test_nutclient.py") CONFIG_FILES="$CONFIG_FILES scripts/python/module/test_nutclient.py" ;; - "scripts/upsdrvsvcctl/nut-driver-enumerator.sh") CONFIG_FILES="$CONFIG_FILES scripts/upsdrvsvcctl/nut-driver-enumerator.sh" ;; - "scripts/upsdrvsvcctl/upsdrvsvcctl") CONFIG_FILES="$CONFIG_FILES scripts/upsdrvsvcctl/upsdrvsvcctl" ;; - "scripts/systemd/nutshutdown") CONFIG_FILES="$CONFIG_FILES scripts/systemd/nutshutdown" ;; - "scripts/Solaris/svc-nut-server") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/svc-nut-server" ;; - "scripts/Solaris/svc-nut-monitor") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/svc-nut-monitor" ;; - "scripts/Solaris/precheck.py") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/precheck.py" ;; - "scripts/Solaris/preinstall") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/preinstall" ;; - "scripts/Solaris/postinstall") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/postinstall" ;; - "scripts/Solaris/preremove") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/preremove" ;; - "scripts/Solaris/postremove") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/postremove" ;; - "scripts/Solaris/preproto.pl") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/preproto.pl" ;; - "scripts/Solaris/nut") CONFIG_FILES="$CONFIG_FILES scripts/Solaris/nut" ;; - "tools/gitlog2changelog.py") CONFIG_FILES="$CONFIG_FILES tools/gitlog2changelog.py" ;; - "tools/nut-snmpinfo.py") CONFIG_FILES="$CONFIG_FILES tools/nut-snmpinfo.py" ;; - "scripts/augeas/nutupsconf.aug") CONFIG_FILES="$CONFIG_FILES scripts/augeas/nutupsconf.aug" ;; - "scripts/udev/nut-usbups.rules") CONFIG_FILES="$CONFIG_FILES scripts/udev/nut-usbups.rules" ;; - "scripts/devd/nut-usb.conf") CONFIG_FILES="$CONFIG_FILES scripts/devd/nut-usb.conf" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -40958,35 +25294,29 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - # TODO: see whether this extra hack can be removed once we start - # requiring Autoconf 2.70 or later. - case $CONFIG_FILES in #( - *\'*) : - eval set x "$CONFIG_FILES" ;; #( - *) : - set x $CONFIG_FILES ;; #( - *) : - ;; -esac + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac shift - # Used to flag and report bootstrapping failures. - am_rc=0 - for am_mf + for mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile which includes - # dependency-tracking related rules and includes. - # Grep'ing the whole file directly is not great: AIX grep has a line + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ - || continue - am_dirpart=`$as_dirname -- "$am_mf" || -$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$am_mf" : 'X\(//\)[^/]' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -41004,100 +25334,106 @@ $as_echo X"$am_mf" | q } s/.*/./; q'` - am_filepart=`$as_basename -- "$am_mf" || -$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ - X"$am_mf" : 'X\(//\)$' \| \ - X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } - /^X\/\(\/\/\)$/{ + /^X\(\/\/\)[^/].*/{ s//\1/ q } - /^X\/\(\/\).*/{ + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` - { echo "$as_me:$LINENO: cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles" >&5 - (cd "$am_dirpart" \ - && sed -e '/# am--include-marker/d' "$am_filepart" \ - | $MAKE -f - am--depfiles) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } || am_rc=$? + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done - if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). -See \`config.log' for more details" "$LINENO" 5; } - fi - { am_dirpart=; unset am_dirpart;} - { am_filepart=; unset am_filepart;} - { am_mf=; unset am_mf;} - { am_rc=; unset am_rc;} - rm -f conftest-deps.mk } ;; "libtool":C) - # See if we are running on zsh, and set the options that allow our + # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}"; then + if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi - cfgfile=${ofile}T + cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL -# Generated automatically by $as_me ($PACKAGE) $VERSION + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. - -# Provide generalized library-building support services. -# Written by Gordon Matzigkeit, 1996 - -# Copyright (C) 2014 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# GNU Libtool is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of of the License, or -# (at your option) any later version. # -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program or library that is built -# using GNU Libtool, you may include this file under the same -# distribution terms that you use for the rest of that program. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 # -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. -available_tags='CXX ' - -# Configured defaults for sys_lib_dlsearch_path munging. -: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} +available_tags="CXX " # ### BEGIN LIBTOOL CONFIG @@ -41117,9 +25453,6 @@ pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install -# Shared archive member basename,for filename based shared library versioning on AIX. -shared_archive_member_spec=$shared_archive_member_spec - # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -41237,27 +25570,18 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl -# Transform the output of nm into a list of symbols to manually relocate. -global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import - # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name lister interface. -nm_interface=$lt_lt_cv_nm_interface - # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and where our libraries should be installed. +# The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot -# Command to truncate a binary pipe. -lt_truncate_bin=$lt_lt_cv_truncate_bin - # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -41348,11 +25672,8 @@ hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Detected run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path - -# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. -configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -41445,13 +25766,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -41515,65 +25836,6 @@ compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG -_LT_EOF - - cat <<'_LT_EOF' >> "$cfgfile" - -# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE - -# func_munge_path_list VARIABLE PATH -# ----------------------------------- -# VARIABLE is name of variable containing _space_ separated list of -# directories to be munged by the contents of PATH, which is string -# having a format: -# "DIR[:DIR]:" -# string "DIR[ DIR]" will be prepended to VARIABLE -# ":DIR[:DIR]" -# string "DIR[ DIR]" will be appended to VARIABLE -# "DIRP[:DIRP]::[DIRA:]DIRA" -# string "DIRP[ DIRP]" will be prepended to VARIABLE and string -# "DIRA[ DIRA]" will be appended to VARIABLE -# "DIR[:DIR]" -# VARIABLE will be replaced by "DIR[ DIR]" -func_munge_path_list () -{ - case x$2 in - x) - ;; - *:) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" - ;; - x:*) - eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" - ;; - *::*) - eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" - eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" - ;; - *) - eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" - ;; - esac -} - - -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -func_cc_basename () -{ - for cc_temp in $*""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac - done - func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -} - - -# ### END FUNCTIONS SHARED WITH CONFIGURE - _LT_EOF case $host_os in @@ -41582,7 +25844,7 @@ _LT_EOF # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test set != "${COLLECT_NAMES+set}"; then +if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -41591,7 +25853,7 @@ _LT_EOF esac -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if @@ -41601,6 +25863,165 @@ ltmain=$ac_aux_dir/ltmain.sh sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -41687,13 +26108,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX -# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes +# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \$shlibpath_var if the +# "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX @@ -41759,26 +26180,6 @@ compiler_lib_search_path=$lt_compiler_lib_search_path_CXX _LT_EOF ;; - "scripts/Aix/nut.init":F) chmod +x "scripts/Aix/nut.init" ;; - "scripts/HP-UX/postinstall":F) chmod +x "scripts/HP-UX/postinstall" ;; - "scripts/python/app/NUT-Monitor-py2gtk2":F) chmod +x "scripts/python/app/NUT-Monitor-py2gtk2" ;; - "scripts/python/app/NUT-Monitor-py3qt5":F) chmod +x "scripts/python/app/NUT-Monitor-py3qt5" ;; - "scripts/augeas/gen-nutupsconf-aug.py":F) chmod +x "scripts/augeas/gen-nutupsconf-aug.py" ;; - "scripts/python/module/test_nutclient.py":F) chmod +x "scripts/python/module/test_nutclient.py" ;; - "scripts/upsdrvsvcctl/nut-driver-enumerator.sh":F) chmod +x "scripts/upsdrvsvcctl/nut-driver-enumerator.sh" ;; - "scripts/upsdrvsvcctl/upsdrvsvcctl":F) chmod +x "scripts/upsdrvsvcctl/upsdrvsvcctl" ;; - "scripts/systemd/nutshutdown":F) chmod +x "scripts/systemd/nutshutdown" ;; - "scripts/Solaris/svc-nut-server":F) chmod +x "scripts/Solaris/svc-nut-server" ;; - "scripts/Solaris/svc-nut-monitor":F) chmod +x "scripts/Solaris/svc-nut-monitor" ;; - "scripts/Solaris/precheck.py":F) chmod +x "scripts/Solaris/precheck.py" ;; - "scripts/Solaris/preinstall":F) chmod +x "scripts/Solaris/preinstall" ;; - "scripts/Solaris/postinstall":F) chmod +x "scripts/Solaris/postinstall" ;; - "scripts/Solaris/preremove":F) chmod +x "scripts/Solaris/preremove" ;; - "scripts/Solaris/postremove":F) chmod +x "scripts/Solaris/postremove" ;; - "scripts/Solaris/preproto.pl":F) chmod +x "scripts/Solaris/preproto.pl" ;; - "scripts/Solaris/nut":F) chmod +x "scripts/Solaris/nut" ;; - "tools/gitlog2changelog.py":F) chmod +x "tools/gitlog2changelog.py" ;; - "tools/nut-snmpinfo.py":F) chmod +x "tools/nut-snmpinfo.py" ;; esac done # for ac_tag @@ -41821,12 +26222,3 @@ fi cat conf_nut_report_feature - echo "------------------" - echo "Compiler settings:" - printf 'CC \t:%s\n' "$CC" - printf 'CFLAGS \t:%s\n' "$CFLAGS" - printf 'CXX \t:%s\n' "$CXX" - printf 'CXXFLAGS\t:%s\n' "$CXXFLAGS" - printf 'CPP \t:%s\n' "$CPP" - printf 'CPPFLAGS\t:%s\n' "$CPPFLAGS" - diff --git a/configure.ac b/configure.ac index 3aa26c2..41db8d3 100644 --- a/configure.ac +++ b/configure.ac @@ -2,40 +2,32 @@ dnl +------------------------------------------------------------------+ dnl | Network UPS Tools: configure.ac | dnl +------------------------------------------------------------------+ -dnl NUT version number is defined here, with a Git suffixed macro like -dnl NUT_VERSION_MACRO "2.7.4-2838-gdfc3ac08" -dnl in include/nut_version.h (generated by make) -AC_INIT([nut],[2.8.0],[https://github.com/networkupstools/nut/issues]) +dnl NUT version number is defined here, with a Git suffix in include/nut_version.h +AC_INIT(nut, 2.7.4, [https://github.com/networkupstools/nut/issues]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR(server/upsd.c) AC_CONFIG_MACRO_DIR([m4]) echo "Network UPS Tools version ${PACKAGE_VERSION}" -AC_CANONICAL_TARGET +AC_CANONICAL_SYSTEM NUT_CHECK_OS -NUT_STASH_WARNINGS -AC_CONFIG_HEADERS([include/config.h]) +AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) AM_INIT_AUTOMAKE([subdir-objects]) -dnl we need Autoconf 2.61 or better to enable features of Posix that are extensions to C -dnl (and actually 2.64 or better for m4/ax_check_compile_flag.m4 when it is sourced) +dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C AC_MSG_CHECKING(for autoconf macro to enable system extensions) -m4_version_prereq(2.61, [ +m4_version_prereq(2.60, [ AC_MSG_RESULT(yes) AC_USE_SYSTEM_EXTENSIONS ], [ AC_MSG_RESULT(no) ]) -AC_PREREQ([2.64]) - dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile dnl in sync after Git updates. AM_MAINTAINER_MODE -dnl Some systems have older autotools without direct macro support for PKG_CONF* -NUT_CHECK_PKGCONFIG - +dnl PKG_PROG_PKG_CONFIG dnl Various version related processing dnl ---------------------------------- @@ -53,7 +45,7 @@ AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version]) dnl Should not be necessary, since old servers have well-defined errors for dnl unsupported commands: -NUT_NETVERSION="1.3" +NUT_NETVERSION="1.2" AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version]) @@ -75,13 +67,6 @@ cgiexecdir='${exec_prefix}/cgi-bin' driverexecdir='${exec_prefix}/bin' htmldir='${prefix}/html' pkgconfigdir='${libdir}/pkgconfig' -auglensdir='/usr/share/augeas/lenses/dist' -if test ! -d "${auglensdir}"; then - auglensdir='/usr/share/augeas/lenses' - if test ! -d "${auglensdir}"; then - auglensdir='' - fi -fi hotplugdir='/etc/hotplug' if test ! -d "${hotplugdir}"; then hotplugdir='' @@ -104,9 +89,6 @@ fi RUN_AS_USER="nobody" RUN_AS_GROUP="nobody" -AS_IF([test -n "`getent group nogroup`" && ! test -n "`getent group "${RUN_AS_GROUP}"`"], - [RUN_AS_GROUP="nogroup"] -) PIDPATH="/var/run" dnl Define directory where LIBOBJS replacement functions are @@ -114,243 +96,26 @@ AC_CONFIG_LIBOBJ_DIR([common]) dnl +------------------------------------------------------------------- -dnl AC_PROG_CC -dnl Macro AC_PROG_CC_C99 is obsolete; use AC_PROG_CC -dnl Note that NUT does not support building with C89 anyway -dnl AC_PROG_CC_C99 +AC_PROG_CC dnl Needed for per-target flags AM_PROG_CC_C_O AC_PROG_CPP AC_PROG_CXX -AC_PROG_CXX_C_O AC_PROG_INSTALL -AC_PROG_MKDIR_P -AC_PROG_LN_S AC_PROG_EGREP AC_PATH_PROG(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) -dnl Postpone call to LT_INIT/AC_CONFIG_FILES to allow disabling static lib +dnl Postpone call to AC_PROG_LIBTOOL to allow disabling static lib AC_C_BIGENDIAN AC_C_INLINE AC_C_FLEXIBLE_ARRAY_MEMBER AC_C_VARARRAYS -dnl Note: the compiler/pragma/attr methods below are custom for NUT codebase: -NUT_COMPILER_FAMILY -dnl Help find warning/error details in a wall of text (must be processed before NUT_COMPILER_FAMILY_FLAGS): -NUT_ARG_ENABLE([Wcolor], - [Request that compiler output is colorized (no = leave it up to compiler defaults)], - [no]) -NUT_COMPILER_FAMILY_FLAGS -AX_C_PRAGMAS -AX_C___ATTRIBUTE__ -AX_C_PRINTF_STRING_NULL -AC_CHECK_FUNCS(flock lockf fcvt fcvtl pow10 round abs_val abs) - -AC_CHECK_HEADER([float.h], - [AC_DEFINE([HAVE_FLOAT_H], [1], - [Define to 1 if you have .])]) -AC_CHECK_HEADER([math.h], - [AC_DEFINE([HAVE_MATH_H], [1], - [Define to 1 if you have .])]) -AC_CHECK_FUNCS(fabs fabsf fabsl, [], [], -[#ifdef HAVE_MATH_H -# include -#endif -#ifdef HAVE_FLOAT_H -# include -#endif]) - -AC_CHECK_HEADER([limits.h], - [AC_DEFINE([HAVE_LIMITS_H], [1], - [Define to 1 if you have .])]) - -AC_CHECK_HEADER([signal.h], - [AC_DEFINE([HAVE_SIGNAL_H], [1], - [Define to 1 if you have .])]) - -AC_CHECK_HEADER([sys/signal.h], - [AC_DEFINE([HAVE_SYS_SIGNAL_H], [1], - [Define to 1 if you have .])]) - -AC_CHECK_HEADER([sys/resource.h], - [AC_MSG_CHECKING([for struct rlimit and getrlimit()]) - AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -#include -], -[struct rlimit limit; -getrlimit(RLIMIT_NOFILE, &limit); -/* Do not care about actual return value in this test, - * normally check for non-zero meaning to look in errno */ -] - )], - [AC_DEFINE([HAVE_SYS_RESOURCE_H], [1], - [Define to 1 if you have with usable struct rlimit and getrlimit().]) - AC_MSG_RESULT([ok]) - ], - [AC_MSG_RESULT([no])] - ) - AC_LANG_POP([C]) - ] -) - -AC_CHECK_HEADER([semaphore.h], - [AC_DEFINE([HAVE_SEMAPHORE_H], [1], - [Define to 1 if you have .]) - AC_MSG_CHECKING([for sem_t, sem_init() and sem_destroy()]) - AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -#include -], -[sem_t semaphore; -sem_init(&semaphore, 0, 4); -sem_destroy(&semaphore); -/* Do not care about actual return value in this test, - * normally check for non-zero meaning to look in errno */ -] - )], - [AC_DEFINE([HAVE_SEMAPHORE], [1], - [Define to 1 if you have with usable sem_t sem_init() and sem_destroy().]) - AC_MSG_RESULT([ok]) - ], - [AC_MSG_RESULT([no])] - ) - AC_LANG_POP([C]) - ] -) - +AC_CHECK_FUNCS(flock lockf fcvt fcvtl) AC_CHECK_FUNCS(cfsetispeed tcsendbreak) AC_CHECK_FUNCS(seteuid setsid getpassphrase) AC_CHECK_FUNCS(on_exit strptime setlogmask) AC_CHECK_DECLS(LOG_UPTO, [], [], [#include ]) -dnl These common routines are not available in strict C standard library -dnl compilation modes (not part of ANSI or later standard), only in GNU, -dnl POSIX or other extension modes. Note that on modern systems they are -dnl available, just hidden in headers - so AC_CHECK_FUNCS() finds them -dnl by adding a declaration, while the "real" codebase can't use them. -AC_MSG_NOTICE( -[----------------------------------------------------------------------- -The next few tests look for required C library routines; if something is -not found, you may need to enable a different C standard or extension macro -version. You may also have to configure without extreme warning levels -since autotools tests fail those on their own and assume system lacks -stuff (although note we try to not involve standard -W* flags here). ------------------------------------------------------------------------]) -dnl# AC_CHECK_FUNCS(strcasecmp strncasecmp, -dnl# [], [AC_MSG_WARN([Required C library routine not found; try adding __EXTENSIONS__])]) -dnl These appear with CFLAGS="-std=c99 -D_POSIX_C_SOURCE=200112L": -dnl# Methods below currently do not cause build errors for C99+ modes so are -dnl# not tested as thoroughly as those further below: - AC_CHECK_FUNCS(strtok_r fileno localtime_r sigemptyset sigaction, - [], [AC_MSG_WARN([Required C library routine not found; try adding -D_POSIX_C_SOURCE=200112L])]) - -AC_LANG_PUSH([C]) - -AC_CHECK_HEADER([string.h], - [AC_DEFINE([HAVE_STRING_H], [1], - [Define to 1 if you have .])]) - -AC_CHECK_HEADER([strings.h], - [AC_DEFINE([HAVE_STRINGS_H], [1], - [Define to 1 if you have .])]) - -CODE_STRINGINCL='#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif' - -AC_CACHE_CHECK([for strcasecmp(s1,s2)], - [ac_cv_func_strcasecmp], - [AX_RUN_OR_LINK_IFELSE( - [AC_LANG_PROGRAM([$CODE_STRINGINCL], - [if (strcasecmp("STR1", "str1") != 0) return 1])], - [ac_cv_func_strcasecmp=yes], [ac_cv_func_strcasecmp=no] - )]) -AS_IF([test x"${ac_cv_func_strcasecmp}" = xyes], - [AC_DEFINE([HAVE_STRCASECMP], 1, [defined if standard library has, and C standard allows, the strcasecmp(s1,s2) method])], - [AC_MSG_WARN([Required C library routine strcasecmp not found; try adding __EXTENSIONS__])] - ) - -AC_CACHE_CHECK([for strncasecmp(s1,s2,n)], - [ac_cv_func_strncasecmp], - [AX_RUN_OR_LINK_IFELSE( - [AC_LANG_PROGRAM([$CODE_STRINGINCL], - [if (strncasecmp("STR1", "strX", 2) != 0) return 1])], - [ac_cv_func_strncasecmp=yes], [ac_cv_func_strncasecmp=no] - )]) -AS_IF([test x"${ac_cv_func_strncasecmp}" = xyes], - [AC_DEFINE([HAVE_STRNCASECMP], 1, [defined if standard library has, and C standard allows, the strncasecmp(s1,s2,n) method])], - [AC_MSG_WARN([Required C library routine strncasecmp not found; try adding __EXTENSIONS__])] - ) - -AC_CACHE_CHECK([for strdup(s)], - [ac_cv_func_strdup], - [AX_RUN_OR_LINK_IFELSE( - [AC_LANG_PROGRAM([$CODE_STRINGINCL], - [[int res = 0; -char *t = "Test"; -char *s = strdup(t); -if (!s || !(s[0]=='T'&&s[1]=='e'&&s[2]=='s'&&s[3]=='t'&&s[4]=='\0') || s == t) res = 1; -if (s) free (s); -if (res != 0) return res -/* autoconf adds ";return 0;" */ -]])], - [ac_cv_func_strdup=yes], [ac_cv_func_strdup=no] - )]) -AS_IF([test x"${ac_cv_func_strdup}" = xyes], - [AC_DEFINE([HAVE_STRDUP], 1, [defined if standard library has, and C standard allows, the strdup(s) method])], - [AC_MSG_WARN([Required C library routine strdup not found; try adding -D_POSIX_C_SOURCE=200112L])] - ) - -AC_CACHE_CHECK([for usleep(us)], - [ac_cv_func_usleep], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include - ]], - [[useconds_t us = 1000; -if (usleep(us) != 0) return 1 /* per doc, no erros are returned actually*/ -/* autoconf adds ";return 0;" */ -]])], - [ac_cv_func_usleep=yes], [ac_cv_func_usleep=no] - )]) -AS_IF([test x"${ac_cv_func_usleep}" = xyes], - [AC_DEFINE([HAVE_USLEEP], 1, [defined if standard library has, and C standard allows, the usleep(us) method])], - [AC_MSG_WARN([Required C library routine usleep not found; try adding -D_POSIX_C_SOURCE=200112L])] - ) - -AC_LANG_POP([C]) - -dnl These routines' arg types differ in strict C standard mode -dnl from what they use in the modes expected by NUT codebase: -dnl bind() : /usr/include/x86_64-linux-gnu/sys/socket.h:123:12: note: expected '__CONST_SOCKADDR_ARG {aka union }' but argument is of type 'struct sockaddr *' -dnl accept() : /usr/include/x86_64-linux-gnu/sys/socket.h:243:12: note: expected '__SOCKADDR_ARG {aka union }' but argument is of type 'struct sockaddr *' -dnl connect() : /usr/include/x86_64-linux-gnu/sys/socket.h:137:12: note: expected '__CONST_SOCKADDR_ARG {aka union }' but argument is of type 'const struct sockaddr *' -dnl sendto() : /usr/include/x86_64-linux-gnu/sys/socket.h:163:16: note: expected '__CONST_SOCKADDR_ARG {aka union }' but argument is of type 'struct sockaddr *' -dnl recvfrom() : /usr/include/x86_64-linux-gnu/bits/socket2.h:64:1: note: expected '__SOCKADDR_ARG {aka union }' but argument is of type 'struct sockaddr *' - -AC_MSG_CHECKING([whether ln -sr works]) -dnl We need to relative-symlink some files. Or hardlink. Or copy... -LN_S_R="cp -pR" -if test "$as_ln_s" = "ln -s" ; then - LN_S_R="ln" - DIR1="$(mktemp -d "dir1.XXXXXXX")" && \ - DIR2="$(mktemp -d "dir2.XXXXXXX")" && \ - touch "${DIR1}/a" && \ - $as_ln_s -r "${DIR1}/a" "${DIR2}/b" && \ - ls -la "${DIR2}/b" | grep '\.\./' > /dev/null && \ - LN_S_R="$as_ln_s -r" - rm -rf "${DIR1}" "${DIR2}" -fi -AC_SUBST([LN_S_R], [${LN_S_R}]) -if test "$LN_S_R" = "ln -s -r" ; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no, using $LN_S_R]) -fi - dnl the following may add stuff to LIBOBJS (is this still needed?) AC_CHECK_FUNCS(vsnprintf snprintf, [], [ AC_LIBOBJ(snprintf) @@ -360,6 +125,27 @@ AC_CHECK_FUNCS(vsnprintf snprintf, [], [ AC_REPLACE_FUNCS(setenv strerror atexit) + +dnl +dnl Tests for CppUnit availability and usability +dnl Using CppUnit implies C++ support! +dnl Theoretically, libcppunit-dev will pull up to g++, through libstdc++... +dnl AM_PATH_CPPUNIT(1.9.6) + +PKG_CHECK_MODULES(CPPUNIT, cppunit, have_cppunit=yes, have_cppunit=no) +if test "${have_cppunit}" != "yes" ; then + AC_MSG_WARN([libcppunit not found.]) +fi +AM_CONDITIONAL(HAVE_CPPUNIT, test "${have_cppunit}" = "yes") + +dnl +dnl Only use these when compiling with gcc +dnl +if ( test "${GCC}" = "yes" ) +then + CFLAGS="${CFLAGS} -Wall -Wsign-compare" +fi + case ${target_os} in solaris2* ) dnl On Solaris, this allows errno to use thread local storage @@ -416,292 +202,43 @@ AC_CHECK_DECLS(__func__, [], [ AC_DEFINE(__func__, __LINE__, [Replace missing __func__ declaration]) ], [AC_INCLUDES_DEFAULT]) ], [AC_INCLUDES_DEFAULT]) - + dnl Solaris compatibility - check for -lnsl and -lsocket AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(connect, socket) -dnl All current systems provide time.h; it need not be checked for. -dnl Not all systems provide sys/time.h, but those that do, all allow -dnl you to include it and time.h simultaneously. -dnl NUT codebase provides the include/timehead.h to wrap these nuances. -AC_CHECK_HEADERS_ONCE([sys/time.h time.h sys/types.h sys/socket.h netdb.h]) -AS_IF([test "$ac_cv_header_sys_time_h" = yes], - [AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both - and . This macro is deemed obsolete by autotools.]) - ], []) +AC_HEADER_TIME +AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h sys/termios.h sys/time.h, [], [], [AC_INCLUDES_DEFAULT]) -AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h, [], [], [AC_INCLUDES_DEFAULT]) - - -dnl pthread related checks -dnl Note: pthread_tryjoin_np() should be available since glibc 2.3.3, according -dnl to https://man7.org/linux/man-pages/man3/pthread_tryjoin_np.3.html +# pthread related checks AC_SEARCH_LIBS([pthread_create], [pthread], - [AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code]) - AC_SEARCH_LIBS([pthread_tryjoin_np], [pthread], - [AC_DEFINE(HAVE_PTHREAD_TRYJOIN, 1, [Define to enable pthread_tryjoin support code])], - []) - ], + [AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code])], []) dnl ---------------------------------------------------------------------- dnl Check for types and define possible replacements NUT_TYPE_SOCKLEN_T -NUT_FUNC_GETNAMEINFO_ARGTYPES - -dnl ---------------------------------------------------------------------- -dnl Check for python binary program names per language version -dnl to embed into scripts and Make rules -NUT_CHECK_PYTHON -NUT_CHECK_PYTHON2 -NUT_CHECK_PYTHON3 - -dnl ---------------------------------------------------------------------- -dnl check for --with-drivers=all (or --with-drivers=name[,name...]) flag - -dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs -dnl (square brackets), so the help string depends on the version used -AC_MSG_CHECKING(which drivers to build) -AC_ARG_WITH(drivers, - AS_HELP_STRING([m4_version_prereq(2.62, - [@<:@--with-drivers=driver@<:@,driver@:>@@:>@], - [[[[--with-drivers=driver@<:@,driver@:>@]]]])], - [Only build specific drivers (all)]), -[ - case "${withval}" in - yes|no|'') - AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt) - ;; - all) - dnl Explicit request to build all drivers (unless specified), or fail - DRIVER_BUILD_LIST="all" - if test -z "${with_serial}"; then with_serial="yes"; fi - if test -z "${with_usb}"; then with_usb="yes"; fi - if test -z "${with_snmp}"; then with_snmp="yes"; fi - if test -z "${with_neon}"; then with_neon="yes"; fi - if test -z "${with_powerman}"; then with_powerman="yes"; fi - if test -z "${with_modbus}"; then with_modbus="yes"; fi - if test -z "${with_ipmi}"; then with_ipmi="yes"; fi - - dnl Platform-dependent snowflakes that are required or auto: - if test -z "${with_linux_i2c}"; then - case ${target_os} in - linux*) with_linux_i2c="yes";; - *) with_linux_i2c="auto";; - esac - fi - if test -z "${with_macosx_ups}"; then - if test -d /System/Library/Frameworks/IOKit.framework/ ; then - with_macosx_ups="yes" - else - with_macosx_ups="auto" - fi - fi - AC_MSG_RESULT(${DRIVER_BUILD_LIST}) - ;; - auto) - dnl Explicit request to build all drivers that we can - DRIVER_BUILD_LIST="all" - if test -z "${with_serial}"; then with_serial="${withval}"; fi - if test -z "${with_usb}"; then with_usb="${withval}"; fi - if test -z "${with_snmp}"; then with_snmp="${withval}"; fi - if test -z "${with_neon}"; then with_neon="${withval}"; fi - if test -z "${with_powerman}"; then with_powerman="${withval}"; fi - if test -z "${with_modbus}"; then with_modbus="${withval}"; fi - if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi - if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi - if test -z "${with_macosx_ups}"; then with_macosx_ups="${withval}"; fi - AC_MSG_RESULT(${DRIVER_BUILD_LIST}) - ;; - *) - DRIVER_BUILD_LIST="`echo ${withval} | sed 's/,/ /g'`" - AC_MSG_RESULT(${DRIVER_BUILD_LIST}) - - AS_IF([test -n "$DRIVER_BUILD_LIST"], - [dnl DRVLIST is occasionally synced with drivers/Makefile.am - dnl NOTE: Currently "USB_DRIVERLIST" is not used standalone: - DRVLIST_NAMES=" - SERIAL_DRIVERLIST USB_LIBUSB_DRIVERLIST SERIAL_USB_DRIVERLIST - SNMP_DRIVERLIST NEONXML_DRIVERLIST - MACOSX_DRIVERLIST MODBUS_DRIVERLIST LINUX_I2C_DRIVERLIST - POWERMAN_DRIVERLIST IPMI_DRIVERLIST" - - get_drvlist() ( - dnl Note escaped brackets - "against" m4 parser - m4_version_prereq(2.62, - [LB="@<:@"; RB="@:>@"], - [LB="[["; RB="]]"] - ) - SPACE="`printf "$LB"' \t'"$RB"`" - SPACES="${SPACE}*" - sed -e "s/${SPACES}""$LB"'+'"$RB"'*='"${SPACES}/=/" \ - -e "s/^${SPACES}//" < drivers/Makefile.am \ - | { - C=false; V=false - while read LINE ; do - case "$LINE" in - *'\') C=true; if $V ; then echo "$LINE" ; fi ;; - *) C=false; V=false ;; - esac - case "$LINE" in - "$1"=*) - echo "$LINE" | sed -e 's,^'"$LB"'^='"$RB"'*=,,' -e 's,\$,,' - V=$C - ;; - esac - done - } | tr '\n' ' ' | sed -e "s,${SPACE}${SPACES}, ," -e "s,${SPACES}\$,," - ) - - for DRVLIST_NAME in $DRVLIST_NAMES; do - OUT="`get_drvlist "$DRVLIST_NAME"`" \ - && test -n "$OUT" || OUT="" - eval $DRVLIST_NAME="\$OUT" - AC_MSG_NOTICE([Will check custom driver selection against $DRVLIST_NAME="$OUT"]) - done - - dnl Note: do not quote the expansion below to keep it multi-token: - for DRV in $DRIVER_BUILD_LIST ; do - - DRV_HITS="" - dnl #DEVEL-DEBUG# AC_MSG_NOTICE([= Checking DRV="$DRV"]) - for DRVLIST_NAME in $DRVLIST_NAMES; do - dnl #DEVEL-DEBUG# AC_MSG_NOTICE([== Checking DRVLIST_NAME="$DRVLIST_NAME"]) - eval DRVLIST="\${$DRVLIST_NAME}" - dnl #DEVEL-DEBUG# AC_MSG_NOTICE([== Contents DRVLIST="$DRVLIST"]) - - for DN in $DRVLIST ; do - dnl #DEVEL-DEBUG# AC_MSG_NOTICE([=== Checking DN="$DN"]) - AS_IF([test x"$DN" = x"$DRV"], [ - DRV_HITS="$DRV_HITS $DRVLIST_NAME" - AS_CASE(["$DRVLIST_NAME"], - - [SERIAL_DRIVERLIST], [ - AS_IF([test -z "${with_serial}"], - [AC_MSG_NOTICE([Requiring --with-serial=yes for driver "$DRV"]) - with_serial=yes] - )], - [USB_LIBUSB_DRIVERLIST], [ - AS_IF([test -z "${with_usb}"], - [AC_MSG_NOTICE([Requiring --with-usb=yes for driver "$DRV"]) - with_usb=yes] - )], - [SERIAL_USB_DRIVERLIST], [ - dnl e.g. nutdrv_qx that can do both - AS_IF([test -z "${with_usb}"], - [AC_MSG_NOTICE([Requiring --with-usb=yes for driver "$DRV"]) - with_usb=yes] - ) - AS_IF([test -z "${with_serial}"], - [AC_MSG_NOTICE([Requiring --with-serial=yes for driver "$DRV"]) - with_serial=yes] - )], - [SNMP_DRIVERLIST], [ - AS_IF([test -z "${with_snmp}"], - [AC_MSG_NOTICE([Requiring --with-snmp=yes for driver "$DRV"]) - with_snmp=yes] - )], - [NEONXML_DRIVERLIST], [ - AS_IF([test -z "${with_neon}"], - [AC_MSG_NOTICE([Requiring --with-neon=yes for driver "$DRV"]) - with_neon=yes] - )], - [MACOSX_DRIVERLIST], [ - dnl NOTE: This one is a bit special, - dnl just one certain driver so far - AS_IF([test -z "${with_macosx_ups}"], - [AC_MSG_NOTICE([Requiring --with-macosx-ups=yes for driver "$DRV"]) - with_macosx_ups=yes] - )], - [MODBUS_DRIVERLIST], [ - AS_IF([test -z "${with_modbus}"], - [AC_MSG_NOTICE([Requiring --with-modbus=yes for driver "$DRV"]) - with_modbus=yes] - )], - [LINUX_I2C_DRIVERLIST], [ - AS_IF([test -z "${with_linux_i2c}"], - [AC_MSG_NOTICE([Requiring --with-linux-i2c=yes for driver "$DRV"]) - with_linux_i2c=yes] - )], - [POWERMAN_DRIVERLIST], [ - AS_IF([test -z "${with_powerman}"], - [AC_MSG_NOTICE([Requiring --with-powerman=yes for driver "$DRV"]) - with_powerman=yes] - )], - [IPMI_DRIVERLIST], [ - AS_IF([test -z "${with_ipmi}"], - [AC_MSG_NOTICE([Requiring --with-ipmi=yes for driver "$DRV"]) - with_ipmi=yes] - )], - - [AC_MSG_WARN([Unhandled DRVLIST_NAME=$DRVLIST_NAME])] - ) - break - dnl Break once, maybe a driver hits several categories - ]) - done - done - AS_IF([test -z "${DRV_HITS}"], - [AC_MSG_ERROR([Requested driver '$DRV' is not defined in drivers/Makefile.am (or configure.ac has a bug/lag detecting driver lists)])]) - - done - ]) - - ;; - esac -], [ - dnl Implicit request to build whatever is enabled; - dnl do not force --with-all here: - DRIVER_BUILD_LIST="all" - AC_MSG_RESULT(all available) -]) -AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all") - -if test "${DRIVER_BUILD_LIST}" != "all"; then - NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) -fi dnl ---------------------------------------------------------------------- dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) AC_ARG_WITH(all, - AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, modbus, cgi, dev, avahi, linux_i2c]), + AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi, linux_i2c]), [ if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because dnl this is what the user expects from --without-all - dnl Note: these settings do not touch generation of - dnl "--with-docs=...", that is handled separately if test -z "${with_serial}"; then with_serial="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_neon}"; then with_neon="${withval}"; fi if test -z "${with_powerman}"; then with_powerman="${withval}"; fi - if test -z "${with_modbus}"; then with_modbus="${withval}"; fi - if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi - - dnl Platform-dependent snowflakes that are required or auto: - if test -z "${with_linux_i2c}"; then - with_linux_i2c="${withval}" - case ${target_os} in - linux*) ;; - *) test x"${withval}" = xno || with_linux_i2c="auto" ;; - esac - fi - if test -z "${with_macosx_ups}"; then - with_macosx_ups="${withval}" - if ! test -d /System/Library/Frameworks/IOKit.framework/ ; then - test x"${withval}" = xno || with_macosx_ups="auto" - fi - fi - - dnl These are not driver families, but other features: if test -z "${with_cgi}"; then with_cgi="${withval}"; fi if test -z "${with_dev}"; then with_dev="${withval}"; fi if test -z "${with_avahi}"; then with_avahi="${withval}"; fi - + if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi + if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) @@ -712,156 +249,98 @@ AC_ARG_WITH(all, dnl ---------------------------------------------------------------------- dnl declare a number of --with-FEATURE options. Do this early, so that -dnl they are listed near the top by "./configure --help"; however, -dnl note that options with further investigation methods are listed -dnl a bit below to be grouped with their additional with/enable help. +dnl they are listed near the top by "./configure --help" NUT_ARG_WITH([dev], [build and install the development files], [no]) - -dnl The NUT legacy option was --with-doc; however to simplify configuration -dnl in some common packaging frameworks, we also allow --with-docs as -dnl a second-class citizen (if both are set, the old option name wins). -dnl Also note that the legacy default was "man=yes" due to requirements -dnl of the "make distcheck", but it was reduced to "man=auto" so that -dnl the usual builds can pass by default on systems without asciidoc. -NUT_ARG_WITH([docs], [build and install documentation (alias to --with-doc)], [man=auto]) -NUT_ARG_WITH([doc], [build and install documentation (see docs/configure.txt for many variants of the option)], [${nut_with_docs}]) - -dnl NOTE: Until X-Mas 2021, the default was "legacy" (now "medium") -NUT_ARG_ENABLE([warnings], - [enable warning presets that were picked as useful in maintainership and CI practice (variants include gcc-minimal, gcc-medium, gcc-hard, clang-minimal, clang-medium, clang-hard, all; auto-choosers: hard, medium, minimal, yes=auto='gcc or clang or all at hardcoded default difficulty')], - [auto]) -NUT_ARG_ENABLE([Werror], - [fail the build if compiler emits any warnings (treat them as errors)], - [no]) -dnl To help find warning/error details in a wall of text, see --enable-Wcolor handled above +NUT_ARG_WITH([serial], [build and install serial drivers], [yes]) +NUT_ARG_WITH([usb], [build and install USB drivers], [auto]) +NUT_ARG_WITH([doc], [build and install documentation], [no]) +NUT_ARG_WITH([avahi], [build and install Avahi support], [auto]) dnl ---------------------------------------------------------------------- dnl Check for presence and compiler flags of various libraries -NUT_ARG_WITH([serial], [build and install serial drivers], [yes]) - dnl These checks are performed unconditionally, even if the corresponding dnl --with-* options are not given. This is because we cannot predict dnl what will be in the --with-drivers argument. -NUT_ARG_WITH([usb], [build and install USB drivers, optionally require build with specified version of libusb library and API: (auto|libusb-0.1|libusb-1.0)], [auto]) -nut_usb_lib="" +NUT_CHECK_LIBNETSNMP NUT_CHECK_LIBUSB - NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto]) NUT_CHECK_LIBNETSNMP - NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto]) NUT_CHECK_LIBNEON - NUT_ARG_WITH([powerman], [build and install Powerman PDU client driver], [auto]) NUT_CHECK_LIBPOWERMAN - -NUT_ARG_WITH([modbus], [build and install modbus drivers], [auto]) -NUT_CHECK_LIBMODBUS - -NUT_ARG_WITH([avahi], [build and install Avahi support], [auto]) NUT_CHECK_LIBAVAHI +dnl ---------------------------------------------------------------------- +dnl additional USB-related checks + +dnl Solaris 10/11 USB handling (need librt and libusb runtime path) +dnl HPUX, since v11, needs an explicit activation of pthreads +case ${target_os} in + solaris2.1* ) + echo Checking for Solaris 10 / 11 specific configuration for usb drivers + AC_SEARCH_LIBS(nanosleep, rt) + LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}" + dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification) + dnl and need to call libusb close upon reconnection + AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.]) + SUN_LIBUSB=1 + ;; + hpux11*) + CFLAGS="${CFLAGS} -lpthread" +esac + + dnl ---------------------------------------------------------------------- dnl checks related to --with-serial dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto". -dnl Below we try to detect if we can build serial drivers, and if we must? -AS_IF([test "${nut_with_serial}" != "no"], - [AS_IF([test "${nut_with_serial}" != "yes"],[nut_with_serial="auto"]) - - CFLAGS_SAVED_SERIAL="${CFLAGS}" - AS_IF([test "${GCC}" = yes], - [CFLAGS_SAVED_WERROR="${CFLAGS} -Wall -Werror" - CFLAGS_SAVED_WNOERROR="${CFLAGS} -Wno-error" - ], - [CFLAGS_SAVED_WERROR="${CFLAGS}" - CFLAGS_SAVED_WNOERROR="${CFLAGS}" - ]) - - dnl At least recent *BSD distros have deprecated sys/termios.h and spew - dnl warnings that termios.h should be used instead. This is redundantly - dnl fatal for pedantic builds where we aim to have no warnings in code. - dnl So there AC_CHECK_HEADERS does find the header, but we don't really - dnl want to use it unless we have no choice: if there is a warning while - dnl trying sys/ version, try the plain header path (without fatal warnings), - dnl and only if that is missing - retry with the sys/ version again (and - dnl no warnings still). - - CFLAGS="${CFLAGS_SAVED_WERROR}" - AC_CHECK_HEADERS(sys/termios.h, [], [ - CFLAGS="${CFLAGS_SAVED_WNOERROR}" - AC_CHECK_HEADERS(termios.h, [], [ - AC_CHECK_HEADERS(sys/termios.h, [], [], [AC_INCLUDES_DEFAULT]) - ], [AC_INCLUDES_DEFAULT]) - ], [AC_INCLUDES_DEFAULT]) - - dnl CFLAGS at this point suffice for surviving a compilation with termios.h - - dnl Don't mind the stupid code below, it just probes the tokens and - dnl sails around compiler warnings - AC_MSG_CHECKING([for struct termios and speed_t]) - AC_LANG_PUSH([C]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ -#if defined(HAVE_SYS_TERMIOS_H) -# include /* for speed_t */ -#else -# if defined(HAVE_TERMIOS_H) -# include -# endif /* HAVE_TERMIOS_H */ -#endif /* HAVE_SYS_TERMIOS_H */ -void getspeed(speed_t* b) { *b = B19200; } -], -[struct termios tio; -if (!tcgetattr(0, &tio)) { return 1; } -speed_t baudrate; -getspeed(&baudrate); -] - )], - [AC_MSG_RESULT([ok]) - nut_have_serial_types=yes - ], - [AC_MSG_RESULT([no, struct termios and/or speed_t not found in discovered headers]) - nut_have_serial_types=no - ] - ) - AC_LANG_POP([C]) - - dnl Restore common set-or-discovered CFLAGS - CFLAGS="${CFLAGS_SAVED_SERIAL}" - - AC_MSG_CHECKING([whether we can build serial drivers]) - AS_IF([test "${nut_have_serial_types}" = yes], - [AS_IF([test "${nut_with_serial}" = "auto"],[nut_with_serial="yes"])], - [AS_IF([test "${nut_with_serial}" = "auto"],[nut_with_serial="no"]) - AS_IF([test "${nut_with_serial}" = "yes"],[AC_MSG_ERROR([no, and were required to])]) - ]) - AS_IF([test "${nut_with_serial}" = "yes"], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no])]) -]) +if test "${nut_with_serial}" != "no"; then + nut_with_serial="yes" +fi NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}], [], [WITH_SERIAL], [Define to enable serial support]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-usb are in its m4 file and NUT_CHECK_LIBUSB() called above +dnl checks related to --with-usb -dnl Note: there is no libusb-config script (and variable) for libusb-1.0 -AM_CONDITIONAL(WITH_LIBUSB_1_0, test "${nut_usb_lib}" = "(libusb-1.0)") -AM_CONDITIONAL(WITH_LIBUSB_0_1, test "${nut_usb_lib}" = "(libusb-0.1)" -o "${nut_usb_lib}" = "(libusb-0.1-config)") +dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then + AC_MSG_ERROR(["USB drivers requested, but libusb not found."]) +fi -NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}], [${nut_usb_lib}], +if test "${nut_with_usb}" != "no"; then + nut_with_usb="${nut_have_libusb}" +fi + +NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}], [], [WITH_USB], [Define to enable USB support]) +dnl ---------------------------------------------------------------------- +dnl checks related to --with-snmp + +dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". +if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then + AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"]) +fi + +if test "${nut_with_snmp}" != "no"; then + nut_with_snmp="${nut_have_libnetsnmp}" +fi + +NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}], [], + [WITH_SNMP], [Define to enable SNMP support]) + dnl ---------------------------------------------------------------------- dnl checks related to --with-neon dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then - AC_MSG_ERROR([neon libraries not found, required for neon based XML/HTTP driver]) + AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"]) fi if test "${nut_with_neon}" != "no"; then @@ -870,14 +349,13 @@ fi NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}], [], [WITH_NEON], [Define to enable Neon HTTP support]) -AM_CONDITIONAL([HAVE_NEON], [test "${nut_have_neon}" = "yes"]) dnl ---------------------------------------------------------------------- dnl checks related to --with-avahi dnl ${nut_with_avahi}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then - AC_MSG_ERROR([avahi libraries not found]) + AC_MSG_ERROR(["avahi libraries not found"]) fi if test "${nut_with_avahi}" != "no"; then @@ -893,7 +371,7 @@ dnl checks related to --with-powerman dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then - AC_MSG_ERROR([Powerman client libraries not found, required for Powerman PDU client driver]) + AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"]) fi if test "${nut_with_powerman}" != "no"; then @@ -904,20 +382,6 @@ NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}], [ [WITH_LIBPOWERMAN], [Define to enable Powerman PDU support]) dnl ---------------------------------------------------------------------- -dnl checks related to --with-modbus - -dnl ${nut_with_modbus}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_modbus}" = "yes" -a "${nut_have_libmodbus}" != "yes"; then - AC_MSG_ERROR([modbus library not found, required for Modbus driver]) -fi - -if test "${nut_with_modbus}" != "no"; then - nut_with_modbus="${nut_have_libmodbus}" -fi - -NUT_REPORT_FEATURE([build Modbus driver], [${nut_with_modbus}], [], - [WITH_MODBUS], [Define to enable Modbus support]) -dnl ---------------------------------------------------------------------- dnl Check for with-ipmi, and --with-freeipmi (or --with-openipmi) dnl Only one can be enabled at a time, with a preference for FreeIPMI dnl if both are available (since it is the only one supported ATM!!) @@ -928,21 +392,21 @@ NUT_ARG_WITH([ipmi], [build and install IPMI PSU driver], [auto]) NUT_ARG_WITH([freeipmi], [enable IPMI support using FreeIPMI], [auto]) dnl NUT_ARG_WITH([openipmi], [enable IPMI support using OpenIPMI], [auto]) -dnl ${nut_with_ipmi}: any value except "yes" or "no" is treated as "auto". +dnl ${nut_with_ipmi}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_ipmi}" != "no"; then dnl check if FreeIPMI (and maybe later OpenIPMI) was explicitly requested if test "${nut_with_freeipmi}" = "yes"; then NUT_CHECK_LIBFREEIPMI if test "${nut_have_freeipmi}" != "yes"; then - AC_MSG_ERROR([FreeIPMI not found, required for IPMI support]) + AC_MSG_ERROR(["GNU FreeIPMI not found, required for IPMI support"]) fi dnl Implies --with-ipmi nut_with_ipmi="yes" dnl elif test "${nut_with_openipmi}" = "yes"; then - dnl AC_MSG_ERROR([OpenIPMI is not yet supported]) + dnl AC_MSG_ERROR(["OpenIPMI is not yet supported"]) dnl NUT_CHECK_LIBOPENIPMI dnl if test "${nut_have_openipmi}" != "yes"; then - dnl AC_MSG_ERROR([OpenIPMI not found, required for IPMI support]) + dnl AC_MSG_ERROR(["OpenIPMI not found, required for IPMI support"]) dnl fi dnl Implies --with-ipmi dnl nut_with_ipmi="yes" @@ -952,13 +416,13 @@ if test "${nut_with_ipmi}" != "no"; then NUT_CHECK_LIBFREEIPMI if test "${nut_have_freeipmi}" != "yes"; then if test "${nut_with_ipmi}" = "yes"; then - AC_MSG_ERROR([FreeIPMI not found, required for IPMI support]) + AC_MSG_ERROR(["FreeIPMI not found, required for IPMI support"]) fi nut_with_ipmi="no" dnl NUT_CHECK_OPENIPMI dnl if test "${nut_have_openipmi}" != "yes"; then dnl if test "${nut_with_ipmi}" = "yes"; then - dnl AC_MSG_ERROR([Neither GNU FreeIPMI nor OpenIPMI was found (required for IPMI support)]) + dnl AC_MSG_ERROR(["GNU FreeIPMI and OpenIPMI neither found, required for IPMI support"]) dnl fi dnl nut_with_ipmi="no" dnl else @@ -996,9 +460,6 @@ if test "${nut_with_macosx_ups}" != no; then if test -d /System/Library/Frameworks/IOKit.framework/ ; then nut_with_macosx_ups="yes" else - if test "${nut_with_macosx_ups}" = yes; then - AC_MSG_ERROR([macosx-ups was required but can not be fulfilled for this build: not MacOS]) - fi nut_with_macosx_ups="no" fi fi @@ -1014,47 +475,16 @@ NUT_ARG_WITH([linux_i2c], [build and install i2c drivers], [auto]) if test "${nut_with_linux_i2c}" != no; then case ${target_os} in linux* ) - AC_CHECK_HEADER( - [linux/i2c-dev.h], - [AC_DEFINE([HAVE_LINUX_I2C_DEV_H], [1], - [Define to 1 if you have .])] - ) - AC_CHECK_HEADER( - [i2c/smbus.h], - [AC_DEFINE([HAVE_LINUX_SMBUS_H], [1], - [Define to 1 if you have .])] - ) AC_CHECK_DECLS( - [i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data], - [], dnl # nut_with_linux_i2c="yes" - [AS_IF([test "${nut_with_linux_i2c}" = "yes"], - [AC_MSG_ERROR(i2c was required but can not be fulfilled for this build)], - [nut_with_linux_i2c="no"])], + [i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data], + [nut_with_linux_i2c="yes"], + [nut_with_linux_i2c="no"], [#include - #ifdef HAVE_LINUX_I2C_DEV_H #include - #endif - #ifdef HAVE_LINUX_SMBUS_H - #include - #endif ] ) - dnl Builds for bitness/arch other than system default can be - dnl "compromised" by lack of respective binary library, so - dnl even if we have the right headers, ultimate link fails. - dnl Note: here we keep the verdict from above, or make it worse. - AC_SEARCH_LIBS([i2c_smbus_read_byte, i2c_smbus_access, i2c_smbus_read_byte_data, i2c_smbus_write_byte_datai2c_smbus_write_byte_data, i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data], - [i2c], - [nut_with_linux_i2c="yes"], - [AS_IF([test "${nut_with_linux_i2c}" = "yes"], - [AC_MSG_ERROR(i2c was required but can not be fulfilled for this build)], - [nut_with_linux_i2c="no"]) - ]) ;; * ) - if test "${nut_with_linux_i2c}" = yes; then - AC_MSG_ERROR([i2c was required but can not be fulfilled for this build: not linux]) - fi nut_with_linux_i2c="no" ;; esac @@ -1078,18 +508,18 @@ NUT_ARG_WITH([ssl], [enable SSL support (either NSS or OpenSSL)], [auto]) NUT_ARG_WITH([nss], [enable SSL support using Mozilla NSS], [auto]) NUT_ARG_WITH([openssl], [enable SSL support using OpenSSL], [auto]) -dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto". +dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_ssl}" != "no"; then dnl check if either NSS or OpenSSL was explicitly requested if test "${nut_with_nss}" = "yes"; then NUT_CHECK_LIBNSS if test "${nut_have_libnss}" != "yes"; then - AC_MSG_ERROR([Mozilla NSS not found (required for SSL support)]) + AC_MSG_ERROR(["Mozilla NSS not found, required for SSL support"]) fi elif test "${nut_with_openssl}" = "yes"; then NUT_CHECK_LIBOPENSSL if test "${nut_have_openssl}" != "yes"; then - AC_MSG_ERROR([OpenSSL not found (required for SSL support)]) + AC_MSG_ERROR(["OpenSSL not found, required for SSL support"]) fi else dnl Prefer OpenSSL over NSS otherwise @@ -1099,9 +529,9 @@ if test "${nut_with_ssl}" != "no"; then if test "${nut_have_libnss}" != "yes"; then dnl Only abort if SSL has been explicitly requested by the user if test "${nut_with_ssl}" = "yes"; then - AC_MSG_ERROR([Neither Mozilla NSS nor OpenSSL was found, but one is needed for the requested SSL support.]) + AC_MSG_ERROR(["Mozilla NSS and OpenSSL neither found, but are needed for the requested SSL support"]) else - AC_MSG_WARN([Neither Mozilla NSS nor OpenSSL was found (required for SSL support)]) + AC_MSG_WARN(["Mozilla NSS and OpenSSL neither found, required for SSL support"]) fi nut_with_ssl="no" else @@ -1131,7 +561,7 @@ if test "${nut_with_wrap}" != "no"; then fi if test "${nut_with_wrap}" = "yes" -a "${nut_have_libwrap}" != "yes"; then - AC_MSG_ERROR([libwrap not found]) + AC_MSG_ERROR(["libwrap not found"]) fi if test "${nut_with_wrap}" != "no"; then @@ -1154,7 +584,7 @@ if test "${nut_with_libltdl}" != "no"; then fi if test "${nut_with_libltdl}" = "yes" -a "${nut_have_libltdl}" != "yes"; then - AC_MSG_ERROR([libltdl not found]) + AC_MSG_ERROR(["libltdl not found"]) fi if test "${nut_with_libltdl}" != "no"; then @@ -1164,7 +594,7 @@ fi NUT_REPORT_FEATURE([enable libltdl (Libtool dlopen abstraction) support], [${nut_with_libltdl}], [], [WITH_LIBLTDL], [Define to enable libltdl (Libtool dlopen abstraction) support]) -dnl Explicitly report if we are building nut-scanner or not +dnl Explicitely report if we are building nut-scanner or not dnl since it requires libltdl NUT_REPORT([build nut-scanner], [${nut_with_libltdl}]) @@ -1192,234 +622,61 @@ NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}], [], dnl ---------------------------------------------------------------------- -dnl checks related to --enable-cppcheck -dnl Currently this is experimental; maybe change default to auto in the future -dnl At that point, see also defaults in ci_build.sh then (to avoid the workload -dnl unless desired). -NUT_ARG_ENABLE([cppcheck], [Run a cppcheck on the codebase among checks], [no]) -NUT_CHECK_CPPCHECK - -case "${nut_enable_cppcheck}" in - yes) if test "${nut_have_cppcheck}" = "no" ; then - AC_MSG_ERROR([Requested to --enable-cppcheck but did not find a good one]) - fi - WITH_CPPCHECK=yes - ;; - no) WITH_CPPCHECK=no ;; - auto) if test "${nut_have_cppcheck}" = "yes" ; then - WITH_CPPCHECK=no - else - WITH_CPPCHECK=no - fi - ;; -esac - -AM_CONDITIONAL(WITH_CPPCHECK, test "${WITH_CPPCHECK}" = "yes") - -dnl ---------------------------------------------------------------------- -dnl checks related to --enable-check-NIT - -AC_MSG_CHECKING(whether to run NIT among default make check target) -nut_enable_check_NIT="no" -AC_ARG_ENABLE([check-NIT], - AS_HELP_STRING([--enable-check-NIT], [Run check-NIT among default checks (no)]), -[ - case "${enableval}" in - no) - AC_MSG_RESULT(no) - ;; - *) - AC_MSG_RESULT(yes) - nut_enable_check_NIT="yes" - ;; - esac -], [ - AC_MSG_RESULT(no) -]) - -AM_CONDITIONAL(WITH_CHECK_NIT, test "${nut_enable_check_NIT}" = "yes") - -dnl ---------------------------------------------------------------------- dnl checks related to --with-doc dnl Always check for AsciiDoc prerequisites, since even if --with-doc dnl is set to 'no', we may still want to build some doc targets manually -dnl (so enable the Makefile recipes for those targets if tools are available) NUT_CHECK_ASCIIDOC -NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [], - [WITH_ASCIIDOC], [Define to enable Asciidoc support]) - -DOC_INSTALL_DISTED_MANS=no - case "${nut_with_doc}" in - yes|all|all=yes) - nut_doc_build_list="man html-single html-chunked pdf" + yes|all|auto) + nut_doc_build_list="html-single html-chunked pdf" ;; - auto|all=auto) - nut_doc_build_list="man=auto html-single=auto html-chunked=auto pdf=auto" - ;; - skip|all=skip) - nut_doc_build_list="man=skip html-single=skip html-chunked=skip pdf=skip" - ;; - no|all=no) + no) nut_doc_build_list="" ;; -dnl If user passed --with-doc='' they they want nothing, right? - "") - nut_doc_build_list="" - AC_MSG_NOTICE([Got explicit empty list of document formats to build; nothing will be generated]) - ;; *) nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`" - AC_MSG_NOTICE([Got explicit list of document formats to build or not: ${nut_doc_build_list}; formats not listed will be silently skipped]) ;; esac -if test -z "${abs_srcdir}" ; then - case "${srcdir}" in - /*) abs_srcdir="${srcdir}";; - "") AC_MSG_ERROR([Can not detect 'srcdir']) ;; - *) abs_srcdir="$(cd "${srcdir}" && pwd)" || AC_MSG_ERROR([Can not detect 'srcdir']) ;; - esac -fi -DOCTESTDIR="$(mktemp -d configure-test.docbuild.$$.XXXXXXX)" && \ -DOCTESTDIR="$(cd "$DOCTESTDIR" && pwd)" - -dnl Note: Do not cover ${nut_doc_build_list} in braces or quotes here, -dnl to ensure that it is processed as several space-separated tokens -for nut_doc_build_target in $nut_doc_build_list; do +for nut_doc_build_target in ${nut_doc_build_list}; do case "${nut_doc_build_target}" in - *=*=*) rm -rf "${DOCTESTDIR}" - AC_MSG_ERROR([Invalid documentation format option: ${nut_doc_build_target}]) ;; - *=*) - nut_doc_build_target_base="`echo "${nut_doc_build_target}" | sed 's,=.*$,,'`" - nut_doc_build_target_flag="`echo "${nut_doc_build_target}" | sed 's,^.*=,,'`" - ;; - *) - nut_doc_build_target_base="${nut_doc_build_target}" - nut_doc_build_target_flag="yes" - ;; - esac - case "${nut_doc_build_target_flag}" in - yes|no|auto|skip) ;; - "") nut_doc_build_target_flag="yes" ;; - *) rm -rf "${DOCTESTDIR}" - AC_MSG_ERROR([Invalid documentation format option: ${nut_doc_build_target}]) ;; - esac - AC_MSG_CHECKING([desire and ability to build ${nut_doc_build_target_base} documentation]) - AC_MSG_RESULT([${nut_doc_build_target_flag}]) - - case "${nut_doc_build_target}" in - *=no|*=skip) - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - ;; - -dnl Notes: Document options below assume either no flag value (which -dnl by default means "yes"), "yes" which is a requirement, or "auto" -dnl to detect if we can build the wanted documentation format and yet -dnl not fail if we have no tools to generate it (so add to SKIP list). - - html-single*) - AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})]) - can_build_doc_html_single=no - AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [${ASCIIDOC_MIN_VERSION}], [ - ( cd "$DOCTESTDIR" && ${A2X} --attribute=xhtml11_format --format=xhtml --xsl-file="${abs_srcdir}"/docs/xhtml.xsl --destination-dir=. "${abs_srcdir}"/docs/asciidoc.txt && test -s asciidoc.html ) && can_build_doc_html_single=yes - rm -f "$DOCTESTDIR"/asciidoc*.htm* - ], []) - if test "${can_build_doc_html_single}" = yes ; then + html-single) + AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)]) + AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ AC_MSG_RESULT(no) - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) ;; - html-chunked*) - AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target_base} (minimum required ${ASCIIDOC_MIN_VERSION})]) - can_build_doc_html_chunked=no - AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [${ASCIIDOC_MIN_VERSION}], [ - ( cd "$DOCTESTDIR" && ${A2X} --attribute=chunked_format --format=chunked --xsl-file="${abs_srcdir}"/docs/chunked.xsl --destination-dir=. "${abs_srcdir}"/docs/FAQ.txt && test -s FAQ.chunked/index.html ) && can_build_doc_html_chunked=yes - rm -rf "${DOCTESTDIR}"/FAQ*.chunked* - ], []) - if test "${can_build_doc_html_chunked}" = yes ; then + html-chunked) + AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)]) + AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ AC_MSG_RESULT(yes) - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ AC_MSG_RESULT(no) - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) ;; - pdf*) - AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target_base} (minimum required ${DBLATEX_MIN_VERSION})]) - can_build_doc_pdf=no - AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [${DBLATEX_MIN_VERSION}], [ - ( cd "$DOCTESTDIR" && ${A2X} --format=pdf --destination-dir=. "${abs_srcdir}"/docs/asciidoc.txt && test -s asciidoc.pdf ) && can_build_doc_pdf=yes - rm -f "${DOCTESTDIR}"/asciidoc.pdf - ], []) - if test "${can_build_doc_pdf}" = yes ; then + pdf) + AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)]) + AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [ AC_MSG_RESULT(yes) - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else + DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}" + ], [ AC_MSG_RESULT(no) - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - fi - fi + DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}" + ]) ;; - - man*) - AC_MSG_CHECKING([if we can build ${nut_doc_build_target_base}]) - can_build_doc_man=no - if test "${nut_have_asciidoc}" = yes ; then - ( cd "$DOCTESTDIR" && ${A2X} --format manpage --destination-dir=. --xsltproc-opts="--nonet" "${abs_srcdir}"/docs/man/snmp-ups.txt && test -s snmp-ups.8 ) && can_build_doc_man=yes - rm -f "${DOCTESTDIR}"/snmp-ups.8 - fi - if test "${can_build_doc_man}" = yes ; then - AC_MSG_RESULT(yes) - DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target_base}" - else - AC_MSG_RESULT(no) - if test "${nut_doc_build_target_flag}" = "yes" ; then - DOC_CANNOTBUILD_LIST="${DOC_CANNOTBUILD_LIST} ${nut_doc_build_target_base}" - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation which you requested]) - else - DOC_SKIPBUILD_LIST="${DOC_SKIPBUILD_LIST} ${nut_doc_build_target_base}" - if test "${nut_doc_build_target_flag}" = "auto" ; then -dnl Test that groff files exist (building from distributed tarball, not git repo) - if test -s "${abs_srcdir}"/docs/man/snmp-ups.8 ; then - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation, but can install pre-built distributed copies]) - DOC_INSTALL_DISTED_MANS="yes" - else - AC_MSG_WARN([Unable to build ${nut_doc_build_target_base} documentation, and unable to install pre-built distributed copies because they are absent]) - fi - fi # Other variants include "no", "skip"... - fi - fi - ;; - - *) rm -rf "${DOCTESTDIR}" - AC_MSG_ERROR([--with-doc option refers to unknown documentation format: $nut_doc_build_target]) ;; - esac done -rm -rf "${DOCTESTDIR}" case "${nut_with_doc}" in auto) @@ -1428,106 +685,76 @@ auto) else nut_with_doc="no" fi - ;; + ;; no) ;; *) - if test -n "${DOC_CANNOTBUILD_LIST}"; then - AC_MSG_ERROR([Unable to build${DOC_CANNOTBUILD_LIST} documentation (check for 'no' results above)]) - fi - - if test -n "${DOC_SKIPBUILD_LIST}"; then - AC_MSG_NOTICE([Skipping build of${DOC_SKIPBUILD_LIST} documentation (check for 'skip' results above)]) - fi - - if test -n "${DOC_BUILD_LIST}"; then + if test -z "${DOC_NOBUILD_LIST}"; then nut_with_doc="yes" else - nut_with_doc="no" + AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)"]) fi ;; esac -NUT_REPORT_FEATURE([build specific documentation format(s)], [${nut_with_doc}], [${DOC_BUILD_LIST}], - [WITH_DOCS], [Define to enable overall documentation generation]) +AC_MSG_CHECKING([if asciidoc version can build manpages (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) + nut_have_asciidoc="yes" +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) -# To cater for less portable make's, precalculate the target list -# for "make check" in "docs/" here... -DOC_CHECK_LIST="" -if test "${nut_with_doc}" = yes ; then - for V in $DOC_BUILD_LIST ; do - DOC_CHECK_LIST="$DOC_CHECK_LIST check-$V" - done +AC_MSG_CHECKING([if a2x version can build manpages (minimum required 8.6.3)]) +AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [ + AC_MSG_RESULT(yes) +], [ + AC_MSG_RESULT(no) + nut_have_asciidoc="no" +]) + +dnl TODO: test for docbook-xsl files (maybe build a test man page?) +dnl https://github.com/networkupstools/nut/issues/162 +AC_MSG_CHECKING([if xsltproc is present (mandatory for man page regeneration)]) +if test -n "${XSLTPROC}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" fi -WITH_MANS=no -SKIP_MANS=no -if echo "${DOC_BUILD_LIST}" | grep -w "man" >/dev/null || test "${DOC_INSTALL_DISTED_MANS}" = "yes" ; then - WITH_MANS=yes +AC_MSG_CHECKING([if xmllint is present (mandatory for man page regeneration)]) +if test -n "${XMLLINT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + nut_have_asciidoc="no" fi -if echo "${DOC_SKIPBUILD_LIST}" | grep -w "man" >/dev/null ; then - SKIP_MANS=yes + +AC_MSG_CHECKING([if source-highlight is present (preferable for documentation generation)]) +if test -n "${SOURCE_HIGHLIGHT}"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [], + [WITH_ASCIIDOC], [Define to enable Asciidoc support]) + +dnl Notes: we also keep HAVE_ASCIIDOC for implicit targets, such as manpage +dnl building +AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"]) + +if test "${nut_with_doc}" = "yes"; then + NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}]) fi -dnl Generally WITH_MANS=no is intentionally fatal for "make distcheck" -dnl But some larger distcheck suites check mans once and then focus on -dnl other aspects of the project, so they can explicitly skip docs (or -dnl just mans) instead. Note that for WITH_MANS=yes the SKIP_MANS value -dnl is effectively ignored by docs/man/Makefile.am at this time. -AM_CONDITIONAL(WITH_MANS, test "${WITH_MANS}" = "yes") -AM_CONDITIONAL(SKIP_MANS, test "${SKIP_MANS}" = "yes") -AM_CONDITIONAL(DOC_INSTALL_DISTED_MANS, test "${DOC_INSTALL_DISTED_MANS}" = "yes") dnl ---------------------------------------------------------------------- dnl checks related to --with-dev dnl We only init libtool there to allow AC_DISABLE_STATIC -if ( test "${GCC}" = "yes" ) -then - dnl # Avoid new compilers' warnings/errors about libtool distro flaws in this test like: - dnl # error: ISO C forbids conversion of function pointer to object pointer type [-Werror=pedantic] - dnl # {"nm_test_func", (void *) &nm_test_func}, - dnl # or ones about LTO (-flto -fno-common) as discussed and suggested - dnl # in https://www.mail-archive.com/libtool@gnu.org/msg14037.html - - dnl # all leading to undefined "global_symbol_pipe" in the generated - dnl # libtool script, and resulting in errors like `... | | ...` below : - dnl # libtool: link: /usr/bin/nm -B .libs/upsclient.o \ - dnl # ../common/.libs/libcommonclient.a | | /usr/bin/sed 's/.* //' \ - dnl # | sort | uniq > .libs/libupsclient.exp - dnl # ../libtool: syntax error: `|' unexpected - - CFLAGS_SAVED_NOPEDANTIC="$CFLAGS" - AS_CASE(["${CFLAGS}"],[*"-pedantic"*],[CFLAGS="${CFLAGS} -Wno-pedantic"]) - AS_CASE(["${CFLAGS}"],[*"-Werror"*],[CFLAGS="${CFLAGS} -Wno-error"]) - AS_CASE(["${CFLAGS}"],[*"-flto"*],[CFLAGS="${CFLAGS} -ffat-lto-objects"]) -fi - -dnl See https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html -dnl #OBSOLETED:# LT_INIT and AC_PROG_LIBTOOL - -dnl # Hack around the libtool script: as of version 58 (current in 2021), -dnl # they use code like below to detect library paths: -dnl # if test yes = "$GCC"; then ... lt_search_path_spec=`$CC -print-search-dirs | ... -dnl # which explodes when non-default architecture is used for the build, -dnl # where e.g. "CC=gcc" and "CFLAGS=-m32" on a 64-bit capable system. -dnl # And similarly for compilation-checks to link third-party libraries. -SAVED_GCC="$GCC" -SAVED_CC="$CC" -if ( test "${GCC}" = "yes" ) -then - case "$CFLAGS$LDFLAGS" in - *-m32*) CC="$CC -m32" ;; - *-m64*) CC="$CC -m64" ;; - esac -fi -LT_INIT -AC_SUBST([LIBTOOL_DEPS]) -GCC="$SAVED_GCC" -CC="$SAVED_CC" - -if ( test "${GCC}" = "yes" ) -then - CFLAGS="$CFLAGS_SAVED_NOPEDANTIC" -fi +AC_PROG_LIBTOOL dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_dev}" != "no"; then @@ -1676,7 +903,7 @@ AC_MSG_RESULT(${PORT}) AC_MSG_CHECKING(user to run as) AC_ARG_WITH(user, - AS_HELP_STRING([--with-user=username], [user for programs started as root (${RUN_AS_USER})]), + AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), [ case "${withval}" in yes|no) @@ -1695,7 +922,7 @@ AC_MSG_RESULT(${RUN_AS_USER}) AC_MSG_CHECKING(group membership of user to run as) AC_ARG_WITH(group, - AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (${RUN_AS_GROUP})]), + AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), [ case "${withval}" in yes|no) @@ -1714,9 +941,9 @@ AC_MSG_RESULT(${RUN_AS_GROUP}) dnl check that --with-user is given if --with-group is given. if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then - AC_MSG_ERROR([If you specify --with-user, you also must specify --with-group]) + AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then - AC_MSG_ERROR([If you specify --with-group, you also must specify --with-user]) + AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) fi AC_MSG_CHECKING(facility for syslog) @@ -1737,30 +964,53 @@ AC_ARG_WITH(logfacility, AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)]) AC_MSG_RESULT(${LOGFACILITY}) +dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs, +dnl so the help string depends on the version used +AC_MSG_CHECKING(which drivers to build) +AC_ARG_WITH(drivers, + AS_HELP_STRING([m4_version_prereq(2.62, + [@<:@--with-drivers=driver@<:@,driver@:>@@:>@], + [[[[--with-drivers=driver@<:@,driver@:>@]]]])], + [Only build specific drivers (all)]), +[ + case "${withval}" in + yes|no) + AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt) + ;; + *) + DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` + AC_MSG_RESULT(${DRIVER_BUILD_LIST}) + ;; + esac +], [ + DRIVER_BUILD_LIST="all" + AC_MSG_RESULT(all available) +]) +AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all") + +if test "${DRIVER_BUILD_LIST}" != "all"; then + NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) +fi + AC_MSG_CHECKING(which driver man pages to install) -if test "${WITH_MANS}" = "yes"; then - if test "${DRIVER_BUILD_LIST}" = "all"; then - DRIVER_MAN_LIST=all - AC_MSG_RESULT(all available) - else - DRIVER_MAN_LIST="" - for i in ${DRIVER_BUILD_LIST}; do - if test -f ${srcdir}/docs/man/$i.8; then - DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" - fi - done - AC_MSG_RESULT(${DRIVER_MAN_LIST}) - fi +if test "${DRIVER_BUILD_LIST}" = "all"; then + DRIVER_MAN_LIST=all + AC_MSG_RESULT(all available) else DRIVER_MAN_LIST="" - AC_MSG_RESULT([none (manpages disabled)]) + for i in ${DRIVER_BUILD_LIST}; do + if test -f ${srcdir}/docs/man/$i.8; then + DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" + fi + done + AC_MSG_RESULT(${DRIVER_MAN_LIST}) fi AC_MSG_CHECKING(whether to strip debug symbols) AC_ARG_ENABLE(strip, AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]), [ - case "${enableval}" in + case "${withval}" in no) AC_MSG_RESULT(no) ;; @@ -1795,106 +1045,14 @@ else fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") -AC_MSG_CHECKING(whether to install Solaris SMF files) -solarissmf="auto" -AC_ARG_WITH([solaris-smf], - AS_HELP_STRING([--with-solaris-smf=(yes|auto|no)], [Enable installation of NUT scripts and manifests for Solaris Service Management Framework (auto)]), -[ - case "${withval}" in - auto|"") - solarissmf="auto" - ;; - yes|no) - solarissmf="${withval}" - ;; - *) - AC_MSG_ERROR([Unexpected argument for --with-solaris-smf=${withval}]) - ;; - esac -], []) - -if test x"$solarissmf" = xauto ; then - if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x /usr/bin/svcs ; then - solarissmf="yes" - else - solarissmf="no" - fi -fi -AC_MSG_RESULT([${solarissmf}]) -AM_CONDITIONAL(WITH_SOLARIS_SMF, test x"$solarissmf" = x"yes") - -AC_MSG_CHECKING(whether to make Solaris SVR4 packages) -solarispkg_svr4="auto" -AC_ARG_WITH([solaris-pkg-svr4], - AS_HELP_STRING([--with-solaris-pkg-svr4=(yes|auto|no)], [Enable construction of Solaris SVR4 packages (auto)]), -[ - case "${withval}" in - auto|"") - solarispkg_svr4="auto" - ;; - yes|no) - solarispkg_svr4="${withval}" - ;; - *) - AC_MSG_ERROR([Unexpected argument for --with-solaris-pkg-svr4=${withval}]) - ;; - esac -], []) - -if test x"$solarispkg_svr4" = xauto ; then - if test -x /usr/bin/pkgtrans && test -x /usr/bin/pkgmk && test -x /usr/bin/pkgproto ; then - solarispkg_svr4="yes" - else - solarispkg_svr4="no" - fi -fi -AC_MSG_RESULT([${solarispkg_svr4}]) -AM_CONDITIONAL(WITH_SOLARIS_PKG_SVR4, test x"$solarispkg_svr4" = x"yes") - -AC_MSG_CHECKING(whether to make Solaris IPS packages) -solarispkg_ips="auto" -AC_ARG_WITH([solaris-pkg-ips], - AS_HELP_STRING([--with-solaris-pkg-ips=(yes|auto|no)], [Enable construction of Solaris IPS packages (auto)]), -[ - case "${withval}" in - auto|"") - solarispkg_ips="auto" - ;; - yes|no) - solarispkg_ips="${withval}" - ;; - *) - AC_MSG_ERROR([Unexpected argument for --with-solaris-pkg-ips=${withval}]) - ;; - esac -], []) - -if test x"$solarispkg_ips" = xauto ; then - if test -x /usr/bin/pkg && test -x /usr/bin/pkgmogrify && test -x /usr/bin/pkgdepend ; then - solarispkg_ips="yes" - else - solarispkg_ips="no" - fi -fi -AC_MSG_RESULT([${solarispkg_ips}]) -AM_CONDITIONAL(WITH_SOLARIS_PKG_IPS, test x"$solarispkg_ips" = x"yes") - -dnl Note: Currently there is no reliable automatic detection - -dnl users have to ask they want systemd units installed, or -dnl risk auto-detection like seen below. -AC_MSG_CHECKING(whether to install systemd unit files) +PKG_PROG_PKG_CONFIG +systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` +AC_MSG_CHECKING(whether to install systemd files) AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto)]), - [systemdsystemunitdir="${withval}"], - [systemdsystemunitdir="auto"]) -case "${systemdsystemunitdir}" in - yes|auto|"") - AS_IF([test x"$have_PKG_CONFIG" = xyes], - [systemdsystemunitdir="`$PKG_CONFIG --variable=systemdsystemunitdir systemd 2>/dev/null`" && test -n "$systemdsystemunitdir" || systemdsystemunitdir="`$PKG_CONFIG --variable=systemdsystemunitdir libsystemd 2>/dev/null`"], - [AS_IF([test "${withval}" = yes], - [AC_MSG_ERROR([--with-systemdsystemunitdir=${withval} was requested, but PKG_CONFIG could not be queried for the system settings])]) - systemdsystemunitdir="" - ]) +[ + case "${withval}" in + yes|auto) ;; no) systemdsystemunitdir="" @@ -1902,273 +1060,18 @@ case "${systemdsystemunitdir}" in *) systemdsystemunitdir="${withval}" ;; -esac -if test "${systemdsystemunitdir}" = "auto" ; then systemdsystemunitdir=""; fi + esac +], []) +dnl Override installation directory, with the local installation +dnl prefix. This is needed for 'distcheck*' targets, otherwise +dnl files will try to get intalled to the actual system directories if test -n "${systemdsystemunitdir}"; then + systemdsystemshutdowndir="${libdir}/systemd/system-shutdown" AC_MSG_RESULT(using ${systemdsystemunitdir}) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "") -dnl This option is only provided so that make distcheck can override it, -dnl otherwise we ask pkg-config whenever --with-systemdsystemunitdir is -dnl given - -AC_MSG_CHECKING(whether to install systemd shutdown files) -AC_ARG_WITH([systemdshutdowndir], - AS_HELP_STRING([--with-systemdshutdowndir=DIR], [Directory for systemd shutdown scripts (auto)]), - [systemdshutdowndir="${withval}"], - [systemdshutdowndir="auto"]) -dnl Note: this option is enabled only if systemdsystemunitdir is not trivial -if test -n "${systemdsystemunitdir}"; then - case "${systemdshutdowndir}" in - yes|auto|"") - AS_IF([test x"$have_PKG_CONFIG" = xyes], - [systemdshutdowndir="`$PKG_CONFIG --variable=systemdshutdowndir systemd 2>/dev/null`" && test -n "$systemdshutdowndir" || systemdshutdowndir="`$PKG_CONFIG --variable=systemdshutdowndir libsystemd 2>/dev/null`"], - [AS_IF([test "${systemdshutdowndir}" = yes], - [AC_MSG_ERROR([--with-systemdshutdowndir=${systemdshutdowndir} was requested, but PKG_CONFIG could not be queried for the system settings])]) - systemdshutdowndir="" - ]) - ;; - no) - systemdshutdowndir="" - ;; - *) - systemdshutdowndir="${withval}" - ;; - esac -fi -if test "${systemdshutdowndir}" = "auto" ; then systemdshutdowndir=""; fi -if test -n "${systemdshutdowndir}"; then - AC_MSG_RESULT(using ${systemdshutdowndir}) -else - AC_MSG_RESULT(no) -fi - -dnl Note: if (systemd-)tmpfiles tech is present, it can be useful even for -dnl daemons starting not as systemd units, to pre-create /var/run/nut etc. -AC_MSG_CHECKING([whether to install systemd tmpfiles files]) -AC_ARG_WITH([systemdtmpfilesdir], - AS_HELP_STRING([--with-systemdtmpfilesdir=DIR], [Directory for systemd tmpfiles scripts (auto)]), - [systemdtmpfilesdir="${withval}"], - [systemdtmpfilesdir="auto"]) -case "${systemdtmpfilesdir}" in - yes|auto|"") - AS_IF([test x"$have_PKG_CONFIG" = xyes], - [systemdtmpfilesdir="`$PKG_CONFIG --variable=tmpfilesdir systemd 2>/dev/null`" && test -n "$systemdtmpfilesdir" || systemdtmpfilesdir="`$PKG_CONFIG --variable=tmpfilesdir libsystemd 2>/dev/null`"], - [AS_IF([test "${systemdtmpfilesdir}" = yes], - [AC_MSG_ERROR([--with-systemdtmpfilesdir=${systemdtmpfilesdir} was requested, but PKG_CONFIG could not be queried for the system settings])]) - systemdtmpfilesdir="" - ]) - ;; - no) - systemdtmpfilesdir="" - ;; - *) - systemdtmpfilesdir="${withval}" - ;; -esac -if test "${systemdtmpfilesdir}" = "auto" ; then systemdtmpfilesdir=""; fi -if test -n "${systemdtmpfilesdir}"; then - AC_MSG_RESULT(using ${systemdtmpfilesdir}) -else - AC_MSG_RESULT(no) -fi - -dnl -dnl Tests for CppUnit availability and usability (will be built if we can, -dnl and if valgrind is enabled for this configuration - reported below). -dnl Using CppUnit implies C++ support! -dnl Theoretically, libcppunit-dev will pull up to g++, through libstdc++... -dnl AM_PATH_CPPUNIT(1.9.6) - -dnl # Tests with gcc-4.8 require this C++11 option to be provided explicitly -dnl # gcc-4.6 does not support this yet; newer gcc's should be ok by default. -dnl # Could use `AX_CXX_COMPILE_STDCXX_11([noext], [optional])` if it were -dnl # available everywhere. Or AX_CHECK_COMPILE_FLAG if it was ubiquitous: -dnl ###AX_CHECK_COMPILE_FLAG([-std=c++11], -dnl ### [CXXFLAGS="$CXXFLAGS -std=c++11" -dnl ### have_cxx11=yes], -dnl ### [have_cxx11=no]) - -AC_MSG_CHECKING(for C++11 support in current compiler) -have_cxx11=unknown -my_CXXFLAGS="$CXXFLAGS" -AC_LANG_PUSH([C++]) - -CPLUSPLUS_DECL=' -#include -#if __cplusplus < 201103L - #error This library needs at least a C++11 compliant compiler -#endif -' -CPLUSPLUS_MAIN='printf("%ld\n", __cplusplus);' - -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[${CPLUSPLUS_DECL}]], [[${CPLUSPLUS_MAIN}]])], - [AC_MSG_RESULT([yes, out of the box]) - have_cxx11=yes], - [AS_CASE(["${CXXFLAGS}"], - [*"-std="*], [ - AC_MSG_RESULT([no, not with the standard already set in CXXFLAGS='${CXXFLAGS}']) - have_cxx11=no, - ],[ - CXXFLAGS="$CXXFLAGS -std=c++11" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[${CPLUSPLUS_DECL}]], [[${CPLUSPLUS_MAIN}]])], - [AC_MSG_RESULT([yes, GCC-style (as C++11)]) - have_cxx11=yes], - [CXXFLAGS="$CXXFLAGS -std=c++0x" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[${CPLUSPLUS_DECL}]], [[${CPLUSPLUS_MAIN}]])], - [AC_MSG_RESULT([yes, GCC-style (as C++0X)]) - have_cxx11=yes], - [AC_MSG_RESULT([no]) - CXXFLAGS="$my_CXXFLAGS" - have_cxx11=no])])])]) -AM_CONDITIONAL(HAVE_CXX11, test "${have_cxx11}" = "yes") -AC_LANG_POP([C++]) -unset CPLUSPLUS_MAIN -unset CPLUSPLUS_DECL - -AC_MSG_CHECKING(for have_cppunit) -have_cppunit="no" -CPPUNIT_NUT_CXXFLAGS="" -AS_IF([test x"$have_PKG_CONFIG" = xyes], - [AS_IF([test x"${have_cxx11}" = xyes], - [ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES(CPPUNIT, cppunit, have_cppunit=yes, have_cppunit=no)], [have_cppunit=no]) - AS_IF([test "${have_cppunit}" != "yes"], - [AC_MSG_WARN([libcppunit not found - those C++ tests will not be built.]) - have_cppunit=no], - [AS_IF([test -n "$CXX"], - [AS_IF([$CXX --version 2>&1 | grep 'Free Software Foundation' > /dev/null], - [CPPUNIT_NUT_CXXFLAGS="-g -O0"])]) - ]) - ]) - ], [AC_MSG_WARN([pkg-config not found, can not look properly for libcppunit - those C++ tests will not be built.]) - have_cppunit=no] -) -AC_MSG_RESULT(${have_cppunit}) - -dnl On some systems, CppUnit inexplicably fails with trivial assertions -dnl so it should not be enabled with those environments, corrupting the -dnl test results with misleading errors. -dnl Tracked in https://github.com/networkupstools/nut/issues/1126 -dnl One such situation was e.g. "clang++ + arm64(QEMU) + -m64" while -dnl this was not seen with other compilers or bitness on same system. -AS_IF([test "${have_cppunit}" = "yes"], - [AC_MSG_CHECKING([if current toolkit can build and run cppunit tests (e.g. no ABI issues, related segfaults, etc.)]) - dnl Code below is largely a stripped variant of our tests/example.cpp and cpputest.cpp - CPLUSPLUS_DECL=' -#include -#include -#include -#include -#include - -class ExampleTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE( ExampleTest ); - CPPUNIT_TEST( testOne ); - CPPUNIT_TEST_SUITE_END(); -public: - void setUp() {}; - void tearDown() {}; - void testOne(); -}; -CPPUNIT_TEST_SUITE_REGISTRATION( ExampleTest ); -void ExampleTest::testOne() -{ - int i = 1; - float f = 1.0; - int cast = static_cast(f); - CPPUNIT_ASSERT_EQUAL_MESSAGE("Casted float is not the expected int (assert_eq)", i, cast ); - CPPUNIT_ASSERT_MESSAGE("Casted float is not the expected int (assert)", (i == cast) ); -} -' - - CPLUSPLUS_MAIN=' -CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); -CppUnit::TextUi::TestRunner runner; -runner.addTest( suite ); -runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), std::cerr ) ); -bool res = runner.run(); -return res ? 0 : 1; -' - - my_CXXFLAGS="$CXXFLAGS" - my_LDFLAGS="$LDFLAGS" - my_LIBS="$LIBS" - CXXFLAGS="$myCXXFLAGS $pkg_cv_CPPUNIT_CFLAGS $pkg_cv_CPPUNIT_CXXFLAGS" - LDFLAGS="$my_LDFLAGS $pkg_cv_CPPUNIT_LDFLAGS" - LIBS="$my_LIBS $pkg_cv_CPPUNIT_LIBS" - AC_LANG_PUSH([C++]) - AX_RUN_OR_LINK_IFELSE([AC_LANG_PROGRAM([[${CPLUSPLUS_DECL}]], [[${CPLUSPLUS_MAIN}]])], - [have_cppunit=yes], [have_cppunit=no]) - CXXFLAGS="$my_CXXFLAGS" - LDFLAGS="$my_LDFLAGS" - LIBS="$my_LIBS" - AC_LANG_POP([C++]) - unset CPLUSPLUS_MAIN - unset CPLUSPLUS_DECL - ]) -AC_MSG_RESULT(${have_cppunit}) - -dnl # By default keep the originally detected have_cppunit value -AC_MSG_CHECKING(for impact from --enable-cppunit option - should we build cppunit tests?) -AC_ARG_ENABLE(cppunit, - [AS_HELP_STRING([--enable-cppunit], [enable CPPUNIT tests for C++ bindings])], - [AS_CASE(["${enableval}"], - ["yes"], [AS_IF([test x"${have_cppunit}" = xyes], [], [AC_MSG_ERROR([--with-cppunit=yes can not be satisfied])])], - ["no"], [have_cppunit=no] - )]) -AC_MSG_RESULT(${have_cppunit}) - -AM_CONDITIONAL(HAVE_CPPUNIT, test "${have_cppunit}" = "yes") -AC_DEFINE_UNQUOTED(CPPUNIT_NUT_CXXFLAGS, $CPPUNIT_NUT_CXXFLAGS, [Compiler flags for cppunit tests]) - -AC_MSG_CHECKING(whether to install Augeas configuration-management lenses) -AC_ARG_WITH(augeas-lenses-dir, - AS_HELP_STRING([--with-augeas-lenses-dir=PATH], [where to install Augeas configuration-management lenses (/usr/share/augeas/lenses{/dist,/})]), -[ - case "${withval}" in - yes) - if test -z "${auglensdir}"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([augeas lenses directory requested but not found in default location]) - fi - if ! test -s scripts/augeas/nutupsconf.aug.in ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([augeas lenses directory requested but a non-trivial scripts/augeas/nutupsconf.aug.in was not provided by autogen.sh or dist archive]) - fi - ;; - auto) - if ! test -s scripts/augeas/nutupsconf.aug.in ; then - AC_MSG_WARN([augeas lenses directory skipped because a non-trivial scripts/augeas/nutupsconf.aug.in was not provided by autogen.sh or dist archive]) - auglensdir="" - fi - ;; - no) - auglensdir="" - ;; - *) - auglensdir="${withval}" - ;; - esac -], []) -if test -n "${auglensdir}"; then - AC_MSG_RESULT(using ${auglensdir}) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL(WITH_AUGLENS, test -n "${auglensdir}") - -AC_PATH_PROGS([AUGPARSE], [augparse], [none]) -AM_CONDITIONAL([HAVE_AUGPARSE], [test "x${AUGPARSE}" != "xnone"]) -AC_MSG_CHECKING([whether to enable Augeas configuration-management lenses tests]) -if test "x${AUGPARSE}" != xnone ; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - AC_MSG_CHECKING(whether to install hotplug rules) AC_ARG_WITH(hotplug-dir, @@ -2178,7 +1081,7 @@ AC_ARG_WITH(hotplug-dir, yes) if test -z "${hotplugdir}"; then AC_MSG_RESULT(no) - AC_MSG_ERROR([hotplug directory requested but not found]) + AC_MSG_ERROR(["hotplug directory requested but not found"]) fi ;; auto) @@ -2206,18 +1109,10 @@ AC_ARG_WITH(udev-dir, yes) if test -z "${udevdir}"; then AC_MSG_RESULT(no) - AC_MSG_ERROR([udev directory requested but not found]) - fi - if test "${nut_with_usb}" = yes && ! test -s scripts/udev/nut-usbups.rules.in ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([udev directory and USB driver support requested but a non-trivial scripts/udev/nut-usbups.rules.in was not provided by autogen.sh or dist archive]) + AC_MSG_ERROR(["udev directory requested but not found"]) fi ;; auto) - if test "${nut_with_usb}" = yes && ! test -s scripts/udev/nut-usbups.rules.in ; then - AC_MSG_WARN([udev directory skipped because a non-trivial scripts/udev/nut-usbups.rules.in was not provided by autogen.sh or dist archive]) - udevdir="" - fi ;; no) udevdir="" @@ -2244,18 +1139,10 @@ AC_ARG_WITH(devd-dir, yes) if test -z "${devddir}"; then AC_MSG_RESULT(no) - AC_MSG_ERROR([devd directory requested but not found]) - fi - if test "${nut_with_usb}" = yes && ! test -s scripts/devd/nut-usbups.rules.in -a -s scripts/devd/nut-usb.conf.in ; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([devd directory and USB driver support requested but non-trivial scripts/devd/nut-usbups.rules.in and scripts/devd/nut-usb.conf.in were not provided by autogen.sh or dist archive]) + AC_MSG_ERROR(["devd directory requested but not found"]) fi ;; auto) - if test "${nut_with_usb}" = yes && ! test -s scripts/devd/nut-usbups.rules.in -a -s scripts/devd/nut-usb.conf.in ; then - AC_MSG_WARN([devd directory skipped because non-trivial scripts/devd/nut-usbups.rules.in and scripts/devd/nut-usb.conf.in were not provided by autogen.sh or dist archive]) - devddir="" - fi ;; no) devddir="" @@ -2274,97 +1161,21 @@ AM_CONDITIONAL(WITH_DEVD, test -n "${devddir}") dnl +AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none]) +AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"]) +AC_PATH_PROGS([A2X], [a2x], [none]) + +dnl check for spell checking deps +AC_PATH_PROGS([ASPELL], [aspell], [none]) +AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"]) + dnl AIX system AM_CONDITIONAL([SYSTEM_AIX], [test "xAIX" = "x`uname -s 2>/dev/null`"]) dnl processor type -AC_DEFINE_UNQUOTED(CPU_TYPE, ["$target_cpu"], [Define processor type]) +AC_DEFINE_UNQUOTED(CPU_TYPE, $target_cpu, [Define processor type]) -dnl Can use valgrind for memory-leak testing, if present -AC_PATH_PROGS([VALGRIND], [valgrind], [none]) -dnl Even if the tool is installed, it may be not usable on build platform. -dnl QEMU may further complicate things, providing CPUs that formally match -dnl a supported family but crash in practice, or hopefully rejected early: -dnl valgrind: fatal error: unsupported CPU. -dnl Supported CPUs are: -dnl * x86 (practically any; Pentium-I or above), AMD Athlon or above) -dnl * AMD Athlon64/Opteron -dnl * ARM (armv7) -dnl * MIPS (mips32 and above; mips64 and above) -dnl * PowerPC (most; ppc405 and above) -dnl * System z (64bit only - s390x; z990 and above) -dnl Even if the tool does basically start, on some QEMU systems it crashes -dnl later (e.g. claims Signal 11 in tear-down after a successful test), so -dnl we support an explicit --without-valgrind (aka --with-valgrind=no) too. -AS_IF([test -n "${VALGRIND}"], [ - AC_MSG_CHECKING([whether valgrind is usable on current platform]) - AS_IF([( ${VALGRIND} --help >/dev/null 2>/dev/null )], - [AS_IF([( ${VALGRIND} /bin/sh -c true >/dev/null 2>/dev/null )], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - VALGRIND="none" - ])], - [AC_MSG_RESULT([no]) - VALGRIND="none" - ]) -]) -AC_MSG_CHECKING(whether to use valgrind for memory-leak testing) -AC_ARG_WITH(valgrind, - AS_HELP_STRING([--with-valgrind=PATH], [whether to use valgrind for memory-leak testing]), -[ - dnl ### echo "Caller said: '${withval}'... Discovered tool: '${VALGRIND}'... " - case "${withval}" in - yes) - if test "x$VALGRIND" = "xnone"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([valgrind requested but not found]) - fi - with_valgrind="yes" - ;; - auto) - with_valgrind="auto" - ;; - no) - with_valgrind="no" - ;; - *) - AC_PATH_PROGS([VALGRIND], ["${withval}"], [none]) - if test "x$VALGRIND" = "xnone"; then - AC_MSG_RESULT(no) - AC_MSG_ERROR([valgrind requested but not found]) - fi - with_valgrind="yes" - ;; - esac -], []) - -if test "x${with_valgrind}" = xauto; then - if test "x$VALGRIND" = "xnone"; then - with_valgrind="no" - else - with_valgrind="yes" - fi -fi - -if test "x${with_valgrind}" = xyes; then - AC_MSG_RESULT(using ${VALGRIND}) - AC_MSG_NOTICE([Do not forget to build with debug (e.g. pass '-g' in CFLAGS for GCC) for best results with valgrind tests]) -else - AC_MSG_RESULT(no) -fi -AM_CONDITIONAL([HAVE_VALGRIND], [test "x${VALGRIND}" != "xnone"]) -AM_CONDITIONAL([WITH_VALGRIND], [test "x${with_valgrind}" = "xyes"]) - -AC_MSG_CHECKING([whether to build cppunit tests using valgrind support]) -if test "x${with_valgrind}" = xyes && test "x${have_cppunit}" = xyes ; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl expand ${sysconfdir} and write it out - note that most packages -dnl override it to be /etc/nut, /etc/ups or similar, while the -dnl autotools default would be $prefix/etc +dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" @@ -2376,7 +1187,6 @@ conftemp="${datadir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" DATADIR=${conftemp} -NUT_DATADIR=${conftemp} AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files]) dnl same for bindir @@ -2400,64 +1210,6 @@ eval conftemp=\"${conftemp}\" LIBDIR=${conftemp} AC_DEFINE_UNQUOTED(LIBDIR, "${conftemp}", [Default path for system libraries]) -dnl same for libexecdir -conftemp="${libexecdir}" -eval conftemp=\"${conftemp}\" -eval conftemp=\"${conftemp}\" -LIBEXECDIR=${conftemp} -AC_DEFINE_UNQUOTED(LIBEXECDIR, "${conftemp}", [Default path for system exec-libraries]) - - -dnl checks related to --with-snmp enabled on command-line - -dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto". -if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then - AC_MSG_ERROR([Net-SNMP libraries not found, required for SNMP drivers]) -fi - -if test "${nut_with_snmp}" != "no"; then - nut_with_snmp="${nut_have_libnetsnmp}" -fi - -NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}], [], - [WITH_SNMP], [Define to enable SNMP support]) -AM_CONDITIONAL([HAVE_SNMP], [test "${nut_have_libsnmp}" = "yes"]) - - -if test -n "${host_alias}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_HOST_ALIAS, "${host_alias}", [host env spec we run on]) -else - if test -n "${host}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_HOST_ALIAS, "${host}", [host env spec we run on]) - fi -fi -if test -n "${build_alias}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_BUILD_ALIAS, "${build_alias}", [host env spec we built on]) -else - if test -n "${build}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_BUILD_ALIAS, "${build}", [host env spec we built on]) - fi -fi -if test -n "${target_alias}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_TARGET_ALIAS, "${target_alias}", [host env spec we built for]) -else - if test -n "${target}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_TARGET_ALIAS, "${target}", [host env spec we built for]) - fi -fi - -if test -n "${host_cpu}" -a -n "${host_os}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_HOST_SHORT_ALIAS, "${host_cpu}-${host_os}", [host OS short spec we run on]) -fi -if test -n "${build_cpu}" -a -n "${build_os}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_BUILD_SHORT_ALIAS, "${build_cpu}-${build_os}", [host OS short spec we built on]) -fi -if test -n "${target_cpu}" -a -n "${target_os}" ; then - AC_DEFINE_UNQUOTED(AUTOTOOLS_TARGET_SHORT_ALIAS, "${target_cpu}-${target_os}", [host OS short spec we built for]) -fi - -dnl ---------------------------------------------------------------------- - dnl Current date now=`TZ=UTC date +%Y-%m-%d` @@ -2467,7 +1219,6 @@ AC_SUBST(TREE_VERSION) AC_SUBST(NUT_NETVERSION) AC_SUBST(LIBSSL_CFLAGS) AC_SUBST(LIBSSL_LIBS) -AC_SUBST(LIBSSL_REQUIRES) AC_SUBST(LIBGD_CFLAGS) AC_SUBST(LIBGD_LDFLAGS) AC_SUBST(LIBNETSNMP_CFLAGS) @@ -2480,12 +1231,9 @@ AC_SUBST(LIBAVAHI_CFLAGS) AC_SUBST(LIBAVAHI_LIBS) AC_SUBST(LIBPOWERMAN_CFLAGS) AC_SUBST(LIBPOWERMAN_LIBS) -AC_SUBST(LIBMODBUS_CFLAGS) -AC_SUBST(LIBMODBUS_LIBS) AC_SUBST(LIBIPMI_CFLAGS) AC_SUBST(LIBIPMI_LIBS) AC_SUBST(DOC_BUILD_LIST) -AC_SUBST(DOC_CHECK_LIST) AC_SUBST(LIBWRAP_CFLAGS) AC_SUBST(LIBWRAP_LIBS) AC_SUBST(LIBLTDL_CFLAGS) @@ -2500,8 +1248,6 @@ AC_SUBST(STATEPATH) AC_SUBST(CONFPATH) AC_SUBST(BINDIR) AC_SUBST(LIBDIR) -AC_SUBST(NUT_DATADIR, [`eval echo "${DATADIR}"`]) -AC_SUBST(NUT_LIBEXECDIR, [`eval echo "${LIBEXECDIR}"`]) AC_SUBST(DRVPATH) AC_SUBST(SBINDIR) AC_SUBST(PORT) @@ -2515,347 +1261,11 @@ AC_SUBST(driverexecdir) AC_SUBST(htmldir) AC_SUBST(pkgconfigdir) AC_SUBST(systemdsystemunitdir) -AC_SUBST(systemdshutdowndir) -AC_SUBST(systemdtmpfilesdir) -AC_SUBST(auglensdir) +AC_SUBST(systemdsystemshutdowndir) AC_SUBST(hotplugdir) AC_SUBST(udevdir) -dnl On a related note to warning setup below, we limit the minimum C and C++ -dnl standard versions to ones we actively strive to support (C99 and C++11, -dnl GNU dialects tend to work on more systems if supported by compiler there). -dnl It is assumed that on very old systems whose compilers do not know these -dnl standards (only support ANSI/C89/C90 or older), as well as for builds -dnl that explicitly specify a CFLAGS="-std=..." (for GCC/CLANG toolkits), -dnl nothing should get added to CFLAGS/CXXFLAGS by this method: -NUT_COMPILER_FAMILY_FLAGS_DEFAULT_STANDARD - -dnl Filter through known variants first, so automatic choices can be made. -dnl Note that clang identifies as gcc-compatible so should be probed first. -dnl TODO: Flip this default to "hard" when we clear existing codebase. -dnl Note: the "gcc-legacy" option is intentionally undocumented, it acts as -dnl least-surprise default if caller did not specify any --enable-warnings. -dnl Note: Currently the "gcc-minimal" mode below adapts to builds with -dnl C89/C90/ANSI mode to be less noisy. Keep this in mind if changing the -dnl default "nut_warning_difficulty" and/or the case handling below. -dnl NOTE: Until X-Mas 2021, the default was "minimal" (now "medium") -nut_warning_difficulty="medium" -AC_MSG_CHECKING([whether to pre-set warnings (from '${nut_enable_warnings}')]) -AS_CASE(["${nut_enable_warnings}"], - [no|all|gcc-legacy|gcc-minimal|clang-minimal|gcc-medium|clang-medium|gcc-hard|clang-hard], [], - [clang], [nut_enable_warnings="${nut_enable_warnings}-${nut_warning_difficulty}"], - [gcc], [ - AS_CASE(["${CFLAGS}"], - [*89*|*90*|*ansi*], [nut_enable_warnings="${nut_enable_warnings}-minimal"], - [nut_enable_warnings="${nut_enable_warnings}-${nut_warning_difficulty}"] - )], - [yes|auto|""], [ - AS_IF([test "${CLANGCC}" = "yes"], [nut_enable_warnings="clang-${nut_warning_difficulty}"], - [AS_IF([test "${GCC}" = "yes"], [ - AS_CASE(["${CFLAGS}"], - [*89*|*90*|*ansi*], [nut_enable_warnings="gcc-minimal"], - [AS_CASE(["`$CC --version | grep -i gcc`"], - [*" "1.*|*" "2.*|3.*|*" "4.0*|*" "4.1*|*" "4.2*|*" "4.3*], [ - AC_MSG_WARN([Very old GCC in use, disabling warnings]) - dnl #AS_IF([test x"${nut_enable_Werror}" = xauto], [nut_enable_Werror="no"]) - nut_enable_Werror="no" - nut_enable_warnings="no"], - [*" "4.4*|*" "4.5*|*" "4.6*|*" "4.7*|*" "4.8*], [nut_enable_warnings="gcc-legacy"], - [nut_enable_warnings="gcc-${nut_warning_difficulty}"] - )] - )], [nut_enable_warnings="all"]) - ]) - ], - [hard|auto-hard|auto=hard], [ - AS_IF([test "${CLANGCC}" = "yes"], [nut_enable_warnings="clang-hard"], - [AS_IF([test "${GCC}" = "yes"], [nut_enable_warnings="gcc-hard"], [nut_enable_warnings="all"]) - ]) - ], - [medium|auto-medium|auto=medium], [ - AS_IF([test "${CLANGCC}" = "yes"], [nut_enable_warnings="clang-medium"], - [AS_IF([test "${GCC}" = "yes"], [nut_enable_warnings="gcc-medium"], [nut_enable_warnings="all"]) - ]) - ], - [minimal|auto-minimal|auto=minimal], [ - AS_IF([test "${CLANGCC}" = "yes"], [nut_enable_warnings="clang-minimal"], - [AS_IF([test "${GCC}" = "yes"], [nut_enable_warnings="gcc-minimal"], [nut_enable_warnings="all"]) - ]) - ], - [legacy], [AS_IF([test "${GCC}" = "yes"], [nut_enable_warnings="gcc-legacy"], [nut_enable_warnings="no"])], - [AC_MSG_WARN([Unsupported variant for --enable-warnings=${nut_enable_warnings}, ignored]) - nut_enable_warnings="no" - ] -) -AC_MSG_RESULT(["${nut_enable_warnings}"]) - -dnl # Nothing special for gcc - we tend to survive it with GNU standard >= 99 -dnl # and fail with strict C standard. Suggestions welcome for "gcc-hard" to -dnl # make a difference. -dnl # Note that "medium" and "hard" settings tend to trigger warnings also -dnl # from system headers, so we try to avoid them, using "-isystem path" -dnl # pre-set in our `m4/nut_compiler_family.m4` script: -dnl # https://stackoverflow.com/questions/36355232/disable-certain-warnings-for-system-headers -dnl # and "-Wno-system-headers" below. -dnl # Some of the compiler flags (including those added by pkg-config of some -dnl # third-party dependency packages) can upset older compiler releases which -dnl # did not yet support those. Flags like "-Wno-unknown-warning" for GCC or -dnl # "-Wno-unknown-warning-option" for CLANG should take care of that at least -dnl # for toolkit versions that support these - set in NUT_COMPILER_FAMILY_FLAGS -dnl # Majority of sanity checks are enabled by "-Wextra" on both GCC and CLANG -dnl # and "-Weverything" additionally on CLANG. They are impractically picky, -dnl # especially with fallout from system headers that we can not impact anyway -dnl # so the "difficulty level" pre-sets exclude certain warning classes from -dnl # that report. -dnl ### Special exclusion picks for clang-hard: -dnl # -Wno-unused-macros -- system headers define a lot of stuff we do not use, -dnl # gotta be fatal right? -dnl # -Wno-reserved-id-macro -- configure script tends to define _GNU_SOURCE_, -dnl # __EXTENSIONS__ etc. which are underscored and reserved for compilers -dnl # -Wno-padded -- NSPR and NSS headers get to issue lots of that -dnl # -Wno-c++98-compat-pedantic -Wno-c++98-compat -- our C++ code uses nullptr -dnl # as requested by newer linters, and C++98 does not. We require C++11 -dnl # or newer anyway, and skip building C++ library and test otherwise. -dnl ### Special exclusion picks for clang-medium (same as hard, plus...): -dnl # -Wno-float-conversion -Wno-double-promotion -Wno-implicit-float-conversion -dnl # -- reduce noise due to floating-point literals like "3.14" being a C -dnl # double type (a "3.14f" literal is a C float) cast implicitly into -dnl # float variables. Also variadic functions like printf() cast their -dnl # floating-point arguments into double (and small integer types into -dnl # "int") which then confuses pedantic checks of printf("%f", floatval). -dnl # -Wno-conversion -- similarly for error: implicit conversion loses -dnl # floating-point precision: 'double' to 'float' [-Werror,-Wconversion] -dnl # max_output = atof(sValue); -dnl # -Wno-cast-qual -- our code calls some library methods in ways which use -dnl # a "const char *" as a "char *" or vice-versa. Sometimes these method -dnl # signatures differ between dependency releases; sometimes they just -dnl # happened too hard to unravel cleanly and add more warnings. -dnl # This exclusion may be removed after common warnings are solved, -dnl # to allow progress on rectifying these cases next. -dnl # -Wno-incompatible-pointer-types-discards-qualifiers -- our code often -dnl # defines (char*) as the type for struct fields and method arguments, -dnl # but initializes/passes (char[]) variables or fixed strings. -dnl # This makes at least clang-3.4 quite upset and noisy (seems newer -dnl # versions care less about this situation). -dnl # -Wno-disabled-macro-expansion -- some system definitions of strncmp() -dnl # and other routines are in fact recursive macros. The -Weverything -dnl # mode of clang(-3.4) disables their handling, unless told otherwise. -AS_CASE(["${nut_enable_warnings}"], - [all], [ - CFLAGS="${CFLAGS} -Wall" - CXXFLAGS="${CXXFLAGS} -Wall" - ], - [clang-hard], [ - CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -pedantic" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat" - ], - [clang-medium], [ - CFLAGS="${CFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -pedantic -Wno-float-conversion -Wno-double-promotion -Wno-implicit-float-conversion -Wno-conversion -Wno-incompatible-pointer-types-discards-qualifiers" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wno-system-headers -Wall -Wextra -Weverything -Wno-disabled-macro-expansion -Wno-unused-macros -Wno-reserved-id-macro -Wno-padded -Wno-documentation -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-c++98-compat" - ], - [clang-minimal], [ - CFLAGS="${CFLAGS} -ferror-limit=0 -Wall -Wextra -Wno-documentation" - CXXFLAGS="${CXXFLAGS} -ferror-limit=0 -Wall -Wextra -Wno-documentation" - ], - [gcc-legacy], [CFLAGS="${CFLAGS} -Wall -Wsign-compare"], - [gcc-minimal], [ - dnl Builds with C89 (and aliases) are quite noisy for C99+ syntax used - dnl in NUT. The minimal-warnings should not complain in these builds. - dnl To make matters worse, many modern OS and third-party library - dnl headers can not be used with "C90 + pedantic" mode of GCC, either. - CFLAGS="${CFLAGS} -Wall -Wsign-compare" - CXXFLAGS="${CXXFLAGS} -Wall -Wextra" - AS_CASE(["${CFLAGS}"], - [*89*|*90*|*ansi*], [], - [CFLAGS="${CFLAGS} -Wextra -pedantic"] - ) - ], - [gcc-medium|gcc-hard], [ - CFLAGS="${CFLAGS} -Wno-system-headers -Wall -Wextra -Wsign-compare" - CXXFLAGS="${CXXFLAGS} -Wno-system-headers -Wall -Wextra" - AS_CASE(["${CFLAGS}"], - [*89*|*90*|*ansi*], [], - [CFLAGS="${CFLAGS} -pedantic"] - ) - ] -) - -AC_MSG_CHECKING([whether to make warnings fatal]) -AS_CASE(["${nut_enable_Werror}"], - [yes|auto], [ - CFLAGS="${CFLAGS} -Werror" - CXXFLAGS="${CXXFLAGS} -Werror" - ], - [no], [ - CFLAGS="${CFLAGS} -Wno-error" - CXXFLAGS="${CXXFLAGS} -Wno-error" - ] -) -AC_MSG_RESULT(["${nut_enable_Werror}"]) - -dnl Some compilers (e.g. older clang-3.4) have issues with built-in methods -dnl that are implemented as macros in system headers -- but only for some -dnl sources like snmp-ups.c, nutscan-serial.c, scan_eaton_serial.c, serial.c, -dnl scan_avahi.c, scan_xml_http.c, scan_snmp.c... (Seems they all refer to -dnl -DNETSNMP_USE_INLINE among other options, and tends to happen more with -dnl OpenSSL-enabled builds). Check if we like them? -AC_CHECK_HEADER([string.h], - [AC_LANG_PUSH([C]) - CFLAGS_SAVED="${CFLAGS}" - CFLAGS_BUILTIN_STR="-fno-builtin-strchr -fno-builtin-strcmp -fno-builtin-strncmp" - CFLAGS="${CFLAGS} -Werror -Wunreachable-code ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - AC_MSG_CHECKING([whether we should disable string built-ins]) - dnl AC_DEFINE([HAVE_STRING_H], [1], [Define to 1 if you have .]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [char *s = "v1", c = '%'; -if (strcmp(s, "v1") != 0) return 1; -if (strchr(s, '1') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - ])], - [CFLAGS="${CFLAGS_SAVED}" - AC_MSG_RESULT([no, they are not a problem])], - [CFLAGS="${CFLAGS_BUILTIN_STR} ${CFLAGS}" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [char *s = "v1", c = '%'; -if (strcmp(s, "v1") != 0) return 1; -if (strchr(s, '1') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - ])], - [CFLAGS="${CFLAGS_BUILTIN_STR} ${CFLAGS_SAVED}" - AC_MSG_RESULT([yes, this solves a problem])], - [CFLAGS="${CFLAGS_SAVED} -Werror -Wno-unreachable-code ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [char *s = "mibs", c = '%'; -/* Macro version of strcmp() has problems with strings shorter than - * 3 or 4 bytes, so to avoid nailing "-Warray-bounds" as well, - * here we just test for longer strings - existing NUT sources were - * fixed for this situation already */ -if (strcmp(s, "mibs") != 0) return 1; -if (strchr(s, 'b') == NULL) return 1; -if (strchr(s, c) != NULL) return 1 -/* no ";return 0;" here - autoconf adds one */ - ])], - [dnl CFLAGS="${CFLAGS_SAVED} -Wno-unreachable-code" - dnl NOTE: Empirically, constrain to just LIBNETSNMP_CFLAGS - CFLAGS="${CFLAGS_SAVED}" - LIBLTDL_CFLAGS="${LIBLTDL_CFLAGS} -Wno-unreachable-code" - LIBNETSNMP_CFLAGS="${LIBNETSNMP_CFLAGS} -Wno-unreachable-code" - AC_MSG_RESULT([no, but -Wno-unreachable-code solves the problem for this compiler])], - [CFLAGS="${CFLAGS_SAVED}" - AC_MSG_RESULT([no, this does not solve the problem or is not supported]) - ]) - ]) - ] - ) - AC_LANG_POP([C])] -) - -dnl Similar to above, for s_addr = htonl((ntohl(ip->start.s_addr) + 1)); -dnl which causes "shadowed local variable" as (re-)defined in nested macros. -dnl Technically also needs to `#include ` for struct in_addr -dnl but that should be pulled by inet.h anyway -AC_CHECK_HEADER([arpa/inet.h], - [AC_LANG_PUSH([C]) - CFLAGS_SAVED="${CFLAGS}" - CFLAGS_BUILTIN_NTOHL="-fno-builtin-htonl -fno-builtin-ntohl" - CFLAGS="${CFLAGS} -Werror -Wunreachable-code -Wshadow ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - AC_MSG_CHECKING([whether we should disable htonl/ntohl built-ins]) - dnl AC_DEFINE([HAVE_ARPA_INET_H], [1], [Define to 1 if you have .]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) -/* no ";return 0;" here - autoconf adds one */ - ])], - [CFLAGS="${CFLAGS_SAVED}" - AC_MSG_RESULT([no, they are not a problem])], - [CFLAGS="${CFLAGS_BUILTIN_NTOHL} ${CFLAGS}" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) -/* no ";return 0;" here - autoconf adds one */ - ])], - [CFLAGS="${CFLAGS_BUILTIN_NTOHL} ${CFLAGS_SAVED}" - AC_MSG_RESULT([yes, this solves a problem])], - [CFLAGS="${CFLAGS_SAVED} -Werror -Wno-shadow ${LIBNETSNMP_CFLAGS} ${LIBLTDL_CFLAGS} ${LIBNEON_CFLAGS} ${LIBSSL_CFLAGS}" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], [struct in_addr sin = {0}; -sin.s_addr = htonl((ntohl(sin.s_addr) + 1)) - ])], - [CFLAGS="${CFLAGS_SAVED}" - LIBLTDL_CFLAGS="${LIBLTDL_CFLAGS} -Wno-shadow" - LIBNETSNMP_CFLAGS="${LIBNETSNMP_CFLAGS} -Wno-shadow" - AC_MSG_RESULT([no, but -Wno-shadow solves the problem for this compiler])], - [CFLAGS="${CFLAGS_SAVED}" - AC_MSG_RESULT([no, this does not solve the problem or is not supported]) - ]) - ]) - ] - ) - AC_LANG_POP([C])] -) - -dnl Finally restore warnings settings that the caller might have provided in CFLAGS etc -NUT_POP_WARNINGS - -dnl Due to possibly repetitive content, generate unique settings -dnl relative to the top_builddir (distcheck and all): -AC_MSG_CHECKING([for top build dir for this configure run]) -TOP_BUILDDIR="" -AS_IF([test -n "${ac_abs_top_builddir}" && test -d "${ac_abs_top_builddir}"], - [TOP_BUILDDIR="${ac_abs_top_builddir}"], - [AS_IF([test -n "${ac_pwd}" && test -d "${ac_pwd}"], - [TOP_BUILDDIR="${ac_pwd}"], - [TOP_BUILDDIR="`dirname "$0"`" - TOP_BUILDDIR="`cd "$TOP_BUILDDIR" && pwd`" || AC_MSG_ERROR([Can not detect TOP_BUILDDIR])] - )] -) -AC_MSG_RESULT(["${TOP_BUILDDIR}"]) - -ABS_TOP_BUILDDIR="`cd "${TOP_BUILDDIR}" && pwd`" || AC_MSG_ERROR([Can not detect ABS_TOP_BUILDDIR]) -ABS_TOP_SRCDIR="`cd "${abs_srcdir}" && pwd`" || AC_MSG_ERROR([Can not detect ABS_TOP_SRCDIR]) -AM_CONDITIONAL([BUILDING_IN_TREE], [test "${ABS_TOP_BUILDDIR}" = "${ABS_TOP_SRCDIR}"]) - -AC_MSG_CHECKING([whether to customize ${TOP_BUILDDIR}/scripts/systemd/nut-common.tmpfiles.in for this system]) -AS_IF([test -n "$systemdtmpfilesdir"], - [mkdir -p "${TOP_BUILDDIR}"/scripts/systemd - cat > "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -# State file (e.g. upsd to driver) and pidfile location for NUT: -d @STATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @STATEPATH@/nut -EOF - AS_IF([test "$STATEPATH" != "$PIDPATH"], - [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @PIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @PIDPATH@/nut -EOF]) - AS_IF([test -n "$ALTPIDPATH" && test "$STATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTPIDPATH"], - [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @ALTPIDPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @ALTPIDPATH@/nut -EOF]) - AS_IF([test -n "$ALTSTATEPATH" && test "$STATEPATH" != "$ALTSTATEPATH" && test "$ALTSTATEPATH" != "$ALTPIDPATH" && test "$PIDPATH" != "$ALTSTATEPATH"], - [cat >> "${TOP_BUILDDIR}"/scripts/systemd/nut-common.tmpfiles.in << EOF -d @ALTSTATEPATH@/nut 0770 @RUN_AS_USER@ @RUN_AS_GROUP@ - - -X @ALTSTATEPATH@/nut -EOF]) -]) -AC_MSG_RESULT([done]) - -AC_MSG_NOTICE([Generating "data" files from templates, see below for executable scripts]) -AC_CONFIG_FILES([ +AC_OUTPUT([ clients/Makefile common/Makefile conf/Makefile @@ -2866,7 +1276,6 @@ AC_CONFIG_FILES([ data/Makefile data/driver.list docs/Makefile - docs/cables/Makefile docs/docinfo.xml docs/man/Makefile drivers/Makefile @@ -2874,12 +1283,12 @@ AC_CONFIG_FILES([ lib/libupsclient-config lib/libupsclient.pc lib/libnutclient.pc - lib/libnutclientstub.pc lib/libnutscan.pc lib/Makefile scripts/Aix/nut-aix.spec scripts/augeas/Makefile scripts/augeas/nutnutconf.aug + scripts/augeas/nutupsconf.aug scripts/augeas/nutupsdconf.aug scripts/augeas/nutupsdusers.aug scripts/augeas/nutupsmonconf.aug @@ -2888,82 +1297,32 @@ AC_CONFIG_FILES([ scripts/augeas/nutupssetconf.aug scripts/avahi/nut.service scripts/devd/Makefile + scripts/devd/nut-usb.conf scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/HP-UX/nut.psf + scripts/HP-UX/postinstall scripts/python/Makefile - scripts/python/module/PyNUT.py - scripts/upsdrvsvcctl/Makefile scripts/systemd/Makefile - scripts/systemd/nut-common.tmpfiles - scripts/systemd/nut-driver@.service + scripts/systemd/nut-driver.service scripts/systemd/nut-monitor.service scripts/systemd/nut-server.service - scripts/systemd/nut-driver-enumerator.service - scripts/systemd/nut-driver-enumerator.path - scripts/Solaris/nut-driver-enumerator.xml - scripts/Solaris/nut-driver.xml - scripts/Solaris/nut-monitor.xml - scripts/Solaris/nut-server.xml - scripts/Solaris/nut.xml + scripts/systemd/nutshutdown scripts/Solaris/Makefile scripts/Solaris/pkginfo + scripts/Solaris/postinstall + scripts/Solaris/preremove + scripts/Solaris/nut scripts/udev/Makefile scripts/udev/nut-ipmipsu.rules - scripts/ufw/Makefile + scripts/udev/nut-usbups.rules scripts/ufw/nut.ufw.profile scripts/Makefile server/Makefile tools/Makefile tools/nut-scanner/Makefile tests/Makefile - tests/NIT/Makefile Makefile ]) -AC_MSG_NOTICE([Generating templated script files that should be marked executable]) -m4_foreach_w([SCRIPTFILE], [ - scripts/Aix/nut.init - scripts/HP-UX/postinstall - scripts/python/app/NUT-Monitor-py2gtk2 - scripts/python/app/NUT-Monitor-py3qt5 - scripts/augeas/gen-nutupsconf-aug.py - scripts/python/module/test_nutclient.py - scripts/upsdrvsvcctl/nut-driver-enumerator.sh - scripts/upsdrvsvcctl/upsdrvsvcctl - scripts/systemd/nutshutdown - scripts/Solaris/svc-nut-server - scripts/Solaris/svc-nut-monitor - scripts/Solaris/precheck.py - scripts/Solaris/preinstall - scripts/Solaris/postinstall - scripts/Solaris/preremove - scripts/Solaris/postremove - scripts/Solaris/preproto.pl - scripts/Solaris/nut - tools/gitlog2changelog.py - tools/nut-snmpinfo.py -], [ - dnl Autoconf substitutes the token above specified in plain text, - dnl e.g. the brace below is empty and bracket gives verbatim varname - dnl AC_MSG_NOTICE([Script: SCRIPTFILE brace:(${SCRIPTFILE}) bracket:([SCRIPTFILE])]) - AC_CONFIG_FILES(SCRIPTFILE, chmod +x "SCRIPTFILE") -]) - -AC_MSG_NOTICE([Generating templated script files whose templates might have been generated (or not) by autogen.sh calling our helper scripts]) -m4_foreach_w([SCRIPTFILE], [ - scripts/augeas/nutupsconf.aug - scripts/udev/nut-usbups.rules - scripts/devd/nut-usb.conf -], [ - AC_MSG_CHECKING([whether to generate SCRIPTFILE]) - AS_IF([test -s SCRIPTFILE.in && ! test -f SCRIPTFILE.in.AUTOGEN_WITHOUT], - [AC_MSG_RESULT(yes) - AC_CONFIG_FILES(SCRIPTFILE)], - [AC_MSG_RESULT(no)] - ) -]) - -AC_OUTPUT - NUT_PRINT_FEATURE_REPORT diff --git a/data/Makefile.am b/data/Makefile.am index 9909818..4b67782 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -5,16 +5,3 @@ SUBDIRS = html dist_data_DATA = cmdvartab nodist_data_DATA = driver.list EXTRA_DIST = evolution500.seq epdu-managed.dev - -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="cmdvartab" SPELLCHECK_DIR="$(srcdir)" $@ - -MAINTAINERCLEANFILES = Makefile.in .dirstamp -CLEANFILES = *.pdf *.html *-spellchecked diff --git a/data/Makefile.in b/data/Makefile.in index e2ae422..0bd8feb 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -17,17 +17,7 @@ # Network UPS Tools: data VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -92,24 +82,19 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/driver.list.in $(dist_data_DATA) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -118,18 +103,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(dist_data_DATA) \ - $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = driver.list @@ -197,7 +175,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am + distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -218,7 +196,6 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/driver.list.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -252,7 +229,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -263,7 +239,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -277,7 +252,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -290,7 +264,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -308,8 +281,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -320,29 +291,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -362,9 +325,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -378,7 +338,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -396,7 +355,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -410,9 +368,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -438,14 +393,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -459,8 +412,6 @@ SUBDIRS = html dist_data_DATA = cmdvartab nodist_data_DATA = driver.list EXTRA_DIST = evolution500.seq epdu-managed.dev -MAINTAINERCLEANFILES = Makefile.in .dirstamp -CLEANFILES = *.pdf *.html *-spellchecked all: all-recursive .SUFFIXES: @@ -476,13 +427,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -643,10 +595,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -731,7 +680,6 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -740,7 +688,6 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -824,18 +771,6 @@ uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA ps ps-am tags tags-am uninstall uninstall-am \ uninstall-dist_dataDATA uninstall-nodist_dataDATA -.PRECIOUS: Makefile - - -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -cmdvartab-spellchecked: cmdvartab Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="cmdvartab" SPELLCHECK_DIR="$(srcdir)" $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/data/cmdvartab b/data/cmdvartab index 5f322c6..3d091f2 100644 --- a/data/cmdvartab +++ b/data/cmdvartab @@ -84,7 +84,7 @@ VARDESC input.load "Load on (ePDU) input (percent of full)" VARDESC input.realpower "Current sum value of all (ePDU) phases real power (W)" VARDESC input.power "Current sum value of all (ePDU) phases apparent power (VA)" VARDESC input.source "The current input power source" -VARDESC input.source.preferred "The preferred input power source" +VARDESC input.source.preferred "The prefered input power source" VARDESC output.voltage "Output voltage (V)" VARDESC output.voltage.nominal "Nominal output voltage (V)" @@ -94,7 +94,6 @@ VARDESC output.current "Output current (A)" VARDESC output.current.nominal "Nominal output current (A)" VARDESC battery.charge "Battery charge (percent of full)" -VARDESC battery.charge.approx "Rough approximation of battery charge" VARDESC battery.charge.low "Remaining battery level when UPS switches to LB (percent)" VARDESC battery.charge.restart "Minimum battery level for restart after power off (percent)" VARDESC battery.charge.warning "Battery level when UPS switches to Warning state (percent)" @@ -146,7 +145,7 @@ VARDESC ambient.present "Ambient sensor presence" VARDESC ambient.contacts.1.status "State of the dry contact sensor 1" VARDESC ambient.contacts.2.status "State of the dry contact sensor 2" -# FIXME: the outlet collection is indexed - solve with regexps? +# FIXME: the outlet collection is indexed - solve with regexs? # # VARDESC outlet.[[:digit:]]+.id "Outlet system identifier ()" @@ -178,7 +177,6 @@ VARDESC outlet.2.delay.start "Interval to wait before restarting this outlet (se VARDESC driver.name "Driver name" VARDESC driver.version "Driver version - NUT release" VARDESC driver.version.internal "Internal driver version" -VARDESC driver.version.usb "USB library version" VARDESC device.part "Device Part Number" diff --git a/data/driver.list.in b/data/driver.list.in index a4e876c..50f23b8 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -16,8 +16,8 @@ # ======== # - device type: # "ups" for Uninterruptible Power Supply -# "pdu" for Power Distribution Unit -# "scd" for Solar Controller Device +# "pdu" for Power Distributions Unit +# "scd" for Solar Controlers Device # "ats" for Automatic Transfer Switch # # - support level: a number from "1" to "5" (stars) meaning: @@ -35,25 +35,15 @@ # Duplicate text in the last field will be cooked out during the conversion # to HTML with ROWSPAN magic. They must be an exact match for this to work. +"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser" "Ablerex" "ups" "2" "625L" "USB" "blazer_usb" "Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser" -"Ablerex" "ups" "2" "MARS MS3000RT" "" "blazer_ser" -"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser" -"Ablerex" "ups" "2" "MP series" "USB" "nutdrv_qx" -"Ablerex" "ups" "2" "ARES Plus series" "USB" "nutdrv_qx" -"Ablerex" "ups" "2" "MSII series" "USB" "nutdrv_qx" -"Ablerex" "ups" "2" "MSIII series" "USB" "nutdrv_qx" -"Ablerex" "ups" "2" "GRs series" "USB" "nutdrv_qx" -"Ablerex" "ups" "2" "GRs Plus series" "USB" "nutdrv_qx" "ActivePower" "ups" "2" "400VA" "" "blazer_ser" "ActivePower" "ups" "2" "1400VA" "" "blazer_ser" "ActivePower" "ups" "2" "2000VA" "" "blazer_ser" "Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser" -"Advice" "ups" "2" "Top V Pro 6-10K" "USB" "blazer_usb" # https://www.advice.co.il/en/advice-products/ups-systems/ups-online-systems/one-phase-ups-5k-10k/%D7%90%D7%9C-%D7%A4%D7%A1%D7%A7-%D7%90%D7%95%D7%9F-%D7%9C%D7%99%D7%99%D7%9F-top-v-pro-6-10k-detail https://github.com/networkupstools/nut/issues/744 -"Advice" "ups" "2" "PRS850" "USB" "blazer_usb" -"Advice" "ups" "2" "PRV700 Pro" "USB" "blazer_usb" "AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21" @@ -61,7 +51,6 @@ "AEG Power Solutions" "ups" "3" "PROTECT NAS" "" "usbhid-ups" "AEG Power Solutions" "ups" "3" "PROTECT B" "" "usbhid-ups" -"APC" "ups" "3" "APC AP9584 Serial-to-USB kit" "USB" "usbhid-ups" # Allows USB connections to Serial-port APC devices, https://github.com/networkupstools/nut/pull/181 "APC" "ups" "2" "Back-UPS 1200BR (Microsol)" "" "solis" "APC" "ups" "2" "Back-UPS BZ2200BI-BR (Microsol)" "" "solis" "APC" "ups" "1" "Back-UPS Pro" "" "apcsmart" @@ -69,16 +58,13 @@ "APC" "ups" "1" "Smart-UPS" "" "apcsmart" "APC" "ups" "1" "Smart-UPS SMT/SMX/SURTD" "Microlink models with RJ45 socket - they *require* AP9620 SmartSlot expansion card and smart cable" "apcsmart" "APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups" -"APC" "ups" "2" "Back-UPS (USB)" "USB" "usbhid-ups" -"APC" "ups" "2" "Back-UPS CS USB" "USB" "usbhid-ups" +"APC" "ups" "2" "Back-UPS USB" "USB" "usbhid-ups" "APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups" "APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups" "APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups" "APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups" "APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups" -"APC" "ups" "2" "Back-UPS XS 1000M (Back-UPS Pro 1000, Model BX1000M)" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/139 -"APC" "ups" "2" "SMC2200BI-BR" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/557 -"APC" "ups" "2" "Smart-UPS (USB)" "USB" "usbhid-ups" +"APC" "ups" "2" "Smart-UPS USB" "USB" "usbhid-ups" "APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1" "APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2" "APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9" @@ -91,7 +77,7 @@ "APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12" "APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)" "APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)" -"APC" "pdu" "3" "(various APxxxx)" "SNMP monitoring card" "snmp-ups" +"APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)" "APC" "ats" "3" "ATS AP7724" "" "snmp-ups (experimental)" "Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)" @@ -102,8 +88,6 @@ "Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)" -"ARES" "ups" "2" "AR265i" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 did not explicitly mention the driver parameters, but other reports in the discussion did - "ARTronic" "ups" "2" "ARTon Millenium 1/2/3/6/10 kVA" "Serial" "blazer_ser" "ARTronic" "ups" "2" "ARTon Millenium 3.1 10/15/20 kVA" "Serial" "blazer_ser" "ARTronic" "ups" "2" "ARTon Titanium 6/10 kVA" "Serial" "blazer_ser" @@ -114,8 +98,6 @@ "ARTronic" "ups" "2" "ARTon Platinium Combo 3.1 10/15/20 kVA" "USB" "blazer_usb" "ARTronic" "ups" "2" "ARTon Platinium RT 1/2/3/6/10 kVA" "USB" "blazer_usb" -"Armac" "ups" "2" "R/2000I/PSW" "(USB ID 0925:1234)" "nutdrv_qx" - "ASEM SPA" "ups" "5" "PB1300 UPS" "i2c" "asem" "Asium" "ups" "3" "P700" "USB" "blazer_usb" # http://www.asiumpower.com/Asium-ASIUM-P700-650VA-360W/dp/B009SMEQ10 @@ -136,7 +118,6 @@ "Atlantis Land" "ups" "2" "(various)" "USB" "nutdrv_qx" "Aviem Systems" "ups" "2" "Aviem Power RT 1000-3000VA" "" "blazer_ser" -"Aviem Systems" "ups" "2" "Aviem Pro 2000VA" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/827 "Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)" "Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)" @@ -204,63 +185,45 @@ "COVER ENERGY SA" "ups" "2" "COVER PRM 1K/2K/3K/6K/10K EC" "" "blazer_usb" "COVER ENERGY SA" "ups" "2" "COVER PRM 6K/10K PR" "" "blazer_usb" -"CPC" "ups" "2" "RACK850VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 - -"Crown" "ups" "2" "CMU-SP1200IEC" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/1014 - -"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7" -"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7" -"Cyber Power Systems" "ups" "1" "CPS1100AVR" "" "powerpanel" -"Cyber Power Systems" "ups" "1" "CPS1200AVR" "" "powerpanel" -"Cyber Power Systems" "ups" "1" "CPS1250AVR" "" "powerpanel" -"Cyber Power Systems" "ups" "1" "CPS1500AVR" "" "powerpanel" -"Cyber Power Systems" "ups" "1" "CPS1500AVR-HO" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS320AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS500AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS650AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS700AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS800AVR" "" "powerpanel" -"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS850AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "CPS900AVR" "" "powerpanel" # http://www.cyberpowersystems.com/products/ups-systems/other-ups/CPS900AVR.html -"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "CPS1250AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "CPS1500AVR" "" "powerpanel" "Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7" -"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "BL1250U" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/battery-backup/bl1250u/ https://github.com/networkupstools/nut/issues/1012 -"Cyber Power Systems" "ups" "2" "BR1000ELCD" "USB" "usbhid-ups" # https://www.cyberpower.com/eu/en/product/sku/BR1000ELCD https://github.com/networkupstools/nut/issues/552 -"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "2" "CP850PFCLCD" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/605 -"Cyber Power Systems" "ups" "2" "CP1500PFCLCD" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/cp1500pfclcd/ https://github.com/networkupstools/nut/issues/520 -"Cyber Power Systems" "ups" "2" "CP900AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7" +"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "CPS1100AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "CPS1200AVR" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "CPS1500AVR-HO" "" "powerpanel" +"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel" +"Cyber Power Systems" "ups" "2" "OL3000RMXL2U" "" "powerpanel" "Cyber Power Systems" "ups" "2" "CPS685AVR" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "CPS800AVR" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "2" "OL3000RMXL2U" "" "powerpanel" -"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel" -"Cyber Power Systems" "ups" "2" "Value 1500ELCD-RU" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "CP825AVR-G / LE825G" "USB" "usbhid-ups" # http://www.cyberpowersystems.com/products/ups-systems/retail-products/LE825G.html +"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "OR700LCDRM1U" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "3" "PR6000LCDRTXL5U" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "CP1000PFCLCD" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "CP1500EPFCLCD" "USB" "usbhid-ups" # http://www.cyberpower-eu.com/products/ups_systems/pfc-sinewave/cp1500epfclcd.htm -"Cyber Power Systems" "ups" "3" "CP825AVR-G / LE825G" "USB" "usbhid-ups" # http://www.cyberpowersystems.com/products/ups-systems/retail-products/LE825G.html -"Cyber Power Systems" "ups" "3" "EC350G" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/products/ups/ecologic/ec350g -"Cyber Power Systems" "ups" "3" "EC750G" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/products/ups/desktop/ec750g -"Cyber Power Systems" "ups" "3" "EC850LCD" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/ec850lcd/ https://github.com/networkupstools/nut/issues/622 -"Cyber Power Systems" "ups" "3" "OR1500ERM1U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/1338 -"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "OR700LCDRM1U" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "OR500LCDRM1U" "USB" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/or500lcdrm1u/ https://github.com/networkupstools/nut/issues/578 -"Cyber Power Systems" "ups" "3" "RT650EI" "USB" "usbhid-ups" # http://www.cyberpowersystems.de/produkte/backup-usv-serien/rt-serie.html https://github.com/networkupstools/nut/issues/453 -"Cyber Power Systems" "ups" "3" "UT2200E" "USB" "usbhid-ups" # https://www.cyberpower.com/ww/en/product/sku/UT2200E https://github.com/networkupstools/nut/issues/556 -"Cyber Power Systems" "ups" "3" "PR1500RT2U" "" "usbhid-ups" # https://www.cyberpowersystems.com/product/ups/new-smart-app-sinewave/pr1500rt2u/ https://github.com/networkupstools/nut/issues/1191 -"Cyber Power Systems" "ups" "3" "PR6000LCDRTXL5U" "USB" "usbhid-ups" -"Cyber Power Systems" "ups" "3" "PR2200LCDRT2U" "" "snmp-ups" +"Cyber Power Systems" "ups" "2" "Value 1500ELCD-RU" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP900AVR" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1000AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups" +"Cyber Power Systems" "ups" "2" "CP1000PFCLCD" "USB" "usbhid-ups" "Cyber Power Systems" "ups" "3" "RMCARD100" "" "snmp-ups" "Cyber Power Systems" "ups" "3" "RMCARD201" "" "snmp-ups" "Cyber Power Systems" "ups" "3" "RMCARD202" "" "snmp-ups" -"Cyber Power Systems" "ups" "3" "RMCARD205" "" "snmp-ups" "Cyber Power Systems" "ups" "3" "RMCARD301" "" "snmp-ups" "Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)" @@ -290,24 +253,14 @@ "Dell" "ups" "5" "Various (XML/HTTP mode)" "UPS Network Management Card" "netxml-ups (experimental)" "Delta" "ups" "1" "GES602N" "" "belkin" -"Delta" "ups" "4" "Delta UPS Amplon R Series" "USB port" "usbhid-ups" "Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15" "Deltec" "ups" "4" "PRM 450/700/1000/1500" "" "upscode2" -"DEXP" "ups" "2" "MIX 850VA" "USB" "blazer_usb langid_fix=0x0409 runtimecal=240,100,720,50 default.battery.voltage.high=2.27 default.battery.voltage.low=1.72" # https://github.com/networkupstools/nut/issues/721 - "Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)" -"DigiTECH" "ups" "2" "Computer 650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/674 (may need longer pollinterval) - "Digitus" "ups" "1" "DN-170014" "USB" "richcomm_usb" # http://www.digitus.info/en/products/professional-network/security-and-surveillance/power-supply/uninterrruptable-power-supplies/ups-uninterruptible-power-systems-dn-170014/section/prof/ "Digitus" "ups" "2" "DN-170020" "" "blazer_ser" -"Digitus" "ups" "2" "DN-170040" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251 -"Digitus" "ups" "2" "DN-170041" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251 -"Digitus" "ups" "2" "DN-170040" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251 -"Digitus" "ups" "2" "DN-170041" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251 -"Digitus" "ups" "2" "DN-170076" "USB" "nutdrv_qx" # https://www.digitus.info/en/products/network-and-server-cabinets/power-supply/uninterruptible-power-supplies/dn-170076/ https://github.com/networkupstools/nut/issues/948 "Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser" "Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser" @@ -321,7 +274,6 @@ "Eaton" "ups" "5" "Ellipse ECO 650/800/1200/1600 VA" "USB" "usbhid-ups" "Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups" "Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups" -"Eaton" "ups" "5" "Ellipse PRO 650 VA" "USB cable" "usbhid-ups" "Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups" "Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups" "Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups" @@ -332,32 +284,24 @@ "Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups" "Eaton" "ups" "5" "5E650iUSB" "USB port" "usbhid-ups" "Eaton" "ups" "5" "5E1100iUSB" "USB port" "usbhid-ups" # http://powerquality.eaton.com/5E1100iUSB.aspx?CX&GUID=8D85FE66-3102-427C-8F33-B8D56BBDD4D3 -"Eaton" "ups" "4" "5E2200" "USB port" "nutdrv_qx" "Eaton" "ups" "5" "5S" "USB port" "usbhid-ups" "Eaton" "ups" "5" "5SC" "USB port" "usbhid-ups" "Eaton" "ups" "5" "5P" "USB port" "usbhid-ups" "Eaton" "ups" "5" "9SX" "USB port" "usbhid-ups" -"Eaton" "ups" "5" "9PX" "USB port" "usbhid-ups" -"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "USB port" "usbhid-ups" -"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut" -"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut" -"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut" -"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut" -"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut" -"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut" -"Eaton" "ups" "5" "5SC" "Serial port" "mge-shut" -"Eaton" "ups" "5" "5P" "Serial port" "mge-shut" -"Eaton" "ups" "5" "9SX" "Serial port" "mge-shut" -"Eaton" "ups" "5" "9PX" "Serial port" "mge-shut" -"Eaton" "ups" "5" "9PX 2000 RT" "USB port" "mge-shut" # https://github.com/networkupstools/nut/issues/540 -"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "Serial port" "mge-shut" -"Eaton" "ups" "5" "9PX" "SNMP/Web card" "netxml-ups" -"Eaton" "ups" "5" "9PX Split Phase 6/8/10 kVA" "SNMP/Web card" "netxml-ups" +"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "5SC" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "5P" "Serial port" "mge-shut or oldmge-shut" +"Eaton" "ups" "5" "9SX" "Serial port" "mge-shut or oldmge-shut" "Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" "Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" "Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb" @@ -384,21 +328,14 @@ "Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups" "Eaton" "ups" "5" "Management Card Contact" "Config 3 - Cable 66033" "genericups upstype=7" "Eaton" "ats" "5" "Eaton ATS16" "" "snmp-ups" -"Eaton" "ats" "5" "Eaton ATS30" "" "snmp-ups" "Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser" "Effekta" "ups" "2" "RM2000MH" "" "blazer_ser" "Electrys" "ups" "2" "UPS 2500" "" "nutdrv_qx or blazer_ser" -"Elsist" "ups" "2" "Nemo2.0 160" "USB" "blazer_usb" # http://www.naicon.com/company/wp-content/uploads/2017/05/Manual-NEMO2.0-Ver.02-Eng.pdf https://github.com/networkupstools/nut/issues/719 - -"Emerson" "pdu" "3" "PM3000 metered & switched" "" "snmp-ups" - "Energy Sistem" "ups" "2" "(various)" "" "blazer_ser" -"Energy Technologies" "ups" "2" "DPK1/1-3" "Serial" "blazer_ser" # https://www.tensy.ru/podderzhka/dokumentatsiya/ibp-serii-dpk/ https://github.com/networkupstools/nut/issues/762 - "ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7" "ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro" @@ -414,7 +351,6 @@ "EVER" "ups" "2" "DUO II Pro series" "USB port" "blazer_usb" "EVER" "ups" "2" "POWERLINE RT 1-3kVA series" "USB port" "blazer_usb" "EVER" "ups" "2" "POWERLINE RT 6-10kVA series" "USB port" "blazer_usb" -"EVER" "ups" "4" "ECO Pro AVR CDS series" "USB port" "usbhid-ups" "Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15" "Exide" "ups" "4" "NetUPS SE 450/700/1000/1500" "" "upscode2" @@ -466,9 +402,6 @@ "Grafenthal" "ups" "2" "PR-3000-HS" "SNMP/Web Minislot card (ref 149G0006)" "snmp-ups" # http://grafenthal.de/produkte/usv/online/pr-hs-serie/pr-3000-hs/?L=3et8 -"Greencell" "ups" "2" "Micropower 600" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1080 -"Greencell" "ups" "2" "Micropower 600" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1080 - "Gtec" "ups" "2" "ZP120N-1K / ZP120N-1KS / ZP120N-2K / ZP120N-2KS / ZP120N-3K / ZP120N-3KS" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-6K / ZP120N-6KS / ZP120N-10K-11 / ZP120N-10KS-11" "" "blazer_usb" "Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "USB port" "blazer_usb" @@ -476,8 +409,6 @@ "Gtec" "ups" "2" "ZP120N-10K-31-00 / ZP120N-10K-31-07 / ZP120N-10K-31-09 / ZP120N-10K-31-99 / ZP120N-20K" "Serial port" "blazer_ser" "Gtec" "ups" "2" "AP160N-1K / AP160LCD-1K-KS / AP160N-2K / AP160LCD-2K-KS / AP160N-3K / AP160LCD-3K-KS / AP160N-6K-PDU / AP160N-10K-PDU" "Serial port" "blazer_ser" -"Guardian" "ups" "2" "LCD 1500 AP (IGA1500LCD)" "Serial" "nutdrv_qx" - "HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart" "HP" "ups" "3" "T750 G2" "Serial port" "bcmxcp" "HP" "ups" "3" "T1000 G3" "Serial port" "bcmxcp" @@ -486,8 +417,8 @@ "HP" "ups" "4" "R3000 XR" "" "bcmxcp" "HP" "ups" "4" "R5500 XR" "" "bcmxcp" "HP" "ups" "3" "T500 / T750" "older models, USB port" "bcmxcp_usb" -"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut" -"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut" +"HP" "ups" "3" "R/T3000" "Serial port" "mge-shut or oldmge-shut" +"HP" "ups" "3" "R5000 / R7000" "Serial port" "mge-shut or oldmge-shut" "HP" "ups" "3" "T750 INTL" "" "usbhid-ups" "HP" "ups" "3" "T1000 INTL" "" "usbhid-ups" "HP" "ups" "3" "T1500 INTL" "" "usbhid-ups" @@ -501,15 +432,8 @@ "HP" "ups" "4" "Various (SNMP mode)" "HP UPS Management Module" "snmp-ups" "HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)" -"HPE" "pdu" "5" "Various (SNMP mode)" "" "snmp-ups" - "Huawei" "ups" "4" "UPS5000-E" "" "snmp-ups" -"Huawei" "ups" "3" "UPS2000-G and UPS2000-A series" "MODBUS (USB with Linux 5.12+, or Serial RS-232)" "huawei-ups2000" # https://github.com/networkupstools/nut/issues/1066 https://github.com/networkupstools/nut/pull/1198 https://github.com/networkupstools/nut/pull/954 https://github.com/networkupstools/nut/issues/1017 -"Hunnox" "ups" "2" "HNX-850" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 - -"IBM" "ups" "5" "Various" "USB port" "usbhid-ups" -"IBM" "ups" "5" "Various" "Serial port" "mge-shut" "IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)" "ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)" @@ -537,12 +461,10 @@ "IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)" -"Ippon" "ups" "2" "Back Basic 850 Euro" "USB" "blazer_usb (experimental)" # https://github.com/networkupstools/nut/issues/802 "Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser" "Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)" "Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser" "Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)" -"Ippon" "ups" "2" "Back Comfo Pro II 650/850/1050" "USB" "blazer_usb (experimental)" "Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser" "Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)" "Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser" @@ -560,8 +482,6 @@ "Kanji" "ups" "1" "800 VA" "USB" "nutdrv_atcl_usb" "Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser" -"Kebo" "ups" "2" "UPS-1000D (UPS-1000VA)" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/981 -"Kebo" "ups" "2" "UPS-650VA" "USB" "megatec_usb" "KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K TOWER" "" "blazer_usb" "KOLFF" "ups" "2" "BLACK NOVA 1K/2K/3K/6K/10K/20K XL TOWER" "" "blazer_usb" @@ -575,43 +495,7 @@ "LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095" -"Legrand" "ups" "2" "Daker DK" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Daker DK" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Daker DK Plus" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Daker DK Plus" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Keor Line RT" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Keor Line RT" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Keor LP" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Keor Multiplug" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Keor S" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Keor S" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Keor PDU" "USB" "usbhid-ups" -"Legrand" "ups" "2" "Keor SP" "USB" "usbhid-ups" -"Legrand" "ups" "2" "Keor SPX" "USB" "nutdrv_qx" -"Legrand" "ups" "4" "Megaline 1250" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 2500" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 3750" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 5000" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 5000 /2" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 6250 /2" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 7500 /2" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 8750 /2" "Serial" "metasys" -"Legrand" "ups" "4" "Megaline 10000 /2" "Serial" "metasys" -"Legrand" "ups" "2" "Niky" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Niky" "USB" "nutdrv_qx" -"Legrand" "ups" "2" "Niky S" "Serial" "nutdrv_qx" -"Legrand" "ups" "2" "Niky S" "USB" "nutdrv_qx" -"Legrand" "ups" "4" "WHAD 800" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD 1000" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD 1250" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD 1500" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD 2000" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD 2500" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD CAB 1250" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD CAB 2500" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD HE 800" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD HE 1000" "Serial" "metasys" -"Legrand" "ups" "4" "WHAD HE 1500" "Serial" "metasys" +"Legrand" "ups" "2" "Keor Multiplug" "" "nutdrv_qx" "Lestar" "ups" "2" "MD-800E" "" "blazer_ser" @@ -622,8 +506,6 @@ "Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)" "Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups" "Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups" -"Liebert" "ups" "2" "PowerSure PSA 500" "USB" "usbhid-ups" -"Liebert" "ups" "2" "PowerSure PSA500MT3-230U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/601 "Liebert" "ups" "2" "PowerSure PSI 1440" "USB" "usbhid-ups" # http://www.emersonnetworkpower.com/en-US/Products/ACPower/Pages/LiebertPowerSurePSILineInteractiveUPS10003000VA.aspx "LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)" @@ -638,50 +520,48 @@ "Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf "Mecer" "ups" "2" "ME-2000" "" "blazer_ser" -"Meta System" "ups" "4" "HF Line" "1..4 boards" "metasys" -"Meta System" "ups" "4" "HF Line /2" "5..8 boards" "metasys" -"Meta System" "ups" "4" "HF Millennium 810" "" "metasys" -"Meta System" "ups" "4" "HF Millennium 820" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 910" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 920" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 930" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 940" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 950" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 960" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 970" "" "metasys" -"Meta System" "ups" "4" "HF TOP Line 980" "" "metasys" -"Meta System" "ups" "4" "ECO Network 750" "" "metasys" -"Meta System" "ups" "4" "ECO Network 1000" "" "metasys" -"Meta System" "ups" "4" "ECO Network 1050" "" "metasys" -"Meta System" "ups" "4" "ECO Network 1500" "" "metasys" -"Meta System" "ups" "4" "ECO Network 1800" "" "metasys" -"Meta System" "ups" "4" "ECO Network 2000" "" "metasys" -"Meta System" "ups" "4" "ECO Network 2100" "" "metasys" -"Meta System" "ups" "4" "ECO Network 2500" "" "metasys" -"Meta System" "ups" "4" "ECO Network 3000" "" "metasys" -"Meta System" "ups" "4" "ECO 305" "" "metasys" -"Meta System" "ups" "4" "ECO 308" "" "metasys" -"Meta System" "ups" "4" "ECO 311" "" "metasys" -"Meta System" "ups" "4" "ECO 511" "" "metasys" -"Meta System" "ups" "4" "ECO 516" "" "metasys" -"Meta System" "ups" "4" "ECO 519" "" "metasys" -"Meta System" "ups" "4" "ECO 522" "" "metasys" -"Meta System" "ups" "4" "ally HF 800" "" "metasys" -"Meta System" "ups" "4" "ally HF 1000" "" "metasys" -"Meta System" "ups" "4" "ally HF 1250" "" "metasys" -"Meta System" "ups" "4" "ally HF 1600" "" "metasys" -"Meta System" "ups" "4" "ally HF 2000" "" "metasys" -"Meta System" "ups" "4" "ally HF 2500" "" "metasys" -"Meta System" "ups" "4" "Megaline 1250" "" "metasys" -"Meta System" "ups" "4" "Megaline 2500" "" "metasys" -"Meta System" "ups" "4" "Megaline 3750" "" "metasys" -"Meta System" "ups" "4" "Megaline 5000" "" "metasys" -"Meta System" "ups" "4" "Megaline 6250" "" "metasys" -"Meta System" "ups" "4" "Megaline 7500" "" "metasys" -"Meta System" "ups" "4" "Megaline 8750" "" "metasys" -"Meta System" "ups" "4" "Megaline 10000" "" "metasys" -"Meta System" "ups" "4" "DHEA 1000" "Serial" "metasys" -"Meta System" "ups" "4" "DHEA 1500" "Serial" "metasys" +"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys" +"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys" +"Meta System" "ups" "1" "HF Millennium 810" "" "metasys" +"Meta System" "ups" "1" "HF Millennium 820" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys" +"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys" +"Meta System" "ups" "1" "ECO Network 750" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1050" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 1800" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2000" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2100" "" "metasys" +"Meta System" "ups" "1" "ECO Network 2500" "" "metasys" +"Meta System" "ups" "1" "ECO Network 3000" "" "metasys" +"Meta System" "ups" "1" "ECO 305" "" "metasys" +"Meta System" "ups" "1" "ECO 308" "" "metasys" +"Meta System" "ups" "1" "ECO 311" "" "metasys" +"Meta System" "ups" "1" "ECO 511" "" "metasys" +"Meta System" "ups" "1" "ECO 516" "" "metasys" +"Meta System" "ups" "1" "ECO 519" "" "metasys" +"Meta System" "ups" "1" "ECO 522" "" "metasys" +"Meta System" "ups" "1" "ally HF 800" "" "metasys" +"Meta System" "ups" "1" "ally HF 1000" "" "metasys" +"Meta System" "ups" "1" "ally HF 1250" "" "metasys" +"Meta System" "ups" "1" "ally HF 1600" "" "metasys" +"Meta System" "ups" "1" "ally HF 2000" "" "metasys" +"Meta System" "ups" "1" "ally HF 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 1250" "" "metasys" +"Meta System" "ups" "1" "Megaline 2500" "" "metasys" +"Meta System" "ups" "1" "Megaline 3750" "" "metasys" +"Meta System" "ups" "1" "Megaline 5000" "" "metasys" +"Meta System" "ups" "1" "Megaline 6250" "" "metasys" +"Meta System" "ups" "1" "Megaline 7500" "" "metasys" +"Meta System" "ups" "1" "Megaline 8750" "" "metasys" +"Meta System" "ups" "1" "Megaline 10000" "" "metasys" "MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups" "MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups" @@ -692,15 +572,15 @@ "MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups" "MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups" "MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups" -"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut" -"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut" +"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut" "MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)" "MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)" "MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" @@ -748,45 +628,45 @@ "MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups" "MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups" "MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups" -"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or mge-utalk" -"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or oldmge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or oldmge-shut or mge-utalk" +"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or oldmge-shut or mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk" @@ -798,7 +678,7 @@ "MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk" "MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk" -"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut" +"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or oldmge-shut" "MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)" "MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)" "MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)" @@ -871,14 +751,10 @@ "Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16" "Nitram" "ups" "1" "Elite 2005" "" "powerpanel" -"nJoy" "ups" "2" "Keen 600" "USB" "blazer_ser port=/dev/ttyUSB0" # https://www.njoy.ro/UPS/keen-600 -"nJoy" "ups" "2" "Keen 600" "USB" "nutdrv_qx port=/dev/ttyUSB0" # https://www.njoy.ro/UPS/keen-600 -"nJoy" "ups" "3" "Aten PRO 3000" "SNMP" "snmp-ups" # At least basic status is served; https://www.njoy.global/product/aten-pro-3000 - "Novex" "ups" "1" "NUPS-650" "USB" "blazer_usb protocol=megatec" # http://komp.1k.by/periphery-ups/novex/Novex_NUPS_650-130052.html "Numeric" "ups" "2" "3000 SW" "" "blazer_ser" -"Numeric" "ups" "2" "Digital 800 plus" "USB" "nutdrv_qx or blazer_usb" +"Numeric" "ups" "2" "Digital 800 plus" "USB" "blazer_usb" "Oneac" "ups" "1" "ON400" "advanced interface" "oneac" "Oneac" "ups" "1" "ON600" "advanced interface" "oneac" @@ -902,24 +778,16 @@ "Online" "ups" "2" "Zinto A" "" "blazer_usb" "Online" "ups" "1" "Zinto D" "" "optiups" "Online" "ups" "2" "Yunto YQ450" "" "blazer_usb" -"Online" "ups" "2" "Xanto S700" "/dev/ttyUSB0" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1279 "OnLite" "ups" "2" "AQUA" "50" "blazer_ser" "Opti-UPS" "ups" "1" "PowerES" "420E" "optiups" "Opti-UPS" "ups" "1" "VS 575C" "type=OPTI" "powercom" -"Opti-UPS" "ups" "1" "Power Series" "PS1500E" "blazer_usb" "Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser" "Orvaldi Power Protection" "ups" "2" "750 / 900SP" "" "blazer_usb" "Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser" -"Phasak" "ups" "2" "9465 or P6N" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1187 => Voltronic-QS-Hex protocol detected - -"PhoenixContact" "ups" "4" "QUINT-UPS/24DC" "2320461" "phoenixcontact_modbus" #https://www.phoenixcontact.com/online/portal/us?uri=pxc-oc-itemdetail:pid=2320461 - -"PiJuice" "ups" "5" "PiJuice HAT" "" "pijuice" # https://github.com/PiSupply/PiJuice/issues/124 -"PiJuice" "ups" "5" "PiJuice Zero pHAT" "" "pijuice" "Plexus" "ups" "2" "500VA" "USB" "blazer_usb" "Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb" @@ -944,14 +812,6 @@ "Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)" "Powercom" "ups" "5" "BNT-xxxAP" "USB (product id: 0004)" "usbhid-ups (experimental)" "Powercom" "ups" "1" "BNT-xxxAP" "USB (product id: 0001)" "usbhid-ups (experimental)" -"Powercom" "ups" "3" "RPT-600AP" "USB" "usbhid-ups" # http://pcmups.com.tw/eA/html/product/show.php?num=226&root=13&kind=105&page=1&keyword= https://github.com/networkupstools/nut/issues/633 -"Powercom" "ups" "3" "Raptor 2000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/633 - -"Powercool" "ups" "1" "350VA to 1600VA" "USB" "nutdrv_atcl_usb" -"Powercool" "ups" "2" "650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 -"Powercool" "ups" "2" "650VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 bus=001 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor norating noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 -"Powercool" "ups" "2" "1500VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 - e.g. battery percentage is not being returned -"Powercool" "ups" "2" "2000VA" "USB" "nutdrv_qx port=auto vendorid=0001 productid=0000 product=MEC0003 protocol=hunnox langid_fix=0x0409 novendor noscanlangid" # https://github.com/networkupstools/nut/pull/638 caveats at https://github.com/networkupstools/nut/issues/537 "POWEREX" "ups" "2" "VI 1000 LED" "" "blazer_usb" @@ -979,18 +839,6 @@ "PowerWalker" "ups" "2" "Line-Interactive VI 850 LCD" "" "blazer_usb" "PowerWalker" "ups" "2" "Online VFI 1000RT/1500RT/2000RT/3000RT/6000RT/10000RT LCD" "" "blazer_usb" "PowerWalker" "ups" "2" "Line-Interactive VI 1000RT/1500RT/2000RT/3000RT LCD" "" "blazer_usb" -"PowerWalker" "ups" "2" "VFI 1000 CG PF1" "" "nutdrv_qx" # https://powerwalker.com/?page=product&item=10122108&lang=en -"PowerWalker" "ups" "2" "VFI 2000 TGS" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/560 and https://github.com/networkupstools/nut/pull/564 -"PowerWalker" "ups" "2" "VI 650 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/483 -"PowerWalker" "ups" "2" "VI 650/850 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646 -"PowerWalker" "ups" "2" "VI 1200 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/1270 -"PowerWalker" "ups" "2" "VI 2200 SHL" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/756 -"PowerWalker" "ups" "2" "VI 1200 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646 -"PowerWalker" "ups" "2" "VI 2200 SH" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/646 -"PowerWalker" "ups" "2" "Basic VI 1000 SB" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/818 -"PowerWalker" "ups" "2" "PR1500LCDRT2U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/818 -"PowerWalker" "ups" "2" "VI 3000 SCL" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/971 -"PowerWalker" "ups" "2" "VI 750T/HID" "USB" "usbhid-ups" # https://powerwalker.com/?page=select&cat=VI_THID&lang=en https://github.com/networkupstools/nut/issues/774 "Powerware" "ups" "4" "3110" "" "genericups upstype=7" "Powerware" "ups" "4" "3115" "" "genericups upstype=11" @@ -1020,7 +868,6 @@ "Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)" "Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)" "Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)" -"Raritan" "pdu" "3" "Dominion PX2" "" "snmp-ups" "REDi" "ups" "2" "Blazer 400VA / 600VA / 800VA" "" "blazer_ser" @@ -1030,8 +877,8 @@ "Riello" "ups" "3" "Riello Sentinel SDL 6000-7" "Netman Plus 102 SNMP Card" "snmp-ups" "Riello" "ups" "3" "Riello Sentinel Dual SDH 1000-7" "Netman Plus 102 SNMP Card" "snmp-ups" -"Riello" "ups" "4" "IDG 400/600/800/1200/1600" "" "riello_usb" -"Riello" "ups" "4" "IPG 600/800" "" "riello_usb" +"Riello" "ups" "5" "IDG 400/600/800/1200/1600" "" "riello_usb" +"Riello" "ups" "5" "IPG 600/800" "" "riello_usb" "Riello" "ups" "5" "WPG 400/600/800" "" "riello_usb" "Riello" "ups" "5" "NPW 600/800/1000/1500/2000" "" "riello_usb" "Riello" "ups" "5" "NDG 800/1000/1500/2000" "" "riello_usb" @@ -1071,37 +918,10 @@ "Rucelf" "ups" "2" "Rucelf UPOII-3000-96-EL" "" "blazer_ser" # http://www.rucelf.ua/en/catalog/upoii-3000-96-el/ -"Salicru" "ups" "2" "SPS ONE 700VA" "USB" "blazer_usb" -"Salicru" "ups" "2" "SPS ONE 2000VA" "USB" "nutdrv_qx" # https://www.salicru.com/en/ups/sps-one.html https://github.com/networkupstools/nut/issues/554 -"Salicru" "ups" "2" "SPS 650/850 HOME" "usb" "usbhid-ups (experimental)" -"Salicru" "ups" "2" "SLC TWIN PRO2" "usb" "usbhid-ups (experimental)" # https://github.com/networkupstools/nut/issues/450 -"Salicru" "ups" "2" "SLC-1500-TWIN PRO3" "usb" "usbhid-ups (experimental)" # https://github.com/networkupstools/nut/issues/1142 -"Salicru" "ups" "2" "SLC TWINPRO3" "usb" "usbhid-ups (experimental)" -"Salicru" "ups" "2" "SLC TWIN RT3" "usb" "usbhid-ups (experimental)" - -"Santak" "ups" "2" "Castle C*K" "Serial" "blazer_ser" # https://github.com/networkupstools/nut/issues/1039 -"Santak" "ups" "2" "MT*-PRO" "Serial" "blazer_ser" # https://github.com/networkupstools/nut/issues/1039 - -"Siemens" "ups" "4" "SITOP UPS500" "serial" "nutdrv_siemens_sitop (experimental, untested)" -"Siemens" "ups" "4" "SITOP UPS500" "USB" "nutdrv_siemens_sitop (experimental)" - "SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)" "SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser" -"SNR" "ups" "2" "SNR-UPS-LID-600" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-600-XPS" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-600-LED-C13" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-600-LED-C13-PRO" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-800" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-800-LED-С13" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-1000-XPS" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-1200" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-1500" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-2000" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-2000-XPS" "" "nutdrv_qx" -"SNR" "ups" "2" "SNR-UPS-LID-3000-XPS" "" "nutdrv_qx" - "SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7" "SOLA" "ups" "1" "325" "" "blazer_ser or bestups" "SOLA" "ups" "1" "520" "" "blazer_ser or bestups" @@ -1142,13 +962,11 @@ "Sweex" "ups" "2" "INTELLIGENT UPS 1500VA P220" "USB" "blazer_usb (USB ID 0665:5161)" # http://www.sweex.com/en/notebook-pc-accessoires/ups/PP220/ "Syndome" "ups" "2" "Era 500VA" "USB" "blazer_usb" -"Syndome" "ups" "2" "Atom LCD-1000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/483 "Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser" "Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser" -"Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "USB" "blazer_usb langid_fix=0x409" -"Tecnoware" "ups" "2" "UPS ERA PLUS 1100" "USB" "blazer_usb" # https://www.tecnoware.com/Prodotti/FGCERAPL1100/ups-era-plus-1100.aspx https://github.com/networkupstools/nut/issues/747 +"Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "" "blazer_usb langid_fix=0x409" "Tripp Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5" "Tripp Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups" @@ -1250,8 +1068,7 @@ "Tripp Lite" "ups" "3" "SMX3000RT2UTAA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4396 "Tripp Lite" "ups" "3" "SMX3000XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2694 "Tripp Lite" "ups" "3" "SMX3000XLRT2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5658 -"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (older; product ID 0001, protocol 3005)" "tripplite_usb" # https://www.tripplite.com/support/product/part-number/SMX500RT1U https://github.com/networkupstools/nut/pull/584 -"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (newer; protocol/product ID 3005)" "usbhid-ups" # https://www.tripplite.com/support/product/part-number/SMX500RT1U +"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2691 "Tripp Lite" "ups" "3" "SMX750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3021 "Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194 "Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070 @@ -1302,8 +1119,6 @@ "UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb" "UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb" -"V7" "ups" "2" "UPS1RM2U1500-1E" "USB" "blazer_usb" # http://www.v7world.com/uk/ups-1500va-rack-mount-2u-eu.html https://github.com/networkupstools/nut/issues/716 - "Various" "ups" "4" "(various)" "SEC protocol" "gamatronic" "Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4" "Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21" @@ -1334,8 +1149,6 @@ "Voltronic Power" "ups" "2" "Frigate TX 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Galleon 1KVA" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Galleon 1KVA" "USB" "nutdrv_qx" -"Voltronic Power" "ups" "2" "Galleon X9-RT LCD-1-3K" "USB" "blazer_usb" # https://github.com/networkupstools/nut/issues/1251 -"Voltronic Power" "ups" "2" "Galleon X9-RT LCD-1-3K" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/1251 "Voltronic Power" "ups" "2" "Imperial 1KVA" "Serial" "nutdrv_qx" "Voltronic Power" "ups" "2" "Imperial 1KVA" "USB" "nutdrv_qx" "Voltronic Power" "ups" "2" "Prosine 800" "Serial" "nutdrv_qx" diff --git a/data/html/Makefile.am b/data/html/Makefile.am index 4d0620a..956e66b 100644 --- a/data/html/Makefile.am +++ b/data/html/Makefile.am @@ -1,11 +1,7 @@ -# Network UPS Tools: data/html +# Network UPS Tools: data/html # install these only if configured --with-cgi if WITH_CGI dist_html_DATA = index.html bottom.html nut-banner.png nodist_html_DATA = header.html endif EXTRA_DIST = README - -MAINTAINERCLEANFILES = Makefile.in .dirstamp -# Generated by configure script: -DISTCLEANFILES = header.html diff --git a/data/html/Makefile.in b/data/html/Makefile.in index 30cdd21..f455c4a 100644 --- a/data/html/Makefile.in +++ b/data/html/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,17 +15,7 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -90,24 +80,19 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = data/html +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/header.html.in $(am__dist_html_DATA_DIST) README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -116,18 +101,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_html_DATA_DIST) \ - $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = header.html @@ -182,8 +160,6 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)" DATA = $(dist_html_DATA) $(nodist_html_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/header.html.in \ - README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -192,7 +168,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -203,7 +178,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -217,7 +191,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -230,7 +203,6 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -248,8 +220,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -260,29 +230,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -302,9 +264,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -318,7 +277,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -336,7 +294,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -350,9 +307,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -378,14 +332,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -396,14 +348,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -# Network UPS Tools: data/html +# Network UPS Tools: data/html # install these only if configured --with-cgi @WITH_CGI_TRUE@dist_html_DATA = index.html bottom.html nut-banner.png @WITH_CGI_TRUE@nodist_html_DATA = header.html EXTRA_DIST = README -MAINTAINERCLEANFILES = Makefile.in .dirstamp -# Generated by configure script: -DISTCLEANFILES = header.html all: all-am .SUFFIXES: @@ -419,13 +368,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/html/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu data/html/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -493,10 +443,7 @@ ctags CTAGS: cscope cscopelist: -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -559,12 +506,10 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am @@ -647,8 +592,6 @@ uninstall-am: uninstall-dist_htmlDATA uninstall-nodist_htmlDATA tags-am uninstall uninstall-am uninstall-dist_htmlDATA \ uninstall-nodist_htmlDATA -.PRECIOUS: Makefile - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/data/html/header.html.in b/data/html/header.html.in index 6e222a5..6f7f1ff 100644 --- a/data/html/header.html.in +++ b/data/html/header.html.in @@ -1,7 +1,7 @@ -Network UPS Tools +Network UPS Tools diff --git a/debian/changelog b/debian/changelog index 46485d6..f6cf025 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,53 +1,3 @@ -nut (2.8.0-1) unstable; urgency=medium - - [ lagertonne ] - * new upstream 2.8.0 - - -- lagertonne Wed, 29 Jun 2022 13:12:45 +0000 - -nut (2.7.4-14) unstable; urgency=medium - - [ Jeremy Sowden ] - * d/patches: add patch to fix FTBFS with g++-11 (closes: #984260) - - [ Laurent Bigonville ] - * debian/control: Bump Standards-Version to 4.6.0 (no further changes) - * debian/source_nut.py: Change the shebang to python3 - - -- Laurent Bigonville Sat, 06 Nov 2021 18:41:33 +0100 - -nut (2.7.4-13) unstable; urgency=medium - - [ Arnaud Quette ] - * Retirement of Arnaud Quette from the Debian project - - [ Debian Janitor ] - * Set upstream metadata fields: Bug-Database, Bug-Submit (from ./configure), - Name (from ./configure), Repository, Repository-Browse. - - [ Sergio Durigan Junior ] - * d/libnutclient0.symbols: Update file, and fix FTBFS. (Closes: #957614) - - -- Laurent Bigonville Thu, 15 Oct 2020 12:16:34 +0200 - -nut (2.7.4-12) unstable; urgency=medium - - * Port autopkgtests to python3, taken from Ubuntu, thanks to them and - Dimitri John Ledkov (Closes: #937169) - - -- Laurent Bigonville Thu, 30 Jan 2020 01:06:14 +0100 - -nut (2.7.4-11) unstable; urgency=medium - - * Remove python(2) binding and disable nut-monitor package for now as it - depends on unmaintained pygtk (Closes: #885358, #937169) - * debian/control: Add support for the Build-Profile - * debian/patches/0013-fix-doc-build.patch: Fix the documentation build with - asciidoc >= 0.9 - * Disable python3-nut package for now as it's broken with python3 - - -- Laurent Bigonville Sun, 15 Dec 2019 21:22:13 +0100 - nut (2.7.4-10) unstable; urgency=medium * debian/libnutscan1.symbols: hurd-i386 is not built with ipmi support and diff --git a/debian/control b/debian/control index 7ba656b..713fe22 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: nut Section: admin Priority: optional -Maintainer: Laurent Bigonville +Maintainer: Arnaud Quette +Uploaders: Laurent Bigonville Build-Depends: debhelper (>= 12), dh-python, libfreeipmi-dev (>= 0.8.5) [!hurd-i386], @@ -14,13 +15,14 @@ Build-Depends: debhelper (>= 12), libsnmp-dev | libsnmp9-dev, libusb-dev (>= 0.1.8), libwrap0-dev (>= 7.6), + python (>= 2.6.6-3~), python3 -Build-Depends-Indep: asciidoc (>= 8.6.3) , - asciidoc-dblatex , - dblatex (>= 0.2.5) , - docbook-xsl , - libxml2-utils -Standards-Version: 4.6.0 +Build-Depends-Indep: asciidoc (>= 8.6.3), + asciidoc-dblatex, + dblatex (>= 0.2.5), + docbook-xsl, + libxml2-utils +Standards-Version: 4.4.0 Homepage: https://networkupstools.org/ Vcs-Browser: https://salsa.debian.org/debian/nut Vcs-Git: https://salsa.debian.org/debian/nut.git @@ -156,7 +158,6 @@ Architecture: all Section: doc Depends: ${misc:Depends} Suggests: doc-base -Build-Profiles: Description: network UPS tools - documentation Network UPS Tools (NUT) is a client/server monitoring system that allows computers to share uninterruptible power supply (UPS) and @@ -260,36 +261,49 @@ Description: network UPS tools - development files for the scanner library . This package provides the development files for the scanner library. -#Package: python3-nut -#Section: python -#Architecture: all -#Depends: ${misc:Depends}, ${python3:Depends} -#Description: network UPS tools - Python3 bindings for NUT server -# Network UPS Tools (NUT) is a client/server monitoring system that -# allows computers to share uninterruptible power supply (UPS) and -# power distribution unit (PDU) hardware. Clients access the hardware -# through the server, and are notified whenever the power status -# changes. -# . -# This package provides Python3 bindings to connect to NUT server. +Package: python-nut +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python:Depends} +Description: network UPS tools - Python bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Python bindings to connect to NUT server. -#Package: nut-monitor -#Architecture: all -#Depends: python-glade2, -# python-gobject-2, -# python-gtk2, -# python-nut, -# ${misc:Depends}, -# ${python:Depends} -#Recommends: python-notify -#Description: network UPS tools - GUI application to monitor UPS status -# Network UPS Tools (NUT) is a client/server monitoring system that -# allows computers to share uninterruptible power supply (UPS) and -# power distribution unit (PDU) hardware. Clients access the hardware -# through the server, and are notified whenever the power status -# changes. -# . -# This package provides nut-monitor, a GUI application to monitor UPS status. +Package: python3-nut +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Description: network UPS tools - Python3 bindings for NUT server + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides Python3 bindings to connect to NUT server. + +Package: nut-monitor +Architecture: all +Depends: python-glade2, + python-gobject-2, + python-gtk2, + python-nut, + ${misc:Depends}, + ${python:Depends} +Recommends: python-notify +Description: network UPS tools - GUI application to monitor UPS status + Network UPS Tools (NUT) is a client/server monitoring system that + allows computers to share uninterruptible power supply (UPS) and + power distribution unit (PDU) hardware. Clients access the hardware + through the server, and are notified whenever the power status + changes. + . + This package provides nut-monitor, a GUI application to monitor UPS status. Package: libups-nut-perl Section: perl diff --git a/debian/libnutclient-dev.manpages b/debian/libnutclient-dev.manpages new file mode 100644 index 0000000..ced03c7 --- /dev/null +++ b/debian/libnutclient-dev.manpages @@ -0,0 +1,34 @@ +debian/tmp/usr/share/man/man3/libnutclient.3 +debian/tmp/usr/share/man/man3/libnutclient_commands.3 +debian/tmp/usr/share/man/man3/libnutclient_devices.3 +debian/tmp/usr/share/man/man3/libnutclient_general.3 +debian/tmp/usr/share/man/man3/libnutclient_misc.3 +debian/tmp/usr/share/man/man3/libnutclient_tcp.3 +debian/tmp/usr/share/man/man3/libnutclient_variables.3 +debian/tmp/usr/share/man/man3/nutclient_authenticate.3 +debian/tmp/usr/share/man/man3/nutclient_destroy.3 +debian/tmp/usr/share/man/man3/nutclient_device_forced_shutdown.3 +debian/tmp/usr/share/man/man3/nutclient_device_login.3 +debian/tmp/usr/share/man/man3/nutclient_device_master.3 +debian/tmp/usr/share/man/man3/nutclient_execute_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_command_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_commands.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_num_logins.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_rw_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_description.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_get_device_variables.3 +debian/tmp/usr/share/man/man3/nutclient_get_devices.3 +debian/tmp/usr/share/man/man3/nutclient_has_device.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_command.3 +debian/tmp/usr/share/man/man3/nutclient_has_device_variable.3 +debian/tmp/usr/share/man/man3/nutclient_logout.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_value.3 +debian/tmp/usr/share/man/man3/nutclient_set_device_variable_values.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_create_client.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_disconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_get_timeout.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_is_connected.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_reconnect.3 +debian/tmp/usr/share/man/man3/nutclient_tcp_set_timeout.3 diff --git a/debian/libnutclient0.symbols b/debian/libnutclient0.symbols index 4e7c579..8487ec8 100644 --- a/debian/libnutclient0.symbols +++ b/debian/libnutclient0.symbols @@ -155,14 +155,18 @@ libnutclient.so.0 libnutclient0 #MINVER# nutclient_tcp_is_connected@Base 2.7.3 nutclient_tcp_reconnect@Base 2.7.3 nutclient_tcp_set_timeout@Base 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 + (c++)"std::_Rb_tree, std::less, std::allocator >::_M_erase(std::_Rb_tree_node*)@Base" 2.7.3 (c++)"std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_erase(std::_Rb_tree_node, std::allocator > >*)@Base" 2.7.3 (c++)"std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::find(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_erase(std::_Rb_tree_node, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >*)@Base" 2.7.3 - (c++|optional=templinst)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4 + (c++|optional=templinst|arch=amd64 arm64 hppa ia64 m68k mips64el ppc64el riscv64 sh4 sparc64 x32)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4 (c++)"std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_get_insert_unique_pos(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 + (c++|optional=templinst)"std::_Rb_tree_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > std::_Rb_tree, std::allocator >, std::pair, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::_Select1st, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::less, std::allocator > >, std::allocator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > > >::_M_emplace_hint_unique, std::allocator > const&>, std::tuple<> >(std::_Rb_tree_const_iterator, std::allocator > const, std::vector, std::allocator >, std::allocator, std::allocator > > > > >, std::piecewise_construct_t const&, std::tuple, std::allocator > const&>&&, std::tuple<>&&)@Base" 2.7.4-9~ (c++)"std::__cxx11::basic_string, std::allocator > std::operator+, std::allocator >(char const*, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 (c++)"std::pair, bool> std::_Rb_tree, std::less, std::allocator >::_M_insert_unique(nut::Variable&&)@Base" 2.7.3 + (c++)"std::pair, std::allocator > >, bool> std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_insert_unique, std::allocator > const&>(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.3 (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::operator=(std::vector, std::allocator >, std::allocator, std::allocator > > > const&)@Base" 2.7.3 (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >::~vector()@Base" 2.7.3 (c++)"std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::~vector()@Base" 2.7.3 @@ -184,8 +188,11 @@ libnutclient.so.0 libnutclient0 #MINVER# (c++)"typeinfo name for nut::TcpClient@Base" 2.7.3 (c++)"typeinfo name for nut::TimeoutException@Base" 2.7.3 (c++)"typeinfo name for nut::UnknownHostException@Base" 2.7.3 - (c++|optional=templinst)"void std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_realloc_insert, std::allocator > const&>(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4 - (c++|optional=templinst)"void std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::_M_realloc_insert, std::allocator >, std::allocator, std::allocator > > > >(__gnu_cxx::__normal_iterator, std::allocator >, std::allocator, std::allocator > > >*, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > > >, std::vector, std::allocator >, std::allocator, std::allocator > > >&&)@Base" 2.7.4 + (c++|optional=templinst)"void std::__cxx11::basic_string, std::allocator >::_M_construct(char const*, char const*, std::forward_iterator_tag)@Base" 2.7.4-9~ + (c++|optional=templinst)"void std::__cxx11::basic_string, std::allocator >::_M_construct(char*, char*, std::forward_iterator_tag)@Base" 2.7.4-9~ + (c++|optional=templinst|arch=amd64 arm64 x32)"void std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_realloc_insert, std::allocator > >(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::__cxx11::basic_string, std::allocator >&&)@Base" 2.7.4-9~ + (c++)"void std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_realloc_insert, std::allocator > const&>(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4-5.1~ + (c++)"void std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > >::_M_realloc_insert, std::allocator >, std::allocator, std::allocator > > > >(__gnu_cxx::__normal_iterator, std::allocator >, std::allocator, std::allocator > > >*, std::vector, std::allocator >, std::allocator, std::allocator > > >, std::allocator, std::allocator >, std::allocator, std::allocator > > > > > >, std::vector, std::allocator >, std::allocator, std::allocator > > >&&)@Base" 2.7.4-5.1~ (c++)"vtable for nut::Client@Base" 2.7.3 (c++)"vtable for nut::IOException@Base" 2.7.3 (c++)"vtable for nut::NotConnectedException@Base" 2.7.3 @@ -194,6 +201,3 @@ libnutclient.so.0 libnutclient0 #MINVER# (c++)"vtable for nut::TcpClient@Base" 2.7.3 (c++)"vtable for nut::TimeoutException@Base" 2.7.3 (c++)"vtable for nut::UnknownHostException@Base" 2.7.3 - (c++|optional=templinst)"void std::vector, std::allocator >, std::allocator, std::allocator > > >::_M_realloc_insert, std::allocator > >(__gnu_cxx::__normal_iterator, std::allocator >*, std::vector, std::allocator >, std::allocator, std::allocator > > > >, std::__cxx11::basic_string, std::allocator >&&)@Base" 2.7.4 - (c++|optional=templinst|arch=s390x mipsel armhf)"std::pair, std::allocator > >, bool> std::_Rb_tree, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::_Identity, std::allocator > >, std::less, std::allocator > >, std::allocator, std::allocator > > >::_M_insert_unique, std::allocator > const&>(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4 - (c++|optional=templinst|arch=!s390x !mipsel !armhf)"std::set, std::allocator >, std::less, std::allocator > >, std::allocator, std::allocator > > >::insert(std::__cxx11::basic_string, std::allocator > const&)@Base" 2.7.4 diff --git a/debian/libnutscan-dev.manpages b/debian/libnutscan-dev.manpages new file mode 100644 index 0000000..c2b22c5 --- /dev/null +++ b/debian/libnutscan-dev.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man3/nutscan*.3 diff --git a/debian/libupsclient-dev.manpages b/debian/libupsclient-dev.manpages new file mode 100644 index 0000000..5c01cdd --- /dev/null +++ b/debian/libupsclient-dev.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man3/upscli*.3 diff --git a/debian/nut-cgi.manpages b/debian/nut-cgi.manpages new file mode 100644 index 0000000..36a1449 --- /dev/null +++ b/debian/nut-cgi.manpages @@ -0,0 +1,6 @@ +debian/tmp/usr/share/man/man5/hosts.conf.5 +debian/tmp/usr/share/man/man5/upsset.conf.5 +debian/tmp/usr/share/man/man5/upsstats.html.5 +debian/tmp/usr/share/man/man8/upsimage.cgi.8 +debian/tmp/usr/share/man/man8/upsset.cgi.8 +debian/tmp/usr/share/man/man8/upsstats.cgi.8 diff --git a/debian/nut-client.manpages b/debian/nut-client.manpages new file mode 100644 index 0000000..9a02533 --- /dev/null +++ b/debian/nut-client.manpages @@ -0,0 +1,9 @@ +debian/tmp/usr/share/man/man5/nut.conf.5 +debian/tmp/usr/share/man/man5/upsmon.conf.5 +debian/tmp/usr/share/man/man5/upssched.conf.5 +debian/tmp/usr/share/man/man8/upsc.8 +debian/tmp/usr/share/man/man8/upscmd.8 +debian/tmp/usr/share/man/man8/upslog.8 +debian/tmp/usr/share/man/man8/upsmon.8 +debian/tmp/usr/share/man/man8/upsrw.8 +debian/tmp/usr/share/man/man8/upssched.8 diff --git a/debian/nut-ipmi.manpages b/debian/nut-ipmi.manpages new file mode 100644 index 0000000..5da576f --- /dev/null +++ b/debian/nut-ipmi.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/nut-ipmipsu.8 diff --git a/debian/nut-powerman-pdu.manpages b/debian/nut-powerman-pdu.manpages new file mode 100644 index 0000000..43bbc81 --- /dev/null +++ b/debian/nut-powerman-pdu.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/powerman-pdu.8 diff --git a/debian/nut-server.install b/debian/nut-server.install index 51591c7..7247dba 100644 --- a/debian/nut-server.install +++ b/debian/nut-server.install @@ -36,6 +36,7 @@ debian/tmp/lib/nut/mge-utalk debian/tmp/lib/nut/microdowell debian/tmp/lib/nut/nutdrv_atcl_usb debian/tmp/lib/nut/nutdrv_qx +debian/tmp/lib/nut/oldmge-shut debian/tmp/lib/nut/oneac debian/tmp/lib/nut/optiups debian/tmp/lib/nut/powercom @@ -54,10 +55,7 @@ debian/tmp/lib/nut/upsd debian/tmp/lib/nut/usbhid-ups debian/tmp/lib/nut/victronups debian/tmp/lib/systemd/system-shutdown/nutshutdown -debian/tmp/lib/systemd/system/nut-driver\@.service -debian/tmp/lib/systemd/system/nut-driver.target -debian/tmp/lib/systemd/system/nut-driver-enumerator.service -debian/tmp/lib/systemd/system/nut-driver-enumerator.path +debian/tmp/lib/systemd/system/nut-driver.service debian/tmp/lib/systemd/system/nut-server.service debian/tmp/sbin/upsd debian/tmp/sbin/upsdrvctl diff --git a/debian/nut-server.manpages b/debian/nut-server.manpages new file mode 100644 index 0000000..63939cd --- /dev/null +++ b/debian/nut-server.manpages @@ -0,0 +1,54 @@ +debian/tmp/usr/share/man/man5/ups.conf.5 +debian/tmp/usr/share/man/man5/upsd.conf.5 +debian/tmp/usr/share/man/man5/upsd.users.5 +debian/tmp/usr/share/man/man8/al175.8 +debian/tmp/usr/share/man/man8/apcsmart-old.8 +debian/tmp/usr/share/man/man8/apcsmart.8 +debian/tmp/usr/share/man/man8/apcupsd-ups.8 +debian/tmp/usr/share/man/man8/bcmxcp.8 +debian/tmp/usr/share/man/man8/bcmxcp_usb.8 +debian/tmp/usr/share/man/man8/belkin.8 +debian/tmp/usr/share/man/man8/belkinunv.8 +debian/tmp/usr/share/man/man8/bestfcom.8 +debian/tmp/usr/share/man/man8/bestfortress.8 +debian/tmp/usr/share/man/man8/bestuferrups.8 +debian/tmp/usr/share/man/man8/bestups.8 +debian/tmp/usr/share/man/man8/blazer_ser.8 +debian/tmp/usr/share/man/man8/blazer_usb.8 +debian/tmp/usr/share/man/man8/clone.8 +debian/tmp/usr/share/man/man8/dummy-ups.8 +debian/tmp/usr/share/man/man8/etapro.8 +debian/tmp/usr/share/man/man8/everups.8 +debian/tmp/usr/share/man/man8/gamatronic.8 +debian/tmp/usr/share/man/man8/genericups.8 +debian/tmp/usr/share/man/man8/isbmex.8 +debian/tmp/usr/share/man/man8/ivtscd.8 +debian/tmp/usr/share/man/man8/liebert-esp2.8 +debian/tmp/usr/share/man/man8/liebert.8 +debian/tmp/usr/share/man/man8/masterguard.8 +debian/tmp/usr/share/man/man8/metasys.8 +debian/tmp/usr/share/man/man8/mge-shut.8 +debian/tmp/usr/share/man/man8/mge-utalk.8 +debian/tmp/usr/share/man/man8/microdowell.8 +debian/tmp/usr/share/man/man8/nut-scanner.8 +debian/tmp/usr/share/man/man8/nutdrv_atcl_usb.8 +debian/tmp/usr/share/man/man8/nutdrv_qx.8 +debian/tmp/usr/share/man/man8/nutupsdrv.8 +debian/tmp/usr/share/man/man8/oneac.8 +debian/tmp/usr/share/man/man8/optiups.8 +debian/tmp/usr/share/man/man8/powercom.8 +debian/tmp/usr/share/man/man8/powerpanel.8 +debian/tmp/usr/share/man/man8/rhino.8 +debian/tmp/usr/share/man/man8/richcomm_usb.8 +debian/tmp/usr/share/man/man8/riello_ser.8 +debian/tmp/usr/share/man/man8/riello_usb.8 +debian/tmp/usr/share/man/man8/safenet.8 +debian/tmp/usr/share/man/man8/solis.8 +debian/tmp/usr/share/man/man8/tripplite.8 +debian/tmp/usr/share/man/man8/tripplite_usb.8 +debian/tmp/usr/share/man/man8/tripplitesu.8 +debian/tmp/usr/share/man/man8/upscode2.8 +debian/tmp/usr/share/man/man8/upsd.8 +debian/tmp/usr/share/man/man8/upsdrvctl.8 +debian/tmp/usr/share/man/man8/usbhid-ups.8 +debian/tmp/usr/share/man/man8/victronups.8 diff --git a/debian/nut-snmp.manpages b/debian/nut-snmp.manpages new file mode 100644 index 0000000..3c9644e --- /dev/null +++ b/debian/nut-snmp.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/snmp-ups.8 diff --git a/debian/nut-xml.manpages b/debian/nut-xml.manpages new file mode 100644 index 0000000..91a537e --- /dev/null +++ b/debian/nut-xml.manpages @@ -0,0 +1 @@ +debian/tmp/usr/share/man/man8/netxml-ups.8 diff --git a/debian/patches/0013-fix-doc-build.patch b/debian/patches/0013-fix-doc-build.patch deleted file mode 100644 index 9aeba8c..0000000 --- a/debian/patches/0013-fix-doc-build.patch +++ /dev/null @@ -1,18 +0,0 @@ -Description: Fix the documentation build with asciidoc >= 0.9 -Author: Laurent Bigonville -Last-Update: 2019-12-15 - ---- a/docs/Makefile.am -+++ b/docs/Makefile.am -@@ -91,10 +91,7 @@ packager-guide.html packager-guide.chunk - # variable ASCIIDOC_VERBOSE to "-v", ie: - # $ ASCIIDOC_VERBOSE=-v make - A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ -- --xsltproc-opts "--nonet" \ -- --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d -d @$(SOURCE_DATE_EPOCH)`\"" \ -- --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S -d @$(SOURCE_DATE_EPOCH)`\"" \ -- --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ -+ --xsltproc-opts "--nonet --stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d -d @$(SOURCE_DATE_EPOCH)`\" --stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S -d @$(SOURCE_DATE_EPOCH)`\" --stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ - --attribute iconsdir=$(srcdir)/images \ - --attribute=badges \ - --attribute=external_title \ diff --git a/debian/patches/0014-Remove-dynamic-exception-specifications-from-clients.patch b/debian/patches/0014-Remove-dynamic-exception-specifications-from-clients.patch deleted file mode 100644 index 9ec6e35..0000000 --- a/debian/patches/0014-Remove-dynamic-exception-specifications-from-clients.patch +++ /dev/null @@ -1,980 +0,0 @@ -From fab323320d5b955ed034b2eea390a9bbb549e8e5 Mon Sep 17 00:00:00 2001 -From: Peter Klein -Date: Thu, 11 Jun 2020 02:32:13 +0000 -Subject: [PATCH] Remove dynamic exception specifications from - clients/nutclient.cpp - -These are invalid in c++17 and must be removed for compatibility with -modern compilers. ---- - clients/nutclient.cpp | 146 +++++++++++++++---------------- - clients/nutclient.h | 195 +++++++++++++++++++++--------------------- - 2 files changed, 167 insertions(+), 174 deletions(-) - -diff --git a/clients/nutclient.cpp b/clients/nutclient.cpp -index b597e0e1e6c1..f5f0b70ef297 100644 ---- a/clients/nutclient.cpp -+++ b/clients/nutclient.cpp -@@ -96,18 +96,18 @@ - public: - Socket(); - -- void connect(const std::string& host, int port)throw(nut::IOException); -+ void connect(const std::string& host, int port); - void disconnect(); - bool isConnected()const; - - void setTimeout(long timeout); - bool hasTimeout()const{return _tv.tv_sec>=0;} - -- size_t read(void* buf, size_t sz)throw(nut::IOException); -- size_t write(const void* buf, size_t sz)throw(nut::IOException); -+ size_t read(void* buf, size_t sz); -+ size_t write(const void* buf, size_t sz); - -- std::string read()throw(nut::IOException); -- void write(const std::string& str)throw(nut::IOException); -+ std::string read(); -+ void write(const std::string& str); - - - private: -@@ -129,7 +129,7 @@ - _tv.tv_sec = timeout; - } - --void Socket::connect(const std::string& host, int port)throw(nut::IOException) -+void Socket::connect(const std::string& host, int port) - { - int sock_fd; - struct addrinfo hints, *res, *ai; -@@ -298,7 +298,7 @@ - return _sock!=INVALID_SOCKET; - } - --size_t Socket::read(void* buf, size_t sz)throw(nut::IOException) -+size_t Socket::read(void* buf, size_t sz) - { - if(!isConnected()) - { -@@ -325,7 +325,7 @@ - return (size_t) res; - } - --size_t Socket::write(const void* buf, size_t sz)throw(nut::IOException) -+size_t Socket::write(const void* buf, size_t sz) - { - if(!isConnected()) - { -@@ -352,7 +352,7 @@ - return (size_t) res; - } - --std::string Socket::read()throw(nut::IOException) -+std::string Socket::read() - { - std::string res; - char buff[256]; -@@ -383,7 +383,7 @@ - } - } - --void Socket::write(const std::string& str)throw(nut::IOException) -+void Socket::write(const std::string& str) - { - // write(str.c_str(), str.size()); - // write("\n", 1); -@@ -408,13 +408,13 @@ - { - } - --bool Client::hasDevice(const std::string& dev)throw(NutException) -+bool Client::hasDevice(const std::string& dev) - { - std::set devs = getDeviceNames(); - return devs.find(dev) != devs.end(); - } - --Device Client::getDevice(const std::string& name)throw(NutException) -+Device Client::getDevice(const std::string& name) - { - if(hasDevice(name)) - return Device(this, name); -@@ -422,7 +422,7 @@ - return Device(NULL, ""); - } - --std::set Client::getDevices()throw(NutException) -+std::set Client::getDevices() - { - std::set res; - -@@ -435,13 +435,13 @@ - return res; - } - --bool Client::hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException) -+bool Client::hasDeviceVariable(const std::string& dev, const std::string& name) - { - std::set names = getDeviceVariableNames(dev); - return names.find(name) != names.end(); - } - --std::map > Client::getDeviceVariableValues(const std::string& dev)throw(NutException) -+std::map > Client::getDeviceVariableValues(const std::string& dev) - { - std::map > res; - -@@ -455,7 +455,7 @@ - return res; - } - --bool Client::hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException) -+bool Client::hasDeviceCommand(const std::string& dev, const std::string& name) - { - std::set names = getDeviceCommandNames(dev); - return names.find(name) != names.end(); -@@ -477,7 +477,7 @@ - // Do not connect now - } - --TcpClient::TcpClient(const std::string& host, int port)throw(IOException): -+TcpClient::TcpClient(const std::string& host, int port): - Client(), - _socket(new internal::Socket) - { -@@ -489,14 +489,14 @@ - delete _socket; - } - --void TcpClient::connect(const std::string& host, int port)throw(IOException) -+void TcpClient::connect(const std::string& host, int port) - { - _host = host; - _port = port; - connect(); - } - --void TcpClient::connect()throw(nut::IOException) -+void TcpClient::connect() - { - _socket->connect(_host, _port); - } -@@ -532,19 +532,18 @@ - } - - void TcpClient::authenticate(const std::string& user, const std::string& passwd) -- throw(NutException) - { - detectError(sendQuery("USERNAME " + user)); - detectError(sendQuery("PASSWORD " + passwd)); - } - --void TcpClient::logout()throw(NutException) -+void TcpClient::logout() - { - detectError(sendQuery("LOGOUT")); - _socket->disconnect(); - } - --Device TcpClient::getDevice(const std::string& name)throw(NutException) -+Device TcpClient::getDevice(const std::string& name) - { - try - { -@@ -560,7 +559,7 @@ - return Device(this, name); - } - --std::set TcpClient::getDeviceNames()throw(NutException) -+std::set TcpClient::getDeviceNames() - { - std::set res; - -@@ -576,12 +575,12 @@ - return res; - } - --std::string TcpClient::getDeviceDescription(const std::string& name)throw(NutException) -+std::string TcpClient::getDeviceDescription(const std::string& name) - { - return get("UPSDESC", name)[0]; - } - --std::set TcpClient::getDeviceVariableNames(const std::string& dev)throw(NutException) -+std::set TcpClient::getDeviceVariableNames(const std::string& dev) - { - std::set set; - -@@ -594,7 +593,7 @@ - return set; - } - --std::set TcpClient::getDeviceRWVariableNames(const std::string& dev)throw(NutException) -+std::set TcpClient::getDeviceRWVariableNames(const std::string& dev) - { - std::set set; - -@@ -607,17 +606,17 @@ - return set; - } - --std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException) -+std::string TcpClient::getDeviceVariableDescription(const std::string& dev, const std::string& name) - { - return get("DESC", dev + " " + name)[0]; - } - --std::vector TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException) -+std::vector TcpClient::getDeviceVariableValue(const std::string& dev, const std::string& name) - { - return get("VAR", dev + " " + name); - } - --std::map > TcpClient::getDeviceVariableValues(const std::string& dev)throw(NutException) -+std::map > TcpClient::getDeviceVariableValues(const std::string& dev) - { - - std::map > map; -@@ -634,13 +633,13 @@ - return map; - } - --void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException) -+void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value) - { - std::string query = "SET VAR " + dev + " " + name + " " + escape(value); - detectError(sendQuery(query)); - } - --void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException) -+void TcpClient::setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values) - { - std::string query = "SET VAR " + dev + " " + name; - for(size_t n=0; n TcpClient::getDeviceCommandNames(const std::string& dev)throw(NutException) -+std::set TcpClient::getDeviceCommandNames(const std::string& dev) - { - std::set cmds; - -@@ -663,32 +662,32 @@ - return cmds; - } - --std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException) -+std::string TcpClient::getDeviceCommandDescription(const std::string& dev, const std::string& name) - { - return get("CMDDESC", dev + " " + name)[0]; - } - --void TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException) -+void TcpClient::executeDeviceCommand(const std::string& dev, const std::string& name) - { - detectError(sendQuery("INSTCMD " + dev + " " + name)); - } - --void TcpClient::deviceLogin(const std::string& dev)throw(NutException) -+void TcpClient::deviceLogin(const std::string& dev) - { - detectError(sendQuery("LOGIN " + dev)); - } - --void TcpClient::deviceMaster(const std::string& dev)throw(NutException) -+void TcpClient::deviceMaster(const std::string& dev) - { - detectError(sendQuery("MASTER " + dev)); - } - --void TcpClient::deviceForcedShutdown(const std::string& dev)throw(NutException) -+void TcpClient::deviceForcedShutdown(const std::string& dev) - { - detectError(sendQuery("FSD " + dev)); - } - --int TcpClient::deviceGetNumLogins(const std::string& dev)throw(NutException) -+int TcpClient::deviceGetNumLogins(const std::string& dev) - { - std::string num = get("NUMLOGINS", dev)[0]; - return atoi(num.c_str()); -@@ -696,7 +695,7 @@ - - - std::vector TcpClient::get -- (const std::string& subcmd, const std::string& params) throw(NutException) -+ (const std::string& subcmd, const std::string& params) - { - std::string req = subcmd; - if(!params.empty()) -@@ -714,7 +713,7 @@ - } - - std::vector > TcpClient::list -- (const std::string& subcmd, const std::string& params) throw(NutException) -+ (const std::string& subcmd, const std::string& params) - { - std::string req = subcmd; - if(!params.empty()) -@@ -748,13 +747,13 @@ - } - } - --std::string TcpClient::sendQuery(const std::string& req)throw(IOException) -+std::string TcpClient::sendQuery(const std::string& req) - { - _socket->write(req); - return _socket->read(); - } - --void TcpClient::detectError(const std::string& req)throw(NutException) -+void TcpClient::detectError(const std::string& req) - { - if(req.substr(0,3)=="ERR") - { -@@ -954,47 +953,44 @@ - return getName()getDeviceDescription(getName()); - } - - std::vector Device::getVariableValue(const std::string& name) -- throw(NutException) - { - return getClient()->getDeviceVariableValue(getName(), name); - } - - std::map > Device::getVariableValues() -- throw(NutException) - { - return getClient()->getDeviceVariableValues(getName()); - } - --std::set Device::getVariableNames()throw(NutException) -+std::set Device::getVariableNames() - { - return getClient()->getDeviceVariableNames(getName()); - } - --std::set Device::getRWVariableNames()throw(NutException) -+std::set Device::getRWVariableNames() - { - return getClient()->getDeviceRWVariableNames(getName()); - } - --void Device::setVariable(const std::string& name, const std::string& value)throw(NutException) -+void Device::setVariable(const std::string& name, const std::string& value) - { - getClient()->setDeviceVariable(getName(), name, value); - } - - void Device::setVariable(const std::string& name, const std::vector& values) -- throw(NutException) - { - getClient()->setDeviceVariable(getName(), name, values); - } - - - --Variable Device::getVariable(const std::string& name)throw(NutException) -+Variable Device::getVariable(const std::string& name) - { - if(getClient()->hasDeviceVariable(getName(), name)) - return Variable(this, name); -@@ -1002,7 +998,7 @@ - return Variable(NULL, ""); - } - --std::set Device::getVariables()throw(NutException) -+std::set Device::getVariables() - { - std::set set; - -@@ -1015,7 +1011,7 @@ - return set; - } - --std::set Device::getRWVariables()throw(NutException) -+std::set Device::getRWVariables() - { - std::set set; - -@@ -1028,12 +1024,12 @@ - return set; - } - --std::set Device::getCommandNames()throw(NutException) -+std::set Device::getCommandNames() - { - return getClient()->getDeviceCommandNames(getName()); - } - --std::set Device::getCommands()throw(NutException) -+std::set Device::getCommands() - { - std::set cmds; - -@@ -1046,7 +1042,7 @@ - return cmds; - } - --Command Device::getCommand(const std::string& name)throw(NutException) -+Command Device::getCommand(const std::string& name) - { - if(getClient()->hasDeviceCommand(getName(), name)) - return Command(this, name); -@@ -1054,26 +1050,26 @@ - return Command(NULL, ""); - } - --void Device::executeCommand(const std::string& name)throw(NutException) -+void Device::executeCommand(const std::string& name) - { - getClient()->executeDeviceCommand(getName(), name); - } - --void Device::login()throw(NutException) -+void Device::login() - { - getClient()->deviceLogin(getName()); - } - --void Device::master()throw(NutException) -+void Device::master() - { - getClient()->deviceMaster(getName()); - } - --void Device::forcedShutdown()throw(NutException) -+void Device::forcedShutdown() - { - } - --int Device::getNumLogins()throw(NutException) -+int Device::getNumLogins() - { - return getClient()->deviceGetNumLogins(getName()); - } -@@ -1141,22 +1137,22 @@ - return getName() Variable::getValue()throw(NutException) -+std::vector Variable::getValue() - { - return getDevice()->getClient()->getDeviceVariableValue(getDevice()->getName(), getName()); - } - --std::string Variable::getDescription()throw(NutException) -+std::string Variable::getDescription() - { - return getDevice()->getClient()->getDeviceVariableDescription(getDevice()->getName(), getName()); - } - --void Variable::setValue(const std::string& value)throw(NutException) -+void Variable::setValue(const std::string& value) - { - getDevice()->setVariable(getName(), value); - } - --void Variable::setValues(const std::vector& values)throw(NutException) -+void Variable::setValues(const std::vector& values) - { - getDevice()->setVariable(getName(), values); - } -@@ -1225,12 +1221,12 @@ - return getName()getClient()->getDeviceCommandDescription(getDevice()->getName(), getName()); - } - --void Command::execute()throw(NutException) -+void Command::execute() - { - getDevice()->executeCommand(getName()); - } ---- a/clients/nutclient.h -+++ b/clients/nutclient.h -@@ -51,9 +51,9 @@ - { - public: - NutException(const std::string& msg):_msg(msg){} -- virtual ~NutException() throw() {} -- virtual const char * what() const throw() {return this->_msg.c_str();} -- virtual std::string str() const throw() {return this->_msg;} -+ virtual ~NutException() {} -+ virtual const char * what() const noexcept {return this->_msg.c_str();} -+ virtual std::string str() const noexcept {return this->_msg;} - private: - std::string _msg; - }; -@@ -65,7 +65,7 @@ - { - public: - SystemException(); -- virtual ~SystemException() throw() {} -+ virtual ~SystemException() {} - private: - static std::string err(); - }; -@@ -78,7 +78,7 @@ - { - public: - IOException(const std::string& msg):NutException(msg){} -- virtual ~IOException() throw() {} -+ virtual ~IOException() {} - }; - - /** -@@ -88,7 +88,7 @@ - { - public: - UnknownHostException():IOException("Unknown host"){} -- virtual ~UnknownHostException() throw() {} -+ virtual ~UnknownHostException() {} - }; - - /** -@@ -98,7 +98,7 @@ - { - public: - NotConnectedException():IOException("Not connected"){} -- virtual ~NotConnectedException() throw() {} -+ virtual ~NotConnectedException() {} - }; - - /** -@@ -108,7 +108,7 @@ - { - public: - TimeoutException():IOException("Timeout"){} -- virtual ~TimeoutException() throw() {} -+ virtual ~TimeoutException() {} - }; - - /** -@@ -132,13 +132,13 @@ - * \todo Is his method is global to all connection protocol or is it specific to TCP ? - * \note Actually, authentication fails only if already set, not if bad values are sent. - */ -- virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0; -+ virtual void authenticate(const std::string& user, const std::string& passwd)=0; - - /** - * Disconnect from the NUTD server. - * \todo Is his method is global to all connection protocol or is it specific to TCP ? - */ -- virtual void logout()throw(NutException)=0; -+ virtual void logout()=0; - - /** - * Device manipulations. -@@ -151,29 +151,29 @@ - * \param name Name of the device. - * \return The device. - */ -- virtual Device getDevice(const std::string& name)throw(NutException); -+ virtual Device getDevice(const std::string& name); - /** - * Retrieve the list of all devices supported by UPSD server. - * \return The set of supported devices. - */ -- virtual std::set getDevices()throw(NutException); -+ virtual std::set getDevices(); - /** - * Test if a device is supported by the NUTD server. - * \param dev Device name. - * \return true if supported, false otherwise. - */ -- virtual bool hasDevice(const std::string& dev)throw(NutException); -+ virtual bool hasDevice(const std::string& dev); - /** - * Retrieve names of devices supported by NUTD server. - * \return The set of names of supported devices. - */ -- virtual std::set getDeviceNames()throw(NutException)=0; -+ virtual std::set getDeviceNames()=0; - /** - * Retrieve the description of a device. - * \param name Device name. - * \return Device description. - */ -- virtual std::string getDeviceDescription(const std::string& name)throw(NutException)=0; -+ virtual std::string getDeviceDescription(const std::string& name)=0; - /** \} */ - - /** -@@ -186,54 +186,54 @@ - * \param dev Device name - * \return Variable names - */ -- virtual std::set getDeviceVariableNames(const std::string& dev)throw(NutException)=0; -+ virtual std::set getDeviceVariableNames(const std::string& dev)=0; - /** - * Retrieve names of read/write variables supported by a device. - * \param dev Device name - * \return RW variable names - */ -- virtual std::set getDeviceRWVariableNames(const std::string& dev)throw(NutException)=0; -+ virtual std::set getDeviceRWVariableNames(const std::string& dev)=0; - /** - * Test if a variable is supported by a device. - * \param dev Device name - * \param name Variable name - * \return true if the variable is supported. - */ -- virtual bool hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException); -+ virtual bool hasDeviceVariable(const std::string& dev, const std::string& name); - /** - * Retrieve the description of a variable. - * \param dev Device name - * \param name Variable name - * \return Variable description if provided. - */ -- virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)=0; -+ virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)=0; - /** - * Retrieve values of a variable. - * \param dev Device name - * \param name Variable name - * \return Variable values (usually one) if available. - */ -- virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)=0; -+ virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name)=0; - /** - * Retrieve values of all variables of a device. - * \param dev Device name - * \return Variable values indexed by variable names. - */ -- virtual std::map > getDeviceVariableValues(const std::string& dev)throw(NutException); -+ virtual std::map > getDeviceVariableValues(const std::string& dev); - /** - * Intend to set the value of a variable. - * \param dev Device name - * \param name Variable name - * \param value Variable value - */ -- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)=0; -+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)=0; - /** - * Intend to set the value of a variable. - * \param dev Device name - * \param name Variable name - * \param value Variable value - */ -- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException)=0; -+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)=0; - /** \} */ - - /** -@@ -246,27 +246,27 @@ - * \param dev Device name - * \return Command names - */ -- virtual std::set getDeviceCommandNames(const std::string& dev)throw(NutException)=0; -+ virtual std::set getDeviceCommandNames(const std::string& dev)=0; - /** - * Test if a command is supported by a device. - * \param dev Device name - * \param name Command name - * \return true if the command is supported. - */ -- virtual bool hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException); -+ virtual bool hasDeviceCommand(const std::string& dev, const std::string& name); - /** - * Retrieve the description of a command. - * \param dev Device name - * \param name Command name - * \return Command description if provided. - */ -- virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)=0; -+ virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)=0; - /** - * Intend to execute a command. - * \param dev Device name - * \param name Command name - */ -- virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)=0; -+ virtual void executeDeviceCommand(const std::string& dev, const std::string& name)=0; - /** \} */ - - /** -@@ -277,15 +277,15 @@ - * Log the current user (if authenticated) for a device. - * \param dev Device name. - */ -- virtual void deviceLogin(const std::string& dev)throw(NutException)=0; -+ virtual void deviceLogin(const std::string& dev)=0; - /** - * Retrieve the number of user longged in the specified device. - * \param dev Device name. - * \return Number of logged-in users. - */ -- virtual int deviceGetNumLogins(const std::string& dev)throw(NutException)=0; -- virtual void deviceMaster(const std::string& dev)throw(NutException)=0; -- virtual void deviceForcedShutdown(const std::string& dev)throw(NutException)=0; -+ virtual int deviceGetNumLogins(const std::string& dev)=0; -+ virtual void deviceMaster(const std::string& dev)=0; -+ virtual void deviceForcedShutdown(const std::string& dev)=0; - - protected: - Client(); -@@ -309,7 +309,7 @@ - * \param host Server host name. - * \param port Server port. - */ -- TcpClient(const std::string& host, int port = 3493)throw(nut::IOException); -+ TcpClient(const std::string& host, int port = 3493); - ~TcpClient(); - - /** -@@ -317,13 +317,13 @@ - * \param host Server host name. - * \param port Server port. - */ -- void connect(const std::string& host, int port = 3493)throw(nut::IOException); -+ void connect(const std::string& host, int port = 3493); - - /** - * Connect to the server. - * Host name and ports must have already set (usefull for reconnection). - */ -- void connect()throw(nut::IOException); -+ void connect(); - - /** - * Test if the connection is active. -@@ -358,39 +358,37 @@ - */ - int getPort()const; - -- virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException); -- virtual void logout()throw(NutException); -+ virtual void authenticate(const std::string& user, const std::string& passwd); -+ virtual void logout(); - -- virtual Device getDevice(const std::string& name)throw(NutException); -- virtual std::set getDeviceNames()throw(NutException); -- virtual std::string getDeviceDescription(const std::string& name)throw(NutException); -- -- virtual std::set getDeviceVariableNames(const std::string& dev)throw(NutException); -- virtual std::set getDeviceRWVariableNames(const std::string& dev)throw(NutException); -- virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException); -- virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException); -- virtual std::map > getDeviceVariableValues(const std::string& dev)throw(NutException); -- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException); -- virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values)throw(NutException); -- -- virtual std::set getDeviceCommandNames(const std::string& dev)throw(NutException); -- virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException); -- virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException); -- -- virtual void deviceLogin(const std::string& dev)throw(NutException); -- virtual void deviceMaster(const std::string& dev)throw(NutException); -- virtual void deviceForcedShutdown(const std::string& dev)throw(NutException); -- virtual int deviceGetNumLogins(const std::string& dev)throw(NutException); -+ virtual Device getDevice(const std::string& name); -+ virtual std::set getDeviceNames(); -+ virtual std::string getDeviceDescription(const std::string& name); -+ -+ virtual std::set getDeviceVariableNames(const std::string& dev); -+ virtual std::set getDeviceRWVariableNames(const std::string& dev); -+ virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name); -+ virtual std::vector getDeviceVariableValue(const std::string& dev, const std::string& name); -+ virtual std::map > getDeviceVariableValues(const std::string& dev); -+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value); -+ virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector& values); -+ -+ virtual std::set getDeviceCommandNames(const std::string& dev); -+ virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name); -+ virtual void executeDeviceCommand(const std::string& dev, const std::string& name); -+ -+ virtual void deviceLogin(const std::string& dev); -+ virtual void deviceMaster(const std::string& dev); -+ virtual void deviceForcedShutdown(const std::string& dev); -+ virtual int deviceGetNumLogins(const std::string& dev); - - protected: -- std::string sendQuery(const std::string& req)throw(nut::IOException); -- static void detectError(const std::string& req)throw(nut::NutException); -+ std::string sendQuery(const std::string& req); -+ static void detectError(const std::string& req); - -- std::vector get(const std::string& subcmd, const std::string& params = "") -- throw(nut::NutException); -+ std::vector get(const std::string& subcmd, const std::string& params = ""); - -- std::vector > list(const std::string& subcmd, const std::string& params = "") -- throw(nut::NutException); -+ std::vector > list(const std::string& subcmd, const std::string& params = ""); - - static std::vector explode(const std::string& str, size_t begin=0); - static std::string escape(const std::string& str); -@@ -455,92 +453,92 @@ - /** - * Retrieve the description of the devce if specified. - */ -- std::string getDescription()throw(NutException); -+ std::string getDescription(); - - /** - * Intend to retrieve the value of a variable of the device. - * \param name Name of the variable to get. - * \return Value of the variable, if available. - */ -- std::vector getVariableValue(const std::string& name)throw(NutException); -+ std::vector getVariableValue(const std::string& name); - /** - * Intend to retrieve values of all variables of the devices. - * \return Map of all variables values indexed by their names. - */ -- std::map > getVariableValues()throw(NutException); -+ std::map > getVariableValues(); - /** - * Retrieve all variables names supported by the device. - * \return Set of available variable names. - */ -- std::set getVariableNames()throw(NutException); -+ std::set getVariableNames(); - /** - * Retrieve all Read/Write variables names supported by the device. - * \return Set of available Read/Write variable names. - */ -- std::set getRWVariableNames()throw(NutException); -+ std::set getRWVariableNames(); - /** - * Intend to set the value of a variable of the device. - * \param name Variable name. - * \param value New variable value. - */ -- void setVariable(const std::string& name, const std::string& value)throw(NutException); -+ void setVariable(const std::string& name, const std::string& value); - /** - * Intend to set values of a variable of the device. - * \param name Variable name. - * \param value New variable values. - */ -- void setVariable(const std::string& name, const std::vector& values)throw(NutException); -+ void setVariable(const std::string& name, const std::vector& values); - - /** - * Retrieve a Variable object representing the specified variable. - * \param name Variable name. - * \return Variable object. - */ -- Variable getVariable(const std::string& name)throw(NutException); -+ Variable getVariable(const std::string& name); - /** - * Retrieve Variable objects representing all variables available for the device. - * \return Set of Variable objects. - */ -- std::set getVariables()throw(NutException); -+ std::set getVariables(); - /** - * Retrieve Variable objects representing all Read/Write variables available for the device. - * \return Set of Variable objects. - */ -- std::set getRWVariables()throw(NutException); -+ std::set getRWVariables(); - - /** - * Retrieve names of all commands supported by the device. - * \return Set of available command names. - */ -- std::set getCommandNames()throw(NutException); -+ std::set getCommandNames(); - /** - * Retrieve objects for all commands supported by the device. - * \return Set of available Command objects. - */ -- std::set getCommands()throw(NutException); -+ std::set getCommands(); - /** - * Retrieve an object representing a command of the device. - * \param name Command name. - * \return Command object. - */ -- Command getCommand(const std::string& name)throw(NutException); -+ Command getCommand(const std::string& name); - /** - * Intend to execute a command on the device. - * \param name Command name. - */ -- void executeCommand(const std::string& name)throw(NutException); -+ void executeCommand(const std::string& name); - - /** - * Login current client's user for the device. - */ -- void login()throw(NutException); -- void master()throw(NutException); -- void forcedShutdown()throw(NutException); -+ void login(); -+ void master(); -+ void forcedShutdown(); - /** - * Retrieve the number of logged user for the device. - * \return Number of users. - */ -- int getNumLogins()throw(NutException); -+ int getNumLogins(); - - protected: - Device(Client* client, const std::string& name); -@@ -603,23 +601,23 @@ - * Intend to retrieve variable value. - * \return Value of the variable. - */ -- std::vector getValue()throw(NutException); -+ std::vector getValue(); - /** - * Intend to retireve variable description. - * \return Variable description if provided. - */ -- std::string getDescription()throw(NutException); -+ std::string getDescription(); - - /** - * Intend to set a value to the variable. - * \param value New variable value. - */ -- void setValue(const std::string& value)throw(NutException); -+ void setValue(const std::string& value); - /** - * Intend to set (multiple) values to the variable. - * \param value New variable values. - */ -- void setValues(const std::vector& values)throw(NutException); -+ void setValues(const std::vector& values); - - protected: - Variable(Device* dev, const std::string& name); -@@ -683,13 +681,13 @@ - * Intend to retireve command description. - * \return Command description if provided. - */ -- std::string getDescription()throw(NutException); -+ std::string getDescription(); - - /** - * Intend to retrieve command description. - * \return Command description if provided. - */ -- void execute()throw(NutException); -+ void execute(); - - protected: - Command(Device* dev, const std::string& name); --- -2.33.0 - diff --git a/debian/patches/series b/debian/patches/series index 677ad2c..ee943a6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,5 +10,3 @@ 0010-fix-nutscanner-ftbfs.patch 0011-use-pkgconfig-module.patch 0012-add-AEG-PROTECT-NAS-support.patch -0013-fix-doc-build.patch -0014-Remove-dynamic-exception-specifications-from-clients.patch diff --git a/debian/python-nut.install b/debian/python-nut.install new file mode 100644 index 0000000..fa24bc5 --- /dev/null +++ b/debian/python-nut.install @@ -0,0 +1 @@ +scripts/python/module/PyNUT.py usr/share/pyshared/ diff --git a/debian/rules b/debian/rules index 9a3f689..f8482c1 100755 --- a/debian/rules +++ b/debian/rules @@ -33,7 +33,7 @@ ifneq ($(shell which asciidoc),) endif %: - dh $@ --no-parallel --with python3 + dh $@ --no-parallel --with python2 --with python3 override_dh_auto_configure: dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS) @@ -98,18 +98,16 @@ override_dh_auto_install-arch: install -D -m 644 debian/source_nut.py $(CURDIR)/debian/tmp/usr/share/apport/package-hooks/source_nut-client.py override_dh_auto_install-indep: -ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) #install documentation mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html cp $(CURDIR)/docs/*.pdf $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/pdf - cp $(CURDIR)/docs/FAQ.txt $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html + cp $(CURDIR)/docs/FAQ.html $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html for f in $(CURDIR)/docs/*.chunked/; do \ nf=`basename $${f} | sed 's/\(.*\)\.chunked/\1/'`; \ cp -a $${f} $(CURDIR)/debian/tmp/usr/share/doc/nut-doc/html/$${nf}/; \ done -endif # install apport hooks install -D -m 644 debian/source_nut.py $(CURDIR)/debian/tmp/usr/share/apport/package-hooks/source_nut.py diff --git a/debian/source_nut.py b/debian/source_nut.py index b5088f1..1dd5fd5 100644 --- a/debian/source_nut.py +++ b/debian/source_nut.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python '''nut Apport interface diff --git a/debian/tests/control b/debian/tests/control index 0f68e27..fc0a7ad 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Tests: nut -Depends: lsb-release, netcat, nut-client, nut-server, psmisc, python3 +Depends: lsb-release, netcat, nut-client, nut-server, psmisc, python Restrictions: needs-root diff --git a/debian/tests/nut b/debian/tests/nut index b367bba..598cde8 100644 --- a/debian/tests/nut +++ b/debian/tests/nut @@ -3,4 +3,4 @@ # Testing nut #------------ set -e -python3 `dirname $0`/test-nut.py 2>&1 +python `dirname $0`/test-nut.py 2>&1 diff --git a/debian/tests/test-nut.py b/debian/tests/test-nut.py index ffbec80..af8dc69 100644 --- a/debian/tests/test-nut.py +++ b/debian/tests/test-nut.py @@ -75,7 +75,7 @@ try: except ImportError: class PrivateNutTest(object): '''Empty class''' - print("Skipping private tests") + print >>sys.stdout, "Skipping private tests" class NutTestCommon(testlib.TestlibCase): @@ -161,7 +161,7 @@ FINALDELAY 0 testlib.create_fill(self.notifyscript, ''' #! /bin/bash -echo "$*" > ''' + self.notifylog + '\n', mode=0o755) +echo "$*" > ''' + self.notifylog + '\n', mode=0755) # dummy-ups absolutely needs a data file, even if empty testlib.config_replace('/etc/nut/dummy.dev', ''' @@ -230,7 +230,7 @@ UPSMON_OPTIONS="" rc, report = testlib.cmd([self.initscript, 'start']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) - self.assertEqual(expected, rc, result + report) + self.assertEquals(expected, rc, result + report) time.sleep(2) def _stop(self): @@ -238,14 +238,14 @@ UPSMON_OPTIONS="" rc, report = testlib.cmd([self.initscript, 'stop']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) - self.assertEqual(expected, rc, result + report) + self.assertEquals(expected, rc, result + report) def _reload(self): '''Reload NUT''' rc, report = testlib.cmd([self.initscript, 'force-reload']) expected = 0 result = 'Got exit code %d, expected %d\n' % (rc, expected) - self.assertEqual(expected, rc, result + report) + self.assertEquals(expected, rc, result + report) def _restart(self): '''Restart NUT''' @@ -261,7 +261,7 @@ UPSMON_OPTIONS="" self._skipped("init script does not support status command") expected = 1 result = 'Got exit code %d, expected %d\n' % (rc, expected) - self.assertEqual(expected, rc, result + report) + self.assertEquals(expected, rc, result + report) def _testDaemons(self, daemons): '''Daemons running''' @@ -379,7 +379,7 @@ printf '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\n' | nc -q 1 127.0.0.1 sleep 1 dd if=/dev/urandom count=64 | nc -q 1 127.0.0.1 3493 ''' - testlib.create_fill(script, contents, mode=0o755) + testlib.create_fill(script, contents, mode=0755) rc, report = testlib.cmd([script]) # It should not have crashed. Let's see if it did @@ -414,9 +414,9 @@ if __name__ == '__main__': # suite.addTest(unittest.TestLoader().loadTestsFromTestCase(MyPrivateTest)) else: - print('''Usage: + print '''Usage: test-nut.py [-v] basic tests -''') +''' sys.exit(1) rc = unittest.TextTestRunner(verbosity=2).run(suite) if not rc.wasSuccessful(): diff --git a/debian/tests/testlib.py b/debian/tests/testlib.py index bc72b07..fe0a622 100644 --- a/debian/tests/testlib.py +++ b/debian/tests/testlib.py @@ -22,6 +22,7 @@ import string, random, crypt, subprocess, pwd, grp, signal, time, unittest, tempfile, shutil, os, os.path, re, glob import sys, socket, gzip from stat import * +from encodings import string_escape import warnings warnings.filterwarnings('ignore', message=r'.*apt_pkg\.TagFile.*', category=DeprecationWarning) @@ -76,7 +77,7 @@ def _save_backup(path): def config_copydir(path): if os.path.exists(path) and not os.path.isdir(path): - raise OSError("'%s' is not a directory" % (path)) + raise OSError, "'%s' is not a directory" % (path) _restore_backup(path) pathbackup = path + '.autotest' @@ -89,13 +90,13 @@ def config_replace(path,contents,append=False): if os.path.exists(path): _save_backup(path) if append: - contents = open(path).read() + contents + contents = file(path).read() + contents open(path, 'w').write(contents) def config_comment(path, field): _save_backup(path) contents = "" - for line in open(path).readlines(): + for line in file(path): if re.search("^\s*%s\s*=" % (field), line): line = "#" + line contents += line @@ -111,7 +112,7 @@ def config_set(path, field, value, spaces=True): else: setting = '%s=%s\n' % (field, value) found = False - for line in open(path).readlines(): + for line in file(path): if re.search("^\s*%s\s*=" % (field), line): found = True line = setting @@ -154,20 +155,20 @@ def timeout(secs, f, *args): def require_nonroot(): if os.geteuid() == 0: - print("This series of tests should be run as a regular user with sudo access, not as root.", file=sys.stderr) + print >>sys.stderr, "This series of tests should be run as a regular user with sudo access, not as root." sys.exit(1) def require_root(): if os.geteuid() != 0: - print("This series of tests should be run with root privileges (e.g. via sudo).", file=sys.stderr) + print >>sys.stderr, "This series of tests should be run with root privileges (e.g. via sudo)." sys.exit(1) def require_sudo(): if os.geteuid() != 0 or os.environ.get('SUDO_USER', None) == None: - print("This series of tests must be run under sudo.", file=sys.stderr) + print >>sys.stderr, "This series of tests must be run under sudo." sys.exit(1) if os.environ['SUDO_USER'] == 'root': - print('Please run this test using sudo from a regular user. (You ran sudo from root.)', file=sys.stderr) + print >>sys.stderr, 'Please run this test using sudo from a regular user. (You ran sudo from root.)' sys.exit(1) def random_string(length,lower=False): @@ -189,14 +190,14 @@ def mkstemp_fill(contents,suffix='',prefix='testlib-',dir=None): handle, name = tempfile.mkstemp(suffix=suffix,prefix=prefix,dir=dir) os.close(handle) - handle = open(name,"w+") + handle = file(name,"w+") handle.write(contents) handle.flush() handle.seek(0) return handle, name -def create_fill(path, contents, mode=0o644): +def create_fill(path, contents, mode=0644): '''Safely create a page''' # make the temp file in the same dir as the destination file so we # don't get invalid cross-device link errors when we rename @@ -341,7 +342,7 @@ def ubuntu_release(): return "UNKNOWN" if size > 1024*1024: - raise IOError('Could not open "%s" (too big)' % f) + raise IOError, 'Could not open "%s" (too big)' % f try: fh = open("/etc/lsb-release", 'r') @@ -363,8 +364,8 @@ def cmd(command, input = None, stderr = subprocess.STDOUT, stdout = subprocess.P a textual error if it failed.''' try: - sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True, preexec_fn=subprocess_setup, universal_newlines=True) - except OSError as e: + sp = subprocess.Popen(command, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True, preexec_fn=subprocess_setup) + except OSError, e: return [127, str(e)] out, outerr = sp.communicate(input) @@ -381,7 +382,7 @@ def cmd_pipe(command1, command2, input = None, stderr = subprocess.STDOUT, stdin try: sp1 = subprocess.Popen(command1, stdin=stdin, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) sp2 = subprocess.Popen(command2, stdin=sp1.stdout, stdout=subprocess.PIPE, stderr=stderr, close_fds=True) - except OSError as e: + except OSError, e: return [127, str(e)] out = sp2.communicate(input)[0] @@ -406,7 +407,7 @@ def cwd_has_enough_space(cdir, total_bytes): cdir = os.getcwd() while cdir != '/': - if cdir not in mounts: + if not mounts.has_key(cdir): cdir = os.path.dirname(cdir) continue if kb < mounts[cdir]: @@ -649,7 +650,7 @@ def is_kdeinit_running(): # check for it. rc, report = cmd(['ps', 'x']) if 'kdeinit4 Running' not in report: - print(("kdeinit not running (you may start/stop any KDE application then run this script again)"), file=sys.stderr) + print >>sys.stderr, ("kdeinit not running (you may start/stop any KDE application then run this script again)") return False return True @@ -659,7 +660,7 @@ def get_pkgconfig_flags(libs=[]): rc, pkg_config = cmd(['pkg-config', '--cflags', '--libs'] + libs) expected = 0 if rc != expected: - print('Got exit code %d, expected %d\n' % (rc, expected), file=sys.stderr) + print >>sys.stderr, 'Got exit code %d, expected %d\n' % (rc, expected) assert(rc == expected) return pkg_config.split() @@ -749,8 +750,8 @@ class TestlibManager(object): # Load LSB release file self.lsb_release = dict() if not os.path.exists('/usr/bin/lsb_release') and not os.path.exists('/bin/lsb_release'): - raise OSError("Please install 'lsb-release'") - for line in subprocess.Popen(['lsb_release','-a'],stdout=subprocess.PIPE,stderr=subprocess.PIPE, universal_newlines=True).communicate()[0].splitlines(): + raise OSError, "Please install 'lsb-release'" + for line in subprocess.Popen(['lsb_release','-a'],stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()[0].splitlines(): field, value = line.split(':',1) value=value.strip() field=field.strip() @@ -767,7 +768,7 @@ class TestlibManager(object): self.lsb_release['Distributor ID'] = "Ubuntu" self.lsb_release['Release'] = 8.04 else: - raise OSError("Unknown version of HP MIE") + raise OSError, "Unknown version of HP MIE" # FIXME: hack to assume a most-recent release if we're not # running under Ubuntu. @@ -788,7 +789,7 @@ class TestlibManager(object): elif machine.startswith('arm'): self.dpkg_arch = 'armel' else: - raise ValueError("Unknown machine type '%s'" % (machine)) + raise ValueError, "Unknown machine type '%s'" % (machine) else: self.dpkg_arch = cmd(['dpkg','--print-architecture'])[1].strip() @@ -799,8 +800,7 @@ class TestlibManager(object): versig = '/proc/version_signature' if os.path.exists(versig): self.kernel_is_ubuntu = True - with open(versig) as f: - self.kernel_version_signature = f.read().strip() + self.kernel_version_signature = file(versig).read().strip() self.kernel_version_ubuntu = self.kernel_version elif os.path.exists('/usr/bin/dpkg'): # this can easily be inaccurate but is only an issue for Dapper @@ -829,14 +829,14 @@ class TestlibManager(object): kernel = self.kernel_version_ubuntu if kernel != self.kernel_version_signature: kernel += " (%s)" % (self.kernel_version_signature) - print("Running test: '%s' distro: '%s %.2f' kernel: '%s' arch: '%s' uid: %d/%d SUDO_USER: '%s')" % ( \ + print >>sys.stdout, "Running test: '%s' distro: '%s %.2f' kernel: '%s' arch: '%s' uid: %d/%d SUDO_USER: '%s')" % ( \ sys.argv[0], self.lsb_release['Distributor ID'], self.lsb_release['Release'], kernel, self.dpkg_arch, os.geteuid(), os.getuid(), - os.environ.get('SUDO_USER', '')), file=sys.stdout) + os.environ.get('SUDO_USER', '')) sys.stdout.flush() # Additional heuristics @@ -848,7 +848,7 @@ class TestlibManager(object): # time.sleep(0.5) def hello(self, msg): - print("Hello from %s" % (msg), file=sys.stderr) + print >>sys.stderr, "Hello from %s" % (msg) # The central instance manager = TestlibManager() @@ -885,11 +885,11 @@ class TestlibCase(unittest.TestCase): if self.lsb_release['Release'] == 8.04 and rc == 255 and len(out) > 0: rc = 0 result = 'Got exit code %d, expected %d:\n%s\n' % (rc, expected, report) - self.assertEqual(expected, rc, result) + self.assertEquals(expected, rc, result) filetype = '^%s$' % (filetype) result = 'File type reported by file: [%s], expected regex: [%s]\n' % (out, filetype) - self.assertNotEqual(None, re.search(filetype, out), result) + self.assertNotEquals(None, re.search(filetype, out), result) def yank_commonname_from_cert(self, certfile): '''Extract the commonName from a given PEM''' @@ -905,12 +905,12 @@ class TestlibCase(unittest.TestCase): def announce(self, text): if self.my_verbosity: - print("(%s) " % (text), end=' ', file=sys.stdout) + print >>sys.stdout, "(%s) " % (text), sys.stdout.flush() def make_clean(self): rc, output = self.shell_cmd(['make','clean']) - self.assertEqual(rc, 0, output) + self.assertEquals(rc, 0, output) def get_makefile_compiler(self): # Find potential compiler name @@ -929,7 +929,7 @@ class TestlibCase(unittest.TestCase): compiler = self.get_makefile_compiler() rc, output = self.shell_cmd(['make',target]) - self.assertEqual(rc, expected, 'rc(%d)!=%d:\n' % (rc, expected) + output) + self.assertEquals(rc, expected, 'rc(%d)!=%d:\n' % (rc, expected) + output) self.assertTrue('%s ' % (compiler) in output, 'Expected "%s":' % (compiler) + output) return output @@ -954,13 +954,13 @@ class TestlibCase(unittest.TestCase): '''Test a shell command matches a specific exit code''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got exit code %d, expected %d\n' % (rc, expected) - self.assertEqual(expected, rc, msg + result + report) + self.assertEquals(expected, rc, msg + result + report) def assertShellExitNotEquals(self, unwanted, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg=""): '''Test a shell command doesn't match a specific exit code''' rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got (unwanted) exit code %d\n' % rc - self.assertNotEqual(unwanted, rc, msg + result + report) + self.assertNotEquals(unwanted, rc, msg + result + report) def assertShellOutputContains(self, text, args, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, msg="", invert=False): '''Test a shell command contains a specific output''' @@ -976,12 +976,12 @@ class TestlibCase(unittest.TestCase): rc, report, out = self._testlib_shell_cmd(args, stdin=stdin, stdout=stdout, stderr=stderr) result = 'Got exit code %d. Looking for exact text "%s" (%s)\n' % (rc, text, " ".join(args)) if not invert: - self.assertEqual(text, out, msg + result + report) + self.assertEquals(text, out, msg + result + report) else: - self.assertNotEqual(text, out, msg + result + report) + self.assertNotEquals(text, out, msg + result + report) if expected != None: result = 'Got exit code %d. Expected %d (%s)\n' % (rc, expected, " ".join(args)) - self.assertEqual(rc, expected, msg + result + report) + self.assertEquals(rc, expected, msg + result + report) def _word_find(self, report, content, invert=False): '''Check for a specific string''' @@ -994,20 +994,20 @@ class TestlibCase(unittest.TestCase): def _test_sysctl_value(self, path, expected, msg=None, exists=True): sysctl = '/proc/sys/%s' % (path) - self.assertEqual(exists, os.path.exists(sysctl), sysctl) + self.assertEquals(exists, os.path.exists(sysctl), sysctl) value = None if exists: - value = int(open(sysctl).read()) + value = int(file(sysctl).read()) report = "%s is not %d: %d" % (sysctl, expected, value) if msg: report += " (%s)" % (msg) - self.assertEqual(value, expected, report) + self.assertEquals(value, expected, report) return value def set_sysctl_value(self, path, desired): sysctl = '/proc/sys/%s' % (path) self.assertTrue(os.path.exists(sysctl),"%s does not exist" % (sysctl)) - open(sysctl,'w').write(str(desired)) + file(sysctl,'w').write(str(desired)) self._test_sysctl_value(path, desired) def kernel_at_least(self, introduced): @@ -1031,7 +1031,7 @@ class TestGroup: self.group = None if group: if group_exists(group): - raise ValueError('group name already exists') + raise ValueError, 'group name already exists' else: while(True): group = random_string(7,lower=lower) @@ -1063,11 +1063,11 @@ class TestUser: self.login = None if os.geteuid() != 0: - raise ValueError("You must be root to run this test") + raise ValueError, "You must be root to run this test" if login: if login_exists(login): - raise ValueError('login name already exists') + raise ValueError, 'login name already exists' else: while(True): login = 't' + random_string(7,lower=lower) @@ -1114,7 +1114,7 @@ class TestUser: '''Add user to the specified group name''' rc, report = cmd(['usermod', '-G', group, self.login]) if rc != 0: - print(report) + print report assert rc == 0 # Timeout handler using alarm() from John P. Speno's Pythonic Avocado @@ -1140,5 +1140,5 @@ class TimeoutFunction: return result def main(): - print("hi") + print "hi" unittest.main() diff --git a/debian/upstream/metadata b/debian/upstream/metadata deleted file mode 100644 index 6e031b2..0000000 --- a/debian/upstream/metadata +++ /dev/null @@ -1,6 +0,0 @@ ---- -Name: nut -Bug-Database: https://github.com/networkupstools/nut/issues -Bug-Submit: https://github.com/networkupstools/nut/issues -Repository: https://github.com/networkupstools/nut.git -Repository-Browse: https://github.com/networkupstools/nut diff --git a/depcomp b/depcomp index 6b39162..4ebd5b3 100755 --- a/depcomp +++ b/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2018-03-07.03; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2018-03-07.03; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,9 +783,9 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" +# time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: diff --git a/docs/FAQ.txt b/docs/FAQ.txt index 9c59f10..81c93df 100644 --- a/docs/FAQ.txt +++ b/docs/FAQ.txt @@ -4,8 +4,8 @@ NUT Frequently Asked Questions endif::external_title[] == I just upgraded, and ... -You have read link:UPGRADING[UPGRADING] in the base directory of the -distribution, right? +You have read link:UPGRADING[UPGRADING] in the base directory of the distribution, +right? If not, go read it now, then come back to this file if your question wasn't answered in there. @@ -38,7 +38,7 @@ already been done in the old version. The drivers drop root privileges long before the serial port is opened. You'll need to change the permissions on that port so that -their new user id can access it. Normally this is "nobody", but it +their new user id can access it. Normally this is "nobody", but it may be changed at compile-time by using configure --with-user. Read the error message. If you have a permissions mismatch, then @@ -47,12 +47,12 @@ you'll see something like this: Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7) This program is currently running as youruid (UID 1234) /dev/ttyS2 is owned by user root (UID 0), mode 0600 - Change the port name, or fix the permissions or ownership + Change the port name, or fix the permissions or ownership of /dev/ttyS2 and try again. Unable to open /dev/ttyS2: Permission denied Now is a good time to point out that using "nobody" is a bad idea, -since it's a hack for NFS access. You should create a new role +since it's a hack for NFS access. You should create a new role account (perhaps called "ups" or "nut"), and use that instead. Also, scroll down to the "security domains" question to see an @@ -88,16 +88,16 @@ Refer to the upsd(8) and upsd.conf(5) manpages for more information. == I get a 'not listening on...' error from upsd. -Verify your LISTEN directive. It should be one of the valid IP addresses -for the computer running `upsd` (or `0.0.0.0`, which is `INADDR_ANY`), not -an address for a client. +Verify your LISTEN directive. It should be one of the valid IP addresses for +the computer running upsd (or 0.0.0.0, which is INADDR_ANY), not an address for +a client. -The LISTEN directive lets you pick which interface `upsd` listens on. -If you are trying to limit the clients which can connect to `upsd`, -you either need to use tcp-wrappers or kernel firewall rules. +The LISTEN directive lets you pick which interface upsd listens on. If you are +trying to limit the clients which can connect to upsd, you either need to use +tcp-wrappers or kernel firewall rules. -This isn't a NUT-specific limitation -- it applies equally to your web server -or mailer daemon. +This isn't a NUT-specific limitation - it applies equally to your web server or +mailer daemon. == Which UPS should I buy? @@ -112,13 +112,13 @@ hardware for testing, results of their testing efforts, or protocol specifications. We try to publish this information on the NUT website, so you can take this into consideration when selecting an UPS brand. -== I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. +== I have an APC Smart-UPS connected with a grey APC serial cable and it won't work. The Back-UPS type in the genericups driver works but then I don't get to use all the nifty features in there. Why doesn't the right driver work? The problem lies in your choice of cable. APC's grey cables -generally only do "dumb" signalling -- very basic yes/no info about +generally only do "dumb" signalling - very basic yes/no info about the battery and line status. While that is sufficient to detect a low battery condition while on battery, you miss out on all the goodies that you paid for. @@ -138,10 +138,9 @@ If your grey cable isn't the 940-0095B, the solution is to dump that cable and find one that supports APC's "smart" signalling. Typically these come with the UPS and are black. If your smart cable has wandered off, one can be built rather easily with some connectors and -cable -- there's no fancy wiring or resistors. +cable - there's no fancy wiring or resistors. -See this URL for a handy diagram: -http://www.networkupstools.org/cables/940-0024C.jpg +See this URL for a handy diagram: http://www.networkupstools.org/cables/940-0024C.jpg There is also a text version of that diagram in the docs/cables directory of the NUT source distribution. Either one should allow @@ -177,8 +176,8 @@ Besides, if upsmon were rolled into upsd, upsd would get even bigger than it is now. You'd have one less process, but the RAM consumption would be pretty close to now. -See the "Data Room" section in link:docs/config-notes.txt[] for -more configuration ideas and explanations. +See the "Data Room" section in docs/config-notes.txt for more configuration +ideas and explanations. *Answer 2* @@ -186,7 +185,7 @@ If this really bothers you, roll up your sleeves and use the sockdebug code to write a "upsmon" type program that sits on top of the state sockets. It won't work over the network, but it means you don't need upsd. It also means only one host can monitor the -UPS. +UPS. This is also a good option to consider if you can't use networked monitoring code for security or safety reasons. @@ -207,7 +206,7 @@ It is also coherent with the answer to the previous question. *Answer 1* New versions of the init man page taken from the sysvinit package -are saying that usage of SIGPWR is discouraged, since /dev/initctl +are saying that usage of SIGPWR is discouraged, since /dev/initctl control channel is the preferred way of communication. *Answer 2* @@ -254,16 +253,16 @@ directly affects how long you run on battery without knowing what's going on with the UPS. Note: some drivers occasionally need more time to update than the -default value of MAXAGE (in upsd.conf) allows. As a result, they +default value of MAXAGE (in upsd.conf) allows. As a result, they are temporarily marked stale even though everything is fine. This -can happen with MGE Ellipse equipment -- see the mge-shut or usbhid-ups man +can happen with MGE Ellipse equipment - see the mge-shut or usbhid-ups man pages. In such cases, you can raise the value of MAXAGE to avoid these warnings; try a value like 25 or 30. == Why do the client programs say 'Driver not connected' when I try to run them? This means that upsd can't connect to the driver for some reason. -Your ups.conf entry might be wrong, or the driver might not be +Your ups.conf entry might be wrong, or the driver might not be running. Maybe your state path is not configured properly. Check your syslog. upsd will complain regularly if it can't @@ -273,12 +272,6 @@ Note: if you jumped in with both feet and didn't follow the INSTALL.nut document, you probably started upsd by itself. You have to run 'upsdrvctl start' to start the drivers after configuring ups.conf. -On operating systems with a supported service management framework, -you might wrap your NUT drivers into individual services instances -with 'upsdrvsvcctl resync' and then manage those with commands like -'upsdrvsvcctl stop' and 'upsdrvsvcctl start' (note that on other -systems this tool may be not pre-installed via packaging). - == Why don't the pathnames in your documentation match the package I installed? Each distribution has conventions for where specific file types should be @@ -305,14 +298,11 @@ that point. You *want* the system to die without reaching the part where the kernel tells it to shut down. A possible script might look like this: ------- # other shutdown stuff here (mount -o remount,ro ...) - # `upsmon -K` if available on still mounted filesystems - # at this point is more portable than the `test` below if (test -f /etc/killpower) then - /sbin/upsdrvctl shutdown + /usr/local/ups/sbin/upsdrvctl shutdown sleep 600 # this should never return @@ -321,7 +311,6 @@ might look like this: fi halt -p ------- The other solution is to change your BIOS setting to "always power on" instead of "last state", assuming that's possible. @@ -334,8 +323,8 @@ things depending on what's supported: - Set a jumper on the motherboard that means "return after outage" - Set something in the BIOS that says "power up after power failure" -- Try using something (like a capacitor) across the power button - to "push" it for you -- this might not work if it needs a delay +- Try using something (like a capacitor) across the power button + to "push" it for you - this might not work if it needs a delay - Hack the cable between the power supply and the motherboard to fool it into powering up whenever line power is present - Teach a monkey to watch the machine and press the power button @@ -353,15 +342,14 @@ cat some magic characters at /dev/adb to enable "server mode". This would instruct the system to reboot while unattended. From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>: ------- + # Send packet over the ADB bus to the PowerMac CUDA chip # telling it to reboot automatically when power is restored # after a power failure. cat /etc/local/autoboot.adb > /dev/adb - # autoboot.adb contains these three bytes (in hex): 01 13 01 ------- + autoboot.adb contains these three bytes (in hex): 01 13 01 Later PowerPC Macs with a PMU and the appropriate kernel driver can achieve the same effect with the following command: @@ -375,11 +363,11 @@ use of `setpci`, and are highly model-specific: - http://superuser.com/questions/212434/reboot-after-power-failure-for-mac-running-ubuntu - http://ubuntuforums.org/showthread.php?t=1209576 -Note: this question has been in the FAQ for several years now, and +Note: this question has been in the FAQ for several years now, and there's still no clean answer. Let me guess: everyone who runs a server on Mac hardware has a team of trained monkeys, and feeds them by growing bananas in the tropical environment formed by waste heat -from the equipment. +from the equipment. The rest of us are still waiting for the answer. Booting into the Mac OS to frob the "file server" panel is not an acceptable @@ -416,7 +404,7 @@ For my development system this yields the following /dev entries: - Switch to root, then start the drivers: - # upsdrvctl -u nutdev start + # /usr/local/ups/sbin/upsdrvctl -u nutdev start - The listing for /var/state/ups then looks like this: @@ -440,14 +428,14 @@ make the files owned by root.nut, with mode 0640. Once the config files are ready, start upsd: - # upsd -u nutsrv + # /usr/local/ups/sbin/upsd -u nutsrv Check your syslog to be sure everything's happy, then be sure to update your startup scripts so it uses this procedure on your next boot. If you like this, you'll probably also find the chroot process to -be useful and interesting. See link:security.txt[] for more details. +be useful and interesting. See security.txt for more details. == What's the point of that 'security domains' concept above? @@ -457,12 +445,12 @@ to that one user account. Direct access to the serial device is not possible, since that is owned by another user. There is also the possibility of running the drivers and upsd in a -chroot jail. See the chroot option in link:security.txt[], `upsd` -and driver documentation. +chroot jail. See the chroot.txt provided in the source +distribution for an example implementation. Why give would-be vandals any sort of help? -Put it this way -- I *wrote* good chunks of this stuff, and I still +Put it this way - I *wrote* good chunks of this stuff, and I still run the programs this way locally. You should definitely consider using this technique. @@ -470,8 +458,8 @@ using this technique. You probably don't want to do this, since it doesn't maximize your runtime on battery. Assuming you have a good reason for it (see -the next entry), then look at link:scheduling.txt[] or the -linkman:upssched[8] man page for some ideas. +the next entry), then look at scheduling.txt or the upssched(8) man +page for some ideas. ///////////////////////////////////////////////////////////////// TODO: figure out how to link to the upssched man page above. @@ -499,17 +487,17 @@ with no visible interruption in service. If you purposely shut down early, you guarantee an interruption in service by bringing down the box. -See link:upssched.txt[] for information on how you can shutdown early if +See upssched.txt for information on how you can shutdown early if this is what you really want to do. -== The CGI programs report 'access to that host is not authorized' -- what's going on? +== The CGI programs report 'access to that host is not authorized' - what's going on? Those programs need to see a host in your hosts.conf before they will attempt communications. This keeps people from feeding it random "host=" settings, which would annoy others with outgoing connection attempts from your system. -If your hosts.conf turns out to be configured correctly with +If your hosts.conf turns out to be configured correctly with MONITOR entries and all that, check the permissions. Your web server may be running the CGI programs as a user that can't read the file. @@ -517,7 +505,7 @@ the file. If you run your web server in a chroot jail, make sure the programs can still read hosts.conf. You may have to copy it into the jail for this to work. If you do that, make sure it's not writable by -any of the user accounts which run inside the jail. +any of the user accounts which run inside the jail. == upsd is running, so why can't I connect to it? @@ -538,7 +526,7 @@ Either find the pid of the background process and send it a SIGHUP, or just start it again with '-c reload'. If you send the signals yourself instead of using -c, be sure you -hit the right process. There are usually two upsmon processes, and you +hit the right process. There are usually two upsmons, and you should only send signals to one of them. To be safe, read the pid file. @@ -549,42 +537,17 @@ There are several driver to support USB models. - usbhid-ups supports various manufacturers complying to the HID Power Device Class (PDC) standard, - tripplite_usb supports various older Tripp-Lite units (with USB ProductID 0001) - bcmxcp_usb supports various Powerware units, -- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol. -- nutdrv_qx supports various manufacturers that use the Megatec / Q* protocol - family. This is the driver slated to receive all further development in this - area, it was specially designed to support many more sub-drivers and has - added a lot over time, so please do try it first nowadays. +- nutdrv_qx and blazer_usb support various manufacturers that use the Megatec / Q1 protocol. -Refer to the 'driver-name' (8) man page for more information. +Refer to the 'driver-name' (8) manpage for more information. You can also consult the Hardware Compatibility List (HCL) and filter on USB: http://www.networkupstools.org/stable-hcl.html?connection=USB -== My USB UPS has a bogus Vendor ID 0x0001 and Product ID 0x0000, what driver supports it? - -Unfortunately, many devices are made without registering as a Vendor with -the corresponding standards body, and use generic USB chips for interfacing -with a computer (roughly similar to using a network interface card with a -random MAC address and PCI ID, and thus poorly identifiable device specifics -needed to automatically load some certain driver). Often they also lack a -unique serial number field, so monitoring several devices is problematic. - -One frequent case is with devices identifying as "Fry's Electronics" and/or -"MEC0003", if those data are served at all, or plain "0001/0000" in ID field. -In some cases they are accompanied by "UPSmart" software with a "MEGA(USB)" -connection option that works for Windows users. - -Your best bet is to search for community discussions of issues on NUT GitHub -at https://github.com/networkupstools/nut/issues?q=is%3Aissue and try options -there. Devices with these chips were known to connect with drivers for such -unrelated protocols as Megatec Q* (different sub-drivers, often `fabula` or -`hunnox`), ATCL, or USB-HID. - == My USB UPS is supported but doesn't work! -On Linux, udev rules are provided to set the correct permissions on device -file. This allows the NUT driver to communicate with the UPS, through this -device file. +On Linux, udev rules are provided to set the correct permissions on device file. +This allows the NUT driver to communicate with the UPS, through this device file. However, the driver may still fail to start and support the device, with a message like: @@ -604,7 +567,7 @@ Instead of unplugging, you might also be able to run `udevadm trigger There was a mistake in the naming of the NUT udev rules file which resulted in the rules being overridden by another udev configuration file. While this has been fixed in the Git master branch, your distribution may still be affected. -Details are available in the following GitHub issue: +Details are available in the following Github issue: https://github.com/networkupstools/nut/issues/140 == Why do you not use the Linux kernel HID driver when communicating with USB UPSes? @@ -633,79 +596,6 @@ There is a rudimentary locking mechanism in NUT, but there is a chance that the packages might not use the same directory as the NUT default, and the conflict will be reported by the kernel. -== Why does my (Eaton 5E) USB UPS on Linux connect but quickly disconnects soon? - -This issue was extensively investigated by NUT community members in -https://github.com/networkupstools/nut/issues/630 and resulted in a -chain of distribution bugs logged such as -https://bugzilla.redhat.com/show_bug.cgi?id=1715504 - -The gist of it is that some versions of Linux kernel used an "USB HID quirk" -for certain devices, see Linux kernel source `drivers/hid/hid-quirks.c` file, -including MGE/Eaton vendor ID (0x0463) based on an older device a contributor -had issues with. Firmware in newer devices no longer had the bug which needed -the "quirk" and misbehaved when it was enabled. While newer (and much older) -Linux kernels should not have the problem, with the quirk removed according -to https://lkml.org/lkml/2018/11/26/580 having the issue in the field really -depends on the combination of Linux kernel and device firmware that meet. - -Either way, it seems that problematic combinations preclude Linux from seeing -the device as a `hid-generic` first, to hand it over to a NUT driver. - -This quirk can be tuned with a kernel boot parameter (via GRUB etc.): - - usbhid.quirks=0x0463:0xffff:0x08 - -to re-enable the NOGET quirk. - -For context, according to https://bugzilla.redhat.com/show_bug.cgi?id=1875532 -the symptoms for the problem look like this: - - # Plug in the UPS and observe the dmesg logs, - # the following continuously appears: - [ 93.568082] usb 1-6: new full-speed USB device number 9 using xhci_hcd - [ 94.311469] usb 1-6: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 - [ 94.311475] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 - [ 94.311483] usb 1-6: Product: 5E - [ 94.311486] usb 1-6: Manufacturer: EATON - [ 96.269989] hid-generic 0003:0463:FFFF.000A: hiddev96,hidraw2: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-6/input0 - [ 107.369425] hid-generic 0003:0463:FFFF.000A: usb_submit_urb(ctrl) failed: -1 - [ 107.369469] hid-generic 0003:0463:FFFF.000A: timeout initializing reports - [ 112.828826] usb 1-6: USB disconnect, device number 9 - [ 113.284452] usb 1-6: new full-speed USB device number 10 using xhci_hcd - [ 114.027693] usb 1-6: New USB device found, idVendor=0463, idProduct=ffff, bcdDevice= 0.01 - [ 114.027698] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0 - [ 114.027701] usb 1-6: Product: 5E - [ 114.027704] usb 1-6: Manufacturer: EATON - [ 115.984222] hid-generic 0003:0463:FFFF.000B: hiddev96,hidraw2: USB HID v1.10 Device [EATON 5E] on usb-0000:00:14.0-6/input0 - [ 126.825756] hid-generic 0003:0463:FFFF.000B: usb_submit_urb(ctrl) failed: -1 - [ 126.825775] hid-generic 0003:0463:FFFF.000B: timeout initializing reports - [ 132.527809] usb 1-6: USB disconnect, device number 10 - -A similar report on the driver side may look like: - - usbhid-ups[4554]: libusb_get_report: Input/output error - upsd[4591]: Data for UPS [eaton] is stale - check driver - usbhid-ups[4554]: Can't claim USB device [0463:ffff]: No such file or directory - upsd[4591]: Can't connect to UPS [eaton] (usbhid-ups-eaton): No such file or directory - upsmon[5148]: Poll UPS [eaton@localhost] failed - Driver not connected - upsmon[5148]: Communications with UPS eaton@localhost lost - -Other similar looking issues may include improper setup of udev, upower -and similar frameworks to hand over the device from the OS to a driver -daemon; competition with other software probing USB devices (ModemManager -was mentioned in this context), including running several copies of the -NUT drivers trying to use same port (e.g. one started by services and -another manually as you tried to debug the problems). - -Software quirks aside, please do test with a different USB cable and/or port -on the computer. These were known to cause grief beyond what can be fixed -with a few key words ;) - -Finally, sometimes the issue is on the OS side (and/or USB chipset), to -the point that the USB driver can not be unloaded and re-attached until -you power cycle the system. - == Why doesn't my package work? Or a variation like... @@ -720,79 +610,6 @@ This means all packages have been built by a third party. If you have an issue that's related to packaging, you will need to seek help with whoever built it for you. -== My UPS is directly connected to an appliance with a limited version of NUT, how can I monitor the UPS from arbitrary clients? - -You can set up a separate general-purpose system as the NUT server for -your "arbitrary clients", using `dummy-ups` in "relay mode" as the driver. -This instance of `dummy-ups` would in turn be the NUT client allowed to -interact with the appliance and that way with the UPS connected there. - -NOTE: The original question related to a NAS with NUT provided in its -firmware OS, that only allowed one or few clients and not a whole -rack's worth of client IP addresses. - -== My networked UPS can't handle being monitored by dozens of NUT clients - -Network management cards on many UPSes are rather puny appliances, often -known to either limit the amount of clients who may connect, for security -or performance reasons, or otherwise to crash or respond very slowly when -overwhelmed. - -You may be better off reducing the amount of servers connected to the UPS -with the `snmp-ups`, `netxml-ups` or similar type of driver, and set up -other systems as clients of these NUT servers. - -Developers who are working on NUT, its drivers, or further projects and -appliances based on NUT, and who need to monitor their UPS from multiple -systems using the complete NUT stack on each system (e.g. during testing), -can benefit from dedicating a separate general-purpose system as the NUT -server using the real (networked) driver for the UPS, while using the -`dummy-ups` in "relay mode" as the driver connected to this dedicated -server on each tested system. - -== How can I setup NUT as a proxy (setup a server to forward/relay client data)? - -This can easily be achieved by using the `dummy-ups` driver. -The `port` field acts as the reference to the "other" UPS served -by another NUT server. - -Example with `dummy-ups` driver: - - [proxy] - driver = dummy-ups - port = upsname@ip-or-hostname[:port] - desc = "UPS proxy for UPS upsname on server ip-or-hostname" - -Also note that there is a `clone` driver with similar purpose, -which allows users to group clients to a particular outlet of -a device with a "real" driver running locally, and deal with -this output as if it was a normal UPS. - -Here the `port` field references the driver socket name that -the "real" UPS driver is using. See its manual page for more -details and caveats. - -Example with `clone` driver: - - [realups] - driver = usbhid-ups - port = auto - - [clone-outlet-1] - driver = clone - port = usbhid-ups-realups - load.on = outlet.1.load.on - load.off = outlet.1.load.off - load.status = outlet.1.status - [...] - -This allows to group load attached to a separately manageable -outlet (or group of outlets) on larger UPS and ePDUs, in order -to power those devices on/off together. This may be also useful -to delegate management of feeds to devices for purposes like -hosting or supporting hardware for smaller teams sharing a rack -in a larger company. - == Why are there two copies of upsmon running? It's not really two complete copies if your OS forks efficiently. @@ -818,7 +635,7 @@ incidentally what the official FreeBSD port of NUT does for all builds. == I have 'some problem' with 'some old version' ... Get the latest stable release, and see if it still happens. If it -goes away, it means someone else reported it and got it fixed a +goes away, it means someone else reported it and got it fixed a long time ago. You may want to search the mailing lists to see if someone else has @@ -828,23 +645,20 @@ into your distribution (potentially with unofficial packages). Some OS distributions contain old versions of NUT. If your hardware is newer than the NUT release, there is a good chance that support has not been added -yet. Please do not tell us you have the "latest version for Distro XYZ" -- even +yet. Please do not tell us you have the "latest version for Distro XYZ" - even if the developers are familiar with that distribution, it helps others if you quote the exact package version. NOTE: check the release date on the version you have. If it's more than about 6-12 months old, there's probably a newer stable tree -version out there. As development happens actively, be sure to also -check if a custom build from Git (usually using the `master` branch -of NUT https://github.com/networkupstools/nut/ repository) has your -issue fixed by some kind soul already. +version out there. == I built NUT from Git, and it complains about lots of missing files. What happened? If you are not actively developing a driver, can you use a snapshot instead? The NUT instance of Buildbot generates tar files of the latest NUT source -after each successful build, and these snapshots include a pre-built version -of the `./configure` script. +after each successful build, and these snapshots include a prebuilt version of +the `./configure` script. Otherwise, you will need recent versions of autoconf, automake, libtool, asciidoc, a2x and its dependencies for DocBook/dblatex. Rather than publish a @@ -859,7 +673,7 @@ and also SNMP and XML/HTTP (Eaton and MGE) communications. Since NUT is very extensible, support for a new communication bus can be added easily. - + Any time there is a gap in features, it's usually because the group of people who own that hardware and the group of people who write code don't overlap. The fix is to make them overlap - @@ -873,12 +687,7 @@ NUT. Changing the way a fundamental component works, such as USB support, means a lot of testing to ensure that your fix does not break other drivers. Sometimes patches are put on hold due to a feature freeze. If it -doesn't show up once the new version opens up, please send it again. - -It may also be much more productive to submit changes as pull requests via -https://github.com/networkupstools/nut/pulls so they are automatically -processed by the NUT CI farm across numerous target platforms, and -various inconsistencies can be diagnosed and fixed early. +doesn't show up once the new version opens up, send it again. == I'm not much of a programmer. How can I help? @@ -896,7 +705,7 @@ has already handled it successfully. == I replaced the battery in my APC Smart-UPS and now it thinks the battery is low all the time. How do you fix this? Or a variation like... - + == My APC UPS keeps reporting 'OL LB', even after it's been charging for many hours. What can I do about this? This happened to me, and some other people too. The combination of @@ -914,7 +723,7 @@ disconnect it from the computer so this software won't shut it down. The easiest way to do this is to first unplug your computer(s) from -it, and plug in a token load like a lamp. Also, move the UPS to a +it, and plug in a token load like a lamp. Also, move the UPS to a power strip that doesn't switch the ground line or an outlet that you can switch off at your panel. @@ -943,8 +752,6 @@ for you. There is a small chance that the mailing list spam filter ate your message. Check the list archives to see if your message appears there. -Also double-check that you have subscribed to the lists and completed -all the confirmation rituals of its engine. Convincing the other subscribers that you've actually read down this far might be useful. You might mention "queequeg" for better results. @@ -963,10 +770,6 @@ In addition, the mailing lists are publicly archived, and therefore easily searchable. Chances are, you aren't the only person who will ever have that question. -There are similar benefits to using the discussions on issue tracker at -https://github.com/networkupstools/nut/issues and if suitable, in the -currently open pull requests. - == If you want mailing list replies to go to the list, why don't you add a Reply-To: header? We are not going to rehash all of the arguments for and against this in a @@ -979,10 +782,6 @@ If you're not a programmer, you can still help others by making that protocol available. You might host the document somewhere and send the URL to one of the mailing lists. -Posting an issue with attachments on -https://github.com/networkupstools/nut/issues -can also be helpful. - == How can you answer questions to situations that nobody's encountered yet? Isn't this a frequently asked questions file? *Answer 1* @@ -994,12 +793,9 @@ It's a kind of Magic. It's both that and a frequently *anticipated* questions file, too. The idea is to write it up in here so that nobody asks the mailing -list when it finally does get released. +list when it finally does get released. == My UPS powers up immediately after a power failure instead of waiting for the batteries to recharge! -Or a variation like... - -== My UPS (an APC as it happens) lacks the field "battery.charge.restart" -- so how will it know when to restart? You can rig up a little hack to handle this issue in software. @@ -1016,8 +812,8 @@ where there's not enough battery capacity left for upsmon to do its thing. Exactly how long to wait is a function of your UPS hardware, and will require careful testing. -If this is too evil for you, buy another kind of UPS that will either wait for -a minimum amount of charge, a minimum amount of time, or both. +If this is too evil for you, buy another kind of UPS that will either wait for a +minimum amount of charge, a minimum amount of time, or both. == I'm facing a power race Or a variation like... @@ -1042,17 +838,12 @@ they won't be stuck in the halted state with the UPS running on line power. Implement this by modifying your shutdown script like this: ------- - # `upsmon -K` if available on still mounted filesystems - # at this point is more portable than the `test` below - if (test -f /etc/killpower) then - /sbin/upsdrvctl shutdown + /usr/local/ups/sbin/upsdrvctl shutdown sleep 120 # uh oh, we never got shut down! (power race?) reboot fi ------- diff --git a/docs/Makefile.am b/docs/Makefile.am index a593070..c587aa5 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,10 +1,3 @@ -MAINTAINERCLEANFILES = Makefile.in .dirstamp -EXTRA_DIST = - -# Is "egrep == grep -E" always valid? (maybe all a job for configure.ac) -EGREP = egrep -#EGREP = grep -E - IMAGE_FILES = images/asciidoc.png \ images/hostedby.png \ images/nut_layering.png \ @@ -19,10 +12,9 @@ IMAGE_FILES = images/asciidoc.png \ images/old-cgi.png # Only track here the local deps -SHARED_DEPS = nut-names.txt daisychain.txt asciidoc.conf asciidoc.txt +SHARED_DEPS = nut-names.txt asciidoc.conf USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ - config-prereqs.txt ci-farm-lxc-setup.txt \ configure.txt download.txt documentation.txt features.txt history.txt \ outlets.txt scheduling.txt security.txt support.txt user-manual.txt @@ -43,107 +35,44 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png -ALL_TXT_SRC = nut-names.txt daisychain.txt \ - $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ - $(CABLES_DEPS) FAQ.txt nut-qa.txt packager-guide.txt snmp.txt \ - solaris-usb.txt +ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-qa.txt packager-guide.txt snmp.txt NUT_SPELL_DICT = nut.dict -EXTRA_DIST += $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ +EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ - common.xsl xhtml.xsl chunked.xsl asciidoc.txt + common.xsl xhtml.xsl chunked.xsl ASCIIDOC_HTML_SINGLE = user-manual.html \ developer-guide.html \ packager-guide.html \ - solaris-usb.html \ - cables.html \ FAQ.html ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ developer-guide.chunked \ packager-guide.chunked \ - solaris-usb.chunked \ - cables.chunked \ - FAQ.chunked + FAQ.html ASCIIDOC_PDF = user-manual.pdf \ developer-guide.pdf \ packager-guide.pdf \ - solaris-usb.pdf \ - cables.pdf \ + cables.pdf \ FAQ.pdf -SUBDIRS = man cables -SUFFIXES = .txt .html .pdf -spellchecked +SUBDIRS = man +SUFFIXES = .txt .html .pdf all: doc -# This list is defined by configure script choices and options: -check-local: @DOC_CHECK_LIST@ - -# This list is defined by configure script choices and options: doc: @DOC_BUILD_LIST@ -# This target can be called by developers to go around the configure -# script choices at their risk (e.g. missing tools are possible): -docs: pdf html-single html-chunked man-man html-man - -all-docs: docs - -check-docs: check-pdf check-html-single check-html-chunked check-man - pdf: $(ASCIIDOC_PDF) # also build the HTML manpages with these targets html-single: $(ASCIIDOC_HTML_SINGLE) html-chunked: $(ASCIIDOC_HTML_CHUNKED) -# the "for" loops might better use $^ but it might be not portable -check-pdf: $(ASCIIDOC_PDF) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(ASCIIDOC_PDF) ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i 'PDF document' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED PDF sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED PDF sanity check"; exit 0 - -check-html-single: $(ASCIIDOC_HTML_SINGLE) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(ASCIIDOC_HTML_SINGLE) ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-single sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-single sanity check"; exit 0 - -check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for D in $(ASCIIDOC_HTML_CHUNKED); do \ - for F in "$$D"/*.html ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; \ - for F in "$$D"/*.css ; do \ - test -s "$$F" && { $(EGREP) -i 'CSS stylesheet' "$$F" > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-chunked sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-chunked sanity check"; exit 0 - -# Note: usually the results from man-page check will be reported twice: -# once as a SUBDIRS child makefile, and once via DOC_CHECK_LIST expansion -# Note: default `make all` in the man directory caters to drivers etc. -# chosen during configure script execution. The "all-man" and "all-html" -# rules build everything documented. -check-man all-man man-man all-html html-man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile $@ - -man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile all - -CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css - -# Dirs to clean clean-local: - rm -rf *.chunked *.bak tmp + rm -rf *.pdf *.html *.chunked docbook-xsl.css *.bak ### TODO: automatic dependency generation # Add other directory deps (not for local EXTRA_DIST) and generated contents @@ -156,258 +85,55 @@ FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf -solaris-usb.html solaris-usb.chunked solaris-usb.pdf: solaris-usb.txt asciidoc.conf # Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when # generating the chunked HTML. In this case, export the environment # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make -A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) \ - --attribute=icons \ - --xsltproc-opts="--nonet" \ - --xsltproc-opts="--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ - --xsltproc-opts="--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ - --xsltproc-opts="--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ - --attribute=iconsdir="$(srcdir)/images" \ +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ + --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ - --attribute=tree_version="@TREE_VERSION@" \ - -a toc -a numbered --destination-dir=$${A2X_OUTDIR} -# NOTE: a2x newer than 8.6.8 says "--destination-dir" is only valid for HTML. -# As of version 8.6.9 it lies, and the argument is required for our distcheck -# (and does affect PDF builds, as found during work on collision-avoidance - -# true with at least asciidoc/a2x versions 9.0.0rc2). -# For more details see issues https://github.com/asciidoc/asciidoc/issues/44 -# and https://github.com/networkupstools/nut/pull/281 (in short, attempts -# to "fix" this warning broke NUT build). If this is to be retried later, see -# https://github.com/networkupstools/nut/pull/281/commits/fe17861c4ea12679b3ebfefa8a6d692d79d99f2d -# and do not forget to fix up docs/man/Makefile.am too ;) + --attribute tree_version=@TREE_VERSION@ \ + -a toc -a numbered --destination-dir=. -# NOTE: a2x tends to copy some files into its working area, preserving original -# permissions. If those files are read-only in origin (e.g. packaged stylesheet -# or our resources coming from EXTRA_DIST) the next a2x can not overwrite it. -# Also note that such hoarding of files has potential to break parallel builds -# (or cause them to produce undefined results if some bad timing happens). -# As a brutal workaround for the former problem, we chmod. For second one we -# might try magic with .SEQUENTIAL recipe hints, but that is gmake-dependent. +.txt.html: common.xsl xhtml.xsl + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< -# Note that empirically it treats "destination-dir" as the source root for -# PDF generation (even though it claims the argument is ignored for non-HTML -# targets) so we have to provide the "images/" in this case. ONLY for PDF! +.txt.chunked: common.xsl chunked.xsl + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl $< -# Note we only remove the original target (if present), if it is a directory - -# e.g. created by "html-chunked" targets. -DOCBUILD_BEGIN = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - rm -rf "./$${A2X_OUTDIR}" || true ; \ - test -d "$@" && rm -rf "$@" || true ; \ - mkdir -p "./$${A2X_OUTDIR}" || exit ; \ - case "$${A2X_OUTDIR}" in \ - tmp/pdf.*) ln -s ../../images "./$${A2X_OUTDIR}" ;; \ - esac; \ - else A2X_OUTDIR='.' ; fi; \ - if test -s "${builddir}/docbook-xsl.css" \ - && test -r "${builddir}/docbook-xsl.css" \ - && ! test -w "${builddir}/docbook-xsl.css" \ - ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \ - chmod -R u+w "./$${A2X_OUTDIR}" || true; \ -} - -# When moving "*" hope a2x did not make any "hidden" files -# like ".*" that would be required for resulting documents. -# Leave the "images/" dir there, though. -# Otherwise, we would have to `find` them all. -DOCBUILD_END = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - chmod -R u+w "./$${A2X_OUTDIR}" || true; \ - test -d "$@" && rm -rf "$@" || true ; \ - mv -f "./$${A2X_OUTDIR}/$(@F)" ./ || exit ; \ - mv -f "./$${A2X_OUTDIR}/"*.* ./ 2>/dev/null || true ; \ - rm -rf "./$${A2X_OUTDIR}" ; \ - fi ; \ -} - -# PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with -# prerequisites like done below, and GNU Make of some versions complains; -# https://www.gnu.org/software/make/manual/html_node/Error-Messages.html -# says the prerequisites were ignored while a suffix rule was created; -# eventually the POSIX stance would be taken to define a rule for a weird -# verbatim target file name with prerequisites: -# ../docs/Makefile:936: warning: ignoring prerequisites on suffix rule definition -# Changes from ".txt.pdf: docinfo.xml" to "*.pdf: docinfo.xml" = ".txt.pdf:" -# as done below may be pointless in the end (with regard to a portable way -# to trigger builds by a changed dependency), but at least predictable and -# not toxic. -*.html: common.xsl xhtml.xsl -.txt.html: - @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ - echo " DOC-HTML Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES - -*.chunked: common.xsl chunked.xsl -.txt.chunked: - @A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ - echo " DOC-HTML-CHUNKED Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES - -# Note: non-HTML a2x modes may ignore the destination directory -*.pdf: docinfo.xml -.txt.pdf: - @A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ - echo " DOC-PDF Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< if HAVE_ASPELL # Non-interactively spell check all documentation source files. # This is useful for Buildbot and automated QA processing # FIXME: how to present output (std{out,err}, single file or per target)? -# NOTE: ../ChangeLog is nowadays generated from commit messages, so -# its spelling (or errors in that) are not fixable and thus irrelevant. -# Similarly for the ../INSTALL file that is prepared by autoconf and not -# tracked as a source file by NUT Git repository. SPELLCHECK_SRC = $(ALL_TXT_SRC) ../README ../INSTALL.nut ../UPGRADING ../NEWS \ ../TODO ../scripts/ufw/README ../scripts/augeas/README ../lib/README \ - ../tools/nut-scanner/README \ - ../AUTHORS ../COPYING ../LICENSE-GPL2 ../LICENSE-GPL3 - -# Directory SPELLCHECK_SRC files are relative to. Overriden by other Makefiles. -SPELLCHECK_DIR = $(srcdir) - -# Note: de-facto our documentation is beyond ASCII (at least in names of -# international committers). The grep tests below look if the aspell output -# contained something other than the OK lines (tagged with asterisk) and -# aspell's version (tagged with @) and if it did - those lines must be the -# spellcheck complaints. Empty OUT is ok. -# We also must indent the input, because certain piped-in characters are -# interpreted as commands, and seems this feature can not be turned off. -# See also http://aspell.net/man-html/Through-A-Pipe.html -# TODO: Is "grep -a" or "grep -b" (treat input as ascii/bin) portable enough? -# Set SPELLCHECK_ERROR_FATAL=no if there are some unavoidable issues -# due to spellchecking, to temporarily not fail builds due to this. -# For Travis CI in particular, see ci_build.sh in NUT codebase root. -SPELLCHECK_ERROR_FATAL = yes -SPELLCHECK_ENV_DEBUG = no -ASPELL_NUT_COMMON_ARGS = -p $(abs_srcdir)/$(NUT_SPELL_DICT) -ASPELL_NUT_COMMON_ARGS += -d en --lang=en --ignore-accents -ASPELL_NUT_COMMON_ARGS += --encoding=utf-8 -ASPELL_ENV_LANG = en.UTF-8 -ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) - -# WARNING: The percent wildcard is a GNU extension; otherwise we need -# a ".txt.txt-spellchecked" type of rule and files like "README" all -# renamed to *.txt, or lots of rules for files without the extensions -# Other Makefiles have a relatively simple life, dealing with just a -# few texts and name/extension patterns in their directories. -#?#.txt.txt-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -#%-spellchecked: % Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -#*-spellchecked */*-spellchecked: $(@:-spellchecked=) $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# NOTE: This portable rule RELIES on just one SPELLCHECK_SRC defined -# at a time, with an outer Makefile caller ensuring the looping: -$(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - rm -f "$@" || true ; \ - echo " ASPELL Spell checking on $(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)"; \ - OUT="`(sed 's,^\(.*\)$$, \1,' | $(ASPELL) -a -t $(ASPELL_NUT_COMMON_ARGS) 2>&1) < "$(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)"`" \ - && { if test -n "$$OUT" ; then OUT="`echo "$$OUT" | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' `" ; fi; \ - test -z "$$OUT" ; } \ - || { RES=$$? ; \ - echo "FAILED : Aspell reported errors here:" >&2 \ - && echo "----- vvv" >&2 \ - && echo "$$OUT" >&2 \ - && echo "----- ^^^" >&2 ; \ - exit $$RES; } ; \ - touch "$@" + ../tools/nut-scanner/README spellcheck: - @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ - echo "ASPELL DEBUG : information about the setup follows:"; \ - LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ - $(ASPELL) --help || true; \ - dpkg -l |grep -i aspell || true ; \ - echo "ASPELL automatic execution line is : ( sed 's,^\(.*\)$$, \1,' < docfile.txt | $(ASPELL) -a -t $(ASPELL_NUT_COMMON_ARGS) | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' )" ; \ - echo "ASPELL proceeding to spellchecking job..."; \ - else true; fi - @FAILED="" ; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for docsrc in $(SPELLCHECK_SRC); do \ - if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ - echo "ASPELL MAKEFILE DEBUG: Will see from `pwd` if '$(SPELLCHECK_DIR)/$${docsrc}-spellchecked' is up to date" >&2; \ - else true ; fi ; \ - $(MAKE) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_DIR="$(SPELLCHECK_DIR)" "$(SPELLCHECK_DIR)/$${docsrc}-spellchecked" \ - || FAILED="$$FAILED $(SPELLCHECK_DIR)/$$docsrc"; \ - done ; \ - if test -n "$$FAILED" ; then \ - echo "=====================================================================" ; \ - echo "FAILED automatic spellcheck for the following sources (relative to `pwd`): $$FAILED" ; \ - echo "=====================================================================" ; \ - echo "Please 'cd $(abs_top_builddir) && make spellcheck-interactive'"; \ - echo "to either fix document sources or update the dictionary of accepted"; \ - echo "words and spellings listed in the '$(NUT_SPELL_DICT)' file there."; \ - echo "Either way, please follow up by posting a pull request or a patch"; \ - echo "to integrate your fixes into the common NUT codebase."; \ - echo "=====================================================================" ; \ - test x"$(SPELLCHECK_ERROR_FATAL)" = xno || exit 1; \ - echo "NOTE: SPELLCHECK_ERROR_FATAL == no so this make does not break the build!"; \ - echo "=====================================================================" ; \ - fi >&2 ; exit 0 - -# Interactively spell check all documentation source files below (so a human -# can edit the documentation errors and/or add words to custom dictionary). -# Note that here we do not restrain reported issues, so this might catch more -# than the automated test above. -spellcheck-sortdict: $(abs_builddir)/$(NUT_SPELL_DICT).sorted - -# Note that the source file may be not overwritable (distcheck, cdrom, ...), -# so we'd ignore that failure. But the practical use-case is a developer's -# in-tree workspace, so we want the working copy of the dictionary fixed up -# for easy `git diff`ing if possible. -# Note also that "$( "$@" - @cp -f "$@" "$(abs_builddir)/$(NUT_SPELL_DICT)" - @if [ "$(abs_builddir)" != "$(abs_srcdir)" ] ; then \ - cp -f "$@" "$<" || true ; \ - cp -f "$(abs_builddir)/$(NUT_SPELL_DICT).bak-pre-sorting" "$(abs_srcdir)/" || true ; \ - fi - -DISTCLEANFILES = $(NUT_SPELL_DICT).bak-pre-sorting .$(NUT_SPELL_DICT).sorted $(NUT_SPELL_DICT).sorted - + @for docsrc in $(SPELLCHECK_SRC); do \ + echo "Spell checking on $$docsrc"; \ + LANG=C $(ASPELL) -a -t -p $(NUT_SPELL_DICT) < $$docsrc | grep [^*]; \ + done +# Interactively spell check all documentation source files spellcheck-interactive: - @FAILED="" ; for docsrc in $(SPELLCHECK_SRC); do \ - echo "Spell checking on $(SPELLCHECK_DIR)/$$docsrc"; \ - LANG=$(ASPELL_ENV_LANG) LC_ALL=$(ASPELL_ENV_LANG) $(ASPELL) check $(ASPELL_NUT_COMMON_ARGS) $(SPELLCHECK_DIR)/$$docsrc || \ - FAILED="$$FAILED $(SPELLCHECK_DIR)/$$docsrc"; \ - done ; \ - if test -n "$$FAILED" ; then \ - echo "FAILED interactive spellcheck for the following sources (relative to `pwd`): $$FAILED" >&2 ; \ - exit 1; \ - fi ; exit 0 - $(MAKE) spellcheck-sortdict - @echo "------------------------------------------------------------------------"; \ - echo "Custom dictionary file $(NUT_SPELL_DICT) may have been updated now."; \ - echo "Use 'git add -p docs/$(NUT_SPELL_DICT) && git checkout -- docs/$(NUT_SPELL_DICT) && make spellcheck-sortdict && git add -p docs/$(NUT_SPELL_DICT)'"; \ - echo "to review changes (please DO NOT REMOVE LINES that aspell chose to drop,"; \ - echo "because other systems might not know these words in their system dictionaries)"; \ - echo "------------------------------------------------------------------------" + @for docsrc in $(SPELLCHECK_SRC); do\ + echo "Spell checking on $$docsrc"; \ + LANG=C $(ASPELL) check -p $(NUT_SPELL_DICT) $$docsrc; \ + done else !HAVE_ASPELL -# This rule woulf probably just fail; normally with no ASPELL there are no callers for it -*/*-spellchecked *-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) - @echo " SKIP-ASPELL $@ : Documentation spell check not available since 'aspell' was not found." >&2 spellcheck: @echo "Documentation spell check not available since 'aspell' was not found." spellcheck-interactive: @echo "Documentation spell check not available since 'aspell' was not found." endif !HAVE_ASPELL -.PHONY: html html-chunked html-single pdf man +.PHONY: html html-single pdf diff --git a/docs/Makefile.in b/docs/Makefile.in index 8b1a929..1a28021 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,17 +14,7 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -89,24 +79,19 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = docs +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(srcdir)/docinfo.xml.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -115,17 +100,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = docinfo.xml @@ -164,7 +143,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir distdir-am + distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -185,7 +164,6 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/docinfo.xml.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -219,7 +197,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -230,7 +207,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -244,7 +220,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -254,12 +229,9 @@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ - -# Is "egrep == grep -E" always valid? (maybe all a job for configure.ac) -EGREP = egrep +EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -277,8 +249,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -289,29 +259,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -331,9 +293,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -347,7 +306,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -365,7 +323,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -379,9 +336,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -407,14 +361,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -424,11 +376,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -MAINTAINERCLEANFILES = Makefile.in .dirstamp -EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ - $(CABLES_IMAGES) $(NUT_SPELL_DICT) common.xsl xhtml.xsl \ - chunked.xsl asciidoc.txt -#EGREP = grep -E IMAGE_FILES = images/asciidoc.png \ images/hostedby.png \ images/nut_layering.png \ @@ -444,9 +391,8 @@ IMAGE_FILES = images/asciidoc.png \ # Only track here the local deps -SHARED_DEPS = nut-names.txt daisychain.txt asciidoc.conf asciidoc.txt +SHARED_DEPS = nut-names.txt asciidoc.conf USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \ - config-prereqs.txt ci-farm-lxc-setup.txt \ configure.txt download.txt documentation.txt features.txt history.txt \ outlets.txt scheduling.txt security.txt support.txt user-manual.txt @@ -467,36 +413,32 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \ images/cables/mge-usb-rj45.jpg \ images/cables/SOLA-330.png -ALL_TXT_SRC = nut-names.txt daisychain.txt \ - $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ - $(CABLES_DEPS) FAQ.txt nut-qa.txt packager-guide.txt snmp.txt \ - solaris-usb.txt +ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \ + $(CABLES_DEPS) FAQ.txt nut-qa.txt packager-guide.txt snmp.txt NUT_SPELL_DICT = nut.dict +EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \ + $(CABLES_IMAGES) $(NUT_SPELL_DICT) \ + common.xsl xhtml.xsl chunked.xsl + ASCIIDOC_HTML_SINGLE = user-manual.html \ developer-guide.html \ packager-guide.html \ - solaris-usb.html \ - cables.html \ FAQ.html ASCIIDOC_HTML_CHUNKED = user-manual.chunked \ developer-guide.chunked \ packager-guide.chunked \ - solaris-usb.chunked \ - cables.chunked \ - FAQ.chunked + FAQ.html ASCIIDOC_PDF = user-manual.pdf \ developer-guide.pdf \ packager-guide.pdf \ - solaris-usb.pdf \ - cables.pdf \ + cables.pdf \ FAQ.pdf -SUBDIRS = man cables -SUFFIXES = .txt .html .pdf -spellchecked -CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css +SUBDIRS = man +SUFFIXES = .txt .html .pdf ### TODO: automatic dependency generation # Add other directory deps (not for local EXTRA_DIST) and generated contents @@ -512,114 +454,29 @@ FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \ # generating the chunked HTML. In this case, export the environment # variable ASCIIDOC_VERBOSE to "-v", ie: # $ ASCIIDOC_VERBOSE=-v make -A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) \ - --attribute=icons \ - --xsltproc-opts="--nonet" \ - --xsltproc-opts="--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ - --xsltproc-opts="--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ - --xsltproc-opts="--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ - --attribute=iconsdir="$(srcdir)/images" \ +A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \ + --xsltproc-opts "--nonet" \ + --xsltproc-opts "--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \ + --xsltproc-opts "--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \ + --xsltproc-opts "--stringparam nut.nutversion \"@PACKAGE_VERSION@\"" \ + --attribute iconsdir=$(srcdir)/images \ --attribute=badges \ --attribute=external_title \ - --attribute=tree_version="@TREE_VERSION@" \ - -a toc -a numbered --destination-dir=$${A2X_OUTDIR} - -# NOTE: a2x newer than 8.6.8 says "--destination-dir" is only valid for HTML. -# As of version 8.6.9 it lies, and the argument is required for our distcheck -# (and does affect PDF builds, as found during work on collision-avoidance - -# true with at least asciidoc/a2x versions 9.0.0rc2). -# For more details see issues https://github.com/asciidoc/asciidoc/issues/44 -# and https://github.com/networkupstools/nut/pull/281 (in short, attempts -# to "fix" this warning broke NUT build). If this is to be retried later, see -# https://github.com/networkupstools/nut/pull/281/commits/fe17861c4ea12679b3ebfefa8a6d692d79d99f2d -# and do not forget to fix up docs/man/Makefile.am too ;) - -# NOTE: a2x tends to copy some files into its working area, preserving original -# permissions. If those files are read-only in origin (e.g. packaged stylesheet -# or our resources coming from EXTRA_DIST) the next a2x can not overwrite it. -# Also note that such hoarding of files has potential to break parallel builds -# (or cause them to produce undefined results if some bad timing happens). -# As a brutal workaround for the former problem, we chmod. For second one we -# might try magic with .SEQUENTIAL recipe hints, but that is gmake-dependent. - -# Note that empirically it treats "destination-dir" as the source root for -# PDF generation (even though it claims the argument is ignored for non-HTML -# targets) so we have to provide the "images/" in this case. ONLY for PDF! - -# Note we only remove the original target (if present), if it is a directory - -# e.g. created by "html-chunked" targets. -DOCBUILD_BEGIN = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - rm -rf "./$${A2X_OUTDIR}" || true ; \ - test -d "$@" && rm -rf "$@" || true ; \ - mkdir -p "./$${A2X_OUTDIR}" || exit ; \ - case "$${A2X_OUTDIR}" in \ - tmp/pdf.*) ln -s ../../images "./$${A2X_OUTDIR}" ;; \ - esac; \ - else A2X_OUTDIR='.' ; fi; \ - if test -s "${builddir}/docbook-xsl.css" \ - && test -r "${builddir}/docbook-xsl.css" \ - && ! test -w "${builddir}/docbook-xsl.css" \ - ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \ - chmod -R u+w "./$${A2X_OUTDIR}" || true; \ -} - - -# When moving "*" hope a2x did not make any "hidden" files -# like ".*" that would be required for resulting documents. -# Leave the "images/" dir there, though. -# Otherwise, we would have to `find` them all. -DOCBUILD_END = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - chmod -R u+w "./$${A2X_OUTDIR}" || true; \ - test -d "$@" && rm -rf "$@" || true ; \ - mv -f "./$${A2X_OUTDIR}/$(@F)" ./ || exit ; \ - mv -f "./$${A2X_OUTDIR}/"*.* ./ 2>/dev/null || true ; \ - rm -rf "./$${A2X_OUTDIR}" ; \ - fi ; \ -} + --attribute tree_version=@TREE_VERSION@ \ + -a toc -a numbered --destination-dir=. # Non-interactively spell check all documentation source files. # This is useful for Buildbot and automated QA processing # FIXME: how to present output (std{out,err}, single file or per target)? -# NOTE: ../ChangeLog is nowadays generated from commit messages, so -# its spelling (or errors in that) are not fixable and thus irrelevant. -# Similarly for the ../INSTALL file that is prepared by autoconf and not -# tracked as a source file by NUT Git repository. @HAVE_ASPELL_TRUE@SPELLCHECK_SRC = $(ALL_TXT_SRC) ../README ../INSTALL.nut ../UPGRADING ../NEWS \ @HAVE_ASPELL_TRUE@ ../TODO ../scripts/ufw/README ../scripts/augeas/README ../lib/README \ -@HAVE_ASPELL_TRUE@ ../tools/nut-scanner/README \ -@HAVE_ASPELL_TRUE@ ../AUTHORS ../COPYING ../LICENSE-GPL2 ../LICENSE-GPL3 +@HAVE_ASPELL_TRUE@ ../tools/nut-scanner/README - -# Directory SPELLCHECK_SRC files are relative to. Overriden by other Makefiles. -@HAVE_ASPELL_TRUE@SPELLCHECK_DIR = $(srcdir) - -# Note: de-facto our documentation is beyond ASCII (at least in names of -# international committers). The grep tests below look if the aspell output -# contained something other than the OK lines (tagged with asterisk) and -# aspell's version (tagged with @) and if it did - those lines must be the -# spellcheck complaints. Empty OUT is ok. -# We also must indent the input, because certain piped-in characters are -# interpreted as commands, and seems this feature can not be turned off. -# See also http://aspell.net/man-html/Through-A-Pipe.html -# TODO: Is "grep -a" or "grep -b" (treat input as ascii/bin) portable enough? -# Set SPELLCHECK_ERROR_FATAL=no if there are some unavoidable issues -# due to spellchecking, to temporarily not fail builds due to this. -# For Travis CI in particular, see ci_build.sh in NUT codebase root. -@HAVE_ASPELL_TRUE@SPELLCHECK_ERROR_FATAL = yes -@HAVE_ASPELL_TRUE@SPELLCHECK_ENV_DEBUG = no -@HAVE_ASPELL_TRUE@ASPELL_NUT_COMMON_ARGS = -p \ -@HAVE_ASPELL_TRUE@ $(abs_srcdir)/$(NUT_SPELL_DICT) -d en \ -@HAVE_ASPELL_TRUE@ --lang=en --ignore-accents --encoding=utf-8 -@HAVE_ASPELL_TRUE@ASPELL_ENV_LANG = en.UTF-8 -@HAVE_ASPELL_TRUE@ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$) -@HAVE_ASPELL_TRUE@DISTCLEANFILES = $(NUT_SPELL_DICT).bak-pre-sorting .$(NUT_SPELL_DICT).sorted $(NUT_SPELL_DICT).sorted all: all-recursive .SUFFIXES: -.SUFFIXES: .txt .html .pdf -spellchecked .chunked +.SUFFIXES: .txt .html .pdf .chunked $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -632,13 +489,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -757,10 +615,7 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -816,7 +671,6 @@ distdir-am: $(DISTFILES) fi; \ done check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile installdirs: installdirs-recursive @@ -843,17 +697,14 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -918,240 +769,65 @@ ps-am: uninstall-am: -.MAKE: $(am__recursive_targets) check-am install-am install-strip +.MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am check-local clean clean-generic clean-libtool \ - clean-local cscopelist-am ctags ctags-am distclean \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile + check-am clean clean-generic clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am all: doc -# This list is defined by configure script choices and options: -check-local: @DOC_CHECK_LIST@ - -# This list is defined by configure script choices and options: doc: @DOC_BUILD_LIST@ -# This target can be called by developers to go around the configure -# script choices at their risk (e.g. missing tools are possible): -docs: pdf html-single html-chunked man-man html-man - -all-docs: docs - -check-docs: check-pdf check-html-single check-html-chunked check-man - pdf: $(ASCIIDOC_PDF) # also build the HTML manpages with these targets html-single: $(ASCIIDOC_HTML_SINGLE) html-chunked: $(ASCIIDOC_HTML_CHUNKED) -# the "for" loops might better use $^ but it might be not portable -check-pdf: $(ASCIIDOC_PDF) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(ASCIIDOC_PDF) ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i 'PDF document' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED PDF sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED PDF sanity check"; exit 0 - -check-html-single: $(ASCIIDOC_HTML_SINGLE) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(ASCIIDOC_HTML_SINGLE) ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-single sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-single sanity check"; exit 0 - -check-html-chunked: $(ASCIIDOC_HTML_CHUNKED) - @FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for D in $(ASCIIDOC_HTML_CHUNKED); do \ - for F in "$$D"/*.html ; do \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; \ - for F in "$$D"/*.css ; do \ - test -s "$$F" && { $(EGREP) -i 'CSS stylesheet' "$$F" > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-chunked sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-chunked sanity check"; exit 0 - -# Note: usually the results from man-page check will be reported twice: -# once as a SUBDIRS child makefile, and once via DOC_CHECK_LIST expansion -# Note: default `make all` in the man directory caters to drivers etc. -# chosen during configure script execution. The "all-man" and "all-html" -# rules build everything documented. -check-man all-man man-man all-html html-man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile $@ - -man: - cd $(top_builddir)/docs/man/ && $(MAKE) -f Makefile all - -# Dirs to clean clean-local: - rm -rf *.chunked *.bak tmp + rm -rf *.pdf *.html *.chunked docbook-xsl.css *.bak user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS) developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS) packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf -solaris-usb.html solaris-usb.chunked solaris-usb.pdf: solaris-usb.txt asciidoc.conf -# PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with -# prerequisites like done below, and GNU Make of some versions complains; -# https://www.gnu.org/software/make/manual/html_node/Error-Messages.html -# says the prerequisites were ignored while a suffix rule was created; -# eventually the POSIX stance would be taken to define a rule for a weird -# verbatim target file name with prerequisites: -# ../docs/Makefile:936: warning: ignoring prerequisites on suffix rule definition -# Changes from ".txt.pdf: docinfo.xml" to "*.pdf: docinfo.xml" = ".txt.pdf:" -# as done below may be pointless in the end (with regard to a portable way -# to trigger builds by a changed dependency), but at least predictable and -# not toxic. -*.html: common.xsl xhtml.xsl -.txt.html: - @A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \ - echo " DOC-HTML Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES +.txt.html: common.xsl xhtml.xsl + $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl $< -*.chunked: common.xsl chunked.xsl -.txt.chunked: - @A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \ - echo " DOC-HTML-CHUNKED Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES +.txt.chunked: common.xsl chunked.xsl + $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl $< -# Note: non-HTML a2x modes may ignore the destination directory -*.pdf: docinfo.xml -.txt.pdf: - @A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \ - echo " DOC-PDF Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES - -# WARNING: The percent wildcard is a GNU extension; otherwise we need -# a ".txt.txt-spellchecked" type of rule and files like "README" all -# renamed to *.txt, or lots of rules for files without the extensions -# Other Makefiles have a relatively simple life, dealing with just a -# few texts and name/extension patterns in their directories. -#?#.txt.txt-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -#%-spellchecked: % Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -#*-spellchecked */*-spellchecked: $(@:-spellchecked=) $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# NOTE: This portable rule RELIES on just one SPELLCHECK_SRC defined -# at a time, with an outer Makefile caller ensuring the looping: -@HAVE_ASPELL_TRUE@$(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -@HAVE_ASPELL_TRUE@ @LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ -@HAVE_ASPELL_TRUE@ rm -f "$@" || true ; \ -@HAVE_ASPELL_TRUE@ echo " ASPELL Spell checking on $(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)"; \ -@HAVE_ASPELL_TRUE@ OUT="`(sed 's,^\(.*\)$$, \1,' | $(ASPELL) -a -t $(ASPELL_NUT_COMMON_ARGS) 2>&1) < "$(SPELLCHECK_DIR)/$(SPELLCHECK_SRC_ONE)"`" \ -@HAVE_ASPELL_TRUE@ && { if test -n "$$OUT" ; then OUT="`echo "$$OUT" | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' `" ; fi; \ -@HAVE_ASPELL_TRUE@ test -z "$$OUT" ; } \ -@HAVE_ASPELL_TRUE@ || { RES=$$? ; \ -@HAVE_ASPELL_TRUE@ echo "FAILED : Aspell reported errors here:" >&2 \ -@HAVE_ASPELL_TRUE@ && echo "----- vvv" >&2 \ -@HAVE_ASPELL_TRUE@ && echo "$$OUT" >&2 \ -@HAVE_ASPELL_TRUE@ && echo "----- ^^^" >&2 ; \ -@HAVE_ASPELL_TRUE@ exit $$RES; } ; \ -@HAVE_ASPELL_TRUE@ touch "$@" +.txt.pdf: docinfo.xml + $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $< @HAVE_ASPELL_TRUE@spellcheck: -@HAVE_ASPELL_TRUE@ @if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ -@HAVE_ASPELL_TRUE@ echo "ASPELL DEBUG : information about the setup follows:"; \ -@HAVE_ASPELL_TRUE@ LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \ -@HAVE_ASPELL_TRUE@ $(ASPELL) --help || true; \ -@HAVE_ASPELL_TRUE@ dpkg -l |grep -i aspell || true ; \ -@HAVE_ASPELL_TRUE@ echo "ASPELL automatic execution line is : ( sed 's,^\(.*\)$$, \1,' < docfile.txt | $(ASPELL) -a -t $(ASPELL_NUT_COMMON_ARGS) | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' )" ; \ -@HAVE_ASPELL_TRUE@ echo "ASPELL proceeding to spellchecking job..."; \ -@HAVE_ASPELL_TRUE@ else true; fi -@HAVE_ASPELL_TRUE@ @FAILED="" ; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ -@HAVE_ASPELL_TRUE@ for docsrc in $(SPELLCHECK_SRC); do \ -@HAVE_ASPELL_TRUE@ if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \ -@HAVE_ASPELL_TRUE@ echo "ASPELL MAKEFILE DEBUG: Will see from `pwd` if '$(SPELLCHECK_DIR)/$${docsrc}-spellchecked' is up to date" >&2; \ -@HAVE_ASPELL_TRUE@ else true ; fi ; \ -@HAVE_ASPELL_TRUE@ $(MAKE) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_DIR="$(SPELLCHECK_DIR)" "$(SPELLCHECK_DIR)/$${docsrc}-spellchecked" \ -@HAVE_ASPELL_TRUE@ || FAILED="$$FAILED $(SPELLCHECK_DIR)/$$docsrc"; \ -@HAVE_ASPELL_TRUE@ done ; \ -@HAVE_ASPELL_TRUE@ if test -n "$$FAILED" ; then \ -@HAVE_ASPELL_TRUE@ echo "=====================================================================" ; \ -@HAVE_ASPELL_TRUE@ echo "FAILED automatic spellcheck for the following sources (relative to `pwd`): $$FAILED" ; \ -@HAVE_ASPELL_TRUE@ echo "=====================================================================" ; \ -@HAVE_ASPELL_TRUE@ echo "Please 'cd $(abs_top_builddir) && make spellcheck-interactive'"; \ -@HAVE_ASPELL_TRUE@ echo "to either fix document sources or update the dictionary of accepted"; \ -@HAVE_ASPELL_TRUE@ echo "words and spellings listed in the '$(NUT_SPELL_DICT)' file there."; \ -@HAVE_ASPELL_TRUE@ echo "Either way, please follow up by posting a pull request or a patch"; \ -@HAVE_ASPELL_TRUE@ echo "to integrate your fixes into the common NUT codebase."; \ -@HAVE_ASPELL_TRUE@ echo "=====================================================================" ; \ -@HAVE_ASPELL_TRUE@ test x"$(SPELLCHECK_ERROR_FATAL)" = xno || exit 1; \ -@HAVE_ASPELL_TRUE@ echo "NOTE: SPELLCHECK_ERROR_FATAL == no so this make does not break the build!"; \ -@HAVE_ASPELL_TRUE@ echo "=====================================================================" ; \ -@HAVE_ASPELL_TRUE@ fi >&2 ; exit 0 - -# Interactively spell check all documentation source files below (so a human -# can edit the documentation errors and/or add words to custom dictionary). -# Note that here we do not restrain reported issues, so this might catch more -# than the automated test above. -@HAVE_ASPELL_TRUE@spellcheck-sortdict: $(abs_builddir)/$(NUT_SPELL_DICT).sorted - -# Note that the source file may be not overwritable (distcheck, cdrom, ...), -# so we'd ignore that failure. But the practical use-case is a developer's -# in-tree workspace, so we want the working copy of the dictionary fixed up -# for easy `git diff`ing if possible. -# Note also that "$( "$@" -@HAVE_ASPELL_TRUE@ @cp -f "$@" "$(abs_builddir)/$(NUT_SPELL_DICT)" -@HAVE_ASPELL_TRUE@ @if [ "$(abs_builddir)" != "$(abs_srcdir)" ] ; then \ -@HAVE_ASPELL_TRUE@ cp -f "$@" "$<" || true ; \ -@HAVE_ASPELL_TRUE@ cp -f "$(abs_builddir)/$(NUT_SPELL_DICT).bak-pre-sorting" "$(abs_srcdir)/" || true ; \ -@HAVE_ASPELL_TRUE@ fi - +@HAVE_ASPELL_TRUE@ @for docsrc in $(SPELLCHECK_SRC); do \ +@HAVE_ASPELL_TRUE@ echo "Spell checking on $$docsrc"; \ +@HAVE_ASPELL_TRUE@ LANG=C $(ASPELL) -a -t -p $(NUT_SPELL_DICT) < $$docsrc | grep [^*]; \ +@HAVE_ASPELL_TRUE@ done +# Interactively spell check all documentation source files @HAVE_ASPELL_TRUE@spellcheck-interactive: -@HAVE_ASPELL_TRUE@ @FAILED="" ; for docsrc in $(SPELLCHECK_SRC); do \ -@HAVE_ASPELL_TRUE@ echo "Spell checking on $(SPELLCHECK_DIR)/$$docsrc"; \ -@HAVE_ASPELL_TRUE@ LANG=$(ASPELL_ENV_LANG) LC_ALL=$(ASPELL_ENV_LANG) $(ASPELL) check $(ASPELL_NUT_COMMON_ARGS) $(SPELLCHECK_DIR)/$$docsrc || \ -@HAVE_ASPELL_TRUE@ FAILED="$$FAILED $(SPELLCHECK_DIR)/$$docsrc"; \ -@HAVE_ASPELL_TRUE@ done ; \ -@HAVE_ASPELL_TRUE@ if test -n "$$FAILED" ; then \ -@HAVE_ASPELL_TRUE@ echo "FAILED interactive spellcheck for the following sources (relative to `pwd`): $$FAILED" >&2 ; \ -@HAVE_ASPELL_TRUE@ exit 1; \ -@HAVE_ASPELL_TRUE@ fi ; exit 0 -@HAVE_ASPELL_TRUE@ $(MAKE) spellcheck-sortdict -@HAVE_ASPELL_TRUE@ @echo "------------------------------------------------------------------------"; \ -@HAVE_ASPELL_TRUE@ echo "Custom dictionary file $(NUT_SPELL_DICT) may have been updated now."; \ -@HAVE_ASPELL_TRUE@ echo "Use 'git add -p docs/$(NUT_SPELL_DICT) && git checkout -- docs/$(NUT_SPELL_DICT) && make spellcheck-sortdict && git add -p docs/$(NUT_SPELL_DICT)'"; \ -@HAVE_ASPELL_TRUE@ echo "to review changes (please DO NOT REMOVE LINES that aspell chose to drop,"; \ -@HAVE_ASPELL_TRUE@ echo "because other systems might not know these words in their system dictionaries)"; \ -@HAVE_ASPELL_TRUE@ echo "------------------------------------------------------------------------" -# This rule woulf probably just fail; normally with no ASPELL there are no callers for it -@HAVE_ASPELL_FALSE@*/*-spellchecked *-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -@HAVE_ASPELL_FALSE@ @echo " SKIP-ASPELL $@ : Documentation spell check not available since 'aspell' was not found." >&2 +@HAVE_ASPELL_TRUE@ @for docsrc in $(SPELLCHECK_SRC); do\ +@HAVE_ASPELL_TRUE@ echo "Spell checking on $$docsrc"; \ +@HAVE_ASPELL_TRUE@ LANG=C $(ASPELL) check -p $(NUT_SPELL_DICT) $$docsrc; \ +@HAVE_ASPELL_TRUE@ done @HAVE_ASPELL_FALSE@spellcheck: @HAVE_ASPELL_FALSE@ @echo "Documentation spell check not available since 'aspell' was not found." @HAVE_ASPELL_FALSE@spellcheck-interactive: @HAVE_ASPELL_FALSE@ @echo "Documentation spell check not available since 'aspell' was not found." -.PHONY: html html-chunked html-single pdf man +.PHONY: html html-single pdf # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/docs/acknowledgements.txt b/docs/acknowledgements.txt index 7597bb2..33aa5d4 100644 --- a/docs/acknowledgements.txt +++ b/docs/acknowledgements.txt @@ -19,24 +19,24 @@ The NUT Team Active members ~~~~~~~~~~~~~~ -- Jim Klimov: project leader (since 2020), OpenIndiana and OmniOS packager, CI ops and infra -- Arnaud Quette: ex-project leader (from 2005 to 2020), Debian packager and jack of all trades +- Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades - Charles Lepple: senior lieutenant +- Emilien Kia: senior developer - Daniele Pezzini: senior developer +- Václav Krpec: junior developer - Kjell Claesson: senior developer - Alexander Gordeev: junior developer - Michal Soltys: junior developer - David Goncalves: Python developer - Jean Perriault: web consultant - Eric S. Raymond: Documentation consultant -- Roger Price: Documentation specialist - Oden Eriksson: Mandriva packager -- Stanislav Brabec: Novell / SUSE packager +- Stanislav Brabec: Novell / Suse packager - Michal Hlavinka: Redhat packager - Antoine Colombier: trainee For an up to date list of NUT developers, refer to -link:https://github.com/networkupstools/nut/graphs/contributors[GitHub]. +link:https://github.com/orgs/networkupstools/members[GitHub]. Retired members ~~~~~~~~~~~~~~~ @@ -45,20 +45,18 @@ Retired members - Arjen de Korte: senior lieutenant - Peter Selinger: senior lieutenant - Carlos Rodrigues: author of the "megatec" drivers, removing the numerous - drivers for Megatec / Q1 protocol. These drivers have now been replaced - by blazer_ser and blazer_usb +drivers for Megatec / Q1 protocol. These drivers have now been replaced by +blazer_ser and blazer_usb - Niels Baggesen: ported and heavily extended upscode2 to NUT 2.0 driver model - Niklas Edmundsson: has worked on 3-phase support, and upscode2 updates - Martin Loyer: has worked a bit on mge-utalk - Jonathan Dion: MGE internship (summer 2006), who has worked on configuration - Doug Reynolds: has worked on CyberPower support (powerpanel driver) -- Jon Gough: has worked on porting the megatec driver to USB (megatec_usb) +- Jon Gough: has worked on porting the megatec driver to USB (megatec_usb) - Dominique Lallement: Consultant (chairman of the USB/HID PDC Forum) - Julius Malkiewicz: junior developer - Tomas Smetana: former Redhat packager (2007-2008) - Frederic Bohe: senior developer, Eaton contractor (2009-2013) -- Emilien Kia: senior developer -- Václav Krpec: junior developer Supporting manufacturers @@ -89,20 +87,13 @@ provide you with official support from Eaton, or a better level of device support in NUT.* ================================================================================ -* link:https://www.ametek.com/products/businessunits/powersystemsandinstruments/powervar[AMETEK -Powervar], through Andrew McCartney, has added support for all AMETEK Powervar -UPM models as usb-hid UPS. - * link:http://www.gamatronic.com[Gamatronic], through Nadav Moskovitch, has revived the 'sec' driver (as gamatronic), and expanded a bit genericups for its UPSs with alarm interface. -* link:https://ever.eu/[EVER Power Systems] added a USB HID subdriver for -EVER UPSes (Sinline RT Series, Sinline RT XL Series, ECO PRO AVR CDS Series). - * link:http://www.microdowell.com[Microdowell], through Elio Corbolante, has -created the 'microdowell' driver to support the Enterprise Nxx/Bxx serial -devices. The company also proposes NUT as an alternative to its software for +created the 'microdowell' driver to support the Enterprise Nxx/Bxx serial devices. +They also proposes NUT as an alternative to its software for link:http://www.microdowell.com/fra/download.html[Linux / Unix]. * link:http://pcmups.com.tw[Powercom], through Alexey Morozov, has provided @@ -120,13 +111,6 @@ list, and the rest of the information is available via the link:http://article.gmane.org/gmane.comp.monitoring.nut.user/8173[list archives]. -* link:https://nag.company/en[NAG], through Alexey Kazancev and Igor Ryabov, -has added support for SNR-UPS-LID-XXXX models as usb-hid UPS. - -* link:http://www.ablerex.com.tw/[Ablere Electronics Co., Ltd.] contributed -the ablerex subdriver for blazer_usb, handling Ablerex MP, ARES Plus, MSII -MSIII, GRs and GRs Plus models. - Appliances manufacturers ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -159,21 +143,20 @@ the libhid projects, ... through Arnaud Quette (who was also an MGE employee). All the MGE supporters have gone with Eaton (through MGE Office Protection Systems), which was temporarily the new NUT sponsor. -- Fenton Technologies contributed a PowerPal 660 to the project. Their open -stance and quick responses to technical inquiries were appreciated for +- Fenton Technologies contributed a PowerPal 660 to the project. Their open +stance and quick responses to technical inquiries were appreciated for making the development of the fentonups driver possible. -Fenton has since been acquired by link:http://www.metapo.com[Metapo]. +Fenton has since been acquired by link:http://www.metapo.com[Metapo]. -- Bo Kersey of link:http://www.vircio.com[VirCIO] provided a Best Power -Fortress 750 to facilitate the bestups driver. +- Bo Kersey of link:http://www.vircio.com[VirCIO] provided a Best Power Fortress +750 to facilitate the bestups driver. - Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol document. SOLA has since been acquired by Eaton. - PowerKinetics technical support provided documentation on their MiniCOL protocol, which is archived in the NUT protocol library. -PowerKinetics was acquired by the link:http://www.jst.cc[JST Group] -in June 2003. +PowerKinetics was acquired by the link:http://www.jst.cc[JST Group] in June 2003. - link:http://www.cyberpowersystems.com[Cyber Power Systems] contributed a 700AVR model for testing and development of the cyberpower driver. @@ -183,12 +166,7 @@ and a UPStation GXT2 with the Web/SNMP card for development of the liebert driver and expansion of the existing snmp-ups driver. Liebert has since been acquired by link:http://www.emerson.com[Emerson]. -NOTE: If a company or individual isn't listed here, then we probably don't -have enough information about the situation. Developers are kindly requested -to report vendor contributions to the NUT team so this list may reflect their -help, as well as convey a sense of official support (at least, that drivers -were proposed according to the know-how coming from specs and knowledge about -hardware and firmware capabilities, and not acquired via reverse engineering -with a certain degree of unreliability and incompleteness). If we have left -you out, please send us some mail or post a pull request to update this -document in GitHub. +NOTE: If a company or individual isn't listed here, then we probably don't have +enough information about the situation. Developers are requested to report vendor +contributions to the NUT team so this list may reflect their help. +If we have left you out, send us some mail. diff --git a/docs/asciidoc.txt b/docs/asciidoc.txt deleted file mode 100644 index 1f7b391..0000000 --- a/docs/asciidoc.txt +++ /dev/null @@ -1,19 +0,0 @@ -Using AsciiDoc in NUT -===================== -Charles Lepple -:Author Initials: CFL - -Intro ------ - -See the https://asciidoc-py.github.io/userguide.html[AsciiDoc User Guide] -for more information. - -Works in Progress ------------------ - -- link:website/index.html[The NUT Website] -- link:user-manual.html[The NUT User Manual] -- link:developer-guide.html[The NUT Developer Guide] -- link:packager-guide.html[The NUT Packager Guide] -- link:man/index.html[Man pages] diff --git a/docs/cables.txt b/docs/cables.txt index df4ca78..afc2c29 100644 --- a/docs/cables.txt +++ b/docs/cables.txt @@ -37,20 +37,20 @@ OmniGuard F6C***-RKM *From "Daniel"* -A straight-through RS-232 cable (with pins 2-7 connected through) should -work with the following models: +A straight-through RS-232 cable (with pins 2-7 connected through) should work +with the following models: - F6C110-RKM-2U - F6C150-RKM-2U - F6C230-RKM-2U -- F6C320-RKM-3U +- F6C320-RKM-3U image::images/cables/belkin-f6cx-rkm-xu-cable.jpg[Belkin OmniGuard F6C***-RKM cable] Eaton ----- -Documents in this section are provided courtesy of Eaton. +Documents in this section are provided courtesy of Eaton. MGE Office Protection Systems ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -127,7 +127,7 @@ This cable can be used with the following models: T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j, R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h, -R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. +R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j. UPS PC 9 pin connector @@ -143,8 +143,8 @@ Contributed by Kjell Claesson and Arnaud Quette. Phoenixtec (Best Power) ----------------------- -Many Best Power units (including the Patriot Pro II) have a female DB-9 -socket with a non-standard pinout. +Many Best Power units (including the Patriot Pro II) have a female DB-9 socket +with a non-standard pinout. |==== |Signal | PC | UPS @@ -166,7 +166,7 @@ Tripp-Lite *From Tripp-Lite, via Bryan Kolodziej* -This cable (black 73-0844 cable) is used on various models, using the -"Lan 2.2 interface" and the genericups driver (upstype=5). +This cable (black 73-0844 cable) is used on various models, using the "Lan 2.2 interface" +and the genericups driver (upstype=5). image::images/cables/73-0724.png[73-0724 cable] diff --git a/docs/cables/Makefile.am b/docs/cables/Makefile.am deleted file mode 100644 index 8cdb1d3..0000000 --- a/docs/cables/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -CLEANFILES = *-spellchecked -MAINTAINERCLEANFILES = Makefile.in .dirstamp diff --git a/docs/cables/Makefile.in b/docs/cables/Makefile.in deleted file mode 100644 index bd4629b..0000000 --- a/docs/cables/Makefile.in +++ /dev/null @@ -1,566 +0,0 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2020 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = docs/cables -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/nut_arg_with.m4 \ - $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ - $(top_srcdir)/m4/nut_check_libavahi.m4 \ - $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ - $(top_srcdir)/m4/nut_check_libgd.m4 \ - $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ - $(top_srcdir)/m4/nut_check_libneon.m4 \ - $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ - $(top_srcdir)/m4/nut_check_libnss.m4 \ - $(top_srcdir)/m4/nut_check_libopenssl.m4 \ - $(top_srcdir)/m4/nut_check_libpowerman.m4 \ - $(top_srcdir)/m4/nut_check_libusb.m4 \ - $(top_srcdir)/m4/nut_check_libwrap.m4 \ - $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ - $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ - $(top_srcdir)/m4/nut_type_socklen_t.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -A2X = @A2X@ -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -ASCIIDOC = @ASCIIDOC@ -ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BINDIR = @BINDIR@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CONFPATH = @CONFPATH@ -CPP = @CPP@ -CPPCHECK = @CPPCHECK@ -CPPFLAGS = @CPPFLAGS@ -CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ -CPPUNIT_LIBS = @CPPUNIT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DBLATEX = @DBLATEX@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ -DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ -DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ -DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ -DRVPATH = @DRVPATH@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@ -LIBAVAHI_LIBS = @LIBAVAHI_LIBS@ -LIBDIR = @LIBDIR@ -LIBGD_CFLAGS = @LIBGD_CFLAGS@ -LIBGD_LDFLAGS = @LIBGD_LDFLAGS@ -LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ -LIBIPMI_LIBS = @LIBIPMI_LIBS@ -LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ -LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ -LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ -LIBNEON_LIBS = @LIBNEON_LIBS@ -LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ -LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@ -LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ -LIBS = @LIBS@ -LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ -LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ -LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ -LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ -LIBUSB_LIBS = @LIBUSB_LIBS@ -LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ -LIBWRAP_LIBS = @LIBWRAP_LIBS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LN_S_R = @LN_S_R@ -LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ -NUT_NETVERSION = @NUT_NETVERSION@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OS_NAME = @OS_NAME@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PIDPATH = @PIDPATH@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ -RANLIB = @RANLIB@ -RUN_AS_GROUP = @RUN_AS_GROUP@ -RUN_AS_USER = @RUN_AS_USER@ -SBINDIR = @SBINDIR@ -SED = @SED@ -SERLIBS = @SERLIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SOURCE_HIGHLIGHT = @SOURCE_HIGHLIGHT@ -STATEPATH = @STATEPATH@ -STRIP = @STRIP@ -SUN_LIBUSB = @SUN_LIBUSB@ -TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ -VERSION = @VERSION@ -WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ -XMLLINT = @XMLLINT@ -XSLTPROC = @XSLTPROC@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -auglensdir = @auglensdir@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -cgiexecdir = @cgiexecdir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -devddir = @devddir@ -docdir = @docdir@ -driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -hotplugdir = @hotplugdir@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -now = @now@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgconfigdir = @pkgconfigdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -runstatedir = @runstatedir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ -systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -udevdir = @udevdir@ -CLEANFILES = *-spellchecked -MAINTAINERCLEANFILES = Makefile.in .dirstamp -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/cables/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/cables/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - cscopelist-am ctags-am distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/cables/apc-rs500-serial.txt b/docs/cables/apc-rs500-serial.txt index 9a35a2a..ef89ed6 100644 --- a/docs/cables/apc-rs500-serial.txt +++ b/docs/cables/apc-rs500-serial.txt @@ -1,7 +1,7 @@ Desc: APC UPS cable - for Back-UPS RS 500 File: apc-rs500-serial.txt Date: 14 July 2004 -Auth: Russell Kroll , Martin Edlman +Auth: Russell Kroll , Martin Edlman This document was constructed from a mail from Martin. He figured out the pinouts to make the Back-UPS RS 500 work with a normal serial port. diff --git a/docs/cables/ge-imv-victron.txt b/docs/cables/ge-imv-victron.txt index 6a84417..bffed19 100644 --- a/docs/cables/ge-imv-victron.txt +++ b/docs/cables/ge-imv-victron.txt @@ -25,7 +25,7 @@ Data cable 2 for UPS: Driver: victronups (newvictronups) - + UPS PC 9 pin connector 2 --------- 3 3 --------- 2 @@ -39,13 +39,13 @@ UPS PC 9 pin connector Crack cable: for UPS Victron Lite (no IMV Victron Match Lite) - + Driver: genericsups UPS PC 9 pin connector 1 ---------- 4 DTR -7 ---------- 1 DCD ----------+ +7 ---------- 1 DCD ----------+ 9 ---------- 8 CTS -----+ | 5 ---------- 5 GND | | | | diff --git a/docs/cables/powerware.txt b/docs/cables/powerware.txt index 1db1a77..3aa127b 100644 --- a/docs/cables/powerware.txt +++ b/docs/cables/powerware.txt @@ -1,8 +1,8 @@ Desc: Powerware 3115 factory cable File: powerware.txt -Date: 22 July 2005 +Date: 22 July 2005 Auth: various - + 1) Powerware 3115 factory cable From Peter Åstrand diff --git a/docs/cables/repotec.txt b/docs/cables/repotec.txt index 3d26a70..6df107a 100644 --- a/docs/cables/repotec.txt +++ b/docs/cables/repotec.txt @@ -2,7 +2,7 @@ Desc: Repotec 800A (800VA) & 162A (1600VA) cable File: repotec.txt Date: 11 April 2001 Auth: Theodor Milkov - + PC UPS @@ -11,9 +11,9 @@ PC UPS R 5.6k | 7 (RTS) >----+ - + 3 (Tx) >--------------- 6 - + 4 (DTR) <----+---------- 5 | R 5.6k diff --git a/docs/cables/sms.txt b/docs/cables/sms.txt index 54f3b81..6d7ab73 100644 --- a/docs/cables/sms.txt +++ b/docs/cables/sms.txt @@ -1,4 +1,4 @@ -Desc: SMS UPS cables, for Upsilon compatible SMS UPS +Desc: SMS UPS cables, for Upsilon compatible SMS UPS File: sms.txt Date: 9 October 2001 Auth: Marcio Gomes @@ -11,6 +11,6 @@ FEMEA DB9 MACHO DB9 4/8 ---------- 5 5 ---------- 8 -- This cable is working with Manager III 1300 VA and 650 VA, SMS UPS's -- Jump in computer side pins 4/8 and connect to pin 1 in UPS side +- This cable is working with Manager III 1300 VA and 650 VA, SMS Ups's +- Jump in computer side pins 4/8 and conect to pin 1 in UPS side - Use NUT blazer_ser driver diff --git a/docs/ci-farm-lxc-setup.txt b/docs/ci-farm-lxc-setup.txt deleted file mode 100644 index 0e7fa7f..0000000 --- a/docs/ci-farm-lxc-setup.txt +++ /dev/null @@ -1,693 +0,0 @@ -Setting up the multi-arch Linux LXC container farm for NUT CI -------------------------------------------------------------- - -Due to some historical reasons including earlier personal experience, -the Linux container setup implemented as described below was done with -persistent LXC containers wrapped by LIBVIRT for management. There was -no particular use-case for systems like Docker (and no firepower for a -Kubernetes cluster) in that the build environment intended for testing -non-regression against a certain release does not need to be regularly -updated -- its purpose is to be stale and represent what users still -running that system for whatever reason (e.g. embedded, IoT, corporate) -have in their environments. - -Common preparations -~~~~~~~~~~~~~~~~~~~ - -* Prepare LXC and LIBVIRT-LXC integration, including an "independent" - (aka "masqueraded) bridge for NAT, following https://wiki.debian.org/LXC - and https://wiki.debian.org/LXC/SimpleBridge -** For dnsmasq integration on the independent bridge (`lxcbr0` following - the documentation examples), be sure to mention: -*** `LXC_DHCP_CONFILE="/etc/lxc/dnsmasq.conf"` in `/etc/default/lxc-net` -*** `dhcp-hostsfile=/etc/lxc/dnsmasq-hosts.conf` in/as the content of - `/etc/lxc/dnsmasq.conf` -*** `touch /etc/lxc/dnsmasq-hosts.conf` which would list simple `name,IP` - pairs, one per line (so one per container) -*** `systemctl restart lxc-net` to apply config (is this needed after - setup of containers too, to apply new items before booting them?) - -* Install qemu with its `/usr/bin/qemu-*-static` and registration in - `/var/lib/binfmt` - -* Prepare an LVM partition (or preferably some other tech like ZFS) - as `/srv/libvirt` and create a `/srv/libvirt/rootfs` to hold the containers - -* Prepare `/home/abuild` on the host system (preferably in ZFS with - lightweight compression like lz4 -- and optionally, only if the amount - of available system RAM permits, with deduplication; otherwise avoid it); - account user and group ID numbers are `399` as on the rest of the CI farm - (historically, inherited from OBS workers) - -** It may help to generate an ssh key without a passphrase for `abuild` - that it would trust, to sub-login from CI agent sessions into the - container. Then again, it may be not required if CI logs into the - host by SSH using `authorized_keys` and an SSH Agent, and the inner - ssh client would forward that auth channel to the original agent. -+ ------- -abuild$ ssh-keygen -# accept defaults - -abuild$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys -abuild$ chmod 640 ~/.ssh/authorized_keys ------- - -* Edit the root (or whoever manages libvirt) `~/.profile` to default the - virsh provider with: -+ ------- -LIBVIRT_DEFAULT_URI=lxc:///system -export LIBVIRT_DEFAULT_URI ------- - -* If host root filesystem is small, relocate the LXC download cache to the - (larger) `/srv/libvirt` partition: -+ ------- -:; mkdir -p /srv/libvirt/cache-lxc -:; rm -rf /var/cache/lxc -:; ln -sfr /srv/libvirt/cache-lxc /var/cache/lxc ------- -** Maybe similarly relocate shared `/home/abuild` to reduce strain on rootfs? - - -Setup a container -~~~~~~~~~~~~~~~~~ - -Note that completeness of qemu CPU emulation varies, so not all distros -can be installed, e.g. "s390x" failed for both debian10 and debian11 to -set up the `openssh-server` package, or once even to run `/bin/true` (seems -to have installed an older release though, to match the outdated emulation?) - -While the `lxc-create` tool does not really specify the error cause and -deletes the directories after failure, it shows the pathname where it -writes the log (also deleted). Before re-trying the container creation, this -file can be watched with e.g. `tail -F /var/cache/lxc/.../debootstrap.log` - -[NOTE] -====== -You can find the list of LXC "template" definitions on your system -by looking at the contents of the `/usr/share/lxc/templates/` directory, -e.g. a script named `lxc-debian` for the "debian" template. You can see -further options for each "template" by invoking its help action, e.g.: ------- -:; lxc-create -t debian -h ------- -====== - -* Install containers like this: -+ ------- -:; lxc-create -P /srv/libvirt/rootfs \ - -n jenkins-debian11-mips64el -t debian -- \ - -r bullseye -a mips64el ------- -** to specify a particular mirror (not everyone hosts everything -- - so if you get something like - `"E: Invalid Release file, no entry for main/binary-mips/Packages"` - then see https://www.debian.org/mirror/list for details, and double-check - the chosen site to verify if the distro version of choice is hosted with - your arch of choice): -+ ------- -:; MIRROR="http://ftp.br.debian.org/debian/" \ - lxc-create -P /srv/libvirt/rootfs \ - -n jenkins-debian10-mips -t debian -- \ - -r buster -a mips ------- -** ...or for EOLed distros, use the archive, e.g.: -+ ------- -:; MIRROR="http://archive.debian.org/debian-archive/debian/" \ - lxc-create -P /srv/libvirt/rootfs \ - -n jenkins-debian8-s390x -t debian -- \ - -r jessie -a s390x ------- -** ...Alternatively, other distributions can be used (as supported by your - LXC scripts, typically in `/usr/share/debootstrap/scripts`), e.g. Ubuntu: -+ ------- -:; lxc-create -P /srv/libvirt/rootfs \ - -n jenkins-ubuntu1804-s390x -t ubuntu -- \ - -r bionic -a s390x ------- -** For distributions with a different packaging mechanism from that on the - LXC host system, you may need to install corresponding tools (e.g. `yum4`, - `rpm` and `dnf` on Debian hosts for installing CentOS and related guests). - You may also need to pepper with symlinks to taste (e.g. `yum => yum4`), - or find a `pacman` build to install Arch Linux or derivative, etc. - Otherwise, you risk seeing something like this: -+ ------- -root@debian:~# lxc-create -P /srv/libvirt/rootfs \ - -n jenkins-centos7-x86-64 -t centos -- \ - -R 7 -a x86_64 - -Host CPE ID from /etc/os-release: -'yum' command is missing -lxc-create: jenkins-centos7-x86-64: lxccontainer.c: - create_run_template: 1616 Failed to create container from template -lxc-create: jenkins-centos7-x86-64: tools/lxc_create.c: - main: 319 Failed to create container jenkins-centos7-x86-64 ------- -+ -Note also that with such "third-party" distributions you may face other - issues; for example, the CentOS helper did not generate some fields in - the `config` file that were needed for conversion into libvirt "domxml" - (as found by trial and error, and comparison to other `config` files): -+ ------- -lxc.uts.name = jenkins-centos7-x86-64 -lxc.arch = x86_64 ------- -+ -Also note the container/system naming without underscore in "x86_64" -- - the deployed system discards the character when assigning its hostname. - Using "amd64" is another reasonable choice here. - -* Add the "name,IP" line for this container to `/etc/lxc/dnsmasq-hosts.conf` - on the host, e.g.: -+ ------- -jenkins-debian11-mips,10.0.3.245 ------- -+ -NOTE: Don't forget to eventually `systemctl restart lxc-net` to apply the -new host reservation! - -* Convert a pure LXC container to be managed by LIBVIRT-LXC (and edit config - markup on the fly -- e.g. fix the LXC `dir:/` URL schema): -+ ------- -:; virsh -c lxc:///system domxml-from-native lxc-tools \ - /srv/libvirt/rootfs/jenkins-debian11-armhf/config \ - | sed -e 's,dir:/srv,/srv,' \ - > /tmp/x && virsh define /tmp/x ------- -+ -NOTE: You may want to tune the default generic 64MB RAM allocation, - so your launched QEMU containers are not OOM-killed as they exceeded - their memory `cgroup` limit. In practice they do not eat *that much* - resident memory, just want to have it addressable by VMM, I guess - (swap is not very used either), at least not until active builds - start (and then it depends on compiler appetite and `make` program - parallelism level you allow, e.g. by pre-exporting `MAXPARMAKES` - environment variable for `ci_build.sh`, and on the number of Jenkins - "executors" assigned to the build agent). -+ -** It may be needed to revert the generated "os/arch" to `x86_64` (and let - QEMU handle the rest) in the `/tmp/x` file, and re-try the definition: -+ ------- -:; virsh define /tmp/x ------- - -* Then execute `virsh edit jenkins-debian11-armhf` (and same for other - containers) to bind-mount the common `/home/abuild` location, adding - this tag to their "devices": -+ ------- - - - - ------- -** Note that generated XML might not conform to current LXC schema, so it - fails validation during save; this can be bypassed with `i` when it asks. - One such case was however with indeed invalid contents, the "dir:" schema - removed by example above. - - -Shepherd the herd -~~~~~~~~~~~~~~~~~ - -* Monitor deployed container rootfs'es with: -+ ------- -:; du -ks /srv/libvirt/rootfs/* ------- -+ -(should have non-trivial size for deployments without fatal infant errors) - -* Mass-edit/review libvirt configurations with: -+ ------- -:; virsh list --all | awk '{print $2}' \ - | grep jenkins | while read X ; do \ - virsh edit --skip-validate $X ; done ------- -** ...or avoid `--skip-validate` when markup is initially good :) - -* Mass-define network interfaces: -+ ------- -:; virsh list --all | awk '{print $2}' \ - | grep jenkins | while read X ; do \ - virsh dumpxml "$X" | grep "bridge='lxcbr0'" \ - || virsh attach-interface --domain "$X" --config \ - --type bridge --source lxcbr0 ; \ - done ------- - -* Verify that unique MAC addresses were defined (e.g. `00:16:3e:00:00:01` - tends to pop up often, while `52:54:00:xx:xx:xx` are assigned to other - containers); edit the domain definitions to randomize, if needed: -+ ------- -:; grep 'mac add' /etc/libvirt/lxc/*.xml | awk '{print $NF" "$1}' | sort ------- - -* Make sure at least one console device exists (end of file, under the - network interface definition tags), e.g.: -+ ------- - - - ------- - -* Populate with `abuild` account, as well as with the `bash` shell and - `sudo` ability, reporting of assigned IP addresses on the console, - and SSH server access complete with envvar passing from CI clients - by virtue of `ssh -o SendEnv='*' container-name`: -+ ------- -:; for ALTROOT in /srv/libvirt/rootfs/*/rootfs/ ; do \ - echo "=== $ALTROOT :" >&2; \ - grep eth0 "$ALTROOT/etc/issue" || ( printf '%s %s\n' \ - '\S{NAME} \S{VERSION_ID} \n \l@\b ;' \ - 'Current IP(s): \4{eth0} \4{eth1} \4{eth2} \4{eth3}' \ - >> "$ALTROOT/etc/issue" ) ; \ - grep eth0 "$ALTROOT/etc/issue.net" || ( printf '%s %s\n' \ - '\S{NAME} \S{VERSION_ID} \n \l@\b ;' \ - 'Current IP(s): \4{eth0} \4{eth1} \4{eth2} \4{eth3}' \ - >> "$ALTROOT/etc/issue.net" ) ; \ - groupadd -R "$ALTROOT" -g 399 abuild ; \ - useradd -R "$ALTROOT" -u 399 -g abuild -M -N -s /bin/bash abuild \ - || useradd -R "$ALTROOT" -u 399 -g 399 -M -N -s /bin/bash abuild \ - || { if ! grep -w abuild "$ALTROOT/etc/passwd" ; then \ - echo 'abuild:x:399:399::/home/abuild:/bin/bash' \ - >> "$ALTROOT/etc/passwd" ; \ - echo "USERADDed manually: passwd" >&2 ; \ - fi ; \ - if ! grep -w abuild "$ALTROOT/etc/shadow" ; then \ - echo 'abuild:!:18889:0:99999:7:::' >> "$ALTROOT/etc/shadow" ; \ - echo "USERADDed manually: shadow" >&2 ; \ - fi ; \ - } ; \ - if [ -s "$ALTROOT/etc/ssh/sshd_config" ]; then \ - grep 'AcceptEnv \*' "$ALTROOT/etc/ssh/sshd_config" || ( \ - ( echo "" ; \ - echo "# For CI: Allow passing any envvars:"; \ - echo 'AcceptEnv *' ) \ - >> "$ALTROOT/etc/ssh/sshd_config" \ - ) ; \ - fi ; \ - done ------- -+ -Note that for some reason, in some of those other-arch distros `useradd` -fails to find the group anyway; then we have to "manually" add them. - -* Let the host know and resolve the names/IPs of containers you assigned: -+ ------- -:; grep -v '#' /etc/lxc/dnsmasq-hosts.conf \ - | while IFS=, read N I ; do \ - getent hosts "$N" >&2 || echo "$I $N" ; \ - done >> /etc/hosts ------- - -Further setup of the containers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -See NUT `docs/config-prereqs.txt` about dependency package installation -for Debian-based Linux systems. - -It may be wise to not install e.g. documentation generation tools (or at -least not the full set for HTML/PDF generation) in each environment, in -order to conserve space and run-time stress. - -Still, if there are significant version outliers (such as using an older -distribution due to vCPU requirements), it can be installed fully just -to ensure non-regression -- e.g. that when adapting `Makefile` rule -definitions or compiler arguments to modern toolkits, we do not lose -the ability to build with older ones. - -For this, `chroot` from the host system can be used, e.g. to improve the -interactive usability for a population of Debian(-compatible) containers -(and to use its networking, while the operating environment in containers -may be not yet configured or still struggling to access the Internet): ------- -:; for ALTROOT in /srv/libvirt/rootfs/*/rootfs/ ; do \ - echo "=== $ALTROOT :" ; \ - chroot "$ALTROOT" apt-get install \ - sudo bash vim mc p7zip p7zip-full pigz pbzip2 git \ - ; done ------- - -Similarly for `yum`-managed systems (CentOS and relatives), though specific -package names can differ, and additional package repositories may need to -be enabled first (see link:config-prereqs.txt[config-prereqs.txt] for more -details such as recommended package names). - -Note that technically `(sudo) chroot ...` can also be used from the CI worker -account on the host system to build in the prepared filesystems without the -overhead of running containers as complete operating environments with any -standard services and several copies of Jenkins `agent.jar` in them. - -Also note that externally-driven set-up of some packages, including the -`ca-certificates` and the JDK/JRE, require that the `/proc` filesystem -is usable in the chroot environment. This can be achieved with e.g.: ------- -:; for ALTROOT in /srv/libvirt/rootfs/*/rootfs/ ; do \ - for D in proc ; do \ - echo "=== $ALTROOT/$D :" ; \ - mkdir -p "$ALTROOT/$D" ; \ - mount -o bind,rw "/$D" "$ALTROOT/$D" ; \ - done ; \ - done ------- - -TODO: Test and document a working NAT and firewall setup for this, to allow -SSH access to the containers via dedicated TCP ports exposed on the host. - - -Troubleshooting -~~~~~~~~~~~~~~~ - -* Q: Container won't start, its `virsh console` says something like: -+ ------- -Failed to create symlink /sys/fs/cgroup/net_cls: Operation not permitted ------- -A: According to https://bugzilla.redhat.com/show_bug.cgi?id=1770763 - (skip to the end for summary) this can happen when a newer Linux - host system with `cgroupsv2` capabilities runs an older guest distro - which only knows about `cgroupsv1`, such as when hosting a CentOS 7 - container on a Debian 11 server. -** One workaround is to ensure that the guest `systemd` does not try to - "join" host facilities, by setting an explicit empty list for that: -+ ------- -:; echo 'JoinControllers=' >> "$ALTROOT/etc/systemd/system.conf" ------- -** Another approach is to upgrade `systemd` related packages in the guest - container. This may require additional "backport" repositories or - similar means, possibly maintained not by distribution itself but by - other community members, and arguably would logically compromise the - idea of non-regression builds in the old environment "as is". - -* Q: Server was set up with ZFS as recommended, and lots of I/O hit the - disk even when application writes are negligible -+ -A: This was seen on some servers and generally derives from data layout - and how ZFS maintains the tree structure of blocks. A small application - write (such as a new log line) means a new empty data block allocation, - an old block release, and bubble up through the whole metadata tree to - complete the transaction (grouped as TXG to flush to disk). -+ -** One solution is to use discardable build workspaces in RAM-backed - storage like `/dev/shm` (`tmpfs`) on Linux, or `/tmp` (`swap`) on - illumos hosting systems, and only use persistent storage for the home - directory with `.ccache` and `.gitcache-dynamatrix` directories. -** Another solution is to reduce the frequency of TXG sync from modern - default of 5 sec to conservative 30-60 sec. Check how to set the - `zfs_txg_timeout` on your platform. - - -Connecting Jenkins to the containers ------------------------------------- - -To properly cooperate with the -https://github.com/networkupstools/jenkins-dynamatrix[jenkins-dynamatrix] -project driving regular NUT CI builds, each build environment should be -exposed as an individual agent with labels describing its capabilities. - -Agent Labels -~~~~~~~~~~~~ - -With the `jenkins-dynamatrix`, agent labels are used to calculate a large -"slow build" matrix to cover numerous scenarios for what can be tested -with the current population of the CI farm, across operating systems, -`make`, shell and compiler implementations and versions, and C/C++ language -revisions, to name a few common "axes" involved. - -Labels for QEMU -^^^^^^^^^^^^^^^ - -Emulated-CPU container builds are CPU-intensive, so for them we define as -few capabilities as possible: here CI is more interested in checking how -binaries behave on those CPUs, *not* in checking the quality of recipes -(distcheck, Make implementations, etc.), shell scripts or documentation, -which is more efficient to test on native platforms. - -Still, we are interested in results from different compiler suites, so -specify at least one version of each. - -NOTE: Currently the NUT `Jenkinsfile-dynamatrix` only looks at various -`COMPILER` variants for `qemu-nut-builder` use-cases, disregarding the -versions and just using one that the environment defaults to. - -The reduced set of labels for QEMU workers looks like: - ------- -qemu-nut-builder qemu-nut-builder:alldrv -NUT_BUILD_CAPS=drivers:all NUT_BUILD_CAPS=cppunit -OS_FAMILY=linux OS_DISTRO=debian11 GCCVER=10 CLANGVER=11 -COMPILER=GCC COMPILER=CLANG -ARCH64=ppc64le ARCH_BITS=64 ------- - -Labels for native builds -^^^^^^^^^^^^^^^^^^^^^^^^ - -For contrast, a "real" build agent's set of labels, depending on -presence or known lack of some capabilities, looks something like this: ------- -doc-builder nut-builder nut-builder:alldrv -NUT_BUILD_CAPS=docs:man NUT_BUILD_CAPS=docs:all -NUT_BUILD_CAPS=drivers:all NUT_BUILD_CAPS=cppunit=no -OS_FAMILY=bsd OS_DISTRO=freebsd12 GCCVER=10 CLANGVER=10 -COMPILER=GCC COMPILER=CLANG -ARCH64=amd64 ARCH_BITS=64 -SHELL_PROGS=sh SHELL_PROGS=dash SHELL_PROGS=zsh SHELL_PROGS=bash -SHELL_PROGS=csh SHELL_PROGS=tcsh SHELL_PROGS=busybox -MAKE=make MAKE=gmake -PYTHON=python2.7 PYTHON=python3.8 ------- - -Generic agent attributes -~~~~~~~~~~~~~~~~~~~~~~~~ - -* Name: e.g. `ci-debian-altroot--jenkins-debian10-arm64` (note the - pattern for "Conflicts With" detailed below) - -* Remote root directory: preferably unique per agent, to avoid surprises; - e.g.: `/home/abuild/jenkins-nut-altroots/jenkins-debian10-armel` -** Note it may help that the system home directory itself is shared between - co-located containers, so that the `.ccache` or `.gitcache-dynamatrix` - are available to all builders with identical contents -** If RAM permits, the Jenkins Agent working directory may be placed in - a temporary filesystem not backed by disk (e.g. `/dev/shm` on modern - Linux distributions); roughly estimate 300Mb per executor for NUT builds. - -* Usage: "Only build jobs with label expressions matching this node" - -* Node properties / Environment variables: - -** `PATH+LOCAL` => `/usr/lib/ccache` - -Where to run agent.jar -~~~~~~~~~~~~~~~~~~~~~~ - -Depending on circumstances of the container, there are several options -available to the NUT CI farm: - -* Java can run in the container, efficiently (native CPU, different distro) - => the container may be exposed as a standalone host for direct SSH access - (usually by NAT, exposing SSH on a dedicated port of the host; or by first - connecting the Jenkins controller with the host as an SSH Build Agent, and - then calling SSH to the container as a prefix for running the agent; or - by using Jenkins Swarm agents), so ultimately the build `agent.jar` JVM - would run in the container. - Filesystem for the `abuild` account may be or not be shared with the host. - -* Java can not run in the container (crashes on emulated CPU, or is too old - in the agent container's distro -- currently Jenkins requires JRE 8+, but - eventually will require 11+) => the agent would run on the host, and then - the host would `ssh` or `chroot` (networking not required, but bind-mount - of `/home/abuild` and maybe other paths from host would be needed) called - for executing `sh` steps in the container environment. Either way, home - directory of the `abuild` account is maintained on the host and shared with - the guest environment, user and group IDs should match. - -* Java is inefficient in the container (operations like un-stashing the source - succeed but take minutes instead of seconds) => either of the above - -Using Jenkins SSH Build Agents -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This is a typical use-case for tightly integrated build farms under common -management, where the Jenkins controller can log by SSH into systems which -act as its build agents. It injects and launches the `agent.jar` to execute -child processes for the builds, and maintains a tunnel to communicate. - -Methods below involving SSH assume that you have configured a password-less -key authentication from the host machine to the `abuild` account in each -guest build environment container. -This can be an `ssh-keygen` result posted into `authorized_keys`, or a -trusted key passed by a chain of ssh agents from a Jenkins Credential -for connection to the container-hoster into the container. -The private SSH key involved may be secured by a pass-phrase, as long as -your Jenkins Credential storage knows it too. -Note that for the approaches explored below, the containers are not -directly exposed for log-in from any external network. - -* For passing the agent through an SSH connection from host to container, - so that the `agent.jar` runs inside the container environment, configure: - -** Launch method: "Agents via SSH" - -** Host, Credentials, Port: as suitable for accessing the container-hoster -+ -NOTE: The container-hoster should have accessed the guest container from - the account used for intermediate access, e.g. `abuild`, so that its - `.ssh/known_hosts` file would trust the SSH server on the container. - -** Prefix Start Agent Command: content depends on the container name, - but generally looks like the example below to report some info about - the final target platform (and make sure `java` is usable) in the - agent's log. Note that it ends with un-closed quote and a space char: -+ ------- -ssh jenkins-debian10-amd64 '( java -version & uname -a ; getconf LONG_BIT; getconf WORD_BIT; wait ) && ------- - -** Suffix Start Agent Command: a single quote to close the text opened above: ------- -' ------- - - -* The other option is to run the `agent.jar` on the host, for all the - network and filesystem magic the agent does, and only execute shell - steps in the container. The solution relies on overridden `sh` step - implementation in the `jenkins-dynamatrix` shared library that uses a - magic `CI_WRAP_SH` environment variable to execute a pipe into the - container. Such pipes can be `ssh` or `chroot` with appropriate host - setup described above. -+ -NOTE: In case of ssh piping, remember that the container's - `/etc/ssh/sshd_config` should `AcceptEnv *` and the SSH - server should be restarted after such configuration change. - -** Launch method: "Agents via SSH" - -** Host, Credentials, Port: as suitable for accessing the container-hoster - -** Prefix Start Agent Command: content depends on the container name, - but generally looks like the example below to report some info about - the final target platform (and make sure it is accessible) in the - agent's log. Note that it ends with a space char, and that the command - here should not normally print anything into stderr/stdout (this tends - to confuse the Jenkins Remoting protocol): -+ ------- -echo PING > /dev/tcp/jenkins-debian11-ppc64el/22 && ------- - -** Suffix Start Agent Command: empty - -* Node properties / Environment variables: - -** `CI_WRAP_SH` => -+ ------- -ssh -o SendEnv='*' "jenkins-debian11-ppc64el" /bin/sh -xe ------- - -Using Jenkins Swarm Agents -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This approach allows remote systems to participate in the NUT CI farm by -dialing in and so defining an agent. A single contributing system may be -running a number of containers or virtual machines set up following the -instructions above, and each of those would be a separate build agent. - -Such systems should be "dedicated" to contribution in the sense that -they should be up and connected for days, and sometimes tasks would land. - -Configuration files maintained on the Swarm Agent system dictate which -labels or how many executors it would expose, etc. Credentials to access -the NUT CI farm Jenkins controller to register as an agent should be -arranged with the farm maintainers, and currently involve a GitHub account -with Jenkins role assignment for such access, and a token for authentication. - -The https://github.com/networkupstools/jenkins-swarm-nutci[jenkins-swarm-nutci] -repository contains example code from such setup with a back-up server -experiment for the NUT CI farm, including auto-start method scripts for -Linux systemd and upstart, illumos SMF, and OpenBSD rcctl. - -Sequentializing the stress -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Running one agent at a time -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Another aspect of farm management is that emulation is a slow and intensive -operation, so we can not run all agents and execute builds at the same time. - -The current solution relies on -https://github.com/jimklimov/conflict-aware-ondemand-retention-strategy-plugin -to allow co-located build agents to "conflict" with each other -- when one -picks up a job from the queue, it blocks neighbors from starting; when it -is done, another may start. - -Containers can be configured with "Availability => On demand", with shorter -cycle to switch over faster (the core code sleeps a minute between attempts): - -* In demand delay: `0`; - -* Idle delay: `0` (Jenkins may change it to `1`); - -* Conflicts with: `^ci-debian-altroot--.*$` assuming that is the pattern - for agent definitions in Jenkins -- not necessarily linked to hostnames. - -Also, the "executors" count should be reduced to the amount of compilers -in that system (usually 2) and so avoid extra stress of scheduling too many -emulated-CPU builds at once. - -Sequentializing the git cache access -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -As part of the `jenkins-dynamatrix` optional optimizations, the NUT CI -recipe invoked via `Jenkinsfile-dynamatrix` maintains persistent git -reference repositories that can be used to cache NUT codebase (including -the tested commits) and so considerably speed up workspace preparation -when running numerous build scenarios on the same agent. - -Such `.gitcache-dynamatrix` cache directories are located in the build -workspace location (unique for each agent), but on a system with numerous -containers these names can be symlinks pointing to a shared location. - -To avoid collisions with several executors updating the same cache with -new commits, critical access windows are sequentialized with the use of -https://github.com/jenkinsci/lockable-resources-plugin[Lockable Resources -plugin]. On the `jenkins-dynamatrix` side this is facilitated by labels: ------- -DYNAMATRIX_UNSTASH_PREFERENCE=scm-ws:nut-ci-src -DYNAMATRIX_REFREPO_WORKSPACE_LOCKNAME=gitcache-dynamatrix:SHARED_HYPERVISOR_NAME ------- - -* The `DYNAMATRIX_UNSTASH_PREFERENCE` tells the `jenkins-dynamatrix` library - code which checkout/unstash strategy to use on a particular build agent - (following values defined in the library; `scm-ws` means SCM caching - under the agent workspace location, `nut-ci-src` names the cache for - this project); -* The `DYNAMATRIX_REFREPO_WORKSPACE_LOCKNAME` specifies a semi-unique - string: it should be same for all co-located agents which use the same - shared cache location, e.g. guests on the same hypervisor; and it should - be different for unrelated cache locations, e.g. different hypervisors - and stand-alone machines. diff --git a/docs/config-notes.txt b/docs/config-notes.txt index a87ae50..62983b5 100644 --- a/docs/config-notes.txt +++ b/docs/config-notes.txt @@ -13,8 +13,8 @@ NOTE: NUT does not currently provide proper graphical configuration tools. However, there is now support for linkdoc:developer-guide[Augeas,augeas_user], which will enable the easier creation of configuration tools. Moreover, linkman:nut-scanner[8] is available to discover supported devices -(USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi or the -classic connection method). +(USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi or the classic +connection method). Details about the configuration files ------------------------------------- @@ -104,7 +104,7 @@ quotes spanning multiple lines. Basic configuration ------------------- -This chapter describes the base configuration to establish communication with +This chapter describe the base configuration to establish communication with the device. This will be sufficient for PDU. But for UPS and SCD, you will also need to @@ -112,35 +112,21 @@ configure <>. image:images/simple.png[] -On operating systems with service management frameworks (such as Linux -systemd and Solaris/illumos SMF), the life-cycle of driver, data server -and monitoring client daemons is managed respectively by `nut-driver` -(multi-instance service), `nut-server` and `nut-monitor` services. -These are in turn wrapped by an "umbrella" service (or systemd "target") -conveniently called `nut` which allows to easily start or stop all those -of the bundled services, which are enabled on a particular deployment. - [[Driver_configuration]] Driver configuration ~~~~~~~~~~~~~~~~~~~~ -Create one section per UPS in 'ups.conf' +Create one section per UPS in /usr/local/ups/etc/ups.conf -NOTE: The default path for a source installation is `/usr/local/ups/etc`, -while packaged installation will vary. -For example, `/etc/nut` is used on Debian and derivatives, -while `/etc/ups` or `/etc/upsd` is used on RedHat and derivatives. - -To find out which driver to use, check the -<>, -or `data/driver.list(.in)` source file. +To find out which driver to use, check the <>, +or data/driver.list. Once you have picked a driver, create a section for your UPS in -'ups.conf'. You must supply values at least for "driver" and "port". +ups.conf. You must supply values for "driver" and "port". Some drivers may require other flags or settings. The "desc" value is optional, but is recommended to provide a better description of -what useful load your UPS is feeding. +what your UPS is supporting. A typical device without any extra settings looks like this: @@ -149,29 +135,19 @@ A typical device without any extra settings looks like this: port = /dev/ttyS1 desc = "Workstation" -[NOTE] -====== -USB drivers (such as `usbhid-ups` for non-SHUT mode, `nutdrv_qx` for -non-serial mode, `bcmxcp_usb`, `tripplite_usb`, `blazer_usb`, `riello_usb` -and `richcomm_usb`) are special cases and ignore the 'port' value. - +NOTE: USB drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, blazer_usb and +richcomm_usb) are special cases and ignore the 'port' value. You must still set this value, but it does not matter what you set -it to; a common and good practice is to set 'port' to *auto*, but you -can put whatever you like. - -If you only own one USB UPS, the driver will find it automatically. - -If you own more than one, refer to the driver's manual page for more -information on matching a specific device. -====== +it to; a common and good practice is to set 'port' to *auto*, but you can +put whatever you like. If you only own one UBS UPS, the driver will +find it automatically. If you own more than one, refer to the driver's +manual page for more information on matching a specific device. References: linkman:ups.conf[5], linkman:nutupsdrv[8], linkman:bcmxcp_usb[8], linkman:blazer[8], -linkman:nutdrv_qx[8], linkman:richcomm_usb[8], -linkman:riello_usb[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] @@ -180,17 +156,16 @@ linkman:usbhid-ups[8] Starting the driver(s) ~~~~~~~~~~~~~~~~~~~~~~ -Generally, you can just start the driver(s) for your hardware (all sections -defined in 'ups.conf') using the following command: +Start the driver(s) for your hardware: - upsdrvctl start + /usr/local/ups/sbin/upsdrvctl start Make sure the driver doesn't report any errors. It should show a few details about the hardware and then enter the background. You should get back to the command prompt a few seconds later. For reference, a successful start of the `usbhid-ups` driver looks like this: - # upsdrvctl start + # /usr/local/ups/sbin/upsdrvctl start Network UPS Tools - Generic HID driver 0.34 (2.4.1) USB communication driver 0.31 Using subdriver: MGE HID 1.12 @@ -198,96 +173,29 @@ reference, a successful start of the `usbhid-ups` driver looks like this: If the driver doesn't start cleanly, make sure you have picked the right one for your hardware. You might need to try other drivers -by changing the "driver=" value in 'ups.conf'. +by changing the "driver=" value in ups.conf. Be sure to check the driver's man page to see if it needs any extra -settings in 'ups.conf' to detect your hardware. +settings in `ups.conf` to detect your hardware. If it says `can't bind /var/state/ups/...` or similar, then your state path probably isn't writable by the driver. Check the -<> vs. the -user account your driver starts as. +<>. -After making changes, try the <> -step again. +After making changes, try the <> step again. -Driver(s) as a service -~~~~~~~~~~~~~~~~~~~~~~ - -On operating systems with init-scripts managing life-cycle of the operating -environment, the `upsdrvctl` program is also commonly used in those scripts. -It has a few downsides, such as that if the device was not accessible during -OS startup and the driver connection timed out, it would remain not-started -until an administrator (or some other script) "kicks" the driver to retry -startup. Also, startup of the `upsd` data server daemon and its clients -like `upsmon` is delayed until all the NUT drivers complete their startup -(or time out trying). - -This can be a big issue on systems which monitor multiple devices, such as -big servers with multiple power sources, or administrative workstations -which monitor a datacenter full of UPSes. - -For this reason, NUT starting with version 2.8.0 supports startup of its -drivers as independent instances of a `nut-driver` service under the Linux -systemd and Solaris/illumos SMF service-management frameworks (corresponding -files and scripts may be not pre-installed in packaging for other systems). - -Such service instances have their own and independent life-cycle, including -parallel driver start and stop processing, and retries of startup in case of -failure as implemented by the service framework in the OS. The Linux systemd -solution also includes a `nut-driver.target` as a checkpoint that all defined -drivers have indeed started up (as well as being a singular way to enable or -disable startup of drivers). - -In both cases, a service named `nut-driver-enumerator` is registered, and -when it is (re-)started it scans the currently defined device sections in -'ups.conf' and the currently defined instances of `nut-driver` service, -and brings them in sync (adding or removing service instances), and if -there were changes -- it restarts the corresponding drivers (via service -instances) as well as the data server which only reads the list of sections -at its startup. This helper service should be triggered whenever your system -(re-)starts the `nut-server` service, so that it runs against an up-to-date -list of NUT driver processes. - -A service-oriented solution also allows to consider that different drivers -have different dependencies -- such as that networked drivers should begin -startup after IP addresses have been assigned, while directly-connected -devices might need nothing beside a mounted filesystem (or an activated -USB stack service or device rule, in case of Linux). Likewise, systems -administrators can define further local dependencies between services and -their instances as needed on particular deployments. - -This solution also adds the `upsdrvsvcctl` script to manage NUT drivers as -system service instances, whose CLI mimics that of `upsdrvctl` program. -One addition is the `resync` argument to trigger `nut-driver-enumerator`, -another is a `list` argument to display current mappings of service -instances to NUT driver sections. Also, original tool's arguments such -as the `-u` (user to run the driver as) or `-D` (debug of the driver) -do not make sense in the service context -- the accounts to use and -other arguments to the driver process are part of service setup (and -an administrator can manage it there). - -Note that while this solution tries to register service instances with same -names as NUT configuration sections for the devices, this can not always be -possible due to constraints such as syntax supported by a particular service -management framework. In this case, the enumerator falls back to MD5 hashes -of such section names, and the `upsdrvsvcctl` script supports this to map -the user-friendly NUT configuration section names to actual service names -that it would manage. - -References: man pages: linkman:nutupsdrv[8], linkman:upsdrvctl[8], -linkman:upsdrvsvcctl[8] +References: man pages: linkman:nutupsdrv[8], linkman:upsdrvctl[8] Data server configuration (upsd) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Configure `upsd`, which serves data from the drivers to the clients. +Configure upsd, which serves data from the drivers to the clients. -First, edit 'upsd.conf' to allow access to your client systems. By -default, `upsd` will only listen to `localhost` port 3493/tcp. If you want +First, edit upsd.conf to allow access to your client systems. By +default, upsd will only listen to localhost port 3493/tcp. If you want to connect to it from other machines, you must specify each interface you -want `upsd` to listen on for connections, optionally with a port number. +want upsd to listen on for connections, optionally with a port number. LISTEN 127.0.0.1 3493 LISTEN ::1 3493 @@ -295,15 +203,15 @@ want `upsd` to listen on for connections, optionally with a port number. NOTE: Refer to the NUT user manual <> for information on how to access and secure upsd clients connections. -Next, create 'upsd.users'. For now, this can be an empty file. +Next, create upsd.users. For now, this can be an empty file. You can come back and add more to it later when it's time to -configure `upsmon` or run one of the management tools. +configure upsmon or run one of the management tools. Do not make either file world-readable, since they both hold access control data and passwords. They just need to be readable by the user you created in the preparation process. -The suggested configuration is to `chown` it to `root`, `chgrp` it to the +The suggested configuration is to chown it to root, chgrp it to the group you created, then make it readable by the group. chown root:nut upsd.conf upsd.users @@ -319,36 +227,26 @@ Starting the data server Start the network data server: - upsd + /usr/local/ups/sbin/upsd Make sure it is able to connect to the driver(s) on your system. A successful run looks like this: - # upsd + # /usr/local/ups/sbin/upsd Network UPS Tools upsd 2.4.1 listening on 127.0.0.1 port 3493 listening on ::1 port 3493 Connected to UPS [eaton]: usbhid-ups-eaton -`upsd` prints dots while it waits for the driver to respond. Your +upsd prints dots while it waits for the driver to respond. Your system may print more or less depending on how many drivers you have and how fast they are. -NOTE: If `upsd` says that it can't connect to a UPS or that the data -is stale, then your 'ups.conf' is not configured correctly, or you +NOTE: if upsd says that it can't connect to a UPS or that the data +is stale, then your ups.conf is not configured correctly, or you have a driver that isn't working properly. You must fix this before going on to the next step. -NOTE: Normally `upsd` requires that at least one driver section is -defined in the 'ups.conf' file, and refuses to start otherwise. -If you intentionally do not have any driver sections defined (yet) -but still want the data server to run, respond and report zero devices -(e.g. on an automatically managed monitoring deployment), you can enable -the `ALLOW_NO_DEVICE true` option in the 'upsd.conf' file. - -On operating systems with service management frameworks, the data server -life-cycle is managed by `nut-server` service. - Reference: man page: linkman:upsd[8] Check the UPS data @@ -358,16 +256,15 @@ Status data ^^^^^^^^^^^ Make sure that the UPS is providing good status data. -You can use the `upsc` command-line client for this: - upsc myupsname@localhost ups.status + /usr/local/ups/bin/upsc myupsname@localhost ups.status You should see just one line in response: OL -`OL` means your system is running on line power. If it says something -else (like `OB` -- on battery, or `LB` -- low battery), your driver was +OL means your system is running on line power. If it says something +else (like OB - on battery, or LB - low battery), your driver was probably misconfigured during the <> step. If you reconfigure the driver, use `upsdrvctl stop` to stop it, then start it again as shown in the <> step. @@ -380,11 +277,11 @@ All data Look at all of the status data which is being monitored. - upsc myupsname@localhost + /usr/local/ups/bin/upsc myupsname@localhost What happens now depends on the kind of device and driver you have. -In the list, you should see `ups.status` with the same value you got -above. A sample run on an UPS (Eaton Ellipse MAX 1100) looks like this: +In the list, you should see ups.status with the same value you got +above. A sample run on a UPS (Eaton Ellipse MAX 1100) looks like this: battery.charge: 100 battery.charge.low: 20 @@ -440,15 +337,8 @@ Startup scripts NOTE: This step is not necessary if you installed from packages. -Edit your startup scripts, and make sure `upsdrvctl` and `upsd` are run -every time your system starts. In newer versions of NUT, you may have a -'nut.conf' file which sets the `MODE` variable for bundled init-scripts, -to facilitate enabling of certain features in the specific end-user -deployments. - -If you installed from source, check the `scripts` directory for reference -init-scripts, as well as systemd or SMF service methods and manifests. - +Edit your startup scripts, and make sure upsdrvctl and upsd are run every time +your system starts. [[UPS_shutdown]] Configuring automatic shutdowns for low battery events @@ -466,95 +356,59 @@ Shutdown design When your UPS batteries get low, the operating system needs to be brought down cleanly. Also, the UPS load should be turned off so that all devices -that are attached to it are forcibly rebooted, and subsequently start in -the predictable order and state suitable for your data center. +that are attached to it are forcibly rebooted. -Here are the steps that occur when a critical power event happens, -for the simpler case of one UPS device feeding one or several systems: +Here are the steps that occur when a critical power event happens: 1. The UPS goes on battery -2. The UPS reaches low battery (a "critical" UPS), that is to say, - `upsc` displays: +2. The UPS reaches low battery (a "critical" UPS), that is to say + upsc displays: + ups.status: OB LB + -The exact behavior depends on the specific device, and is related to -such settings and readings as: +The exact behavior depends on the specific device, and is related to: - - `battery.charge` and `battery.charge.low` - - `battery.runtime` and `battery.runtime.low` + - battery.charge and battery.charge.low + - battery.runtime and battery.runtime.low -3. The `upsmon` primary notices the "critical UPS" situation and sets - "FSD" -- the "forced shutdown" flag to tell all secondary systems - that it will soon power down the load. +3. The upsmon master notices and sets "FSD" - the "forced shutdown" + flag to tell all slave systems that it will soon power down the load. + -[WARNING] -========= -By design, since we require power-cycling the load and don't -want some systems to be powered off while others remain running -if the "wall power" returns at the wrong moment as usual, the "FSD" -flag can not be removed from the data server unless its daemon is -restarted. If we do take the first step in critical mode, then we -intend to go all the way -- shut down all the servers gracefully, -and power down the UPS. +(If you have no slaves, skip to step 6) -Keep in mind that some UPS devices and corresponding drivers would -latch the "FSD" again even if "wall power" is available, but the -remaining battery charge is below a threshold configured as "safe" -in the device (usually if you manually power on the UPS after a long -power outage). This is by design of respective UPS vendors, since -in such situation they can not guarantee that if a new power outage -happens, their UPS would safely shut down your systems again. -So it is deemed better and safer to stay dark until batteries -become sufficiently charged. -========= -+ -(If you have no secondary systems, skip to step 6) +4. upsmon slave systems see "FSD" and: -4. `upsmon` secondary systems see "FSD" and: + - generate a NOTIFY_SHUTDOWN event + - wait FINALDELAY seconds - typically 5 + - call their SHUTDOWNCMD + - disconnect from upsd - - generate a `NOTIFY_SHUTDOWN` event - - wait `FINALDELAY` seconds -- typically `5` - - call their `SHUTDOWNCMD` - - disconnect from `upsd` +5. The upsmon master system waits up to HOSTSYNC seconds (typically 15) + for the slaves to disconnect from upsd. If any are connected after + this time, upsmon stops waiting and proceeds with the shutdown + process. -5. The `upsmon` primary system waits up to `HOSTSYNC` seconds (typically `15`) - for the secondary systems to disconnect from `upsd`. If any are still - connected after this time, `upsmon` primary stops waiting and proceeds - with the shutdown process. +6. The upsmon master: -6. The `upsmon` primary: + - generates a NOTIFY_SHUTDOWN event + - waits FINALDELAY seconds - typically 5 + - creates the POWERDOWNFLAG file - usually /etc/killpower + - calls the SHUTDOWNCMD - - generates a `NOTIFY_SHUTDOWN` event - - waits `FINALDELAY` seconds -- typically `5` - - creates the `POWERDOWNFLAG` file in its local filesystem -- - usually `/etc/killpower` - - calls the `SHUTDOWNCMD` - -7. On most systems, `init` takes over, kills your processes, syncs and +7. On most systems, init takes over, kills your processes, syncs and unmounts some filesystems, and remounts some read-only. -8. `init` then runs your shutdown script. This checks for the - `POWERDOWNFLAG`, finds it, and tells the UPS driver(s) to power off - the load by sending commands to the connected UPS device(s) they manage. +8. init then runs your shutdown script. This checks for the + POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off + the load. -9. All the systems lose power. +9. The system loses power. 10. Time passes. The power returns, and the UPS switches back on. 11. All systems reboot and go back to work. -/////////////////////////////////// -https://github.com/networkupstools/nut/issues/1370 - -TODO: Check other docs and code to spell out expected behavior with -multiple UPS devices (when not all of them go critical or even on battery) -and servers with multiple inputs. - -Does the `upsmon` primary system power-cycle a "critical" UPS if that -is not the only one feeding it, so it is not shutting down now? -/////////////////////////////////// How you set it up ~~~~~~~~~~~~~~~~~ @@ -563,48 +417,42 @@ How you set it up NUT user creation ^^^^^^^^^^^^^^^^^ -Create a `upsd` user for `upsmon` to use while monitoring this UPS. +Create a upsd user for upsmon to use while monitoring this UPS. -Edit 'upsd.users' and create a new section. The `upsmon` will connect -to `upsd` and use these user name (in brackets) and password to -authenticate (as specified in its configuration via `MONITOR` line). - -This example is for defining a user called "monuser": +Edit upsd.users and create a new section. upsmon will connect +to upsd and use this user name (in brackets) and password to +authenticate. This example is for a user called "monuser": [monuser] password = mypass - upsmon primary - # or upsmon secondary + upsmon master + # or upsmon slave References: linkman:upsd[8], linkman:upsd.users[5] Reloading the data server ^^^^^^^^^^^^^^^^^^^^^^^^^ -Reload `upsd`. Depending on your configuration, you may be able to -do this without stopping the `upsd` daemon process: +Reload upsd. Depending on your configuration, you may be able to +do this without stopping upsd: - upsd -c reload + /usr/local/ups/sbin/upsd -c reload If that doesn't work (check the syslog), just restart it: - upsd -c stop - upsd + /usr/local/ups/sbin/upsd -c stop + /usr/local/ups/sbin/upsd -For systems with integrated service management (Linux systemd, -illumos/Solaris SMF) their corresponding `reload` or `refresh` -service actions should handle this as well. - -NOTE: If you want to make reloading work later, see the entry in the -link:FAQ.html[FAQ] about starting `upsd` as a different user. +NOTE: if you want to make reloading work later, see the entry in the +link:FAQ.html[FAQ] about starting upsd as a different user. Power Off flag file ^^^^^^^^^^^^^^^^^^^ -Set the `POWERDOWNFLAG` location for `upsmon`. +Set the POWERDOWNFLAG location for upsmon. -In 'upsmon.conf', add a `POWERDOWNFLAG` directive with a filename. -The `upsmon` will create this file when the UPS needs to be powered off +In upsmon.conf, add a POWERDOWNFLAG directive with a filename. +upsmon will create this file when the UPS needs to be powered off during a power failure when low battery is reached. We will test for the presence of this file in a later step. @@ -617,79 +465,68 @@ linkman:upsmon.conf[5] Securing upsmon.conf ^^^^^^^^^^^^^^^^^^^^ -The recommended setting is to have it owned by `root:nut`, then make it -readable by the group and not by the world. This file contains passwords -that could be used by an attacker to start a shutdown, so keep it secure. +The recommended setting is to have it owned by root:nut, then make it readable +by the group and not world. This file contains passwords that could be used by +an attacker to start a shutdown, so keep it secure. chown root:nut upsmon.conf chmod 0640 upsmon.conf -This step has been placed early in the process so you secure this file -before adding sensitive data in the next step. +This step has been placed early in the process so you secure this file before +adding sensitive data in the next step. Create a MONITOR directive for upsmon ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Edit 'upsmon.conf' and create a `MONITOR` line with the UPS definition -(@), username and password from the -<> step, and the -"primary" or "secondary" setting. +Edit upsmon.conf and create a MONITOR line with the UPS definition +(@), username and password from the <> +step, and the master or slave setting. -If this system is the UPS manager (i.e. it's connected to this UPS directly -and can manage it using a suitable NUT driver), its `upsmon` is the primary: +If it's the master (i.e., it's connected to this UPS directly): - MONITOR myupsname@mybox 1 monuser mypass primary + MONITOR myupsname@mybox 1 monuser mypass master -If it's just monitoring this UPS over the network, and some other -system is the primary, then this one is a secondary: +If it's just monitoring this UPS over the network, and some other system is the +master: - MONITOR myupsname@mybox 1 monuser mypass secondary + MONITOR myupsname@mybox 1 monuser mypass slave -The number `1` here is the "power value". This should always be set -to 1, unless you have a very special (read: expensive) system with -redundant power supplies. In such cases, refer to the User Manual: +The number "1" here is the power value. This should always be set to 1 unless +you have a very special (read: expensive) system with redundant power supplies. +In such cases, refer to the User Manual: - <>, - <>. -Note that the "power value" may also be 0 for a monitoring (administrative) -system which only observes the remote UPS status but is not impacted by its -power events, and so does not shut down when the UPS does. - References: linkman:upsmon[8], linkman:upsmon.conf[5] Define a SHUTDOWNCMD for upsmon ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Still in 'upsmon.conf', add a directive that tells `upsmon` how to -shut down your system. This example seems to work on most systems: +Still in upsmon.conf, add a directive that tells upsmon how to shut down your +system. This example seems to work on most systems: SHUTDOWNCMD "/sbin/shutdown -h +0" Notice the presence of "quotes" here to keep it together. -If your system has special needs (e.g. system-provided shutdown handler -is ungracefully time constrained), you may want to set this to a script -which does customized local shutdown tasks before calling `init` or -`shutdown` programs to handle the system side of this operation. +If your system has special needs, you may want to set this to a script which +does local shutdown tasks before calling init. Start upsmon ^^^^^^^^^^^^ - upsmon + /usr/local/ups/sbin/upsmon If it complains about something, then check your configuration. -On operating systems with service management frameworks, the monitoring client -life-cycle is managed by `nut-monitor` service. - Checking upsmon ^^^^^^^^^^^^^^^ -Look for messages in the `syslog` to indicate success. -It should look something like this: +Look for messages in the syslog to indicate success. It should look something +like this: May 29 01:11:27 mybox upsmon[102]: Startup successful May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1 @@ -706,12 +543,10 @@ NOTE: This step is not need if you installed from packages. Edit your startup scripts, and add a call to `upsmon`. -Make sure `upsmon` starts when your system comes up. -On systems with `upsmon` primary (also running the data server), -do it after `upsdrvctl` and `upsd`, or it will complain about not -being able to contact the server. +Make sure `upsmon` starts when your system comes up. Do it after `upsdrvctl` +and `upsd`, or it will complain about not being able to contact the server. -You may delete the `POWERDOWNFLAG` in the startup scripts, but it is not +You may delete the POWERDOWNFLAG in the startup scripts, but it is not necessary. `upsmon` will clear that file for you when it starts. NOTE: Init script examples are provide in the 'scripts' directory of @@ -725,17 +560,16 @@ NOTE: This step is not need if you installed from packages. Edit your shutdown scripts, and add `upsdrvctl shutdown`. -You should configure your system to power down the UPS after the -filesystems are remounted read-only. Have it look for the presence -of the `POWERDOWNFLAG` (from linkman:upsmon.conf[5]), using this -as an example: +You should configure your system to power down the UPS after the filesystems are +remounted read-only. Have it look for the presence of the POWERDOWNFLAG (from +linkman:upsmon.conf[5]), using this as an example: ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- - if (/sbin/upsmon -K) + if (test -f /etc/killpower) then echo "Killing the power, bye!" - /sbin/upsdrvctl shutdown + /usr/local/ups/bin/upsdrvctl shutdown sleep 120 @@ -744,25 +578,18 @@ as an example: # *** see also the section on power races in the FAQ! *** fi ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- [WARNING] -============================================================================== -- Be careful that `upsdrvctl shutdown` command will probably power off -your machine and others fed by the UPS(es) which it manages. +================================================================================ +- Be careful that upsdrvctl command will probably power off your machine. Don't use it unless your system is ready to be halted by force. If you run RAID, read the <<_raid_warning,RAID warning>> below! -- Make sure the filesystem(s) containing `upsdrvctl`, `upsmon`, -the `POWERDOWNFLAG` file, 'ups.conf' and your UPS driver(s) are -mounted (possibly in read-only mode) when the system gets to -this point. Otherwise it won't be able to figure out what to do. - -- If for some reason you can not ensure `upsmon` program is executable -at this point, your script can `(test -f /etc/killpower)` in a somewhat -non-portable manner, instead of asking `upsmon -K` for the verdict -according to its current configuration. -============================================================================== +- Make sure the filesystem(s) containing upsdrvctl, ups.conf and your UPS +driver(s) are mounted (possibly in read-only mode) when the system gets to this +point. Otherwise it won't be able to figure out what to do. +================================================================================ [[Testing_shutdowns]] @@ -775,17 +602,17 @@ on your systems before leaving them unattended. A successful sequence is one where the OS halts before the battery runs out, and the system restarts when power returns. -The first step is to see how `upsdrvctl` will behave without actually -turning off the power. To do so, use the `-t` argument: +The first step is to see how upsdrvctl will behave without actually turning off +power. To do so, use the '-t' argument: - upsdrvctl -t shutdown + /usr/local/ups/bin/upsdrvctl -t shutdown It will display the sequence without actually calling the drivers. You can finally test a forced shutdown sequence (FSD) using: - upsmon -c fsd + /usr/local/ups/sbin/upsmon -c fsd This will execute a full shutdown sequence, as presented in <>, starting from the 3rd step. @@ -816,38 +643,35 @@ is turned off and waits for the power to return. Once the power is back, the system reboots, pulls the snapshot back in, and keeps going from there. If the user happened to be away when it happened, they may return and have no idea that their system actually -shut down completely in the middle (although network connections will drop). +shut down completely in the middle. -In order for this to work, you need to shutdown NUT (UPS driver, `upsd` -server and `upsmon` client) in the `suspend` script and start them again in -the `resume` script. Don't try to keep them running. The `upsd` server +In order for this to work, you need to shutdown NUT (UPS driver, upsd +server and upsmon client) in the suspend script and start them again in +the resume script. Don't try to keep them running. The upsd server will latch the FSD state (so it won't be usable after resuming) and so -will the `upsmon` client. Some drivers may work after resuming, but many -don't and some UPS devices will require re-initialization, so it's best not -to keep them running either. +will the upsmon client. Some drivers may work after resuming, but many +don't and some UPSs will require re-initialization, so it's best not +to keep this running either. -After stopping NUT driver, server and client you'll have to send the UPS -the command to shutdown only if the `POWERDOWNFLAG` is present. Note -that most likely you'll have to allow for a grace period after calling -`upsdrvctl shutdown` since the system will still have to take a -snapshot of itself after that. Not all drivers and devices support this, -so before going down this road, make sure that the one you're using does. - -- see if you can query or configure settings named like `load.off.delay`, - `ups.delay.shutdown`, `offdelay` and/or `shutdown_delay` +After stopping driver, server and client you'll have to send the UPS +the command to shutdown only if the POWERDOWNFLAG is present. Note +that most likely you'll have to allow for a grace period after sending +'upsdrvctl shutdown' since the system will still have to take a +snapshot of itself after that. Not all drivers support this, so before +going down this road, make sure that the one you're using does. RAID warning ~~~~~~~~~~~~ -If you run any sort of RAID equipment, make sure your arrays are -either halted (if possible) or switched to "read-only" mode. -Otherwise you may suffer a long resync once the system comes back up. +If you run any sort of RAID equipment, make sure your arrays are either halted +(if possible) or switched to "read-only" mode. Otherwise you may suffer a long +resync once the system comes back up. -The kernel may not ever run its final shutdown procedure, so you must take -care of all array shutdowns in userspace before `upsdrvctl shutdown` runs. +The kernel may not ever run its final shutdown procedure, so you must take care +of all array shutdowns in userspace before upsdrvctl runs. -If you use software RAID (md) on Linux, get `mdadm` and try using -`mdadm --readonly` to put your arrays in a safe state. This has to +If you use software RAID (md) on Linux, get mdadm and try using +'mdadm --readonly' to put your arrays in a safe state. This has to happen after your shutdown scripts have remounted the filesystems. On hardware RAID or other kernels, you have to do some detective work. It may @@ -869,8 +693,8 @@ be configured using some general descriptions. There are two main elements: -1. There's a UPS attached to a communication (serial, USB or network) port - on this system. +1. There's a UPS attached to a communication (serial, USB or network) port on +this system. 2. This system depends on a UPS for power. You can play "mix and match" with those two to arrive at these descriptions @@ -880,37 +704,36 @@ for individual hosts: - B: 2 but not 1 - C: 1 and 2 -A small to medium sized data room usually has one 'C' and a bunch of 'Bs'. -This means that there's a system (type 'C') hooked to the UPS which depends -on it for power. There are also some other systems in there (type 'B') +A small to medium sized data room usually has one C and a bunch of Bs. +This means that there's a system (type C) hooked to the UPS which depends +on it for power. There are also some other systems in there (type B) which depend on that same UPS for power, but aren't directly connected to -it communications-wise. +it. Larger data rooms or those with multiple UPSes may have several "clusters" -of the "single 'C', many 'Bs'" depending on how it's all wired. +of the "single C, many Bs" depending on how it's all wired. -Finally, there's a special case. Type 'A' systems are connected to -an UPS's communication port, but don't depend on it for power. -This usually happens when an UPS is physically close to a box and can -reach the serial port, but the power wiring is such that it doesn't -actually feed that box. +Finally, there's a special case. Type A systems are connected to a UPS's +serial port, but don't depend on it for power. This usually happens when +a UPS is physically close to a box and can reach the serial port, but +the wiring is such that it doesn't actually feed it. Once you identify a system's type, use this list to decide which of the programs need to be run for monitoring: -- A: driver and `upsd` -- B: `upsmon` (in secondary mode) -- C: driver, `upsd`, and `upsmon` (in primary mode, as the UPS manager) - -image:images/advanced.png[] +- A: driver and upsd +- B: upsmon (as slave) +- C: driver, upsd, and upsmon (as master) To further complicate things, you can have a system that is hooked to multiple UPSes, but only depends on one for power. This particular -situation makes it an `A` relative to one UPS, and a `C` relative to the -other. The software can handle this -- you just have to tell it what to do. +situation makes it an "A" relative to one UPS, and a "C" relative to the +other. The software can handle this - you just have to tell it what to do. NOTE: NUT can also serve as a data proxy to increase the number of clients, -or share the communication load between several `upsd` instances. +or share the communication load between several upsd instances. + +image:images/advanced.png[] If you are running large server-class systems that have more than one power feed, see the next section for information on how to handle it @@ -920,8 +743,8 @@ properly. Typical setups for big servers with UPS redundancy -------------------------------------------------- -By using multiple `MONITOR` statements in 'upsmon.conf', you can configure -an environment where a large machine with redundant power monitors multiple +By using multiple MONITOR statements in upsmon.conf, you can configure an +environment where a large machine with redundant power monitors multiple separate UPSes. image:images/bigbox.png[] @@ -929,39 +752,35 @@ image:images/bigbox.png[] Example configuration ~~~~~~~~~~~~~~~~~~~~~ -For the examples in this section, we will use a server with four power -supplies installed and locally running the full NUT stack, including -`upsmon` in primary mode -- as the UPS manager. +For the examples in this section, we will use a server with four power supplies +installed. -Two UPSes, 'Alpha' and 'Beta', are each driving two of the power supplies -(by adding up, we know about the four power supplies of the current system). +Two UPS, 'Alpha' and 'Beta', are each driving two of the power supplies. This means that either 'Alpha' *or* 'Beta' can totally shut down and the server will be able to keep running. -The 'upsmon.conf' configuration which reflects this is the following: +The upsmon.conf configuration that reflect this is the following: - MONITOR ups-alpha@myhost 2 monuser mypass primary - MONITOR ups-beta@myhost 2 monuser mypass primary + MONITOR ups-alpha@myhost 2 monuser mypass master + MONITOR ups-beta@myhost 2 monuser mypass master MINSUPPLIES 2 -With such configuration, `upsmon` on this system will only shut down when -both UPS devices reach a critical (on battery + low battery) condition, -since 'Alpha' and 'Beta' each provide the same power value. +With that configuration, upsmon will only shut down when both UPS reaches +a critical (on battery + low battery) condition, since 'Alpha' and 'Beta' +provide the same power value. As an added bonus, this means you can move a running server from one UPS -to another (for maintenance purpose for example) without bringing it down -since the minimum sufficient power will be provided at all times. +to another (for maintenance purpose for example) without bringing it down since +the minimum power will be provided at all times. -The `MINSUPPLIES` line tells `upsmon` that we need at least 2 power supplies +The MINSUPPLIES line tells upsmon that we need at least 2 power supplies to be receiving power from a good UPS (on line or on battery, just not -on battery *and* low battery). +on battery and low battery). -NOTE: We could have used a 'Power Value' of `1` for both UPS, and have -`MINSUPPLIES` set to `1` too. These values are purely arbitrary, so -you are free to use your own rules. Here, we have linked these values -to the number of power supplies that each UPS is feeding (2) since this -maps better to physical topology and allows to throw a third or fourth -UPS into the mix without much configuration headache. +NOTE: we could have used a 'Power Value' of 1 for both UPS, and MINSUPPLIES +set to 1 too. These values are purely arbitrary, so you are free to use your +own rules. Here, we have linked these values to the number of power supplies +that each UPS is feeding (2). Multiple UPS shutdowns ordering @@ -969,11 +788,11 @@ Multiple UPS shutdowns ordering If you have multiple UPSes connected to your system, chances are that you need to shut them down in a specific order. The goal is to shut down -everything but the one keeping `upsmon` alive at first, then you do that -one last. +everything but the one keeping upsmon alive at first, then you do that one +last. To set the order in which your UPSes receive the shutdown commands, define -the `sdorder` value in your 'ups.conf' device sections. +the 'sdorder' value in your ups.conf. [bigone] driver = usbhid-ups @@ -991,11 +810,11 @@ the `sdorder` value in your 'ups.conf' device sections. sdorder = 0 The order runs from 0 to the highest number available. So, for this -configuration, the order of shutdowns would be 'misc', 'littleguy', -and then 'bigone'. +configuration, the order of shutdowns would be 'misc', 'littleguy', and then +'bigone'. -NOTE: If you have a UPS that shouldn't be powered off when running -`upsdrvctl shutdown`, set its `sdorder` to `-1`. +NOTE: If you have a UPS that shouldn't be shutdown when running 'upsdrvctl +shutdown', set the *sdorder* to *-1*. Other redundancy configurations diff --git a/docs/config-prereqs.txt b/docs/config-prereqs.txt deleted file mode 100644 index 45b1058..0000000 --- a/docs/config-prereqs.txt +++ /dev/null @@ -1,848 +0,0 @@ -ifdef::website[] -Prerequisites for building NUT on different OSes -================================================ -endif::website[] - -This chapter aims to list packages with the tools needed on a freshly minimally -deployed worker to build as many targets of NUT recipes as possible, mainly -the diverse driver and documentation types. - -NUT codebase generally should not depend on particular operating system or -kernel technology and version, and with the operating systems listed below -one can benefit from use of containers (jails, zones) to build and test -against numerous OS distributions on one physical or virtual machine, -e.g. to cover non-regression with older tool kits while taking advantage -of new releases. - -* For Linux systems, we have notes on link:ci-farm-lxc-setup.txt[Setting - up the multi-arch Linux LXC container farm for NUT CI] - -Some of the below are alternatives, e.g. compiler toolkits (gcc vs. clang) -or SSL implementations (OpenSSL vs Mozilla NSS) -- no problem installing -both, at a disk space cost. - -NOTE: Some NUT branches may need additional or different software versions -that are not yet included into `master` branch dependencies, e.g. the DMF -(Dynamic Mapping Files) sub-project needs LUA 5.1. - -More packages and/or system setup may be needed to actually run NUT with -all features enabled; chapters below concern just with building it. - -General call to Test the ability to configure and build -------------------------------------------------------- - -Check out from git, generate files and configure to tailor to your build -environment, and build some tests: - ------- -:; mkdir -p nut && cd nut && \ - git clone https://github.com/networkupstools/nut/ -b master . -:; ./autogen.sh && \ - ./configure --with-doc=all --with-all --with-cgi && \ - make all && make check && make spellcheck ------- - -You can toggle some `configure` options to check different dependency -variants, e.g. `--with-ssl=nss` vs. `--with-ssl=openssl` - -For reproducible runs of various pre-sets of configuration during -development, take a look at `ci_build.sh` script and different `BUILD_TYPE` -(and other) environment variable settings that it supports. A minimal run -with it is just to call the script, e.g.: - ------- -:; mkdir -p nut && cd nut && \ - git clone https://github.com/networkupstools/nut/ -b fightwarn . -:; ./ci_build.sh ------- - -[NOTE] -====== -To build older releases, such as "vanilla" NUT 2.7.4 and older, -you may need to address some nuances: - -* Ensure that `python` in `PATH` points to a python-2.x implementation - (`master` branch is fixed to work with python 2 and 3) - -* Ensure that `bash` is your user and maybe system shell (or ensure the - generated `configure` script gets interpreted by it) - -* Generally you may have better results with GNU Make newer than 3.81 - than with other make implementations; however, builds are regularly - tested by CI with Sun dmake and BSD make as well, so recipes should - not expect GNU-only syntax and constructs to work - -* Parallel builds should be okay in current development version and - since NUT 2.8.0 (is a bug to log and fix, if not), but they may be - failure-prone in 2.7.4 and earlier releases -====== - -For intensive rebuilds, `ccache` is recommended. - - -Build prerequisites to make NUT from scratch on various Operating Systems -------------------------------------------------------------------------- - -Debian 10/11 -~~~~~~~~~~~~ - -Being a popular baseline among Linux distributions, Debian is an -important build target. Related common operating systems include -Ubuntu and customized distros for Raspberry Pi, Proxmox, as well -as many others. - -The package list below should largely apply to those as well, -however note that some well-known package names tend to differ. -A few of those are noted below. - -[NOTE] -====== -While Debian distros I've seen (8 to 11) provide a "libusb-dev" -for libusb-0.1 headers, the binary library package name is specifically -versioned package by default of the current release (e.g. "libusb-0.1-4"), -while names of both the library and development packages for libusb-1.0 -must be determined with: ------- -:; apt-cache search 'libusb.*1\.0.* ------- -yielding e.g. "libusb-1.0-0-dev" (string name was seen with different -actual package source versions on both Debian 8 "Jessie" and -Debian 11 "Buster"). -====== - -Debian-like package installations commonly start with an update of -metadata about recently published package revisions: - ------- -:; apt-get update - -# NOTE: Older Debian-like distributions may lack a "libtool-bin" -:; apt-get install \ - ccache time \ - git python perl curl \ - make autoconf automake libltdl-dev libtool-bin libtool \ - valgrind \ - cppcheck \ - pkg-config \ - gcc g++ clang - -# NOTE: For python, you may eventually have to specify a variant like this -# (numbers depending on default or additional packages of your distro): -# :; apt-get install python2 python2.7 python-is-python2 -# and/or: -# :; apt-get install python3 python3.9 -# You can find a list of what is (pre-)installed with: -# :; dpkg -l | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; apt-get install \ - aspell aspell-en - -# For other doc types (man-page, PDF, HTML) generation - massive packages (TEX, X11): -:; apt-get install \ - asciidoc source-highlight python3-pygments dblatex - -# For CGI graph generation - massive packages (X11): -:; apt-get install \ - libgd-dev - -# NOTE: Some older Debian-like distributions, could ship "libcrypto-dev" -# and/or "openssl-dev" instead of "libssl-dev" by its modern name -:; apt-get install \ - libcppunit-dev \ - libssl-dev libnss3-dev \ - augeas-tools libaugeas-dev augeas-lenses \ - libusb-dev libusb-1.0-0-dev \ - libi2c-dev \ - libmodbus-dev \ - libsnmp-dev \ - libpowerman0-dev \ - libfreeipmi-dev libipmimonitoring-dev \ - libavahi-common-dev libavahi-core-dev libavahi-client-dev -# For libneon, see below - -:; apt-get install \ - lua5.1-dev - -:; apt-get install \ - bash dash ksh busybox ------- - -Alternatives that can depend on your system's other packaging choices: ------- -:; apt-get install libneon27-dev -# ... or -:; apt-get install libneon27-gnutls-dev ------- - -Over time, Debian and Ubuntu had different packages and libraries providing -the actual methods for I2C; if your system lacks the `libi2c` (and so fails -to `./configure --with-all`), try adding the following packages: ------- -:; apt-get install build-essential git-core libi2c-dev i2c-tools lm-sensors ------- - -For cross-builds (note that not everything supports multilib approach, -limiting standard package installations to one or another implementation; -in that case local containers each with one ARCH may be a better choice, -with `qemu-user-static` playing a role to "natively" run the other-ARCH -complete environments): ------- -:; apt-get install \ - gcc-multilib g++-multilib \ - crossbuild-essential \ - gcc-10:armhf gcc-10-base:armhf \ - qemu-user-static ------- - -NOTE: For Jenkins agents, also need to `apt-get install openjdk-11-jdk-headless` -(technically, needs at least JRE 8+). You may have to ensure `/proc` is mounted -in the target chroot (or do this from the running container). - -CentOS 7 -~~~~~~~~ - -CentOS is another popular baseline among Linux distributions, being a free -derivative of the RedHat Linux, upon which many other distros are based as -well. These systems typically use the RPM package manager, using directly -`rpm` command, or `yum` or `dnf` front-ends depending on their generation. - -For CentOS 7 it seems that not all repositories are equally good; some of -the software below is only served by EPEL (Extra Packages for Enterprise -Linux), as detailed at: - -* https://docs.fedoraproject.org/en-US/epel/ -* https://www.redhat.com/en/blog/whats-epel-and-how-do-i-use-it -* https://pkgs.org/download/epel-release - -You may have to specify a mirror as the `baseurl` in a `/etc/yum.repos.d/...` -file (as the aged distributions become less served by mirrors), such as: - -* https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/ -+ ------- -# e.g. for CentOS7 currently: -:; yum install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm - -# And edit /etc/yum.repos.d/epel.repo to uncomment and set the baseurl=... -# lines, and comment away the mirrorlist= lines (if yum hiccups otherwise) ------- - -General developer system helpers mentioned in link:ci-farm-lxc-setup.txt[]: ------- -:; yum update - -:; yum install \ - sudo vim mc p7zip pigz pbzip2 ------- - -NOTE: Below we request to install generic `python` per system defaults. -You may request specifically `python2` or `python3` (or both): current -NUT should be compatible with both (2.7+ at least). - -NOTE: On CentOS, `libusb` means 0.1.x and `libusbx` means 1.x.x API version. - -NOTE: On CentOS, it seems that development against libi2c/smbus is not -supported. Neither the suitable devel packages were found, nor i2c-based -drivers in distro packaging of NUT. Resolution and doc PRs are welcome. - ------- -:; yum install \ - ccache time \ - file systemd-devel \ - git python perl curl \ - make autoconf automake libtool-ltdl-devel libtool \ - valgrind \ - cppcheck \ - pkgconfig \ - gcc gcc-c++ clang - -# NOTE: For python, you may eventually have to specify a variant like this -# (numbers depending on default or additional packages of your distro): -# :; yum install python-2.7.5 -# and/or: -# :; yum install python3 python3-3.6.8 -# You can find a list of what is (pre-)installed with: -# :; rpm -qa | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; yum install \ - aspell aspell-en - -# For other doc types (man-page, PDF, HTML) generation - massive packages (TEX, X11): -:; yum install \ - asciidoc source-highlight python-pygments dblatex - -# For CGI graph generation - massive packages (X11): -:; yum install \ - gd-devel - -# NOTE: "libusbx" is the CentOS way of naming "libusb-1.0" -# vs. the older "libusb" as the package with "libusb-0.1" -:; yum install \ - cppunit-devel \ - openssl-devel nss-devel \ - augeas augeas-devel \ - libusb-devel libusbx-devel \ - i2c-tools \ - libmodbus-devel \ - net-snmp-devel \ - powerman-devel \ - freeipmi-devel \ - avahi-devel \ - neon-devel -#?# is python-augeas needed? exists at least... -#?# no (lib)i2c-devel ... -#?# no (lib)ipmimonitoring-devel ... would "freeipmi-ipmidetectd" cut it at least for run-time? - -# Some NUT code related to lua may be currently limited to lua-5.1 -# or possibly 5.2; the former is default in CentOS 7 releases... -:; yum install \ - lua-devel - -:; yum install \ - bash dash ksh ------- - -NOTE: `busybox` is not packaged for CentOS 7 release; a static binary can -be downloaded if needed. For more details, see -https://unix.stackexchange.com/questions/475584/cannot-install-busybox-on-centos - -CentOS packaging for 64-bit systems delivers the directory for dispatching -compiler symlinks as `/usr/lib64/ccache`. You can set it up same way as for -other described environments by adding a symlink `/usr/lib/ccache`: ------- -:; ln -s ../lib64/ccache/ "$ALTROOT"/usr/lib/ ------- - -NOTE: For Jenkins agents, also need to `yum install java-11-openjdk-headless` -(technically, needs at least JRE 8+). - -FreeBSD 12.2 -~~~~~~~~~~~~ - -Note that `PATH` for builds on BSD should include `/usr/local/...`: - ------- -:; PATH=/usr/local/libexec/ccache:/usr/local/bin:/usr/bin:$PATH -:; export PATH ------- - -NOTE: You may want to reference `ccache` even before all that, as detailed -below. - ------- -:; pkg install \ - git python perl5 curl \ - gmake autoconf automake autotools libltdl libtool \ - valgrind \ - cppcheck \ - pkgconf \ - gcc clang - -# NOTE: For python, you may eventually have to specify a variant like this -# (numbers depending on default or additional packages of your distro): -# :; pkg install python2 python27 -# and/or: -# :; pkg install python3 python37 -# You can find a list of what is (pre-)installed with: -# :; pkg info | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; pkg install \ - aspell en-aspell - -# For other doc types (man-page, PDF, HTML) generation - massive packages (TEX, X11): -:; pkg install \ - asciidoc source-highlight textproc/py-pygments dblatex - -# For CGI graph generation - massive packages (X11): -:; pkg install \ - libgd - -:; pkg install \ - cppunit \ - openssl nss \ - augeas \ - libmodbus \ - neon \ - net-snmp \ - powerman \ - freeipmi \ - avahi - -:; pkg install \ - lua51 - -:; pkg install \ - bash dash busybox ksh93 ------- - -Recommended: ------- -:; pkg install ccache -:; ccache-update-links ------- - -For compatibility with common setups on other operating systems, can symlink -`/usr/local/libexec/ccache` as `/usr/lib/ccache` and possibly add dash-number -suffixed symlinks to compiler tools (e.g. `gcc-10` beside `gcc10` installed -by package). - -NOTE: For Jenkins agents, also need to `pkg install openjdk8` (or 11+) -- -and do note its further OS configuration suggestions for special filesystem -mounts. - -Due to BSD specific paths *when not using* an implementation of `pkg-config` -or `pkgconf` (so guessing of flags is left to administrator -- TBD in NUT -`m4` scripts), better use this routine to test the config/build: ----- -:; ./configure --with-doc=all --with-all --with-cgi \ - --without-avahi --without-powerman --without-modbus \ - ### CPPFLAGS="-I/usr/local/include -I/usr/include" \ - ### LDFLAGS="-L/usr/local/lib -L/usr/lib" ----- - -Note the lack of `pkg-config` also precludes `libcppunit` tests, although -they also tend to mis-compile/mis-link with GCC (while CLANG seems okay). - -OpenBSD 6.4 -~~~~~~~~~~~ - -Note that `PATH` for builds on BSD should include `/usr/local/...`: - ------- -:; PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH -:; export PATH ------- - -NOTE: You may want to reference `ccache` even before all that, as detailed -below. - -OpenBSD delivers many versions of numerous packages, you should specify -your pick interactively or as part of package name (e.g. `autoconf-2.69p2`). - -During builds, you may have to tell system dispatcher scripts which version -to use (which feels inconvenient, but on the up-side for CI -- this system -allows to test many versions of auto-tools in the same agent), e.g.: ------- -:; export AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.10 ------- - -To use the `ci_build.sh` don't forget `bash` which is not part of OpenBSD -base installation. It is not required for "legacy" builds arranged by just -`autogen.sh` and `configure` scripts. - -NOTE: The OpenBSD 6.4 `install64.iso` installation includes a set of packages -that seems to exceed whatever is available on network mirrors; for example, -the CD image included `clang` program while it is not available to `pkg_add`, -at least not via http://ftp.netbsd.hu/mirrors/openbsd/6.4/packages/amd64/ -mirror. The `gcc` version on CD image differed notably from that in the -networked repository (4.2.x vs 4.9.x) - ------- -:; pkg_add \ - git python curl \ - gmake autoconf automake libltdl libtool \ - valgrind \ - cppcheck \ - pkgconf \ - gcc clang - -# NOTE: For python, you may eventually have to specify a variant like this -# (numbers depending on default or additional packages of your distro): -# :; yum install python-2.7.15p0 -# and/or: -# :; yum install python-3.6.6p1 -# although you might succeed specifying shorter names and the packager -# will offer a list of matching variants. -# NOTE: "perl" is not currently a package, but seemingly part of base OS. -# You can find a list of what is (pre-)installed with: -# :; pkg_info | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; pkg_add \ - aspell - -# For other doc types (man-page, PDF, HTML) generation - massive packages (TEX, X11): -:; pkg_add \ - asciidoc source-highlight py-pygments dblatex \ - docbook2x docbook-to-man - -# For CGI graph generation - massive packages (X11): -:; pkg_add \ - gd - -:; pkg_add \ - cppunit \ - openssl nss \ - augeas \ - libusb1 \ - neon \ - net-snmp \ - avahi - -# Select a LUA-5.1 (or possibly 5.2?) version -:; pkg_add \ - lua - -:; pkg_add \ - bash dash busybox ksh93 ------- - -[NOTE] -====== -With OpenBSD 6.4, building against freeipmi failed: its libtool -recipes referenced `-largp` which did not get installed in the system. -Maybe some more packages are needed explicitly? - ------- -:; pkg_add \ - freeipmi ------- -====== - -Recommended: ------- -:; pkg_add ccache -:; ( mkdir -p /usr/lib/ccache && cd /usr/lib/ccache && \ - for TOOL in cpp gcc g++ clang clang++ clang-cpp ; do \ - ln -s ../../local/bin/ccache "$TOOL" ; \ - done ; \ - ) ------- - -For compatibility with common setups on other operating systems, can add -dash-number suffixed symlinks to compiler tools (e.g. `gcc-4.2.1` beside -`gcc` installed by package) into `/usr/lib/ccache`. - -NOTE: For Jenkins agents, also need to `pkg_add jre` or `pkg_add jdk` -(pick version 1.8 or 8, or 11+). - -Due to BSD specific paths *when not using* an implementation of `pkg-config` -or `pkgconf` (so guessing of flags is left to administrator -- TBD in NUT -`m4` scripts), better use this routine to test the config/build: ------- -:; ./configure --with-doc=all --with-all --with-cgi \ - --without-avahi --without-powerman --without-modbus \ - ### CPPFLAGS="-I/usr/local/include -I/usr/include" - ### LDFLAGS="-L/usr/local/lib -L/usr/lib" ------- - -Note the lack of `pkg-config` also precludes `libcppunit` tests, although -they also tend to mis-compile/mis-link with GCC (while CLANG seems okay). - -NetBSD 9.2 -~~~~~~~~~~ - -Instructions below assume that `pkgin` tool (pkg-src component to -"install binary packages") is present on the system. Text below -was prepared with a VM where "everything" was installed from the -ISO image, including compilers and X11. It is possible that some -packages provided this way differ from those served by `pkgin`, -or on the contrary, that the list of suggested tool installation -below would not include something a bare-minimum system would -require to build NUT. - -Note that `PATH` for builds on NetBSD should include `local` and -`pkg`; the default after installation of the test system was: - ------- -:; PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/local/sbin:/usr/local/bin" -:; export PATH ------- - -NOTE: You may want to reference `ccache` even before all that, -as detailed below: - ------- -:; PATH="/usr/lib/ccache:$PATH" -:; export PATH ------- - -To use the `ci_build.sh` don't forget `bash` which is not part of OpenBSD -base installation. It is not required for "legacy" builds arranged by just -`autogen.sh` and `configure` scripts. - ------- -:; pkgin install \ - git python27 python39 perl curl \ - make gmake autoconf automake libltdl libtool \ - cppcheck \ - pkgconf \ - gcc7 clang - -;; ( cd /usr/pkg/bin && ( ln -fs python2.7 python2 ; ln -fs python3.9 python3 ) ) -# You can find a list of what is (pre-)installed with: -# :; pkgin list | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; pkgin install \ - aspell aspell-en - -# For man-page doc types, footprint on this platform is moderate: -:; pkgin install \ - asciidoc - -# For other doc types (PDF, HTML) generation - massive packages (TEX, X11): -:; pkgin install \ - source-highlight py39-pygments dblatex - -# For CGI graph generation - massive packages (X11): -:; pkgin install \ - gd openmp - -:; pkgin install \ - cppunit \ - openssl nss \ - augeas \ - libusb libusb1 \ - neon \ - net-snmp \ - avahi - -# Select a LUA-5.1 (or possibly 5.2?) version -:; pkgin install \ - lua51 - -:; pkgin install \ - bash dash ast-ksh oksh ------- - -[NOTE] -====== -(TBD) On NetBSD 9.2 this package complains that it requires -OS ABI 9.0, or that `CHECK_OSABI=no` is set in `pkg_install.conf`. -Such file was not found in the test system... - ------- -:; pkgin install \ - openipmi ------- -====== - -Recommended: For compatibility with common setups on other operating -systems, can add dash-number suffixed symlinks to compiler tools (e.g. -`gcc-7` beside the `gcc` installed by package) near the original -binaries and into `/usr/lib/ccache`: ------- -:; ( cd /usr/bin && for TOOL in cpp gcc g++ ; do \ - ln -s "$TOOL" "$TOOL-7" ; \ - done ) - -# Note that the one delivered binary is `clang-13` and many (unnumbered) -# symlinks to it. For NUT CI style of support for builds with many -# compilers, complete the known numbers: -:; ( cd /usr/pkg/bin && for TOOL in clang-cpp clang++ ; do \ - ln -s clang-13 "$TOOL-13" ; \ - done ) - -:; pkgin install ccache -:; ( mkdir -p /usr/lib/ccache && cd /usr/lib/ccache && \ - for TOOL in cpp gcc g++ clang ; do \ - for VER in "" "-7" ; do \ - ln -s ../../pkg/bin/ccache "$TOOL$VER" ; \ - done ; \ - done ; \ - for TOOL in clang clang++ clang-cpp ; do \ - for VER in "" "-13" ; do \ - ln -s ../../pkg/bin/ccache "$TOOL$VER" ; \ - done ; \ - done ; \ - ) ------- - -NOTE: For Jenkins agents, also need to `pkgin install openjdk11` (will be -in `JAVA_HOME=/usr/pkg/java/openjdk11`). - -OpenIndiana 2021.10 -~~~~~~~~~~~~~~~~~~~ - -Note that due to IPS and `pkg(5)`, a version of python is part of baseline -illumos-based OS; this may not be the case on some other illumos distributions -which do not use IPS however. Currently they use python 3.7 or newer. - -To build older NUT releases (2.7.4 and before), you may need to explicitly -`pkg install python-27`. - -Typical tooling would include: - ------- -:; pkg install \ - git curl wget \ - gnu-make autoconf automake libltdl libtool \ - valgrind \ - pkg-config \ - gnu-binutils developer/linker - -# NOTE: For python, some suitable version should be available since `pkg(5)` -# tool is written in it. Similarly, many system tools are written in perl -# so some version should be installed. You may specify additional variants -# like this (numbers depending on default or additional packages of your -# distro; recommended to group `pkg` calls with many packages at once to -# save processing time for calculating a build strategy): -# :; pkg install runtime/python-27 -# and/or: -# :; pkg install runtime/python-37 runtime/python-35 runtime/python-39 -# Similarly for perl variants, e.g.: -# :; pkg install runtime/perl-522 runtime/perl-524 runtime/perl-534 -# You can find a list of what is available in remote repositories with: -# :; pkg info -r | grep -Ei 'perl|python' - -# For spell-checking, highly recommended if you would propose pull requests: -:; pkg install \ - aspell text/aspell/en - -# For other doc types (man-page, PDF, HTML) generation - massive packages (TEX, X11): -:; pkg install \ - asciidoc libxslt \ - docbook/dtds docbook/dsssl docbook/xsl docbook docbook/sgml-common pygments-39 \ - graphviz expect graphviz-tcl - -# For CGI graph generation - massive packages (X11): -:; pkg install \ - gd - -:; pkg install \ - openssl library/mozilla-nss \ - library/augeas python/augeas \ - libusb-1 libusbugen system/library/usb/libusb system/header/header-usb driver/usb/ugen \ - libmodbus \ - neon \ - net-snmp \ - powerman \ - freeipmi \ - avahi - -:; pkg install \ - lua - -:; pkg install \ - dash bash shell/ksh93 - -### Maybe -:; pkg install \ - gnu-coreutils - -### Maybe - after it gets fixed for GCC builds/linkage -:; pkg install \ - cppunit ------- - -For extra compiler coverage, we can install a large selection of versions, -although to meet NUT CI farm expectations we also need to expose "numbered" -filenames, as automated below: ------- -:; pkg install \ - gcc-48 gcc-49 gcc-5 gcc-6 gcc-7 gcc-9 gcc-10 gcc-11 \ - clang-80 clang-90 \ - ccache - -# As of this writing, clang-13 refused to link (claiming issues with -# --fuse-ld which was never specified) on OI; maybe later it will: -:; pkg install \ - developer/clang-13 runtime/clang-13 - -# Get clang-cpp-X visible in standard PATH (for CI to reference the right one), -# and make sure other frontends are exposed with versions (not all OI distro -# releases have such symlinks packaged right), e.g.: -:; (cd /usr/bin && for X in 8 9 13 ; do for T in "" "++" "-cpp"; do \ - ln -fs "../clang/$X.0/bin/clang$T" "clang${T}-${X}" ; \ - done; done) - -# If /usr/lib/ccache/ symlinks to compilers do not appear after package -# installation, or if you had to add links like above, call the service: -:; svcadm restart ccache-update-symlinks ------- - -We can even include a `gcc-4.4.4-il` version (used to build the illumos OS -ecosystems, at least until recently, which is a viable example of an old -GCC baseline); but note that so far it conflicts with `libgd` builds at -`./configure --with-cgi` stage (its binaries require newer ecosystem): - ------- -:; pkg install \ - illumos-gcc@4.4.4 - -# Make it visible in standard PATH -:; (cd /usr/bin && for T in gcc g++ cpp ; do \ - ln -s ../../opt/gcc/4.4.4/bin/$T $T-4.4.4 ; \ - done) - -# If /usr/lib/ccache/ symlinks to these do not appear, call the service: -:; svcadm restart ccache-update-symlinks ------- - -OI currently also does not build `cppunit`-based tests well, at least -not with GCC (they segfault at run-time with `ostream` issues); a CLANG -build works for that however. - -It also lacks out-of-the-box Tex suite and `dblatex` in particular, which -`asciidoc` needs to build PDF documents. It may be possible to add these -from third-party repositories (e.g. SFE) and/or build from sources. - -No pre-packaged `cppcheck` was found, either. - -NOTE: For Jenkins agents, also need to `pkg install developer/java/openjdk8` -(or `pkg install runtime/java/openjdk11` for JRE 11 -- currently the OS does -not offer in-distro JDK version 11+). - -OmniOS CE (as of release 151036) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Being a minimal-footprint system, OmniOS CE provides very few packages out -of the box. There are additional repositories supported by the project, as -well as third-party repositories such as SFE. For some dependencies, it may -happen that you would need to roll and install your own builds in accordance -with that project's design goals. - -Note you may need not just the "Core" IPS package publisher, but also the -"Extra" one. See OmniOS CE web site for setup details. - ------- -:; pkg install \ - developer/build/autoconf developer/build/automake developer/build/libtool \ - build-essential ccache git developer/pkg-config \ - runtime/perl \ - asciidoc \ - libgd - -:; pkg install \ - net-snmp - -# NOTE: For python, some suitable version should be available since `pkg(5)` -# tool is written in it. You may specify an additional variant like this -# (numbers depending on default or additional packages of your distro): -# :; pkg install runtime/python-37 -# You can find a list of what is available in remote repositories with: -# :; pkg info -r | grep -Ei 'perl|python' ------- - -OmniOS lacks a pre-packaged libusb, however the binary build from contemporary -OpenIndiana can be used (copy the header files and the library+symlinks for -all architectures you would need). - -You may need to set up `ccache` with the same `/usr/lib/ccache` dir used -in other OS recipes. Assuming your Build Essentials pulled GCC 9 version, -and ccache is under `/opt/ooce` namespace, that would be like: ------- -:; mkdir -p /usr/lib/ccache -:; cd /usr/lib/ccache -:; ln -fs ../../../opt/ooce/bin/ccache gcc -:; ln -fs ../../../opt/ooce/bin/ccache g++ -:; ln -fs ../../../opt/ooce/bin/ccache gcpp -:; ln -fs ../../../opt/ooce/bin/ccache gcc-9 -:; ln -fs ../../../opt/ooce/bin/ccache g++-9 -:; ln -fs ../../../opt/ooce/bin/ccache gcpp-9 ------- - -Given that many of the dependencies can get installed into that namespace, -you may have to specify where `pkg-config` will look for them (note that -library and binary paths can be architecture bitness-dependent): ------- -:; ./configure PKG_CONFIG_PATH="/opt/ooce/lib/amd64/pkgconfig" --with-cgi ------- - -Note also that the minimal footprint nature of OmniOS CE precludes building -any large scope easily, so avoid docs and "all drivers" unless you provide -whatever they need to happen. diff --git a/docs/configure.txt b/docs/configure.txt index c681f74..aff82c1 100644 --- a/docs/configure.txt +++ b/docs/configure.txt @@ -3,229 +3,96 @@ Configure options ================= endif::website[] -There are a few options reviewed below that can be given to `configure` -script to tweak your compilations. See also `./configure --help` for a -current and complete listing for the current version of the codebase. +There are a few options that can be given to configure to tweak compiles. +See also "./configure --help" for a current and complete listing. Driver selection ---------------- -Serial drivers -~~~~~~~~~~~~~~ - --with-serial -USB drivers -~~~~~~~~~~~ - Build and install the serial drivers (default: yes) --with-usb Build and install the USB drivers (default: auto-detect) - -Note that you need to install the libusb development package or files, -and that both libusb 0.1 and 1.0 are supported. In case both are -available, libusb 1.0 takes precedence, and will be used by default. -It is however possible to override this default choice by explicitly -calling `--with-usb=libusb-0.1` or `--with-usb=libusb-1.0`. -If you do specify the version to use (or `yes` for auto-detection), -this option would fail if requested (or any) libusb version was not -found. The default `auto` value would not fail in such case. - -SNMP drivers -~~~~~~~~~~~~ +Note that you need to install the libusb development package or files. --with-snmp Build and install the SNMP drivers (default: auto-detect) - Note that you need to install libsnmp development package or files. - --with-net-snmp-config - -In addition to the `--with-snmp` option above, this one allows to provide -a custom program name (in `PATH`) or complete pathname to `net-snmp-config` -(may have copies named per architecture, e.g. `net-snmp-config-32` and -`net-snmp-config-64`). - -This may be needed on build systems which support multiple architectures, -or in cases where your distribution names this program differently. -With a default value of `yes` it would mean preference of this program, -compared to information from `pkg-config`, if both are available. - -XML drivers and features -~~~~~~~~~~~~~~~~~~~~~~~~ - --with-neon Build and install the XML drivers (default: auto-detect) - Note that you need to install neon development package or files. -LLNC CHAOS Powerman driver -~~~~~~~~~~~~~~~~~~~~~~~~~~ - --with-powerman Build and install Powerman PDU client driver (default: auto-detect) - This allows to interact with the Powerman daemon, and the numerous -Power Distribution Units (PDU) supported by the -https://github.com/chaos/powerman[powerman] project. - +Power Distribution Units (PDU) supported by the project. Note that you need to install powerman development package or files. -IPMI drivers -~~~~~~~~~~~~ - --with-ipmi --with-freeipmi Build and install IPMI PSU driver (default: auto-detect) - -This allows to monitor numerous Power Supply Units (PSU) found on servers. - -Note that you need to install freeipmi (0.8.5 or higher, for nut-scanner; -and 1.0.1 or higher, for nut-ipmipsu) development package or files. - -I2C bus drivers -~~~~~~~~~~~~~~~ +This allows to monitor numerous Power Supply Units (PSU) found +on servers. +Note that you need to install freeipmi (0.8.5 or higher) development package or +files. --with-linux_i2c Build and install i2c drivers (default: auto-detect) - Note that you need to install libi2c development package or files. -Modbus drivers -~~~~~~~~~~~~~~ - - --with-modbus - -Build and install modbus (Serial, TCP) drivers (default: auto-detect) - -Note that you need to install libmodbus development package or files. - -Manual selection of drivers -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --with-drivers=,,... Specify exactly which driver or drivers to build and install (this works for serial, usb, and snmp drivers, and overrides the preceding three options). -As of the time of original writing (2010), there are 46 UPS drivers +As of the time of this writing (2010), there are 46 UPS drivers available. Most users will only need one, a few will need two or three, and very few people will need all of them. To save time during the compile and disk space later on, you can use this option to just build and install a subset of the drivers. -For example, to select `mge-shut` and `usbhid-ups`, you'd do this: +To select mge-shut and usbhid-ups, you'd do this: --with-drivers=apcsmart,usbhid-ups If you need to build more drivers later on, you will need to rerun -`configure` with a different list. To make it build all of the -drivers from scratch again, run `make clean` before starting. +configure with a different list. To make it build all of the +drivers from scratch again, run 'make clean' before starting. Optional features ----------------- -CGI client interface -~~~~~~~~~~~~~~~~~~~~ - --with-cgi (default: no) Build and install the optional CGI programs, HTML files, and sample CGI configuration files. This is not enabled by default, as they -are only useful on web servers. See link:data/html/README[] for additional +are only useful on web servers. See data/html/README for additional information on how to set up CGI programs. -Pretty documentation and man pages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --with-doc= (default: no) Build and install NUT documentation file(s). +The possible values are "html-single" for single page HTML, "html-chunked" +for multi pages HTML, "pdf" for a PDF file or "auto" to build all the +possible previous documentation formats. +Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make -This feature requires AsciiDoc 8.6.3 or newer (see https://asciidoc.org). - -The possible documentation type values are: - -* `html-single` for single page HTML, -* `html-chunked` for multi-paged HTML, -* `pdf` for a PDF file, and -* `man` for the usual manpages. - -Other values understood for this option are listed below: - -* If the `--with-doc` argument is passed without a list, or specifies - just `=yes` or `=all`, it enables all supported formats with a `=yes` - to require them. - -* An (explicit!) `--with-doc=auto` argument tries to enable all supported - formats with an `=auto` but should not fail the build if something - can not be generated. - -* A `--with-doc=no` quietly skips generation of all types of documentation, - including manpages. - -* `--with-doc=skip` is used to configure some of the `make distcheck*` - scenarios to re-use man page files built and distributed by the main - build and not waste time on re-generation of those. - -Multiple documentation format values can be specified, separated with comma. -Each such value can be suffixed with `=yes` to require building of this one -documentation format (abort configuration if tools are missing), `=auto` to -detect and enable if we can build it on this system (and not abort if we -can not), and `=no` (or `=skip`) to explicitly skip generation of this -document format even if we do have the tools to build it. - -If a document format is mentioned in the list without a suffix, then it is -treated as a `=yes` requirement. - -Verbose output can be enabled using: `ASCIIDOC_VERBOSE=-v make` - -Example valid formats of this flag: - -* `--with-doc` without an argument, effectively same as `--with-doc=yes` -* `--with-doc=` is a valid empty list, effectively same as `--with-doc=no` -* `--with-doc=auto` -* `--with-doc=pdf,html-chunked` -* `--with-doc=man=no,pdf=auto,html-single` - -Development files -~~~~~~~~~~~~~~~~~ +This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc). --with-dev (default: no) -Build and install the upsclient and nutclient library and header files, to -build further projects against NUT (such as wmNUT client and many others). - -Options for developers -~~~~~~~~~~~~~~~~~~~~~~ - - --enable-check-NIT (default: no) - -Add `make check-NIT` to default activity of `make check` to run the -NUT Integration Testing suite. This is potentially dangerous (e.g. due -to port conflicts when running many such tests in same environment), -so not active by default. - - --enable-maintainer-mode (default: no) - -Use maintainer mode to keep `Makefile.in` and `Makefile` in sync with -ever-changing `Makefile.am` content after Git updates or editing. - - --enable-cppcheck (default: no) - -Activate recipes for static analysis with `cppcheck` tools (if available). - -I want it all! -~~~~~~~~~~~~~~ +Build and install the upsclient and nutclient library and header files. --with-all (no default) @@ -233,120 +100,84 @@ Build and install all of the above (the serial, USB, SNMP, XML/HTTP and PowerMan drivers, the CGI programs and HTML files, and the upsclient library). -Networking transport security -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - --with-ssl (default: auto-detect) --with-nss (default: auto-detect) --with-openssl (default: auto-detect) Enable SSL support, using either Mozilla NSS or OpenSSL. - If both are present, and nothing was specified, OpenSSL support will -be preferred. - -Read link:docs/security.txt[] for instructions on SSL support. - -NOTE: Currently the two implementations differ in supported features. - -Networking access security -~~~~~~~~~~~~~~~~~~~~~~~~~~ +be preferred. Read docs/security.txt for instructions on SSL support. --with-wrap (default: auto-detect) -Enable libwrap (tcp-wrappers) support. - -Refer to linkman:upsd[8] man page for more information. - -Networking IPv6 -~~~~~~~~~~~~~~~ +Enable libwrap (tcp-wrappers) support. Refer to upsd man page for +more information. --with-ipv6 (default: auto-detect) Enable IPv6 support. -AVAHI/mDNS -~~~~~~~~~~ - --with-avahi (default: auto-detect) Build and install Avahi support, to publish NUT server availability using mDNS protocol. This requires Avahi development files for the -Core and Client parts. - -LibLTDL -~~~~~~~ +Core and Client parts. --with-libltdl (default: auto-detect) Enable libltdl (Libtool dlopen abstraction) support. - -This is required to build `nut-scanner` which loads third-party libraries -dynamically, based on requested scanning options. This allows to build and -package the tool without requiring all possible dependencies to be installed -in each run-time environment. +This is required to build nut-scanner. Other configuration options --------------------------- -NUT data server port -~~~~~~~~~~~~~~~~~~~~ - --with-port=PORT -Change the TCP port used by the network code. Default is 3493 -as registered with IANA. +Change the TCP port used by the network code. Default is 3493. -Ancient versions of `upsd` used port 3305. NUT 2.0 and up use a -substantially different network protocol and are not able to +Ancient versions of upsd used port 3305. NUT 2.0 and up use a +substantially different network protocol and are not able to communicate with anything older than the 1.4 series. If you have to monitor a mixed environment, use the last 1.4 version, as it contains compatibility code for both the old "REQ" and the new "GET" versions of the protocol. -Daemon user accounts -~~~~~~~~~~~~~~~~~~~~ - --with-user= --with-group= -Programs started as `root` will `setuid()` to `` for somewhat -safer operation. You can override this with `-u ` in several -programs, including `upsdrvctl` (and all drivers by extension), `upsd`, -and `upsmon`. The "user" directive in `ups.conf` overrides this at run +Programs started as root will setuid() to for somewhat +safer operation. You can override this with -u in several +programs, including upsdrvctl (and all drivers by extension), upsd, +and upsmon. The "user" directive in ups.conf overrides this at run time for the drivers. -NOTE: `upsmon` does not totally drop `root` because it may need to +NOTE: upsmon does not totally drop root because it may need to initiate a shutdown. There is always at least a stub process -remaining with `root` powers. The network code runs in another +remaining with root powers. The network code runs in another (separate) process as the new user. -The `` is used for the permissions of some files, +The is used for the permissions of some files, particularly the hotplugging rules for USB. The idea is that the device files for any UPS devices should be readable and writable by members of that group. -The default value for both the username and groupname is `nobody` -(or `nogroup` on systems that have it when `configure` script runs). +The default value for both the username and groupname is "nobody". This was done since it's slightly better than staying around as -`root`. Running things as `nobody` is not a good idea, since it's a +root. Running things as nobody is not a good idea, since it's a hack for NFS access. You should create at least one separate user for this software. -If you use one of the `--with-user` and `--with-group` options, then -you have to use the other one too. +If you use one of the --with-user and --with-group options, then +you have to use the other one too. -See the link:INSTALL.nut[] document and the FAQ for more on this topic. - -Syslog facility -~~~~~~~~~~~~~~~ +See the INSTALL.nut document and the FAQ for more on this topic. --with-logfacility=FACILITY Change the facility used when writing to the log file. Read the man -page for `openlog` to get some idea of what's available on your system. -Default is `LOG_DAEMON`. +page for openlog to get some idea of what's available on your system. +Default is LOG_DAEMON. Installation directories @@ -356,165 +187,111 @@ Installation directories This is a fairly standard option with GNU autoconf, and it sets the base path for most of the other install directories. The default -is `/usr/local/ups`, which puts everything but the state sockets in one -easy place, and does not conflict with usual distribution packaging. +is /usr/local/ups, which puts everything but the state sockets in one +easy place. If you like having things to be at more of a "system" level, setting -the prefix to `/usr/local` or even `/usr` might be better. +the prefix to /usr/local or even /usr might be better. --exec_prefix=PATH This sets the base path for architecture dependent files. By -default, it is the same as ``. +default, it is the same as . --sysconfdir=PATH Changes the location where NUT's configuration files are stored. -By default this path is `/etc`. Setting this to `/etc/nut` or -`/etc/ups` might be useful. +By default this path is /etc. Setting this to /etc or +/etc/ups might be useful. -The `NUT_CONFPATH` environment variable overrides this at run time. +The NUT_CONFPATH environment variable overrides this at run time. - --sbindir=PATH --bindir=PATH + --sbindir=PATH Where executable files will be installed. Files that are normally -executed by root (`upsd`, `upsmon`, `upssched`) go to ``, -all others to ``. The defaults are `/sbin` and -`/bin` respectively. - -See also `--with-drvpath` below. - - --with-drvpath=PATH - -The UPS drivers will be installed to this path. By default they -install to `/bin`, i.e. `/usr/local/ups/bin`. - -You would want a location that remains mounted when most of the system -is prepared to turn off, so some distributions package NUT drivers into -`/lib/nut` or similar. See link:config-notes.txt[] detailing how to -set up system shutdown. - -The `driverpath` global directive in the `ups.conf` file overrides this -at run time. +executed by root (upsd, upsmon, upssched) go to sbindir, all others +to bindir. The defaults are /bin and /sbin. --datadir=PATH Change the data directory, i.e., where architecture independent -read-only data is installed. By default this is `/share`, -i.e. `/usr/local/ups/share`. At the moment, this directory only -holds two files -- the optional `cmdvartab` and `driver.list`. +read-only data is installed. By default this is /share, +i.e., /usr/local/ups/share. At the moment, this directory only +holds two files - the optional cmdvartab and driver.list. --mandir=PATH Sets the base directories for the man pages. The default is -`/man`, i.e. `/usr/local/ups/man`. +/man, i.e., /usr/local/ups/man. --includedir=PATH Sets the path for include files to be installed when `--with-dev` is -selected. For example, `upsclient.h` is installed here. The default -is `/include`. +selected. For example, upsclient.h is installed here. The default +is /include. --libdir=PATH -Sets the installation path for libraries. Depending on the build -configuration, this can include the `libupsclient`, `libnutclient`, -`libnutclientsub`, `libnutscan` and their pkg-config metadata (see -`--with-pkgconfig-dir` option). The default is `/lib`. +Sets the installation path for libraries. This is just the +upsclient library for now. The default is /lib. - --with-pkgconfig-dir=PATH + --with-drvpath=PATH -Where to install pkg-config `*.pc` files. This option only has an -effect if `--with-dev` is selected, and causes a pkg-config file to -be installed in the named location. The default is -`/pkgconfig`. +The UPS drivers will be installed to this path. By default they +install to "/bin", i.e., /usr/local/ups/bin. -Use `--without-pkgconfig-dir` to disable this feature altogether. +The "driverpath" global directive in the ups.conf file overrides this +at run time. --with-cgipath=PATH The CGI programs will be installed to this path. By default, they -install to `/cgi-bin`, which is usually -`/usr/local/ups/cgi-bin`. +install to "/cgi-bin", which is usually /usr/local/ups/cgi-bin. -NOTE: If you set the prefix to something like `/usr`, you should set the -`cgipath` to something else, because `/usr/cgi-bin` is pretty ugly and +If you set the prefix to something like /usr, you should set the +cgipath to something else, because /usr/cgi-bin is pretty ugly and non-standard. The CGI programs are not built or installed by default. Use -`./configure --with-cgi` to request that they are built and +"./configure --with-cgi" to request that they are built and installed. --with-htmlpath=PATH HTML files will be installed to this path. By default, this is -`/html`. Note that HTML files are only installed if -`--with-cgi` is selected. +"/html". Note that HTML files are only installed if +--with-cgi is selected. + + --with-pkgconfig-dir=PATH + +Where to install pkg-config *.pc files. This option only has an +effect if `--with-dev` is selected, and causes a pkg-config file to +be installed in the named location. The default is +/pkgconfig. + +Use --without-pkgconfig-dir to disable this feature altogether. --with-hotplug-dir=PATH -Where to install Linux 2.4 hotplugging rules. The default is to use -`/etc/hotplug`, if that directory exists, and to not install it +Where to install Linux 2.4 hotplugging rules. The default is +/etc/hotplug, if that directory exists, and not to install it otherwise. Note that this installation directory is not a -subdirectory of `` by default. When installing NUT as a +subdirectory of by default. When installing NUT as a non-root user, you may have to override this option. -Use `--without-hotplug-dir` to disable this feature altogether. +Use --without-hotplug-dir to disable this feature altogether. --with-udev-dir=PATH Where to install Linux 2.6 hotplugging rules, for kernels that have -the "udev" mechanism. The default is to use `/etc/udev`, if that -directory exists, and to not install it otherwise. Note that this -installation directory is not a subdirectory of `` by +the "udev" mechanism. The default is /etc/udev, if that directory +exists, and not to install it otherwise. Note that this +installation directory is not a subdirectory of by default. When installing NUT as a non-root user, you may have to override this option. -Use `--without-udev-dir` to disable this feature altogether. - - --with-systemdsystemunitdir=PATH - -Where to install Linux systemd unit definitions. Useless and harmless -on other OSes, including Linux distributions without systemd, just adding -a little noise to configure script output. - -Use `--with-systemdsystemunitdir=auto` (default) to detect the settings -using pkg-config if possible. - -Use `--with-systemdsystemunitdir(=yes)` to require detection of these -settings with pkg-config, or fail configuration if not possible. - -Use `--with-systemdsystemunitdir=no` to disable this feature altogether. - - --with-systemdshutdowndir=PATH - -Where to install Linux systemd unit definitions for shutdown handling. -Useless and harmless on other OSes, including Linux distributions -without systemd, just adding a little noise to configure script output. - -Use `--with-systemdshutdowndir` to detect the settings using pkg-config. - -Use `--with-systemdshutdowndir=no` to disable this feature altogether. - - --with-systemdtmpfilesdir=PATH - -Where to install Linux systemd configuration for tmpfiles handling (the -automatically created locations for PID, state and similar run-time files). -Useless and harmless on other OSes, including Linux distributions -without systemd, just adding a little noise to configure script output. - -Use `--with-systemdtmpfilesdir` to detect the settings using pkg-config. - -Use `--with-systemdtmpfilesdir=no` to disable this feature altogether. - - --with-augeas-lenses-dir=PATH - -Where to install Augeas configuration-management lenses. - -Only useful and valid if you use Augeas to parse and modify configuration -files. The default is to use `/usr/share/augeas/lenses`, if that directory -exists, and to not install it otherwise. +Use --without-udev-dir to disable this feature altogether. Directories used by NUT at run-time @@ -523,87 +300,53 @@ Directories used by NUT at run-time --with-pidpath=PATH Changes the directory where pid files are stored. By default this is -`/var/run`. Certain programs like `upsmon` will leave files here. +/var/run. Certain programs like upsmon will leave files here. --with-altpidpath=PATH -Programs that normally don't have `root` powers, like the drivers and -`upsd`, write their pid files here. By default this is whatever the -statepath (below) is, as those programs should be able to write there. - -The `NUT_ALTPIDPATH` environment variable overrides this at run time. +Programs that normally don't have root powers, like the drivers and +upsd, write their pid files here. By default this is whatever the +statepath is, as those programs should be able to write there. --with-statepath=PATH -Change the default location of the state sockets created by the drivers -to interact with the data server `upsd`. Default is `/var/state/ups`. +Change the default location of the state sockets created by the +drivers. -The `NUT_STATEPATH` environment variable overrides this at run time. +The NUT_STATEPATH environment variable overrides this at run time. + +Default is /var/state/ups. Things the compiler might need to find -------------------------------------- -LibGD -~~~~~ - - --with-pkg-config - -This option allows to provide a custom program name (in `PATH`) or a -complete pathname to `pkg-config` which describes `CFLAGS`, `LIBS` and -possibly other build-time options in `*.pc` files, to use third-party -libraries. On build systems which support multiple architectures you -may also want to set `PKG_CONFIG_PATH` to match your current build. - --with-gd-includes="-I/foo/bar" -If you installed `libgd` in some place where your C preprocessor can't -find the header files, use this switch to add additional `-I` flags. +If you installed gd in some place where your C preprocessor can't +find the header files, use this switch to add additional -I flags. --with-gd-libs="-L/foo/bar -labcd -lxyz" -If your copy of `libgd` isn't linking properly, use this to give the -proper `-L` and `-l` flags to make it work. See `LIBS=` in gd's `Makefile`. +If your copy of gd isn't linking properly, use this to give the +proper -L and -l flags to make it work. See LIBS= in gd's Makefile. -NOTE: the `--with-gd` switches are not necessary if you have gd 2.0.8 -or higher installed properly. The `gdlib-config` script or pkg-config -manifest will be detected and used by default in that situation. - - --with-gdlib-config - -This option allows to provide a custom program name (in `PATH`) or -a complete pathname to `gdlib-config`. This may be needed on build -systems which support multiple architectures, or in cases where your -distribution names this program differently. - -LibUSB -~~~~~~ - - --with-libusb-config - -This option allows to provide a custom program name (in `PATH`) or -a complete pathname to `libusb-config` (usually delivered only for -libusb-0.1 version, but not for libusb-1.0). This may be needed on -build systems which support multiple architectures or provide several -versions of libusb, or in cases where your distribution names this -program differently. - -Various -~~~~~~~ +NOTE: the --with-gd switches are not necessary if you have gd 2.0.8 +or higher installed properly. The gdlib-config script will be +detected and used by default in that situation. --with-ssl-includes, --with-usb-includes, --with-snmp-includes, --with-neon-includes, --with-libltdl-includes, --with-powerman-includes="-I/foo/bar" If your system doesn't have pkg-config and support for any of the above -libraries isn't found (but you know it is installed), you must specify -the compiler flags that are needed. +libraries isn't found (but you know it is installed), you must specify the +compiler flags that are needed. --with-ssl-libs, --with-usb-libs, --with-snmp-libs, --with-neon-libs, --with-libltdl-libs --with-powerman-libs="-L/foo/bar -labcd -lxyz" -If system doesn't have pkg-config or it fails to provides hints for -some of the settings that are needed to set it up properly and the -build in defaults are not right, you can specify the correct values -for your system here. +If system doesn't have pkg-config or it fails to provides hints for some of the +settings that are needed to set it up properly and the build in defaults are +not right, you can specify the right variables here. diff --git a/docs/contact-closure.txt b/docs/contact-closure.txt index 044039e..deba8b9 100644 --- a/docs/contact-closure.txt +++ b/docs/contact-closure.txt @@ -74,19 +74,15 @@ When editing the genericups.h, the values have the following meanings: Outgoing lines: -- line_norm = what to set to make the line "normal" -- i.e. cable power +- line_norm = what to set to make the line "normal" - i.e. cable power - line_sd = what to set to make the UPS shut down the load Incoming lines: -- line_ol = flag that appears for on line / on battery -- val_ol = value of that flag when the UPS is on battery -- line_bl = flag that appears for low battery / battery OK -- val_bl = value of that flag when the battery is low -- line_rb = flag that appears for battery health -- val_rb = value of that flag when the battery needs a replacement -- line_bypass = flag that appears for battery bypass / battery protection active -- val_bypass = value of that flag when the battery is bypassed / missing +- line_ol = flag that appears for on line / on battery +- val_ol = value of that flag when the UPS is on battery +- line_bl = flag that appears for low battery / battery OK +- val_bl = value of that flag when the battery is low This may seem a bit confusing to have two variables per value that we want to read, but here's how it works. If you set line_ol to @@ -95,7 +91,7 @@ with the value of the serial port whenever a poll occurs. If that flag exists, then the result of the and will be 0x80. If it does not exist, the result will be 0. -So, if line_ol = foo, then val_ol can only be foo or 0. +So, if line_ol = foo, then val_ol can only be foo or 0. As a general case, if 'line_ol == val_ol', then the value you're reading is active high. Otherwise, it's active low. Check out the guts of diff --git a/docs/daisychain.txt b/docs/daisychain.txt deleted file mode 100644 index c67d287..0000000 --- a/docs/daisychain.txt +++ /dev/null @@ -1,220 +0,0 @@ -ifndef::external_title[] -[[daisychain]] -NUT daisychain support notes -============================ -endif::external_title[] - -NUT supports daisychained devices for any kind of device that proposes -it. This chapter introduces: - -* for developers: how to implement such mechanism, -* for users: how to manage and use daisychained devices in NUT in general, - and how to take advantage of the provided features. - -Introduction ------------- - -It's not unusual to see some daisy-chained PDUs or UPSs, connected together -in master-slave mode, to only consume 1 IP address for their communication -interface (generally, network card exposing SNMP data) and expose only one -point of communication to manage several devices, through the daisy-chain -master. - -This breaks the historical consideration of NUT that one driver provides -data for one unique device. However, there is an actual need, and a smart -approach was considered to fulfill this, while not breaking the standard -scope (for base compatibility). - - -Implementation notes --------------------- - -General specification -~~~~~~~~~~~~~~~~~~~~~ - -The daisychain support uses the device collection to extend the historical -NUT scope (1 driver -- 1 device), and provides data from the additional -devices accessible through a single management interface. - -A new variable was introduced to provide the number of devices exposed: the -`device.count`, which: - -* defaults to 1 -* if higher than 1, enables daisychain support and access to data of each -individual device through `device.X.{...}` - -To ensure backward compatibility in NUT, the data of the various devices -are exposed the following way: - -* `device.0` is a special case, for the whole set of devices (the whole -daisychain). It is equivalent to `device` (without `.X` index) and root -collections. The idea is to be able to get visibility and control over the -whole daisychain from a single point. -* daisy-chained devices are available from `device.1` (master) to `device.N` -(slaves). - -That way, client applications that are unaware of the daisychain support, -will only see the whole daisychain, as it would normally seem, and not -nothing at all. - -Moreover, this solution is generic, and not specific to the ePDU use case -currently considered. It thus support both the current NUT scope, along with -other use cases (parallel / serial UPS setups), and potential evolution and -technology change (hybrid chain with UPS and PDU for example). - - -Devices status handling -^^^^^^^^^^^^^^^^^^^^^^^ - -To be clarified... - - -Devices alarms handling -^^^^^^^^^^^^^^^^^^^^^^^ - -Devices (master and slaves) alarms are published in `device.X.ups.alarm`, -which may evolve into `device.X.alarm`. If any of the devices has an alarm, -the main `ups.status` will publish an `ALARM` flag. This flag is be cleared -once all devices have no alarms anymore. - -NOTE: ups.alarm behavior is not yet defined (all devices alarms vs. list of -device(s) that have alarms vs. nothing?) - -Example -^^^^^^^ - -Here is an example excerpt of three PDUs, connected in daisychain mode, with -one master and two slaves: - - device.count: 3 - device.mfr: EATON - device.model: EATON daisychain PDU - device.1.mfr: EATON - device.1.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19 - device.2.mfr: EATON - device.2.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19 - device.3.mfr: EATON - device.3.model: EPDU MI 38U-A IN: L6-30P 24A 1P OUT: 36XC13:6XC19 - ... - device.3.ups.alarm: high current critical! - device.3.ups.status: ALARM - ... - input.voltage: ??? (proposal: range or list or average?) - device.1.input.voltage: 237.75 - device.2.input.voltage: 237.75 - device.3.input.voltage: 237.75 - ... - outlet.1.status: ?? (proposal: "on, off, off) - device.1.outlet.1.status: on - device.2.outlet.1.status: off - device.3.outlet.1.status: off - ... - ups.status: ALARM - - -Information for developers -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -NOTE: these details are dedicated to the `snmp-ups` driver! - -In order to enable daisychain support for a range of devices, developers -have to do two things: - -* Add a `device.count` entry in a mapping file (see `*-mib.c`) -* Modify mapping entries to include a format string for the daisychain index - -Optionally, if there is support for outlets and / or outlet-groups, there -is already a template formatting string. So you have to tag such templates -with multiple definitions, to point if the daisychain index is the first -or second formatting string. - -Base support -^^^^^^^^^^^^ - -In order to enable daisychain support on a mapping structure, the following -steps have to be done: - -* Add a "device.count" entry in the mapping file: snmp-ups will determine -if the daisychain support has to be enabled (if more than 1 device). -To achieve this, use one of the following type of declarations: -+ -a) point at an OID which provides the number of devices: - - { "device.count", 0, 1, ".1.3.6.1.4.1.13742.6.3.1.0", "1", - SU_FLAG_STATIC, NULL }, -+ -b) point at a template OID to guesstimate the number of devices, by walking -through this template, until it fails: -+ - { "device.count", 0, 1, ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.%i", "1", - SU_FLAG_STATIC, NULL, NULL }, - -* Modify all entries so that OIDs include the formatting string for the -daisychain index. For example, if you have the following entry: -+ - { "device.model", ST_FLAG_STRING, SU_INFOSIZE, - ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.0", ... }, -+ -And if the last "0" of the the 4th field represents the index of the device -in the daisychain, then you would have to adapt it the following way: -+ - { "device.model", ST_FLAG_STRING, SU_INFOSIZE, - ".1.3.6.1.4.1.534.6.6.7.1.2.1.2.%i", ... }, - - -Templates with multiple definitions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If there already exist templates in the mapping structure, such as for -single outlets and outlet-groups, you also need to specify the position -of the daisychain device index in the OID strings for all entries in the -mapping table, to indicate where the daisychain insertion point is exactly. - -For example, using the following entry: - - { "outlet.%i.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.6.4.1.3.0.%i", - NULL, SU_OUTLET, NULL, NULL }, - -You would have to translate it to: - - { "outlet.%i.current", 0, 0.001, ".1.3.6.1.4.1.534.6.6.7.6.4.1.3.%i.%i", - NULL, SU_OUTLET | SU_TYPE_DAISY_1, NULL, NULL }, - -`SU_TYPE_DAISY_1` flag indicates that the daisychain index is the first -`%i` specifier in the OID template string. If it is the second one, use -`SU_TYPE_DAISY_2`. - - -Devices alarms handling -^^^^^^^^^^^^^^^^^^^^^^^ - -Two functions are available to handle alarms on daisychain devices in your -driver: - -* `device_alarm_init()`: clear the current alarm buffer -* `device_alarm_commit(const int device_number)`: commit the current alarm -buffer to "device..ups.alarm", and increase the count of -alarms. If the current alarms buffer is empty, the count of alarm is -decreased, and the variable "device..ups.alarm" is removed -from publication. Once the alarm count reaches "0", the main (device.0) -ups.status will also remove the "ALARM" flag. - -[NOTE] -====== -When implementing a new driver, the following functions have to be -called: - -* `alarm_init()` at the beginning of the main update loop, for the whole -daisychain. This will set the alarm count to "0", and reinitialize all -alarms, -* `device_alarm_init()` at the beginning of the per-device update loop. -This will only clear the alarms for the current device, -* `device_alarm_commit()` at the end of the per-device update loop. -This will flush the current alarms for the current device, -* also `device_alarm_init()` at the end of the per-device update loop. -This will clear the current alarms, and ensure that this buffer will not -be considered by other subsequent devices, -* `alarm_commit()` at the end of the main update loop, for the whole -daisychain. This will take care of publishing or not the "ALARM" flag -in the main ups.status (`device.0`, root collection). -====== diff --git a/docs/design.txt b/docs/design.txt index 9655f01..4e39eca 100644 --- a/docs/design.txt +++ b/docs/design.txt @@ -1,7 +1,7 @@ NUT design document =================== -This software is designed around a layered scheme with drivers, a +This software is designed around a layered scheme with drivers, a server and clients. These layers communicate with text-based protocols for easier maintenance and diagnostics. @@ -26,7 +26,7 @@ From the driver ~~~~~~~~~~~~~~~ The core of all DRIVERS maintains internal storage for every variable -that is known along with the auxiliary data for those variables. It +that is known along with the auxiliary data for those variables. It sends updates to this data to any process which connects to the Unix domain socket. @@ -39,7 +39,7 @@ The SERVER will connect to the socket of each DRIVER and will request a dump at that time. It retains this data in local storage for later use. It continues to listen on the socket for additional updates. -This protocol is documented in link:sock-protocol.txt[]. +This protocol is documented in sock-protocol.txt. From the server ~~~~~~~~~~~~~~~ @@ -50,31 +50,28 @@ immediately. When a request for data arrives from a CLIENT, the SERVER looks through the internal storage for that UPS and returns the requested data if it is available. -The format for requests from the CLIENT is documented in link:protocol.txt[]. +The format for requests from the CLIENT is documented in protocol.txt. Instant commands ---------------- -"Instant commands" is the term given to a set of actions that result in +Instant commands is the term given to a set of actions that result in something happening to the UPS. Some of the common ones are -`test.battery.start` to initiate a battery test and `test.panel.start` to +test.battery.start to initiate a battery test and test.panel.start to test the front panel of the UPS. They are passed to the SERVER from a CLIENT using an authenticated network connection. The SERVER first checks to make sure that the instant -command is valid for the DRIVER. If it's supported, a message is sent +command is valid for the DRIVER. If it's supported, a message is sent via a socket to the DRIVER containing the command and any auxiliary information. At this point, there is no confirmation to the SERVER of the command's execution. This is (still) planned for a future release. This has been delayed since returning a response involves some potentially interesting -timing issues. Remember that `upsd` services clients in a round-robin +timing issues. Remember that upsd services clients in a round-robin fashion, so all queries must be lightweight and speedy. -NOTE: FIXME: Wasn't "TRACKING" mechanism for "INSTCMD/SET VAR" introduced -to address just this? See https://github.com/networkupstools/nut/pull/659 - Setting variables ----------------- @@ -91,9 +88,6 @@ Like the instant commands, there is currently no acknowledgement of the command's completion from the DRIVER. This, too, is planned for a future release. -NOTE: FIXME: Wasn't "TRACKING" mechanism for "INSTCMD/SET VAR" introduced -to address just this? See https://github.com/networkupstools/nut/pull/659 - Example data path ----------------- @@ -103,24 +97,24 @@ delivering the alpha message to the admin. 1. EQUIPMENT reports on battery by setting flag in status register -2. DRIVER notices this flag and stores it in the `ups.status` variable as +2. DRIVER notices this flag and stores it in the ups.status variable as OB. This update gets pushed out to any listeners via the sockets. -3. SERVER `upsd` sees activity on the socket, reads it, parses it, and - commits the new data to its local version of the status variable. +3. SERVER upsd sees activity on the socket, reads it, parses it, and + commits the new data to its local version of the status variable. -4. CLIENT `upsmon` does a routine poll of SERVER for `ups.status` and - gets `OB`. +4. CLIENT upsmon does a routine poll of SERVER for "ups.status" and + gets "OB". -5. CLIENT `upsmon` then invokes its `NOTIFYCMD` which is `upssched`. +5. CLIENT upsmon then invokes its NOTIFYCMD which is upssched. -6. `upssched` starts up a daemon to handle a timer which will expire about +6. upssched starts up a daemon to handle a timer which will expire about 30 seconds into the future. 7. 30 seconds later, the timer expires since the UPS is still on battery, - and so `upssched` calls the `CMDSCRIPT` which is `upssched-cmd`. + and upssched calls the CMDSCRIPT upssched-cmd. -8. `upssched-cmd` parses the args and calls `sendmail`. +8. upssched-cmd parses the args and calls sendmail. 9. Avian carriers, smoke signals, SMTP, and some magic result in the message getting from the pager company's gateway to a transmitter @@ -128,66 +122,66 @@ delivering the alpha message to the admin. This scenario requires some configuration, obviously: -1. There's an UPS driver running. +1. There's a UPS driver running. (Whatever applies for the hardware) -2. `upsd` has a valid UPS entry in 'ups.conf' for this UPS. +2. upsd has a valid UPS entry in ups.conf for this UPS. [myups] driver = nutupsdrv port = /dev/ttySx -3. `upsd` has a valid user for `upsmon` in 'upsd.users' file. +3. upsd has a valid user for upsmon in upsd.users. [monuser] password = somepass - upsmon primary + upsmon master -4. `upsmon` is set to monitor this UPS with this user in 'upsmon.conf' file. +4. upsmon is set to monitor this UPS in upsmon.conf. + + MONITOR myups@localhost 1 monuser somepass master - MONITOR myups@localhost 1 monuser somepass primary - -5. `upsmon` is set to `EXEC` the `NOTIFYCMD` for the `ONBATT` condition in - 'upsmon.conf' file. +5. upsmon is set to EXEC the NOTIFYCMD for the ONBATT condition in + upsmon.conf. NOTIFYFLAG ONBATT EXEC -6. `upsmon` calls `upssched` as the `NOTIFYCMD` in 'upsmon.conf' file. +6. upsmon calls upssched as the NOTIFYCMD in upsmon.conf. NOTIFYCMD /path/to/upssched -7. `upssched` has a 30 second timer for `ONBATT` in 'upssched.conf' file. +7. upssched has a 30 second timer for ONBATT in upssched.conf. AT ONBATT * START-TIMER upsonbatt 30 -8. `upssched` calls `upssched-cmd` as the `CMDSCRIPT` in 'upssched.conf'. +8. upssched calls upssched-cmd as the CMDSCRIPT in upssched.conf. CMDSCRIPT /path/to/upssched-cmd -9. `upssched-cmd` knows what to do with `upsonbatt` keyword as its first - argument (a quick `case..esac` construct, see the examples) +9. upssched-cmd knows what to do with "upsonbatt" as its first argument + (A quick case..esac construct, see the examples) History ------- The oldest versions of this software (1998) had no separation between -the driver and the network server, and only supported the latest APC +the driver and the network server and only supported the latest APC Smart-UPS hardware as a result. The network protocol used brittle binary structs. This had numerous bad implications for compatibility and portability. After the driver and server were separated, data was shared through the state file concept. Status was written into a static array (the "info -array") by drivers, and that array was stored on disk. The `upsd` would +array") by drivers, and that array was stored on disk. upsd would periodically read that file into a local copy of that array. Shared memory mode was added a bit later, and that removed some of the lag from the status updates. Unfortunately, it didn't have any locking originally, and the possibility for corruption due to races existed. -`mmap()` support was added at some point after that, and became the -default. The drivers and `upsd` would `mmap()` the file into memory and +mmap() support was added at some point after that, and became the +default. The drivers and upsd would mmap() the file into memory and read or write from it. Locking was done using the state file as the token, so contention problems were avoided. This method was relatively quick, but it involved at least 3 copies of the data (driver, disk/mmap, @@ -200,13 +194,12 @@ connections and push updates asynchronously to any listeners. They also recognize a few commands. Drivers also dampen updates, and only push them out when something actually changes. -As a result, `upsd` no longer has to poll any files on the disk, and can -just `select()` all of its file descriptors (fds) and wait for activity. -When one of them is active, it reads the fd and parses the results. -Updates from the hardware now get to `upsd` about as fast as they possibly -can. +As a result, upsd no longer has to poll any files on the disk, and can +just select() all of its fds and wait for activity. When one of them is +active, it reads the fd and parses the results. Updates from the +hardware now get to upsd about as fast as they possibly can. -Drivers used to call `setinfo()` to change the local array, and then would -call `writeinfo()` to push the array onto the disk, or into the +Drivers used to call setinfo() to change the local array, and then would +call writeinfo() to push the array onto the disk, or into the mmap/shared memory space. This introduced a lag since many drivers poll quite a few variables during an update. diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt index 5cd8f2c..7b0a823 100644 --- a/docs/developer-guide.txt +++ b/docs/developer-guide.txt @@ -73,19 +73,18 @@ This mode allows to simulate any kind of devices, even non existing ones. Using this method, you can either replay a real life sequence, <>, or directly interact -through `upsrw` or by editing the device file, to modify the variables' -values. +through upsrw or by editing the device file, to modify the variables values. Here is an example to setup a device simulation: - install NUT as usual, if not already done -- get a simulation file (`.dev`) or sequence (`.seq`), or generate one using - the <>. Sample files are provided in the - `data` directory of the NUT source. You can also download these from - the development repository, such as the - link:https://github.com/networkupstools/nut/raw/master/data/evolution500.seq[evolution500.seq]. -- copy the simulation file to your sysconfig directory, like `/etc/nut` - or `/etc/ups` +- get a simulation file (.dev) or sequence (.seq), or generate one using the +<>. Sample files are provided in the 'data' +directory of the NUT source. You can also download these from the development +repository, such as the +link:http://anonscm.debian.org/viewvc/nut/trunk/data/evolution500.seq?revision=2778&view=co[evolution500.seq]. +- copy the simulation file to your sysconfig directory, like /etc/nut or +/etc/ups - configure NUT for simulation (linkman:ups.conf[5]): + [dummy] @@ -93,7 +92,7 @@ Here is an example to setup a device simulation: port = evolution500.dev desc = "dummy-ups in dummy mode" + -- now start NUT, at least `dummy-ups` and `upsd`: +- now start NUT, at least dummy-ups and upsd: + $ upsdrvctl start dummy $ upsd @@ -103,15 +102,15 @@ Here is an example to setup a device simulation: $ upsc dummy ... + -- you can also use `upsrw` to modify the data in memory: +- you can also use upsrw to modify the data: + $ upsrw -s ups.status="OB LB" -u user -p password dummy + -- or directly edit your copy of `/etc/nut/evolution500.seq`. - In this case, modification will only apply according to the `TIMER` - events and the current position in the sequence. +- or directly edit /etc/nut/evolution500.seq. In this case, modification will +only apply according to the TIMER events and the current position in the +sequence. -For more information, refer to linkman:dummy-ups[8] manual page. +For more information, refer to linkman:dummy-ups[8] manual page. [[dev-recording]] @@ -119,11 +118,11 @@ For more information, refer to linkman:dummy-ups[8] manual page. Device recording ---------------- -To complete `dummy-ups`, NUT provides a device recorder script called -`nut-recorder.sh` and located in the 'tools/' directory of the +To complete dummy-ups, NUT provides a device recorder script called +'nut-recorder.sh' and located in the 'tools/' directory of the NUT source tree. -This script uses `upsc` to record device information, and stores +This script uses 'upsc' to record device information, and stores these in a differential fashion every 5 seconds (by default). Its usage is the following: @@ -135,8 +134,8 @@ For example, to record information from the device 'myups' every 10 seconds: nut-recorder.sh myups@localhost myups.seq 10 During the recording, you will want to generate power events, such as power -failure and restoration. These will be tracked in the simulation files, and -be eventually be replayed by the <> driver. +failure and restoration. These will be tracked in the simulation files, and be +eventually be replayed by the <> driver. NUT core development and maintenance @@ -160,14 +159,8 @@ Appendix A: NUT command and variable naming scheme include::nut-names.txt[] -[[daisychain]] -Appendix B: NUT daisychain support notes -======================================== - -include::daisychain.txt[] - [[lib-info]] -Appendix C: NUT libraries complementary information +Appendix B: NUT libraries complementary information =================================================== include::../lib/README[] diff --git a/docs/developers.txt b/docs/developers.txt index 11f8daa..9d52065 100644 --- a/docs/developers.txt +++ b/docs/developers.txt @@ -4,71 +4,70 @@ Information for developers This document is intended to explain some of the more useful things within the tree, and provide a standard for working on the code. -General stuff -- common subdirectory ------------------------------------- +General stuff - common subdirectory +----------------------------------- String handling ~~~~~~~~~~~~~~~ -Use `snprintf()`. It's even provided with a compatibility module if the +Use snprintf(). It's even provided with a compatibility module if the target system doesn't have it natively. -If you use `snprintf()` to load some value into a buffer, make sure you +If you use snprintf() to load some value into a buffer, make sure you provide the format string. Don't use user-provided format strings, since that's an easy way to open yourself up to an exploit. -Don't use `strcat()`. We have a neat wrapper for `snprintf()` called -`snprintfcat()` that allows you to append to `char *` with a format -string and all the usual string length checking of `snprintf()` routine. +Don't use strcat(). We have a neat wrapper for snprintf() called snprintfcat() +that allows you to append to char * with a format string and all the usual +string length checking of snprintf(). Error reporting ~~~~~~~~~~~~~~~ -Don't call `syslog()` directly. Use `upslog_with_errno()` and `upslogx()`. +Don't call syslog() directly. Use upslog_with_errno() and upslogx(). They may write to the syslog, stderr, or both as appropriate. This means you don't have to worry about whether you're running in the background or not. -The `upslog_with_errno()` routine prints your message plus the string -expansion of `errno`. The `upslogx()` just prints the message. +upslog_with_errno prints your message plus the string expansion of +errno. upslogx just prints the message. -`fatal_with_errno()` and `fatalx()` work the same way, but they -also `exit(EXIT_FAILURE)` afterwards. Don't call `exit()` directly. +fatal_with_errno and fatalx work the same way, but they +exit(EXIT_FAILURE) afterwards. Don't call exit() directly. Debugging information ~~~~~~~~~~~~~~~~~~~~~ -The `upsdebug_with_errno()`, `upsdebugx()`, `upsdebug_hex()` and -`upsdebug_ascii()` routines use the global `nut_debug_level`, so you -don't have to mess around with `printf()`'s and `if`'s yourself. -Use them. +upsdebug_with_errno(), upsdebugx(), upsdebug_hex() and upsdebug_ascii() +use the global `nut_debug_level` so you don't have to mess around with +printf()s yourself. Use them. Memory allocation ~~~~~~~~~~~~~~~~~ -`xmalloc()`, `xcalloc()`, `xrealloc()` and `xstrdup()` all check the -results of the base calls before continuing, so you don't have to. -Don't use the raw calls directly. +xmalloc, xcalloc, xrealloc and xstrdup all check the results of the base +calls before continuing, so you don't have to. Don't use the raw calls +directly. Config file parsing ~~~~~~~~~~~~~~~~~~~ -The configuration parser, called `parseconf`, is now up to its fourth +The configuration parser, called parseconf, is now up to its fourth major version. It has multiple entry points, and can handle many different jobs. It's usually used for parsing files, but it can also take input a line at a time or even a character at a time. -You must initialize a context buffer with `pconf_init()` before using any -other `parseconf` function. `pconf_encode()` is the only exception, since -it operates on a buffer you supply and is an auxiliary function. +You must initialize a context buffer with pconf_init before using any +other parseconf function. pconf_encode is the only exception, since it +operates on a buffer you supply and is an auxiliary function. Escaping special characters and quoting multiple-word elements is all handled by the state machine. Using the same code for all config files avoids code duplication. NOTE: this does not apply to drivers. Driver authors should use the -`upsdrv_makevartable()` scheme to pick up values from 'ups.conf' file. -Drivers should not have their own config files. +upsdrv_makevartable() scheme to pick up values from ups.conf. Drivers +should not have their own config files. Drivers may have their own data files, such as lists of hardware, mapping tables, or similar. The difference between a data file and a @@ -79,13 +78,13 @@ hardware support to a driver without recompiling. vs. ~~~~~~~~~~~~~~~~~~~~~~~~~ -This is already handled by autoconf, so just `#include "timehead.h"` and -you will get the right headers on every system. +This is already handled by autoconf, so just include "timehead.h" and you +will get the right headers on every system. -Device drivers -- main.c ------------------------- +Device drivers - main.c +----------------------- -The device drivers use `main.c` as their core. +The device drivers use main.c as their core. To write a new driver, you create a file with a series of support functions that will be called by main. These all have names that start @@ -93,7 +92,7 @@ with `upsdrv_`, and they will be called at different times by main depending on what needs to happen. See the <> for information on writing -drivers, and also refer to the skeletal driver in `skel.c`. +drivers, and also refer to the skeletal driver in skel.c. Portability ----------- @@ -109,9 +108,9 @@ There are still older systems out there that don't do C++ style comments. -------------------------------------- Newer versions of gcc allow you to declare a variable inside a function -after code, somewhat like the way C++ operates, like this: +somewhat like the way C++ operates, like this: -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- function do_stuff(void) { check_something(); @@ -120,322 +119,18 @@ function do_stuff(void) a = do_something_else(); } -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- While this will compile and run on these newer versions, it will fail miserably for anyone on an older system. That means you must not use -it. `gcc` only warns about this with `-pedantic` flag. - -Another feature that does not work on some compilers (e.g. conforming -to "ANSI C"/C89/C90 standard) is initial variable declaration inside a -'for loop' block, like this: --------------------------------------------------------------------------------- -function do_stuff(void) -{ - /* This should declare "int i;" first, then use it in "for" loop: */ - for (int i = 0; i < INT_MAX; ++i) { ... } - - /* Additional loops cause also an error about re-declaring a variable: */ - for (int i = 10; i < 15; ++i) { ... } -} --------------------------------------------------------------------------------- - -TIP: At this point NUT is expected to work correctly when built with a -C99 (or rather GNU99 on many systems) or newer standard. - -The NUT codebase may build in a mode without warnings made fatal on C89 -(GNU89), but the emitted warnings indicate that those binaries may crash. -By the end of 2021, NUT codebase has been revised to pass GNU and strict-C -mode builds with C89 standard with the GCC toolkit (and on systems that do -have the newer features in libraries, just hide them in standard headers); -however CLANG toolkit is more restrictive about the C99+ syntax used. -If somebody in the community requires to build and run NUT on systems -that old, pull requests to fix the offending coding issues are welcome. - -Note also that the NUT codebase currently relies on certain features, -such as the printf format modifiers for `(s)size_t`, use of `long long`, -some nuances about structure/array initializers, variadic macros for -debugging, etc. that a pedantic C90 mode compilation warns is not part -of the standard but a GNU extension (and part of C99 and newer standard -revisions). Many of the "offences" against the older standard actually -come from system and third-party header files. - -That said, the NUT CI farm does run non-regression builds with GNU C89 -and strict C89 standard revisions and minimal passing warnings level, -to ensure that codebase is and remains at least basically compliant. - -Continuous Integration and Automated Builds -------------------------------------------- - -To ease and automate the build scenarios which were deemed important for -quality assurance and non-regression checks of NUT, several solutions -were introduced over time. - -ci_build.sh -^^^^^^^^^^^ - -This script was originally introduced (following ZeroMQ/ZProject example) -to automate CI builds, by automating certain scenarios driven by exported -environment variables to set particular `configure` options and `make` -some targets (chosen by the `BUILD_TYPE` envvar). It can also be used -locally to avoid much typing to re-run those scenarios during development. - -Developers can directly use the scripts involved in CI builds to fix -existing code on their workstations or to ensure support for new -compilers and C standard revisions, e.g. save a local file like this -to call the common script with pre-sets: - - $ cat _fightwarn-gcc10-gnu17.sh - #!/bin/sh - - BUILD_TYPE=default-all-errors \ - CFLAGS="-Wall -Wextra -Werror -pedantic -std=gnu17" \ - CXXFLAGS="-Wall -Wextra -Werror -std=gnu++17" \ - CC=gcc-10 CXX=g++-10 \ - ./ci_build.sh - -...and then execute it to prepare a workspace, after which you can go -fixing bugs file-by-file running a `make` after each save to confirm -your solutions and uncover the next issue to address :-) - -Helpfully, the NUT CI farm build logs report the configuration used for -each executed stage, so if some build combination fails -- you can just -scroll to the end of that section and copy-paste the way to reproduce -an issue locally (on an OS similar to that build case). - -Note that while spelling out sets of warnings can help in a quest to -fix certain bugs during development (if only by removing noise from -classes of warnings not relevant to the issue one is working on), there -is a reasonable set of warnings which NUT codebase actively tries to -be clean about (and checks in CI), detailed in the next section. - -For the `ci_build.sh` usage like above, one can instead pass the setting -via `BUILD_WARNOPT=...`, and require that all emitted warnings are fatal -for their build, e.g.: - - $ cat _fightwarn-clang9-gnu11.sh - #!/bin/sh - - BUILD_TYPE=default-all-errors \ - BUILD_WARNOPT=hard BUILD_WARNFATAL=yes \ - CFLAGS="-std=gnu11" \ - CXXFLAGS="-std=gnu++11" \ - CC=clang-9 CXX=clang++-9 CPP=clang-cpp \ - ./ci_build.sh - -Finally, for refactoring effort geared particularly for fighting the -warnings which exist in current codebase, the script contains some -presets (which would evolve along with codebase quality improvements) -as `BUILD_TYPE=fightwarn-gcc`, `BUILD_TYPE=fightwarn-clang` or plain -`BUILD_TYPE=fightwarn`: - - BUILD_TYPE=fightwarn-clang ./ci_build.sh - -As a rule of thumb, new contributions must not emit any warnings when -built in GNU99 mode with a `minimal` "difficulty" level of warnings. -Technically they must survive the part of test matrix across the several -platforms tested by NUT CI and marked in project settings as required -to pass, to be accepted for a pull request merge. - -Developers aiming to post successful pull requests to improve NUT can -pass the `--enable-warnings` option to the `configure` script in local -builds to see how that behaves and ensure that at least in some set-up -their contribution is viable. Note that different compiler versions and -vendors (gcc/clang/...), building against different OS and third-party -dependencies, with different CPU architectures and different language -specification revisions, might all complain about different issues -- -and catching this in as diverse range of set-ups as possible is why we -have CI tests. - -It can be beneficial for serial developers to set up a local BuildBot, -Travis or a Jenkins instance with a matrix test job, to test their local -git repository branches with whatever systems they have available. - -* https://github.com/networkupstools/nut/issues/823 - -While `autoconf` tries its best to provide portable shell code, sometimes -there are builds of system shell that just fail under stress. If you are -seeing random failures of `./configure` script in different spots with -the same inputs, try telling `./ci_build.sh` to loop configuring until -success (instead of quickly failing), and/or tell `./configure` to use -another shell at least for the system call-outs, with options like these: - - SHELL=/bin/bash CONFIG_SHELL=/bin/bash CI_SHELL_IS_FLAKY=true \ - ./ci_build.sh - -Jenkins CI -^^^^^^^^^^ - -Since mid-2021, the NUT CI farm is implemented by several virtual servers -courteously provided by http://fosshost.org - -These run various operating systems as build agents, and a Jenkins instance -to orchestrate the builds of NUT branches and pull requests on those agents. - -This is driven by `Jenkinsfile-dynamatrix` and a Jenkins Shared Library called -link:https://github.com/networkupstools/jenkins-dynamatrix[jenkins-dynamatrix] -which prepares a matrix of builds across as many operating systems, -bitnesses/architectures, compilers, make programs and C/C++ revisions -as it can -- based on the population of currently available build agents -and capabilities which they expose as agent labels. - -This hopefully means that people interested in NUT can contribute to the -build farm (and ensure NUT is and remains compatible with their platform) -by running a Jenkins Swarm agent with certain labels, which would dial -into https://ci.networkupstools.org/ controller. Please contact the NUT -maintainer if you want to participate in this manner. - -The `Jenkinsfile-dynamatrix` recipe allows NUT CI farm to run different sets -of build scenarios based on various conditions, such as the name of branch -being built (or PR'ed against), changed files (e.g. C/C++ sources vs. just -docs), and some build combinations may be not required to succeed. - -For example, the main development branch and pull requests against it must -cleanly pass all specified builds and tests on various platforms with the -default level of warnings specified in the `configure` script. These are -balanced to not run too many build scenarios overall, but just a quick and -sufficiently representative set. - -As another example, there is special handling for "fightwarn" pattern in -the branch names to run many more builds with varying warning levels and -more variants of intermediate language revisions, and so expose concerns -deliberately missed by default warnings levels in "master" branch builds -(the bar moves over time, as some classes of warnings become extinct from -our codebase). - -Further special handling for branches named like `fightwarn.*89.*` regex -enables more intensive warning levels for a GNU89 build specifically (which -are otherwise disabled as noisy yet not useful for supported C99+ builds), -and is intended to help develop fixes for support of this older language -revision, if anyone would dare. - -Many of those unsuccessful build stages are precisely the focus of the -"fightwarn" effort, and are currently marked as "may fail", so they end -up as "UNSTABLE" (seen as orange bubbles in the Jenkins BlueOcean UI, or -orange cells in the tabular list of stages in the legacy UI), rather than -as "FAILURE" (red bubbles) for build scenarios that were not expected to -fail and usually represent higher-priority problems that would block a PR. - -Developers whose PR builds (or attempts to fix warnings) did not succeed in -some cell of such build matrix, can look at the individual logs of that cell. -Beside indication from the compiler about the failure, the end of log text -includes the command which was executed by CI worker and can be reproduced -locally by the developer, e.g.: ----- -22:26:01 FINISHED with exit-code 2 cmd: ( -22:26:01 [ -x ./ci_build.sh ] || exit -22:26:01 -22:26:01 eval BUILD_TYPE="default-alldrv" BUILD_WARNOPT="hard" \ - BUILD_WARNFATAL="yes" MAKE="make" CC=gcc-10 CXX=g++-10 \ - CPP=cpp-10 CFLAGS='-std=gnu99 -m64' CXXFLAGS='-std=gnu++11 -m64' \ - LDFLAGS='-m64' ./ci_build.sh -22:26:01 ) ----- -or for autotools-driven scenarios (which prep, configure, build and test -in separate stages -- so for reproducing a failed build you should also -look at its configuration step separately): ----- -22:28:18 FINISHED with exit-code 0 cmd: ( [ -x configure ] || exit; \ - eval CC=clang-9 CXX=clang++-9 CPP=clang-cpp-9 CFLAGS='-std=c11 -m64' \ - CXXFLAGS='-std=c++11 -m64' LDFLAGS='-m64' time ./configure ) ----- - -To re-run such scenario locally, you can copy the line from `eval` (but -without the `eval` keyword itself) up to and including the executed script -or tool, into your shell. Depending on locally available compilers, you -may have to tweak the `CC`, `CXX` and `CPP` arguments; note that a `CPP` -may be specified as `/path/to/CC -E` for GCC and CLANG based toolkits -at least, if they lack a standalone preprocessor program (e.g. IntelCC). - -NOTE: While NUT recipes do not currently recognize a separate `CXXCPP`, -it would follow similar semantics. - -Some further details about the NUT CI farm workers are available in -link:config-prereqs.txt[config-prereqs.txt] and -link:ci-farm-lxc-setup.txt[ci-farm-lxc-setup.txt] documents. - -Travis CI -^^^^^^^^^ - -See the `.travis.yml` file in project sources for a detailed list of third -party dependencies and a large matrix of `CFLAGS` and compiler versions -last known to work or to not (yet) work on operating systems available -to that CI solution. - -[NOTE] -====== -The cloud Travis CI offering became effectively defunct for -open-source projects in mid-2021, so the `.travis.yml` file in NUT -codebase is not actively maintained. - -Local private deployments of Travis CI are possible, so if anybody does -use it and has updated markup to share, they are welcome to post PRs. -====== - -The NUT project on GitHub has integration with Travis CI to test a large -set of compiler and option combinations, covering different versions of -gcc and clang, C standards, and requiring to pass builds at least in a -mode without warnings (and checking the other cases where any warnings -are made fatal). - -Pre-set warning options -~~~~~~~~~~~~~~~~~~~~~~~ - -The options chosen into pre-sets that can be selected by `configure` -script options are ones we use for different layers of CI tests. - -Values to note include: - -* `--enable-Werror(=yes/no)` -- make warnings fatal; - -* `--enable-warnings(=.../no)` -- enable certain warning presets: - -** `gcc-hard`, `clang-hard`, `gcc-medium`, `clang-medium`, `gcc-minimal`, - `clang-minimal`, `all` -- actual definitions that are compiler-dependent - (the latter just adds `-Wall` which may be relatively portable); - -** `hard`, `medium` or `minimal` -- if current compiler is detected as - CLANG or GCC, apply corresponding setting from above (or `all` otherwise); - -** `gcc` or `clang` -- apply the set of options (regardless of detected - compiler) with default "difficulty" hard-coded in `configure` script, - to tweak as our codebase becomes cleaner; - -** `yes`/`auto` (also takes effect if `--enable-warnings` is requested - without an `=ARG` part) -- if current compiler is detected as CLANG - or GCC, apply corresponding setting with default "difficulty" from - above (or `all` otherwise). - -Note that for backwards-compatibility reasons and to help filter out -introduction of blatant errors, builds with compilers that claim GCC -compatibility can enable a few easy warning presets by default. This -can be avoided with an explicit argument to `--disable-warnings` (or -`--enable-warnings=no`). - -All levels of warnings pre-sets for GCC in particular do not enforce -the `-pedantic` mode for builds with C89/C90/ANSI standard revision -(as guesstimated by `CFLAGS` content), because nowadays it complains -more about the system and third-party library headers, than about NUT -codebase quality (and "our offenses" are mostly something not worth -fixing in this era, such as the use of `__func__` in debug commands). -If there still are practical use-cases that require builds of NUT on -pre-C99 compiler toolkits, pull requests are of course welcome -- but -the maintainer team does not intend to spend much time on that. - -Hopefully this warnings pre-set mechanism is extensible enough if we -would need to add more compilers and/or "difficulty levels" in the -future. - -Finally, note that such pre-set warnings can be mixed with options -passed through `CFLAGS` or `CXXFLAGS` values to your local `configure` -run, but it is up to your compiler how it interprets the resulting mix. +it. gcc only warns about this with -pedantic. Coding style ------------ This is how we do things: -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- int open_subspace(char *ship, int privacy) { if (!privacy) @@ -446,22 +141,22 @@ int open_subspace(char *ship, int privacy) return secure_channel(ship); } -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- The basic idea is that we try to group things into functions, and then find ways to drop out of them when we can't go any further. There's another way to program this involving a big else chunk and a bunch of braces, and it can be hard to follow. You can read this from top to bottom and have a pretty good idea of what's going on without having to -track too much `{ }` nesting and indenting. +track too much { } nesting and indenting. -We don't really care for `pretentiousVariableNamingSchemes`, but you can +We don't really care for pretentiousVariableNamingSchemes, but you can probably get away with it in your own driver that we will never have to touch. If your function or variable names start pushing important code off the right margin of the screen, expect them to meet the byte chainsaw sooner or later. -All types defined with typedef should end in `_t`, because this is +All types defined with typedef should end in "_t", because this is easier to read, and it enables tools (such as indent and emacs) to display the source code correctly. @@ -479,41 +174,16 @@ non-tab character has appeared on the line must be done by spaces in order for it to remain at the same alignment when someone views tabs at a different widths. -One common example for this is multi-line if condition: - --------------------------------------------------------------------------------- - if (something && - something_else) { --------------------------------------------------------------------------------- - -which may be written without mixing tabs and spaces to indent, as: - --------------------------------------------------------------------------------- - if (something - && something_else - ) { --------------------------------------------------------------------------------- - -Another example is tables of definitions that are better aligned with -(non-leading) spaces at least between names and values not too many -characters wide; it still helps to align the columns with spaces at -offsets divisible by 4 or 8 (consistently for the whole table): - --------------------------------------------------------------------------------- -#define SHORT_MACRO 1 /* flag comment */ -#define SOMETHING_WITH_A_VERY_LONG_NAME 255 /* flag comment */ --------------------------------------------------------------------------------- - -If you write something that uses leading spaces, you may get away with -it in a driver that's relatively secluded. However, if we have to work -on that code, expect it to get reformatted according to the above. +If you write something that uses spaces, you may get away with it in a +driver that's relatively secluded. However, if we have to work on that +code, expect it to get reformatted according to the above. Patches to existing code that don't conform to the coding style being used in that file will probably be dropped. If it's something we really need, it will be grudgingly reformatted before being included. When in doubt, have a look at Linus's take on this topic in the Linux -kernel -- Documentation/CodingStyle. He's done a far better job of +kernel - Documentation/CodingStyle. He's done a far better job of explaining this. Line breaks @@ -521,52 +191,26 @@ Line breaks It is better to have lines that are longer than 80 characters than to wrap lines in random places. This makes it easier to work with tools -such as `grep`, and it also lets each developer choose their own +such as "grep", and it also lets each developer choose their own window size and tab setting without being stuck to one particular choice. Of course, this does not mean that lines should be made unnecessarily long when there is a better alternative (see the note on -`pretentiousVariableNamingSchemes` above). Certainly there should not +pretentiousVariableNamingSchemes above). Certainly there should not be more than one statement per line. Please do not use -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- if (condition) break; -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- but use the following: -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- if (condition) { break; } -------------------------------------------------------------------------------- - -Un-used variables and function arguments -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Whenever a function needs to satisfy a particular API, it can end up -taking arguments that are not used in practice (think a too-trivial -signal handler). While some compilers offer the facility of decorations -like `__attribute__(unused)`, this proved not to be a portable solution. -Also the abilities of newer C++ standard revisions are of no help to -the vast range of existing systems that run NUT today and expect to be -able to do so tomorrow (hence the required C99+ support noted above). - -In NUT codebase we prefer to mark un-used variables explicitly in the -body of the function (or an `#ifdef` branch of its code) using the -`NUT_UNUSED_VARIABLE(varname)` as a routine call inside a function -body, referring to the macro defined in `common.h`. - -To display in a rough example: - -------------------------------------------------------------------------------- - static void signal_X_handler(int signal_X) { - NUT_UNUSED_VARIABLE(signal_X); - /* We have explicitly got nothing to do if we catch signal X */ - return; - } -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- Miscellaneous coding style tools -------------------------------- @@ -586,10 +230,10 @@ possible to set a tab stop to be 3 spaces, rather than the usual 8. (Note that in the saved file, one indentation level will still correspond to one tab stop; the difference is only how the file is rendered on screen). It is even possible to set this on a -per-directory basis, by putting something like this into your `.emacs` +per-directory basis, by putting something like this into your .emacs file: -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- ;; NUT style (defun nut-c-mode () @@ -604,64 +248,29 @@ file: (setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode) auto-mode-alist)) -------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- Finishing touches ~~~~~~~~~~~~~~~~~ -We like code that uses `const` and `static` liberally. If you don't need -to expose a function or global variable to the outside world, `static` is +We like code that uses const and static liberally. If you don't need to +expose a function or global variable to the outside world, static is your friend. If nobody should edit the contents of some buffer that's -behind a pointer, `const` keeps them honest. +behind a pointer, const keeps them honest. -We always compile with `-Wall`, so things like `const` and `static` help you +We always compile with -Wall, so things like const and static help you find implementation flaws. Functions that attempt to modify a constant or access something outside their scope will throw a warning or even fail to compile in some cases. This is what we want. -Switch case fall-through -~~~~~~~~~~~~~~~~~~~~~~~~ - -While C standards allow to write `switch` statements to "fall through" -from handling one case into another, modern compilers frown upon that -practice and spew warnings which complicate detecting real bugs in the -code (and also looking back at some of the cases written decades ago, -it is not trivial to state whether the fall-through was intentional or -really is a bug). - -Compilers which detect such problem usually offer ways to decorate the -code with comments or attributes to keep it quiet it in cases where the -jump is intentional; also C++17 introduces special keywords for that in -the standard. NUT aiming to be portable and independent of compilers as -much as possible, prefers the arguably clearer and standards-based way -of using `goto` into the next intended operation, even though it is a -couple of lines away, e.g.: - - int uppercase = 0; - switch (char_opt) { - case 'U': - uppercase = 1; - goto fallthrough_case_u_option; - case 'u': - fallthrough_case_u_option: - process_u_option(uppercase); - break; - } - -In trivial cases, like falling through to `default` which just returns, -it may be clearer and more maintainable (adding other option cases in -the future) to just `return same_result` in the code block that would -fall through otherwise and avoid `goto` statements altogether. - Spaghetti ~~~~~~~~~ -If you use a `goto` that jumps over long distances (see "Switch case -fall-through" section above), expect us to drop it when our head stops -spinning. It gives us flashbacks to the very old code we wrote. +If you use a goto, expect us to drop it when our head stops spinning. +It gives us flashbacks to the very old code we wrote. We've tried to clean up our act, and you should make the effort -as well. +as well. We're not making a blanket statement about gotos, since everything probably has at least one good use. There are a few cases where a goto @@ -676,18 +285,18 @@ There are parts of the source tree that do not yet conform to these specs. Part of this is due to the fact that the coding style has been evolving slightly over the course of the project. Some of the code you see in these directories is 5 years old, and things have gotten cleaner -since then. Don't worry -- it'll get cleaned up the next time something +since then. Don't worry - it'll get cleaned up the next time something in the vicinity gets a visit. Memory leak checking ~~~~~~~~~~~~~~~~~~~~ We can't say enough good things about valgrind. If you do anything with -dynamic memory in your code, you need to use this. Just compile with -`gcc -g` and start the program inside `valgrind`. Run it through the -suspected area and then exit cleanly. valgrind will tell you if you've -done anything dodgy like freeing regions twice, reading uninitialized -memory, or if you've leaked memory anywhere. +dynamic memory in your code, you need to use this. Just compile with -g +and start the program inside valgrind. Run it through the suspected +area and then exit cleanly. valgrind will tell you if you've done +anything dodgy like freeing regions twice, reading uninitialized memory, +or if you've leaked memory anywhere. For more information, refer to the link:http://valgrind.kde.org[Valgrind] project. @@ -701,24 +310,19 @@ and many people have put a lot of time and energy to improve it. Submitting patches ------------------ -Current preference for suggesting changes is to open a pull request on -GitHub for the https://github.com/networkupstools/nut/ project. +Small patches that arrive in unified format (diff -u) as plain text attachments +with no HTML and a brief summary at the top are the easiest to handle. -For some cases, small patches that arrive by mailing list in unified -format (`diff -u`) as plain text attachments with no HTML and a brief -summary at the top are easy to handle, but sadly also easy to overlook. - -If a patch is sent to the nut-upsdev mailing list, it stands a better -chance of being seen immediately. However, it is likely to be dropped -if any issues cannot be resolved quickly. If your code might not work -for others, or if it is a large change, your best bet is to submit a -pull request or create an +If a patch is sent to the nut-upsdev mailing list, it stands a better chance of +being seen immediately. However, it is likely to be dropped if any issues +cannot be resolved quickly. If your code might not work for others, or if it is +a large change, your best bet is to submit a pull request or create an link:https://github.com/networkupstools/nut/issues[issue on GitHub]. -The issue tracker allows us to track the patches over a longer period -of time, and it is less likely that a patch will fall through the cracks. -Posting a reminder to the developers (via the nut-upsdev list) about a -patch on GitHub is fair game. +The issue tracker allows us to track the patches over a longer period of time, +and it is less likely that a patch will fall through the cracks. Posting a +reminder to the developers (via the nut-upsdev list) about a patch on GitHub is +fair game. Patch cohesion -------------- @@ -734,7 +338,7 @@ evaluated separately, assuming the core developers care enough to do that instead of just dropping it. If you have to make big changes in lots of places, send multiple -patches -- one per item. +patches - one per item. The finishing touches: manual pages and device entry in HCL ----------------------------------------------------------- @@ -749,57 +353,39 @@ skeletal man page that will probably miss many of the finer points of the driver and hardware. The same remark goes for device entries: if you add support for new models, -please remember to also complete the hardware compatibility list, present -in link:data/driver.list.in[]. This will be used to generate both textual, -static HTML and dynamic searchable HTML for the website. - -Finally, don't forget about fame and glory: if you added or substantially -updated a driver, your copyright belongs in the heading comment (along -with existing ones). For vendor backed (or sponsored) contributions we -welcome an entry in the link:docs/acknowledgements.txt[] file as well, -to track and know the industry players who help make NUT better and more -useful. - -It is nice to update the link:NEWS[] file for significant development -to be seen as part of next release, as well as to update the -link:UPGRADING[] file for potentially breaking changes and similar -heads-up notes for third-party teams (distribution packagers, clients -and bindings, etc.) +remember to also complete the hardware compatibility list, present +in data/driver.list.in. This will be used to generate both textual, static +HTML and dynamic searchable HTML for the website. Source code management ---------------------- -We currently use a Git repository hosted at GitHub to track changes to -the NUT source code. This allows you to clone the repository (or fork, -in GitHub parlance), make changes, and post them online for peer review -prior to integration. +We currently use a Git repository hosted at GitHub (with a mirror at Alioth) to track +changes to the NUT source code. This allows you to clone the repository (or +fork, in GitHub parlance), make changes, and post them online for review prior +to integration. -To obtain permission to commit directly to the common upstream NUT repository, -you must be prepared to spend a fair amount of time contributing to the -NUT codebase. Most developers will be well served by committing to their -own forked Git repository (preferably in a uniquely named branch for each -new contribution), and having the NUT team merge their changes using pull -requests. +To obtain permission to commit directly to the master NUT repository, you must +be prepared to spend a fair amount of time contributing to the NUT codebase. +Most developers will be well served by committing to their own Git repository, +and having the NUT team merge their changes. -Git offers a little more flexibility than the +svn update+ command. -You may fetch other developers' changes into your repository, but hold -off on actually combining them with your branch until you have compared -the two branches (for instance, with `gitk --all`). Git also allows you -to accumulate more than one commit worth of changes before pushing to -another repository. This allows development to continue without a constant -network connection. +Git offers a little more flexibility than the +svn update+ command. You may +fetch other developers' changes into your repository, but hold off on +actually combining them with your branch until you have compared the two +branches (for instance, with `gitk --all`). Git also allows you to accumulate +more than one commit worth of changes before pushing to another repository. +This allows development to continue without a constant network connection. -For a quick change to a file in the Git working copy, you can use -`git diff` to generate a patch to send to the nut-upsdev mailing list. -If you have more extensive changes, you can use `git format-patch` on -a complete commit or branch, and send the resulting series of patches -to the list. +For a quick change to a file in the Git working copy, you can use `git diff` to +generate a patch to send to the nut-upsdev mailing list. If you have more +extensive changes, you can use `git format-patch` on a complete commit or +branch, and send the resulting series of patches to the list. -If you use GitHub's web-based editor to make changes, it tends to create -lots of small commits, one per change per file. Unless there is reason to -keep the intermediate history, we will probably collapse (or "squash" in -Git parlance) the entire branch into one commit with a `git rebase -i` -before merging. +If you use GitHub's web-based editor to make changes, it tends to create lots +of small commits, one per change per file. Unless there is reason to keep the +intermediate history, we will probably collapse the entire branch into one +commit with `git rebase -i` before merging. The link:https://git.wiki.kernel.org/index.php/GitSvnCrashCourse[GitSvnCrashCourse] wiki page has some useful information for long-time users of Subversion. @@ -815,38 +401,46 @@ or git clone https://github.com/networkupstools/nut.git -if it is necessary to get around a pesky firewall that blocks the native -Git protocol. +if it is necessary to get around a pesky firewall that blocks the native Git +protocol. For a quicker checkout (when you don't need the entire repository history), you can limit the depth of the clone: git clone --depth 1 git://github.com/networkupstools/nut.git +In case the GitHub repository is temporarily unavailable for any reason, we +also plan to push to Alioth's +link:https://alioth.debian.org/scm/?group_id=30602[Git server] as well. You can +add a remote reference to your local repository: + + cd path/to/nut + git remote add -f alioth git://anonscm.debian.org/nut/nut.git + Mercurial (hg) access ~~~~~~~~~~~~~~~~~~~~~ -There are those who prefer the simplicity and self-consistency of the -Mercurial SCM client over the hodgepodge of unique commands which make -up Git. Rather than debate the merits of each system, we will gently -guide you towards the link:http://hg-git.github.com/[hg-git project] -which would theoretically be a transparent bridge between the central -Git repository, and your local Mercurial working copy. +There are those who prefer the simplicity and self-consistency of the Mercurial +SCM client over the hodgepodge of unique commands which make up Git. Rather +than debate the merits of each system, we will gently guide you towards the +link:http://hg-git.github.com/[hg-git project] which would theoretically be a +transparent bridge between the central Git repository, and your local Mercurial +working copy. -Other tools for hg/git interoperability are sure to exist. We would -welcome any feedback about this process on the nut-upsdev mailing list. +Other tools for hg/git interoperability are sure to exist. We would welcome any +feedback about this process on the nut-upsdev mailing list. Subversion (SVN) access ~~~~~~~~~~~~~~~~~~~~~~~ If you prefer to check out the NUT source code using an SVN client, GitHub has a link:https://github.com/blog/966-improved-subversion-client-support[SVN -interface to Git repositories] hosted on their servers. You can fork a copy -of the NUT repository and commit to your fork with SVN. +interface to Git repositories] hosted on their servers. You can fork a copy of +the NUT repository and commit to your fork with SVN. -Be aware that the examples in the GitHub blog post might result in a -checkout that includes all of the current branches, as well as the trunk. -You are most likely interested in a command line similar to the following: +Be aware that the examples in the GitHub blog post might result in a checkout +that includes all of the current branches, as well as the trunk. You are most +likely interested in a command line similar to the following: svn co https://github.com/networkupstools/nut/trunk nut-trunk-svn @@ -857,13 +451,12 @@ The NUT repository generally only holds files which are not generated from other files. This prevents spurious differences from being recorded in the repository history. -If you add a driver, it is recommended that you add the driver executable -name to the `.gitignore` file in that directory. Similarly, files generated -from `*.in` and `*.am` source templates should be ignored as well. -We try to include a number of generated files in the tarball releases with -`make dist` hooks in order to minimize the number of dependencies for end -users, but the assumption is that a developer can install the packages -needed to regenerate those files. +If you add a driver, it is recommended that you add the driver executable name +to the .gitignore file in that directory. Similarly, files generated from *.in +and *.am sources should be ignored as well. We try to include a number of +generated files in the tarball releases with `make dist` hooks in order to +minimize the number of dependencies for end users, but the assumption is that +a developer can install the packages needed to regenerate those files. Commit message formatting ------------------------- @@ -871,11 +464,11 @@ Commit message formatting From the `git commit` man page: [quote] -Though not required, it's a good idea to begin the commit message with a -single short (less than 50 character) line summarizing the change, followed -by a blank line and then a more thorough description. The text up to the -first blank line in a commit message is treated as the commit title, and -that title is used throughout git. +Though not required, it’s a good idea to begin the commit message with a single +short (less than 50 character) line summarizing the change, followed by a blank +line and then a more thorough description. The text up to the first blank line +in a commit message is treated as the commit title, and that title is used +throughout git. If your commit is just a change to one component, such as the HCL, upsd or a specific driver, prefix your commit message in a way that matches similar @@ -897,24 +490,16 @@ and should *not* be used as a guide for future commits. Repository etiquette and quality assurance ------------------------------------------ -For developers who have commit access to the common upstream NUT repository: -Please keep the Git "master" branch in working condition at all times. -The "master" branch may be used to generate daily tarballs, it provides the -baseline for new contributions, and occasionally is tagged for a new release. -It should not contain broken code. If you need to commit incremental changes -that leave the system in a broken state, please do so in a separate branch -and merge the changes back into "master" once they are complete. - -To help keep the codebase ever-green, we run a number of CI tests and builds -in various conditions, including older compilers, different C/C++ standard -revisions, and an assortment of operating systems; a section below elaborates -on this in more detail. +Please keep the Git master branch in working condition at all times. The +master branch may be used to generate daily tarballs, and should not contain +broken code. If you need to commit incremental changes that leave the system +in a broken state, please do so in a separate branch and merge the changes +back into master once they are complete. You are encouraged to use `git rebase -i` on your private Git branches to separate your changes into <<_patch_cohesion,logical changes>>. -From there, you can generate patches for the issue tracker, or the nut-upsdev -mailing list. +From there, you can generate patches for the issue tracker, or the nut-upsdev list. Note that once you rebase a branch, anyone else who has a copy of this branch will need to rebase on top of your rebased branch. Obviously, this hinders @@ -931,7 +516,7 @@ stash pop+ to apply your saved changes. Here is an example workflow: ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- git clone -o central git://github.com/networkupstools/nut.git cd nut @@ -958,7 +543,7 @@ Here is an example workflow: # Publish your branch to your GitHub repository: git push username my-new-feature ------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- If you are new to Git, but are familiar with SVN, the link:http://git-scm.com/course/svn.html[following link] may be of use. @@ -967,13 +552,12 @@ link:http://git-scm.com/course/svn.html[following link] may be of use. Building the Code ----------------- -For a developer, the NUT build process starts with `./autogen.sh`. - -This script generates the `./configure` script that end users typically -invoke to build NUT. If you are making a number of changes to the NUT -source tree, configuring with the `--enable-maintainer-mode` flag will -ensure that after you change a `Makefile.am`, nearby `Makefile.in` and -`Makefile` get regenerated. At a minimum, you will need at least: +For a developer, the NUT build process starts with `./autogen.sh`. This script +generates the `./configure` script that end users typically invoke to build +NUT. If you are making a number of changes to the NUT source tree, configuring +with the `--enable-maintainer-mode` flag will ensure that after you change +`Makefile.am`, the `Makefile.in` and `Makefile` get regenerated. At a +minimum, you will need: * autoconf * automake @@ -981,52 +565,32 @@ ensure that after you change a `Makefile.am`, nearby `Makefile.in` and * Python * Perl -[NOTE] -====== -See the link:config-prereqs.txt[] for better detailed package lists for -different operating systems. +After running `./autogen.sh`, you can pass your local configuration options to +`./configure` and run `make` from the top-level directory. To avoid the need +for root privileges when testing new NUT code, you may wish to use +`--prefix=$HOME/local/nut --with-statepath=/tmp`. You can also keep +compilation times down by only building the driver you are currently working +on: `--with-drivers=driver1,dummy-ups`. -See `ci_build.sh` for automating many practical scenarios, for easier -iterations. -====== +Before pushing your commits upstream, please run +make distcheck-light+. This +checks that the Makefiles are not broken, that all the +relevant files are distributed, and that there are no compilation or +installation errors. Note that this requires all of the dependencies necessary +to build the documentation, including asciidoc, a2x, xsltproc, dblatex and any +additional XSL stylesheets. + +Running +make distcheck-light+ is especially important if you have added or +removed files, or updated configure.in or some Makefile.am. Remember: simply +adding a file to Git does not mean it will be distributed. To distribute a +file, you must update the corresponding Makefile.am. + +There is also +make distcheck+, which runs an even stricter set of +tests than +make distcheck-light+, but will not work unless you have all the +optional libraries and features installed. Even if you do not use your distribution's packages of NUT, installing the distribution's list of build dependencies for NUT can reduce the amount of -trial-and-error when installing dependencies. For instance, in Debian, you -can run `apt-get build-dep nut` to install all of the auto* tools as well -as any development libraries and headers. +trial-and-error when installing dependencies. For instance, in Debian, you can +run `apt-get build-dep nut` to install all of the auto* tools as well as any +development libraries and headers. -After running `./autogen.sh`, you can pass your local configuration -options to `./configure` and run `make` from the top-level directory. -To avoid the need for root privileges when testing new NUT code, you -may wish to use `--prefix=$HOME/local/nut --with-statepath=/tmp`. -You can also keep compilation times down by only building the driver -which you are currently working on: `--with-drivers=driver1,dummy-ups`. - -Before pushing your commits upstream, please run `make distcheck-light`. -This checks that the Makefiles are not broken, that all the relevant files -are distributed, and that there are no compilation or installation errors. -Note that unless you specifically pass `--with-doc=skip` to `configure`, -this requires all of the dependencies necessary to build the documentation -to be locally installed on your system, including `asciidoc`, `a2x`, -`xsltproc`, `dblatex` and any additional XSL stylesheets. - -Running `make distcheck-light` is especially important if you have added or -removed files, or updated `configure.ac` or some `Makefile.am` file. -Remember: simply adding a file to Git does not mean it will be distributed. -To distribute a file, you must update the corresponding `Makefile.am` with -`EXTRA_DIST` entry and possibly other recipe handling. - -There is also `make distcheck`, which runs an even stricter set of -tests than `make distcheck-light`, but will not work unless you have all -of the optional third-party libraries and features installed. - -Finally note, that since 2017 the GitHub upstream project is monitored -by Travis CI (in addition to earlier multi-platform buildbots which -occasionally do not work), replaced since 2021 by a dedicated NUT CI farm. -This means that if your posted improvements are based on current NUT -"master" branch, the resulting pull request should get tested for a number of -scenarios automatically. If your code adds a substantial feature, consider -extending the `Jenkinsfile-dynamatrix` and/or `ci_build.sh` scripts in the -workspace root to add another `BUILD_TYPE` to the matrix of tests run in -parallel. diff --git a/docs/documentation.txt b/docs/documentation.txt index c588e12..ab3bd2c 100644 --- a/docs/documentation.txt +++ b/docs/documentation.txt @@ -13,7 +13,6 @@ ifdef::website[] - Cables information (link:cables.html[online]) (link:docs/cables.pdf[PDF]) - link:docs/man/index.html#User_man[User manual pages] - link:ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported -- link:docs/solaris-usb.html[Notes on NUT monitoring of USB devices in Solaris and related operating systems] endif::website[] ifndef::website[] - link:../FAQ.html[FAQ - Frequently Asked Questions] @@ -21,7 +20,6 @@ ifndef::website[] - <> - link:../man/index.html#User_man[User manual pages] - link:http://www.networkupstools.org/ddl/index.html#_supported_devices[Devices Dumps Library (DDL)]: Provides information on how devices are supported -- link:../solaris-usb.html[Notes on NUT monitoring of USB devices in Solaris and related operating systems] endif::website[] Developer Documentation @@ -44,36 +42,6 @@ ifndef::website[] - link:http://www.networkupstools.org/ddl/index.html[Devices Dumps Library (DDL)]: Provides simulation data to the linkman:dummy-ups[8] driver endif::website[] -Data dumps for the DDL ----------------------- - -Note: both developers contributing a driver and users using an existing driver -for device not previously documented as supported by it, are welcome to report -new data for the Devices Dumps Library (DDL) mentioned above. Best of all such -"data dump" reports can be prepared by the -ifdef::website[] -link:https://raw.githubusercontent.com/networkupstools/nut/master/tools/nut-ddl-dump.sh[`tools/nut-ddl-dump.sh`] -endif::website[] -ifndef::website[] -`./tools/nut-ddl-dump.sh` -endif::website[] -script from the main NUT codebase, and reported on the NUT mailing list or -via link:https://github.com/networkupstools/nut/issues[NUT issues on GitHub] -or as a pull request against the -link:https://github.com/networkupstools/nut-ddl[NUT Devices Dumps Library] -following the naming and other rules described in the DDL documentation page. - -Data dumps collected by the tools above, or by `upsc` client, or by drivers -in exploratory data-dumping mode (with `-d 1` argument), can be compared by -ifdef::website[] -link:https://raw.githubusercontent.com/networkupstools/nut/master/tools/nut-dumpdiff.sh[`tools/nut-dumpdiff.sh`] -endif::website[] -ifndef::website[] -`./tools/nut-dumpdiff.sh` -endif::website[] -script from the main NUT codebase, which strips away lines with only numeric -values (aiming to minimize the risk of losing meaningful changes like counters). - Offsite Links ------------- @@ -91,10 +59,10 @@ These are general information about UPS, PDU, ATS, PSU and SCD: These are writeups by users of the software. - link:http://rogerprice.org/NUT.html[NUT Setup with openSUSE] '(Roger Price)' -- link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' +- link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)' - link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)' - link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)' -- link:https://github.com/networkupstools/nut/wiki/NUT-on-Mac-OS-X[Network UPS Tools (NUT) on Mac OS X (10.4.10)] '(Andy Poush)' +- link:http://trac.networkupstools.org/projects/nut/wiki/NutOnMacOSX[Network UPS Tools (NUT) on Mac OS X (10.4.10)] '(Andy Poush)' - link:http://www.llondel.org/ups.shtml[Interfacing a Contact-Closure UPS to Mac OS X and Linux] '(David Hough)' - link:http://fedoranews.org/contributors/kazutoshi_morioka/nut/[How to use UPS with nut on RedHat / Fedora Core] '(Kazutoshi Morioka)' - link:http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt[FreeBSD installation procedure] '(Thierry Thomas, from FreeBSD)' @@ -103,11 +71,6 @@ These are writeups by users of the software. - link:http://deschis.blogspot.com/2006/07/cum-se-configureaz-un-ups-apollo-seria.html[Cum se configurează un UPS Apollo seria 1000F pe Linux] '(deschis, Romanian)' - link:http://buffalo.nas-central.org/wiki/Install_a_UPS_%28nut%29[Install a UPS (nut) on a Buffalo NAS] '(various authors)' - link:http://blog.pointbre.com/2903/nutnetwork-ups-tool-korean-guidebook.html[NUT Korean GuideBook] '(PointBre)' -- link:https://www.jamesridgway.co.uk/monitoring-eaton-5sc-ups-scripts-and-integration-network-tools-home-assistant/amp/[USB UPS, notifications, and Home Assistant] '(James Ridgway)' - -Video articles are also available: - -- link:https://www.youtube.com/watch?v=vyBP7wpN72c[Network UPS Tools (NUT Server) Ultimate Guide] '(Techno Tim)' News articles and Press releases -------------------------------- diff --git a/docs/download.txt b/docs/download.txt index c6d2a63..e43ce48 100644 --- a/docs/download.txt +++ b/docs/download.txt @@ -10,7 +10,7 @@ Source code ================================================================================ You should always use PGP/GPG to verify the signatures before using any source code. -You can use the +You can use the ifdef::website[] link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure] endif::website[] @@ -51,7 +51,7 @@ following script in the directory you just checked out: $ ./autogen.sh -Then refer to the +Then refer to the ifdef::website[] link:docs/user-manual.chunked/index.html[NUT user manual] endif::website[] @@ -59,7 +59,7 @@ ifndef::website[] linkdoc:user-manual[NUT user manual] endif::website[] for more information. - + ////////////////////////// NOTE: Users that need the latest developments to support new devices *must* use Git or <>. @@ -68,10 +68,12 @@ use Git or <>. Browse code ^^^^^^^^^^^ -You can browse the "vanilla NUT" code at the -link:https://github.com/networkupstools/nut/[Main GitHub repository for NUT sources], -and some possibly modified copies as part of packaging recipe -sources of operating system distributions, as listed below. +You can also browse the code at +link:https://github.com/networkupstools/nut[GitHub], or at the +link:http://alioth.debian.org/scm/?group_id=30602[Alioth mirror]. The code was +originally kept in Subversion, and the old +link:http://trac.networkupstools.org/projects/nut[Trac site] will be kept +around for a bit so as not to break the URLs in the mailing list archives. [[Snapshots]] Snapshots @@ -79,23 +81,13 @@ Snapshots GitHub has several download links for repository snapshots (for particular tags or branches), but you will need a number of tools such as autoconf, automake -and libtool to use these snapshots to generate the `configure` script and some -other files. - -After you `configure` the source workspace, a `make dist-hash` recipe would -create the snapshot tarballs which do not require the auto* tools, and their -checksum files, such as those available on the NUT website and attached to -link:https://github.com/networkupstools/nut/releases[GitHub Releases page]. - -///////// -TODO: #1400 to replace this with a NUT CI farm service to publish the tarballs +and libtool to use these snapshots. If our Buildbot instance is behaving, you can download a snapshot which does not require auto* tools from this link:http://buildbot.networkupstools.org/snapshots[builder]. Look for the latest *[tarball]* link towards the top of the page, and be sure to check the 'Build ##' link to verify the branch name. -///////// Older versions ~~~~~~~~~~~~~~ @@ -108,70 +100,43 @@ Binary packages NOTE: The only official releases from this project are source code. -NUT is already available in the following operating systems (and -link:https://github.com/networkupstools/nut/wiki/Links-to-distribution-packaging-recipes-and-repository-sections[likely more]): +NUT is already available in the following systems: -- link:https://repology.org/project/nut/versions[Repology report on NUT] - lists 745 entries about NUT, as of this writing - -- Linux: - - * link:https://github.com/42ity/nut/tree/FTY/obs[42ITy.org packaging recipes for Debian-based releases] - * link:https://salsa.debian.org/debian/nut/[Debian Salsa recipes] - and link:http://packages.debian.org/nut[Debian packages] - * link:http://packages.ubuntu.com/nut[Ubuntu packages] - * link:https://src.fedoraproject.org/rpms/nut/tree/rawhide[Fedora Rawhide recipes] - and link:https://src.fedoraproject.org/rpms/nut[Red Hat / Fedora packages] - * link:https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=network-ups-tools-git[Arch Linux recipe] - and link:https://aur.archlinux.org/packages/network-ups-tools-git[Arch Linux package info] - * link:https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-power/nut[Gentoo Linux recipe] - and link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux package info] - * link:https://build.opensuse.org/package/show/openSUSE%3AFactory/nut[Novell SUSE / openSUSE official package base recipe] - and link:https://build.opensuse.org/package/show/hardware/nut[Novell SUSE / openSUSE official package development recipe], - and link:http://software.opensuse.org/package/nut[Novell SUSE / openSUSE official package overview] - * link:https://build.opensuse.org/search?search_text=nut[Numerous other recipes on Open Build System (not only by SUSE)] - * link:https://github.com/openwrt/packages/tree/master/net/nut[OpenWRT recipes] - * link:http://sotirov-bg.net/slackpack/search.cgi?q=nut[Slackware package overview] - * link:https://github.com/void-linux/void-packages/tree/master/srcpkgs/network-ups-tools[Void Linux recipes] +- Linux: +link:https://aur.archlinux.org/packages/network-ups-tools[Arch Linux], +link:http://packages.debian.org/nut[Debian], +link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux], +Mandriva, +link:https://apps.fedoraproject.org/packages/nut[Red Hat / Fedora], +link:http://software.opensuse.org/package/nut[Novell Suse / openSUSE], +link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt], +link:http://packages.ubuntu.com/nut[Ubuntu], +link:https://github.com/voidlinux/xbps-packages/blob/master/srcpkgs/network-ups-tools/template[Void Linux]. - BSD systems: - - * link:https://cgit.freebsd.org/ports/tree/sysutils/nut-devel[FreeBSD package recipe (devel)], - link:https://cgit.freebsd.org/ports/tree/sysutils/nut[FreeBSD package recipe] - and link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD package overview] - * link:cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/ups-nut/[NetBSD recipe] and link:http://pkgsrc.se/sysutils/ups-nut[NetBSD package overview] - * link:http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD recipe] - * link:https://github.com/freenas/iocage-ports/tree/master/sysutils/nut[FreeNAS iocage-ports recipe], - link:http://doc.freenas.org/9.3/freenas_services.html#ups[FreeNAS 9.3 docs on UPS integration] - and link:https://www.ixsystems.com/documentation/freenas/11.3-U5/services.html#ups[FreeNAS 11.3-U5 docs on UPS integration] +link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD], +link:http://pkgsrc.se/sysutils/ups-nut[NetBSD], +link:http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD], +link:http://doc.freenas.org/9.3/freenas_services.html#ups[FreeNAS]. - Mac OS X: - - * link:https://github.com/fink/fink-distributions/blob/master/10.9-libcxx/stable/main/finkinfo/net/nut.info[Fink recipe] - and link:http://pdb.finkproject.org/pdb/package.php/nut[Fink package overview] - * link:http://trac.macports.org/browser/trunk/dports/sysutils/nut/Portfile[MacPorts recipe] - -- illumos/Solaris: - - * link:https://github.com/OpenIndiana/oi-userland/tree/oi/hipster/components/sysutils/nut[OpenIndiana oi-userland recipe] - and link:https://pkg.openindiana.org/hipster/en/search.shtml?token=nut&action=Search[OpenIndiana latest rolling builds] +link:http://pdb.finkproject.org/pdb/package.php/nut[Fink], +link:http://trac.macports.org/browser/trunk/dports/sysutils/nut/Portfile[MacPorts] - Windows (complete port, Beta): - - * link:http://www.networkupstools.org/package/windows/NUT-Installer-2.6.5-6.msi[Windows MSI installer 2.6.5-6] +link:http://www.networkupstools.org/package/windows/NUT-Installer-2.6.5-6.msi[Windows MSI installer 2.6.5-6] Java packages ------------- -- The jNut package has been split into its own - link:https://github.com/networkupstools/jNut[GitHub repository]. +The jNut package has been split into its own link:https://github.com/networkupstools/jNut[GitHub repository]. - NUT Java support (client side, Beta) - link:http://www.networkupstools.org/package/java/jNut-0.2-SNAPSHOT.tar.gz[jNUT 0.2-SNAPSHOT] +link:http://www.networkupstools.org/package/java/jNut-0.2-SNAPSHOT.tar.gz[jNUT 0.2-SNAPSHOT] - NUT Java Web support (client side using REST, Beta) - link:http://www.networkupstools.org/package/java/jNutWebAPI-0.2-SNAPSHOT-src.tar.gz[jNutWebAPI 0.2-SNAPSHOT (sources)] +link:http://www.networkupstools.org/package/java/jNutWebAPI-0.2-SNAPSHOT-src.tar.gz[jNutWebAPI 0.2-SNAPSHOT (sources)] Virtualization packages ----------------------- @@ -179,7 +144,7 @@ Virtualization packages VMware ~~~~~~ -- NUT client 2.7.4 for ESXi 5.0, 5.1, 5.5 and 6.0 (offsite, René Garcia) +- NUT client 2.7.2 for ESXi 5.x (offsite, René Garcia) * link:http://rene.margar.fr/2012/05/client-nut-pour-esxi-5-0/[blog entry (French)] - * link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.4.0.tar.gz[VIB package (v1.4.0)] + * link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.3.0.tar.gz[VIB package (v1.3.0)] diff --git a/docs/features.txt b/docs/features.txt index 631bdbc..eef38b6 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -19,7 +19,7 @@ Multiple manufacturer and device support ---------------------------------------- - Monitors many UPS, PDU, ATS, PSU and SCD models from more than 140 -manufacturers with a unified interface +manufacturers with a unified interface (link:stable-hcl.html[Hardware Compatibility List]). - Various communication types and many protocols are supported with the same @@ -31,12 +31,11 @@ common interface: Multiple architecture support ----------------------------- -- Cross-platform -- different flavors of Unix can be managed together with a +- Cross-platform - different flavors of Unix can be managed together with a common set of tools, even crossing architectures. -- This software has been reported to run on Linux distributions, the BSDs, -Apple's OS X, commercial Solaris and open-source illumos distros, IRIX, -HP/UX, Tru64 Unix, and AIX. +- This software has been reported to run on Linux distributions, the BSDs, Apple's +OS X, Solaris, IRIX, HP/UX, Tru64 Unix, and AIX. - Windows users may be able to build it directly with Cygwin. There is also a port of the client-side monitoring to Windows called WinNUT. @@ -61,8 +60,8 @@ WARNING: Be sure to plug your network's physical hardware (switches, hubs, routers, bridges, ...) into the UPS! -Redundancy support -- Hot swap/high availability power supplies ---------------------------------------------------------------- +Redundancy support - Hot swap/high availability power supplies +-------------------------------------------------------------- - upsmon can handle high-end servers which receive power from multiple UPSes simultaneously. @@ -71,18 +70,14 @@ simultaneously. source UPSes becomes critical (on battery and low battery). - You can lose a UPS completely as long as you still have at least the minimum -number of sources available. The minimum value is configurable. +number of sources available. The minimum value is configurable. Security and access control --------------------------- - Manager functions are granted with per-user granularity. The admin can have -full powers, while the admin's helper can only do specific non-destructive -tasks such as a battery test (beware that with a worn-out battery whose -replacement is a few years overdue, a "capacity/remaining runtime" test can -still be destructive by powering off the load abruptly -- and also such a -test can cause hosts to hide into graceful shutdowns when the battery state -does get critical as part of the test). +full powers, while the admin's helper can only do specific non-destructive tasks +such as a battery test. - The drivers, server, and monitoring client (upsmon) can all run as separate user IDs if this is desired for privilege separation. @@ -96,8 +91,8 @@ shutdown command. In any other case, the privileged process exits. This was inspired by the auth mechanism in Solar Designer's excellent popa3d. - The drivers and network server may be run in a chroot jail for further -security benefits. This is supported directly since version 1.4 and beyond -with the 'chroot=' configuration directive. +security benefits. This is supported directly since version 1.4 and beyond with +the 'chroot=' configuration directive. - IP-based access control relies on the local firewall and link:http://en.wikipedia.org/wiki/TCP_Wrapper[TCP Wrapper]. @@ -111,9 +106,9 @@ Web-based monitoring - Comes stock with CGI-based web interface tools for UPS monitoring and management, including graphical status displays. -- Custom status web pages may be generated with the CGI programs, since they -use templates to create the pages. This allows you to have status pages which -fit the look and feel of the rest of your site. +- Custom status web pages may be generated with the CGI programs, since they use +templates to create the pages. This allows you to have status pages which fit +the look and feel of the rest of your site. Free software ------------- @@ -121,48 +116,39 @@ Free software - That's free beer and free speech. Licensed under the GNU General Public License version 2 or later. -- Know your systems -- all source code is available for inspection, so there are -no mysteries or secrets in your critical monitoring tools. +- Know your systems - all source code is available for inspection, so there are +no mysteries or secrets in your critical monitoring tools. UPS management and control -------------------------- -- Writable variables may be edited on higher end equipment for local -customization +- Writable variables may be edited on higher end equipment for local customization -- Status monitoring can generate notifications (email/pager/SMS/...) on alert -conditions +- Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions -- Alert notices may be dampened to only trigger after a condition persists. -This avoids the usual pager meltdown when something happens and no delay -is used. +- Alert notices may be dampened to only trigger after a condition persists. This +avoids the usual pager meltdown when something happens and no delay is used. - Maintenance actions such as battery runtime calibration are available where supported by the UPS hardware. -- Power statistics can be logged in custom formats for later retrieval and -analysis +- Power statistics can be logged in custom formats for later retrieval and analysis -- All drivers are started and stopped with one common program. Starting one -is as easy as starting ten: `upsdrvctl start`. - -- For operating systems with a supported service management framework, you can -manage the NUT drivers wrapped into independent service instances using the -'upsdrvsvcctl' instead, and gain the benefits of automated restart as well as -possibility to define further dependencies between your OS components. +- All drivers are started and stopped with one common program. Starting one is +as easy as starting ten: 'upsdrvctl start'. - Shutdowns and other procedures may be tested without stressing actual UPS -hardware by simulating status values with the dummy-ups pseudo-driver. -Anything that can happen in a driver can be replicated with dummy-ups. +hardware by simulating status values with the dummy-ups pseudo-driver. Anything +which can happen in a driver can be replicated with dummy-ups. Monitoring diagrams ------------------- -These are the most common situations for monitoring UPS hardware. Other ways -are possible, but they are mostly variations of these four. +These are the most common situations for monitoring UPS hardware. Other ways are +possible, but they are mostly variants on these four. -NOTE: these examples show serial communications for simplicity, but USB or -SNMP or any other monitoring is also possible. +NOTE: these examples show serial communications for simplicity, but USB or SNMP +or any other monitoring is also possible. "Simple" configuration ~~~~~~~~~~~~~~~~~~~~~~ @@ -171,8 +157,8 @@ image:images/simple.png[] One UPS, one computer. This is also known as "Standalone" configuration. -This is the configuration that most users will use. You need at least a -driver, `upsd`, and `upsmon` running. +This is the configuration that most users will use. You need at least a driver, +upsd, and upsmon running. "Advanced" configuration ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -180,77 +166,60 @@ driver, `upsd`, and `upsmon` running. image:images/advanced.png[] One UPS, multiple computers. Only one of them can actually talk to the UPS -directly. That's where the network comes in: +directly. That's where the network comes in. The Master system runs the driver, +upsd, and upsmon in master mode. The Slave systems only run upsmon in slave mode. -- The Primary system runs the relevant driver, `upsd`, and `upsmon` in -"primary" mode. +This is useful when you have a very large UPS that's capable of running multiple +systems simultaneously. There is no longer the need to buy a bunch of individual +UPSes or "sharing" hardware, since this software will handle the sharing for you. -- The Secondary systems only run `upsmon` in "secondary" mode which all -connect to `upsd` on Primary. - -This is useful when you have a very large UPS that's capable of running -multiple systems simultaneously. There is no longer the need to buy a bunch -of individual UPSes or "sharing" hardware, since this software will handle -the sharing for you. - -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// *FIXME* remainder === One UPS, many clients === -- Multiple systems may monitor a single UPS using only their network -connections -- no special "UPS sharing" hardware is required. +- Multiple systems may monitor a single UPS using only their network connections - no special "UPS sharing" hardware is required. -- "Secondaries and a primary" monitoring design synchronizes shutdowns so that -secondary systems can bring down their operating systems cleanly before -the primary tells the UPS to switch off the power. +- "Slave and master" monitoring design synchronizes shutdowns so that slaves can bring down their operating systems cleanly before the master switches off the power. === Many UPSes, many clients === -- Each `upsd` process can serve status data for multiple UPSes to many clients. -Multiple NUT drivers need to be configured and running locally on the system -with `upsd` then, and have appropriate media connections to the power devices. +- Each upsd process can serve status data for multiple UPSes to many clients. -- Each `upsmon` process can monitor multiple UPSes, possibly from multiple -`upsd` hosts, for status data. +- Each upsmon process can monitor multiple UPSes for status data. -////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// "Big Box" configuration ~~~~~~~~~~~~~~~~~~~~~~~ image:images/bigbox.png[] -Some systems have multiple power supplies and cords. You typically find -this on high-end servers that allow hot-swap and other fun features. -In this case, you run multiple drivers (one per UPS), a single `upsd`, -and a single `upsmon` (as a primary for both UPS 1 and UPS 2) +Some systems have multiple power supplies and cords. You typically find this on +high-end servers that allow hot-swap and other fun features. In this case, you +run multiple drivers (one per UPS), a single upsd, and a single upsmon (as +master for both UPS 1 and UPS 2) -This software understands that some of these servers can also run with -some of the supplies gone. For this reason, every UPS is assigned a -"power value" -- the quantity of power supplies that it feeds on this -system. - -The total available "power value" is compared to the minimum that is -required for that hardware. For example, if you have 3 power supplies -and 3 UPSes, but only 2 supplies must be running at any given moment, -the minimum would be 2. - -This means that you can safely lose any one UPS and the software will -handle it properly by remaining online and not causing a shut down. +This software understands that some of these servers can also run with some of +the supplies gone. For this reason, every UPS is assigned a "power value" - the +quantity of power supplies that it feeds on a system. +The total available "power value" is compared to the minimum that is required +for that hardware. For example, if you have 3 power supplies and 3 UPSes, but +only 2 supplies must be running at any given moment, the minimum would be 2. +This means that you can safely lose any one UPS and the software will handle it +properly by remaining online. "Bizarre" configuration ~~~~~~~~~~~~~~~~~~~~~~~ image:images/bizarre.png[] -You can even have a UPS that has the serial port connected to a system that -it's not feeding. Sometimes a PC will be close to a UPS that needs to be -monitored, so it's drafted to supply a serial port for the purpose. -This PC may in fact be getting its own power from some other UPS. This is -not a problem for the set-up. +You can even have a UPS that has the serial port connected to a system that it's +not feeding. Sometimes a PC will be close to a UPS that needs to be monitored, +so it's drafted to supply a serial port for the purpose. This PC may in fact be +getting power from some other UPS. This is not a problem. -The first system ("mixed") is a Primary for UPS 1, but is only monitoring -UPS 2. The other systems are Secondaries of UPS 2. +The first system ("mixed") is a Master for UPS 1, but is only monitoring UPS 2. +The other systems are Slaves of UPS 2. Image credits ------------- diff --git a/docs/hid-subdrivers.txt b/docs/hid-subdrivers.txt index edf2b84..42a7cab 100644 --- a/docs/hid-subdrivers.txt +++ b/docs/hid-subdrivers.txt @@ -9,9 +9,9 @@ different classes (audio, imaging, mass storage etc). Almost all UPS devices belong to the "HID" class, which means "Human Interface Device", and also includes things like keyboards and mice. What HID devices have in common is a particular (and very flexible) interface -for reading and writing information (such as X/Y coordinates and -button states, in the case of a mouse, or voltages and status information, -in the case of a UPS). +for reading and writing information (such as x/y coordinates and +button states, in case of a mouse, or voltages and status information, +in case of a UPS). The NUT "usbhid-ups" driver is a meta-driver that handles all HID UPS devices. It consists of a core driver that handles most of the work of @@ -20,14 +20,13 @@ specific UPS manufacturers (MGE, APC, and Belkin are currently supported). Adding support for a new HID UPS device is easy, because it requires only the creation of a new sub-driver. -There are a few USB UPS devices that are not true HID devices. These +There are a few USB UPS devices that are not HID devices. These devices typically implement some version of the manufacturer's serial protocol over USB (which is a really dumb idea, by the way). An -example is the original Tripplite USB interface (USB idProduct = 0001). Its HID -descriptor is only 52 bytes long (compared to several hundred bytes for a true -PDC HID UPS). Such devices are *not* supported by the usbhid-ups driver, and -are not covered in this document. If you need to add support for such a device, -read new-drivers.txt and see the "tripplite_usb" driver for inspiration. +example is the Tripplite USB. Such devices are *not* supported by the +usbhid-ups driver, and are not covered in this document. If you need to +add support for such a device, read new-drivers.txt and see the +tripplite_usb driver for inspiration. HID Usage Tree ~~~~~~~~~~~~~~ @@ -116,7 +115,7 @@ example Belkin defines `00860040` = ConfigVoltage (which is incidentally a violation of the USB PDC specification, as `00860040` is reserved for future use). -Thus, subdrivers generally need to provide: +Thus, subdrivers generally need to provide: - manufacturer-specific usage definitions, - a mapping of HID variables to NUT variables. @@ -127,58 +126,26 @@ shutdown.restart), and conversions of manufacturer specific data formats. -Usage macros in drivers/hidtypes.h -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The `drivers/hidtypes.h` header provides a number of macro names -for entries in the standard usage tables for Power Device -`USAGE_POW_` and Battery System `USAGE_BAT_` -data pages. - -If NUT codebase would ever need to refresh those macros, here is -some background information (based on NUT issue #1189 and PR #1290): - -These data were parsed from (a very slightly updated version of) -https://github.com/abend0c1/hidrdd/blob/master/rd.conf file, which -incorporates the complete USB-IF usage definitions for Power Device -and Battery System pages (among many others), so we didn't have to -extract the names and values from the USB-IF standards documents -(did check it all by eye though). - -The file was processed with the following chain of commands: - ------- -:; grep -e '^0084' -e '^0085' rd.conf \ - | sed 's/,.*$//;s/ *$//' \ - | sed 's/ /_/g;s/_/ /' \ - | tr '[:lower:]' '[:upper:]' \ - | sed 's/\(0085.... \)/\1USAGE_BAT_/;s/\(0084.... \)/\1USAGE_POW_/;s/\([A-Z_]*\)_PAGE/PAGE_\1/' \ - | awk '{print "#define "$2" 0x"$1}' ------- - - Writing a subdriver ~~~~~~~~~~~~~~~~~~~ In preparation for writing a subdriver for a device that is currently unsupported, run usbhid-ups with the following command line: - drivers/usbhid-ups -DD -u root -x explore -x vendorid=XXXX -x port=auto -s ups + drivers/usbhid-ups -DD -u root -x explore -x vendorid=XXXX auto -(substitute your device's 4-digit VendorID instead of "XXXX"). -This will produce a bunch of debugging information, including a number -of lines starting with "Path:" that describe the device's usage tree. -This information forms the initial basis for a new subdriver. +(substitute your device's 4-digit VendorID instead of "XXXX"). +This will produce a bunch of debugging information, including a number +of lines starting with "Path:" that describe the device's usage tree. +This information forms the initial basis for a new subdriver. -You should save this information to a file, e.g.: - - drivers/usbhid-ups -DD -u root -x explore -x vendorid=XXXX \ - -x port=auto -s ups 2>&1 | tee /tmp/info +You should save this information to a file, e.g. + drivers/usbhid-ups -DD -u root -x explore -x vendorid=XXXX auto >& /tmp/info You can create an initial "stub" subdriver for your device by using script scripts/subdriver/gen-usbhid-subdriver.sh. Note: this only creates -a "stub" and needs to be further customized to be useful (see -"Customization" below). +a "stub" and needs to be futher customized to be useful (see +CUSTOMIZATION below). Use the script as follows: @@ -193,18 +160,14 @@ and digits, and use natural capitalization such as "Belkin" (not information. You should put the generated files into the drivers/ subdirectory, and -update `usbhid-ups.c` by adding the appropriate `#include` line and by -updating the definition of `subdriver_list` in `usbhid-ups.c`. You must -also add the subdriver to USBHID_UPS_SUBDRIVERS in `drivers/Makefile.am` -and call `autoreconf` and/or `./configure` from the top-level NUT directory. -You can then recompile `usbhid-ups`, and start experimenting with the new +update usbhid-ups.c by adding the appropriate #include line and by +updating the definition of subdriver_list in usbhid-ups.c. You must +also add the subdriver to USBHID_UPS_SUBDRIVERS in drivers/Makefile.am +and call "autoreconf" and/or "./configure" from the top level NUT directory. +You can then recompile usbhid-ups, and start experimenting with the new subdriver. - -Customization -~~~~~~~~~~~~~ - -The initially generated subdriver code is only a stub, +CUSTOMIZATION: The initially generated subdriver code is only a stub, and will not implement any useful functionality (in particular, it will be unable to shut down the UPS). In the beginning, it simply attempts to monitor some UPS variables. To make this driver useful, @@ -212,7 +175,7 @@ you must examine the NUT variables of the form "unmapped.*" in the hid_info_t data structure, and map them to actual NUT variables and instant commands. There are currently no step-by-step instructions for how to do this. Please look at the files to see how the currently implemented -subdrivers are written: +subdrivers are written.: - apc-hid.c/h - belkin-hid.c/h @@ -225,29 +188,10 @@ subdrivers are written: - tripplite-hid.c/h -Fixing report descriptors -~~~~~~~~~~~~~~~~~~~~~~~~~ - -It is a fact of life that fellow developers make mistakes, and firmware -authors do too. In some cases there are inconsistencies about bytes seen -on the wire vs. their logical values, such value range and signedness if -interpreting them according to standard. - -NUT drivers now include a way to detect and fix up known issues in such -flawed USB report descriptors, side-stepping the standard similarly where -deemed needed. A pointer to such hook method is part of the `subdriver_t` -structure detailing each `usbhid-ups` subdriver nuances, defaulting to -a `fix_report_desc()` trivial implementation. - -For some practical examples, see e.g. `apc_fix_report_desc()` method in the -`drivers/apc-hid.c` file, and `cps_fix_report_desc()` in `drivers/cps-hid.c` -file. - - Shutting down the UPS ~~~~~~~~~~~~~~~~~~~~~ -It is desirable to support shutting down the UPS. Usually (for +It is desireable to support shutting down the UPS. Usually (for devices that follow the HID Power Device Class specification), this requires sending the UPS two commands. One for shutting down the UPS (with an 'offdelay') and one for restarting it (with an 'ondelay'), diff --git a/docs/history.txt b/docs/history.txt index 4db0a35..e31c933 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -8,7 +8,7 @@ This page is an attempt to document how everything came together. The Network UPS Tools team would like to warmly thank Russell Kroll. Russell initially started this project, maintaining and improving it for -over 8 years (1996 -- mid 2005). +over 8 years (1996 - mid 2005). Prototypes and experiments -------------------------- @@ -144,75 +144,49 @@ September 1999: new name, new URL Several visitors to the web page and subscribers to the mailing lists provided suggestions to rename the project. The old name no longer accurately described -it, and it was perilously close to APC's "Smart-UPS" trademark. Rather than -risk problems in the future, the name was changed. Kern Sibbald provided the -winner: Network UPS Tools, which captures the essence of the project and makes -for great short tarball filenames: nut-x.y.z.tar.gz. +it, and it was perilously close to APC's "Smart-UPS" trademark. Rather than risk +problems in the future, the name was changed. Kern Sibbald provided the winner: +Network UPS Tools, which captures the essence of the project and makes for great +short tarball filenames: nut-x.y.z.tar.gz. -The new name was first applied to 0.42.0, released October 31, 1999. -This is also when the web pages moved from the old -`http://www.exploits.org/~rkroll/smartupstools/` URL to the replacement -at `http://www.exploits.org/nut/` to coincide with the name change. +The new name was first applied to 0.42.0, released October 31, 1999. This is +also when the web pages moved from the old `http://www.exploits.org/~rkroll/smartupstools/` +URL to the replacement at `http://www.exploits.org/nut/` to coincide with the +name change. More drivers were written and the hardware support continued to grow. upsmon -picked up the concepts of what is now known as "primary" and "secondary", -and could now handle environments where multiple systems get power from a -single UPS. - -Manager mode was added to allow changing the value of read/write variables -in certain UPS models. +picked up the concepts of "master" and "slave", and could now handle +environments where multiple systems get power from a single UPS. Manager mode +was added to allow changing the value of read/write variables in certain UPS +models. June 2001: common driver core ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Up to this point, all of the drivers compiled into freestanding programs, each providing their own implementation of main(). This meant they all had to check -the incoming arguments and act uniformly. Unfortunately, not all of the -programs behaved the same way, and it was hard to document and use consistently. -It also meant that startup scripts had to be edited depending on what kind of -hardware was attached. +the incoming arguments and act uniformly. Unfortunately, not all of the programs +behaved the same way, and it was hard to document and use consistently. It also +meant that startup scripts had to be edited depending on what kind of hardware +was attached. -Starting in 0.45.0, released June 11, 2001, there was a new common core for -all drivers called `main.c`. It provided the main function and called back to -the `upsdrv_*` functions provided by the hardware-specific part of the drivers. -This allowed driver authors to focus on the UPS hardware without worrying about -the housekeeping stuff that needs to happen. +Starting in 0.45.0, released June 11, 2001, there was a new common core for all drivers called main.c. It provided the main function and called back to the upsdrv_* functions provided by the hardware-specific part of the drivers. This allowed driver authors to focus on the UPS hardware without worrying about the housekeeping stuff that needs to happen. -This new design provided an obvious way to configure drivers from one file, and -so `ups.conf` was born. This eventually spawned upsdrvctl, and now all drivers -based on this common core could be started or stopped with one command. Startup -scripts now could contain "upsdrvctl start", and it didn't matter what kind of -hardware or how many UPSes you had on one system. +This new design provided an obvious way to configure drivers from one file, and ups.conf was born. This eventually spawned upsdrvctl, and now all drivers based on this common core could be started or stopped with one command. Startup scripts now could contain "upsdrvctl start", and it didn't matter what kind of hardware or how many UPSes you had on one system. -Interestingly, at the end of this month, Arnaud Quette entered the UPS world, -as a subcontractor of the now defunct MGE UPS SYSTEMS. This marked the start of -a future successful collaboration. +Interestingly, at the end of this month, Arnaud Quette entered the UPS world, as a subcontractor of the now defunct MGE UPS SYSTEMS. +This marks the start of a future successful collaboration. May 2002: casting off old drivers, IANA port, towards 1.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -During the 0.45.x series, both the old standalone drivers and the ones which -had been converted to the common core were released together. Before the -release of 0.50.0 on May 24, 2002, all of the old drivers were removed. -While this shrank the list of supported hardware, it set the precedent for -removing code which isn't receiving regular maintenance. The assumption is -that the code will be brought back up to date by someone if they actually -need it. Otherwise, it's just dead weight in the tree. +During the 0.45.x series, both the old standalone drivers and the ones which had been converted to the common core were released together. Before the release of 0.50.0 on May 24, 2002, all of the old drivers were removed. While this shrank the list of supported hardware, it set the precedent for removing code which isn't receiving regular maintenance. The assumption is that the code will be brought back up to date by someone if they actually need it. Otherwise, it's just dead weight in the tree. -This change meant that all remaining drivers could be controlled with the -`upsdrvctl` and `ups.conf`, allowing the documentation to be greatly -simplified. There was no longer any reason to say "do this, unless you -have this driver, then do this". +This change meant that all drivers could be controlled with upsdrvctl and ups.conf, allowing the documentation to be greatly simplified. There was no longer any reason to say "do this, unless you have this driver, then do this". -IANA granted an official port number to the project, and the network code -switched to port 3493. It had previously been on 3305 which is assigned to -`odette-ftp`. 3305 was probably picked in 1997 because it was the fifth -project to spawn from some common UDP server code. +IANA granted an official port number to the project, and the network code switched to port 3493. It had previously been on 3305 which is assigned to odette-ftp. 3305 was probably picked in 1997 because it was the fifth project to spawn from some common UDP server code. -After 0.50.1, the 0.99 tree was created to provide a tree which would receive -nothing but bug fixes in preparation for the release of 1.0. As it turned out, -very few things required fixing, and there were only three releases in this -tree. +After 0.50.1, the 0.99 tree was created to provide a tree which would receive nothing but bug fixes in preparation for the release of 1.0. As it turned out, very few things required fixing, and there were only three releases in this tree. Leaving 0.x territory --------------------- @@ -220,119 +194,51 @@ Leaving 0.x territory August 2002: first stable tree: NUT 1.0.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -After nearly 5 years of having a 0.x version number, 1.0.0 was released on -August 19, 2002. This milestone meant that all of the base features that -you would expect to find were intact: good hardware support, a network -server with security controls, and system shutdowns that worked. +After nearly 5 years of having a 0.x version number, 1.0.0 was released on August 19, 2002. This milestone meant that all of the base features that you would expect to find were intact: good hardware support, a network server with security controls, and system shutdowns that worked. -The design was showing signs of wear from the rapid expansion, but this was -intentionally ignored for the moment. The focus was on getting a good version -out that would provide a reasonable base while the design issues could be -addressed in the future, and I'm confident that we succeeded. +The design was showing signs of wear from the rapid expansion, but this was intentionally ignored for the moment. The focus was on getting a good version out that would provide a reasonable base while the design issues could be addressed in the future, and I'm confident that we succeeded. November 2002: second stable tree: NUT 1.2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -One day after the release of 1.0.0, 1.1.0 started the new development tree. -During that development cycle, the CGI programs were rewritten to use template -files instead of hard-coded HTML, thus bringing back the flexibility of the -original unreleased prototype from 5 years before. The `multimon` was removed -from the tree, as the new `upsstats` could do both jobs by loading different -templates. +One day after the release of 1.0.0, 1.1.0 started the new development tree. During that development cycle, the CGI programs were rewritten to use templates instead of hard-coded HTML, thus bringing back the flexibility of the original unreleased prototype from 5 years before. multimon was removed from the tree, as the new upsstats could do both jobs by loading different templates. -A new client library called upsclient was created, and it replaced upsfetch. -This new library only supported TCP connections, and used an opaque context -struct to keep state for each connection. As a result, client programs could -now do things that used multiple connections without any conflicts. This was -done primarily to allow OpenSSL support, but there were other benefits from -the redesign. +A new client library called upsclient was created, and it replaced upsfetch. This new library only supported TCP connections, and used an opaque context struct to keep state for each connection. As a result, client programs could now do things that used multiple connections without any conflicts. This was done primarily to allow OpenSSL support, but there were other benefits from the redesign. -upsd and the clients could now use OpenSSL for basic authentication and -encryption, but this was not included by default. This was provided as -a bonus feature for those users who cared to read about it and enable -the option, as the initial setup was complex. +upsd and the clients could now use OpenSSL for basic authentication and encryption, but this was not included by default. This was provided as a bonus feature for those users who cared to read about it and enable the option, as the initial setup was complex. -After the 1.1 tree was frozen and deemed complete, it became the second -stable tree with the release of 1.2.0 on November 5, 2002. +After the 1.1 tree was frozen and deemed complete, it became the second stable tree with the release of 1.2.0 on November 5, 2002. April 2003: new naming scheme, better driver glue, and an overhauled protocol ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Following an extended period with no development tree, 1.3.0 got things -moving again on April 13, 2003. The focus of this tree was to rewrite -the driver-server communication layer and replace the static naming -scheme for variables and commands. +Following an extended period with no development tree, 1.3.0 got things moving again on April 13, 2003. The focus of this tree was to rewrite the driver-server communication layer and replace the static naming scheme for variables and commands. -Up to this point, all variables had names like STATUS, UTILITY, and OUTVOLT. -They had been created as drivers were added to the tree, and there was little -consistency. For example, it probably should have been INVOLT and OUTVOLT, -but there was no OUTVOLT originally, so UTILITY was all we had. This same -pattern repeated with ACFREQ -- is it incoming or outgoing? -- and many more. +Up to this point, all variables had names like STATUS, UTILITY, and OUTVOLT. They had been created as drivers were added to the tree, and there was little consistency. For example, it probably should have been INVOLT and OUTVOLT, but there was no OUTVOLT originally, so UTILITY was all we had. This same pattern repeated with ACFREQ - is it incoming or outgoing? - and many more. -To solve this problem, all variables and commands were renamed to a -hierarchical scheme that had obvious grouping. STATUS became ups.status. -UTILITY turned into input.voltage, and OUTVOLT is output.voltage. -ACFREQ is input.frequency, and the new output.frequency is also now -supported. Every other variable or command was renamed in this fashion. +To solve this problem, all variables and commands were renamed to a hierarchical scheme that had obvious grouping. STATUS became ups.status. UTILITY turned into input.voltage, and OUTVOLT is output.voltage. ACFREQ is input.frequency, and the new output.frequency is also now supported. Every other variable or command was renamed in this fashion. -These variables had been shared between the drivers and upsd as values. -That is, for each name like STATUS, there was a #define somewhere in the -tree with an INFO_ prefix that gave it a number. INFO_STATUS was 0x0006, -INFO_UTILITY was 0x0004, and so on, with each name having a matching number. -This number was stored in an int within a structure which was part of the -array that was either written to disk or shared memory. +These variables had been shared between the drivers and upsd as values. That is, for each name like STATUS, there was a #define somewhere in the tree with an INFO_ prefix that gave it a number. INFO_STATUS was 0x0006, INFO_UTILITY was 0x0004, and so on, with each name having a matching number. This number was stored in an int within a structure which was part of the array that was either written to disk or shared memory. -That structure had several restrictions on expansion and was dropped as the -data sharing method between the drivers and the server. It was replaced by -a new system of text-based messages over Unix domain sockets. Drivers now -accepted a short list of commands from upsd, and would push out updates -asynchronously. upsd no longer had to poll the state files or shared memory. -It could just select all of the driver and client fds and act on events. +That structure had several restrictions on expansion and was dropped as the data sharing method between the drivers and the server. It was replaced by a new system of text-based messages over Unix domain sockets. Drivers now accepted a short list of commands from upsd, and would push out updates asynchronously. upsd no longer had to poll the state files or shared memory. It could just select all of the driver and client fds and act on events. -At the same time, the network protocol on port 3493 was overhauled to take -advantage of the new naming scheme. The existing "REQ STATUS@su700", -"ANS STATUS@su700 OL" scheme was showing signs of age, and it really -only supported the UPS name (@su700) as an afterthought. The new protocol -would now use commands like GET and LIST, leading to exchanges like -"GET VAR su700 ups.status" and "VAR su700 ups.status OL". These responses -contain enough data to stand alone, so clients can now handle them -asynchronously. +At the same time, the network protocol on port 3493 was overhauled to take advantage of the new naming scheme. The existing "REQ STATUS@su700", "ANS STATUS@su700 OL" scheme was showing signs of age, and it really only supported the UPS name (@su700) as an afterthought. The new protocol would now use commands like GET and LIST, leading to exchanges like "GET VAR su700 ups.status" and "VAR su700 ups.status OL". The responses contain enough data to stand alone, so clients can now handle them asynchronously. July 2003: third stable tree: NUT 1.4.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -On July 25, 2003, 1.4.0 was released. It contained support for both the -old "REQ" style protocol (with names like STATUS), and the new "GET" style -protocol (with names like ups.status). This tree is provided to bridge the -gap between all of the old releases and the upcoming 2.0. +On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ" style protocol (with names like STATUS), and the new "GET" style protocol (with names like ups.status). This tree is provided to bridge the gap between all of the old releases and the upcoming 2.0. -2.0 will be released without support for the old REQ/STATUS protocol. -The hope is that client authors and those who have implemented their own -monitoring software will use the 1.4 cycle to change to the new protocol. -The 1.4 releases contain a lot of compatibility code to make sure both -work at the same time. +2.0 will be released without support for the old REQ/STATUS protocol. The hope is that client authors and those who have implemented their own monitoring software will use the 1.4 cycle to change to the new protocol. The 1.4 releases contain a lot of compatibility code to make sure both work at the same time. July 2003: pushing towards 2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes -were to throw out anything which was providing compatibility with the older -versions of the software. This means that 1.5 and the eventual 2.0 will not -talk to anything older than 1.4. +1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibility with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4. -This tree continues to evolve with new serial routines for the drivers which -are intended to replace the aging upscommon code which dates back to the early -0.x releases. The original routines would call alarm and read in a tight loop -while fetching characters. The new functions are much cleaner, and wait for -data with select. This makes for much cleaner code and easier strace/ktrace -logs, since the number of syscalls has been greatly reduced. +This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced. -There has also been a push to make sure the data from the UPS is well-formed -and is actually usable before sending updates out to upsd. This started -during 1.3 as drivers were adapted to use the dstate functions and the -new variable/command names. Some drivers which were not converted to the -new naming scheme or didn't do sanity checks on the incoming UPS data from -the serial port were dropped from the tree. +There has also been a push to make sure the data from the UPS is well-formed and is actually usable before sending updates out to upsd. This started during 1.3 as drivers were adapted to use the dstate functions and the new variable/command names. Some drivers which were not converted to the new naming scheme or didn't do sanity checks on the incoming UPS data from the serial port were dropped from the tree. This tree was released as 2.0.0. @@ -342,23 +248,11 @@ networkupstools.org November 2003: a new URL ~~~~~~~~~~~~~~~~~~~~~~~~ -The bandwidth demands of a project like this have slowly been forcing me to -offload certain parts to other servers. The download links have pointed -offsite for many months, and other large things like certain UPS protocols -have followed. As the traffic grows, it's clear that having the project -attached to exploits.org is not going to work. +The bandwidth demands of a project like this have slowly been forcing me to offload certain parts to other servers. The download links have pointed offsite for many months, and other large things like certain UPS protocols have followed. As the traffic grows, it's clear that having the project attached to exploits.org is not going to work. -The solution was to register a new domain and set up mirrors. There are two -initial web servers, with more on the way. The main project URL has changed -from `http://www.exploits.org/nut/` to http://www.networkupstools.org. -The actual content is hosted on various mirrors which are updated regularly -with rsync, so the days of dribbling bits through my DSL should be over. +The solution was to register a new domain and set up mirrors. There are two initial web servers, with more on the way. The main project URL has changed from `http://www.exploits.org/nut/` to http://www.networkupstools.org. The actual content is hosted on various mirrors which are updated regularly with rsync, so the days of dribbling bits through my DSL should be over. -This is also when all of the web pages were redesigned to have a simpler -look with fewer links on the left side. The old web pages used to have 30 -or more links on the top page, and most of them vanished when you dropped -down one level. The links are now constant on the entire site, and the old -links now live in their own groups in separate directories. +This is also when all of the web pages were redesigned to have a simpler look with fewer links on the left side. The old web pages used to have 30 or more links on the top page, and most of them vanished when you dropped down one level. The links are now constant on the entire site, and the old links now live in their own groups in separate directories. Second major version -------------------- @@ -385,7 +279,7 @@ At that time, the development process was still centralized. There was no revision control system (like the current Subversion repository), nor trackers to interact with NUT development. Russell was receiving all the patches and requests, and doing all the work on -his own, including releases. +his own, including releases. Russell was more and more thinking about giving the project leadership to Arnaud Quette, which finally happened with the 2.0.1 release in February 2005. @@ -393,11 +287,10 @@ Arnaud Quette, which finally happened with the 2.0.1 release in February 2005. This marked a new era for NUT... First, Arnaud aimed at opening up the development by creating a project on the -http://www.debian.org/[Debian] -http://alioth.debian.org/projects/nut/[Alioth Forge]. +http://www.debian.org/[Debian] http://alioth.debian.org/projects/nut/[Alioth Forge]. This allowed to build the team of hackers that Russell dreamed about. It also allows to ensure NUT's continuation, whatever happens to -the leader. And that would most of all boost the projects contributions. +the leader. And that would most of all boost the projects contributions. //////////////////////////////////////////////////////////////////////// diff --git a/docs/images/advanced.png b/docs/images/advanced.png index a8291af..8f1df80 100644 Binary files a/docs/images/advanced.png and b/docs/images/advanced.png differ diff --git a/docs/images/bizarre.png b/docs/images/bizarre.png index 47e45e2..0c56884 100644 Binary files a/docs/images/bizarre.png and b/docs/images/bizarre.png differ diff --git a/docs/macros.txt b/docs/macros.txt index b32da5b..efd9dd7 100644 --- a/docs/macros.txt +++ b/docs/macros.txt @@ -44,11 +44,11 @@ directory. - NUT_CHECK_OS Check for the exact system name and type. - This was only used in the past to determine the packaging rule to be - used through the OS_NAME variable, but may be useful for other purposes - in the future. + This was only used in the past to determine the packaging rule to be used + through the OS_NAME variable, but may be useful for other purposes in the + future. -- NUT_REPORT_FEATURE(FEATURE, VALUE, VARIABLE, DESCRIPTION) +- NUT_REPORT_FEATURE(FEATURE, VALUE, VARIABLE, DESCRIPTION) Schedule a line for the end-of-configuration feature summary. The FEATURE is a descriptive string such that the sentence "Checking @@ -62,7 +62,7 @@ directory. - NUT_REPORT(FEATURE, VALUE) Schedule a line for the end-of-configuration feature summary, without - printing anything to the terminal immediately. + printing anything to the terminal immediately. - NUT_PRINT_FEATURE_REPORT diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am index 0d693a3..e793657 100644 --- a/docs/man/Makefile.am +++ b/docs/man/Makefile.am @@ -4,21 +4,13 @@ # Notes: # - sources (.txt) and groff formats are both distributed, # - only sources are versioned ; groff files are generated at worst -# during 'make dist' (while preparing a release tarball) +# during 'make dist' # - HTML files are built upon request, if AsciiDoc is available, # - groff update will only happen if AsciiDoc is available too, # - all this can probably (and hopefully) be improved, but I've not # found a way to do pattern replacement on the fly for target deps! # FIXME: investigate an autogen.sh hook # - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html -# - WITH_MANS can be enabled if either we are building man-pages, or if -# the --with-doc=man=auto detected an inability to build the man-pages -# but enabled the DOC_INSTALL_DISTED_MANS toggle so we deliver disted -# files from source tree - -# Is "egrep == grep -E" always valid? (maybe all a job for configure.ac) -EGREP = egrep -#EGREP = grep -E # Base configuration and client manpages, always installed SRC_CONF_PAGES = \ @@ -29,7 +21,6 @@ SRC_CONF_PAGES = \ upsmon.conf.txt \ upssched.conf.txt -if WITH_MANS MAN_CONF_PAGES = \ nut.conf.5 \ ups.conf.5 \ @@ -37,7 +28,6 @@ MAN_CONF_PAGES = \ upsd.users.5 \ upsmon.conf.5 \ upssched.conf.5 -endif man5_MANS = $(MAN_CONF_PAGES) @@ -49,50 +39,36 @@ HTML_CONF_MANS = \ upsmon.conf.html \ upssched.conf.html -# NOTE: Currently SRC_DRIVERTOOL_PAGES are a separate list to generate -# a linkman-drivertool-names.txt file, but historically remain part of -# MAN/HTML_CLIENT_PAGES in the bigger picture. -SRC_DRIVERTOOL_PAGES = \ - nut-driver-enumerator.txt \ - upsdrvctl.txt \ - upsdrvsvcctl.txt - SRC_CLIENT_PAGES = \ - $(SRC_DRIVERTOOL_PAGES) \ nutupsdrv.txt \ upsc.txt \ upscmd.txt \ upsd.txt \ + upsdrvctl.txt \ upslog.txt \ upsmon.txt \ upsrw.txt \ upssched.txt -if WITH_MANS MAN_CLIENT_PAGES = \ nutupsdrv.8 \ - nut-driver-enumerator.8 \ upsc.8 \ upscmd.8 \ upsd.8 \ upsdrvctl.8 \ - upsdrvsvcctl.8 \ upslog.8 \ upsmon.8 \ upsrw.8 \ upssched.8 -endif man8_MANS = $(MAN_CLIENT_PAGES) HTML_CLIENT_MANS = \ nutupsdrv.html \ - nut-driver-enumerator.html \ upsc.html \ upscmd.html \ upsd.html \ upsdrvctl.html \ - upsdrvsvcctl.html \ upslog.html \ upsmon.html \ upsrw.html \ @@ -100,9 +76,7 @@ HTML_CLIENT_MANS = \ SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt -if WITH_MANS MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 -endif man8_MANS += $(MAN_TOOL_PAGES) @@ -117,7 +91,6 @@ SRC_CGI_PAGES = \ upsstats.cgi.txt \ upsimage.cgi.txt -if WITH_MANS MAN5_CGI_PAGES = \ hosts.conf.5 \ upsset.conf.5 \ @@ -127,11 +100,11 @@ MAN8_CGI_PAGES = \ upsset.cgi.8 \ upsstats.cgi.8 \ upsimage.cgi.8 -endif if WITH_CGI -man5_MANS += $(MAN5_CGI_PAGES) -man8_MANS += $(MAN8_CGI_PAGES) + man5_MANS += $(MAN5_CGI_PAGES) + + man8_MANS += $(MAN8_CGI_PAGES) endif HTML_CGI_MANS = \ @@ -172,7 +145,7 @@ SRC_DEV_PAGES = \ nutscan.txt \ nutscan_scan_snmp.txt \ nutscan_scan_usb.txt \ - nutscan_scan_xml_http_range.txt \ + nutscan_scan_xml_http.txt \ nutscan_scan_nut.txt \ nutscan_scan_avahi.txt \ nutscan_scan_ipmi.txt \ @@ -189,66 +162,7 @@ SRC_DEV_PAGES = \ libupsclient-config.txt \ skel.txt -if WITH_MANS # NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt) - -LIBNUTCLIENT_MISC_DEPS= \ - nutclient_authenticate.3 \ - nutclient_logout.3 \ - nutclient_device_login.3 \ - nutclient_get_device_num_logins.3 \ - nutclient_device_master.3 \ - nutclient_device_forced_shutdown.3 - -$(LIBNUTCLIENT_MISC_DEPS): libnutclient_misc.3 - touch $@ - -LIBNUTCLIENT_TCP_DEPS= \ - nutclient_tcp_create_client.3 \ - nutclient_tcp_disconnect.3 \ - nutclient_tcp_get_timeout.3 \ - nutclient_tcp_is_connected.3 \ - nutclient_tcp_reconnect.3 \ - nutclient_tcp_set_timeout.3 - -$(LIBNUTCLIENT_TCP_DEPS): libnutclient_tcp.3 - touch $@ - -LIBNUTCLIENT_GENERAL_DEPS= \ - nutclient_destroy.3 - -$(LIBNUTCLIENT_GENERAL_DEPS): libnutclient_general.3 - touch $@ - -LIBNUTCLIENT_VARIABLES_DEPS= \ - nutclient_get_device_rw_variables.3 \ - nutclient_get_device_variable_description.3 \ - nutclient_get_device_variables.3 \ - nutclient_get_device_variable_values.3 \ - nutclient_has_device_variable.3 \ - nutclient_set_device_variable_value.3 \ - nutclient_set_device_variable_values.3 - -$(LIBNUTCLIENT_VARIABLES_DEPS): libnutclient_variables.3 - touch $@ - -LIBNUTCLIENT_COMMANDS_DEPS= \ - nutclient_execute_device_command.3 \ - nutclient_get_device_command_description.3 \ - nutclient_get_device_commands.3 \ - nutclient_has_device_command.3 - -$(LIBNUTCLIENT_COMMANDS_DEPS): libnutclient_commands.3 - touch $@ - -LIBNUTCLIENT_DEVICES_DEPS= \ - nutclient_get_device_description.3 \ - nutclient_get_devices.3 \ - nutclient_has_device.3 - -$(LIBNUTCLIENT_DEVICES_DEPS): libnutclient_devices.3 - touch $@ - MAN3_DEV_PAGES = \ upsclient.3 \ upscli_add_host_cert.3 \ @@ -261,9 +175,7 @@ MAN3_DEV_PAGES = \ upscli_list_next.3 \ upscli_list_start.3 \ upscli_readline.3 \ - upscli_readline_timeout.3 \ upscli_sendline.3 \ - upscli_sendline_timeout.3 \ upscli_splitaddr.3 \ upscli_splitname.3 \ upscli_ssl.3 \ @@ -271,21 +183,42 @@ MAN3_DEV_PAGES = \ upscli_upserror.3 \ libnutclient.3 \ libnutclient_commands.3 \ - $(LIBNUTCLIENT_COMMANDS_DEPS) \ libnutclient_devices.3 \ - $(LIBNUTCLIENT_DEVICES_DEPS) \ libnutclient_general.3 \ - $(LIBNUTCLIENT_GENERAL_DEPS) \ libnutclient_misc.3 \ - $(LIBNUTCLIENT_MISC_DEPS) \ libnutclient_tcp.3 \ - $(LIBNUTCLIENT_TCP_DEPS) \ libnutclient_variables.3 \ - $(LIBNUTCLIENT_VARIABLES_DEPS) \ + nutclient_authenticate.3 \ + nutclient_destroy.3 \ + nutclient_device_forced_shutdown.3 \ + nutclient_device_login.3 \ + nutclient_device_master.3 \ + nutclient_execute_device_command.3 \ + nutclient_get_device_command_description.3 \ + nutclient_get_device_commands.3 \ + nutclient_get_device_description.3 \ + nutclient_get_device_num_logins.3 \ + nutclient_get_device_rw_variables.3 \ + nutclient_get_devices.3 \ + nutclient_get_device_variable_description.3 \ + nutclient_get_device_variables.3 \ + nutclient_get_device_variable_values.3 \ + nutclient_has_device.3 \ + nutclient_has_device_command.3 \ + nutclient_has_device_variable.3 \ + nutclient_logout.3 \ + nutclient_set_device_variable_value.3 \ + nutclient_set_device_variable_values.3 \ + nutclient_tcp_create_client.3 \ + nutclient_tcp_disconnect.3 \ + nutclient_tcp_get_timeout.3 \ + nutclient_tcp_is_connected.3 \ + nutclient_tcp_reconnect.3 \ + nutclient_tcp_set_timeout.3 \ nutscan.3 \ nutscan_scan_snmp.3 \ nutscan_scan_usb.3 \ - nutscan_scan_xml_http_range.3 \ + nutscan_scan_xml_http.3 \ nutscan_scan_nut.3 \ nutscan_scan_avahi.3 \ nutscan_scan_ipmi.3 \ @@ -300,21 +233,14 @@ MAN3_DEV_PAGES = \ nutscan_get_serial_ports_list.3 \ nutscan_init.3 -upscli_readline_timeout.3: upscli_readline.3 - touch $@ - -upscli_sendline_timeout.3: upscli_sendline.3 - touch $@ - MAN1_DEV_PAGES = \ libupsclient-config.1 -endif if WITH_DEV -man3_MANS = $(MAN3_DEV_PAGES) + man3_MANS = $(MAN3_DEV_PAGES) if !WITH_PKG_CONFIG -man1_MANS = $(MAN1_DEV_PAGES) + man1_MANS = $(MAN1_DEV_PAGES) endif # WITH_DEV endif @@ -347,7 +273,7 @@ HTML_DEV_MANS = \ nutscan.html \ nutscan_scan_snmp.html \ nutscan_scan_usb.html \ - nutscan_scan_xml_http_range.html \ + nutscan_scan_xml_http.html \ nutscan_scan_nut.html \ nutscan_scan_avahi.html \ nutscan_scan_ipmi.html \ @@ -369,7 +295,7 @@ HTML_DEV_MANS = \ # (--with-drivers=...) if SOME_DRIVERS -man8_MANS += $(DRIVER_MAN_LIST) + man8_MANS += $(DRIVER_MAN_LIST) else @@ -403,8 +329,7 @@ SRC_SERIAL_PAGES = \ mge-utalk.txt \ oneac.txt \ microdowell.txt \ - microsol-apc.txt \ - nutdrv_siemens_sitop.txt \ + nutdrv_qx.txt \ optiups.txt \ powercom.txt \ powerpanel.txt \ @@ -418,7 +343,6 @@ SRC_SERIAL_PAGES = \ victronups.txt \ apcupsd-ups.txt -if WITH_MANS MAN_SERIAL_PAGES = \ al175.8 \ apcsmart.8 \ @@ -445,10 +369,9 @@ MAN_SERIAL_PAGES = \ metasys.8 \ mge-shut.8 \ mge-utalk.8 \ + nutdrv_qx.8 \ oneac.8 \ microdowell.8 \ - microsol-apc.8 \ - nutdrv_siemens_sitop.8 \ optiups.8 \ powercom.8 \ powerpanel.8 \ @@ -461,10 +384,9 @@ MAN_SERIAL_PAGES = \ upscode2.8 \ victronups.8 \ apcupsd-ups.8 -endif if WITH_SERIAL -man8_MANS += $(MAN_SERIAL_PAGES) + man8_MANS += $(MAN_SERIAL_PAGES) endif HTML_SERIAL_MANS = \ @@ -493,10 +415,9 @@ HTML_SERIAL_MANS = \ metasys.html \ mge-shut.html \ mge-utalk.html \ + nutdrv_qx.html \ oneac.html \ microdowell.html \ - microsol-apc.html \ - nutdrv_siemens_sitop.html \ optiups.html \ powercom.html \ powerpanel.html \ @@ -512,12 +433,10 @@ HTML_SERIAL_MANS = \ # (--with-snmp) SRC_SNMP_PAGES = snmp-ups.txt -if WITH_MANS MAN_SNMP_PAGES = snmp-ups.8 -endif if WITH_SNMP -man8_MANS += $(MAN_SNMP_PAGES) + man8_MANS += $(MAN_SNMP_PAGES) endif HTML_SNMP_MANS = snmp-ups.html @@ -528,142 +447,88 @@ SRC_USB_LIBUSB_PAGES = \ blazer-common.txt \ blazer_usb.txt \ nutdrv_atcl_usb.txt \ + nutdrv_qx.txt \ richcomm_usb.txt \ riello_usb.txt \ tripplite_usb.txt \ usbhid-ups.txt -if WITH_MANS MAN_USB_LIBUSB_PAGES = \ bcmxcp_usb.8 \ blazer_usb.8 \ nutdrv_atcl_usb.8 \ + nutdrv_qx.8 \ richcomm_usb.8 \ riello_usb.8 \ tripplite_usb.8 \ usbhid-ups.8 -endif if WITH_USB -man8_MANS += $(MAN_USB_LIBUSB_PAGES) + man8_MANS += $(MAN_USB_LIBUSB_PAGES) endif HTML_USB_LIBUSB_MANS = \ bcmxcp_usb.html \ blazer_usb.html \ + nutdrv_qx.html \ nutdrv_atcl_usb.html \ richcomm_usb.html \ riello_usb.html \ tripplite_usb.html \ usbhid-ups.html -# (--with-serial / --with-usb) -SRC_SERIAL_USB_PAGES = \ - nutdrv_qx.txt - -if WITH_MANS -MAN_SERIAL_USB_PAGES = \ - nutdrv_qx.8 -endif - -if WITH_SERIAL -man8_MANS += $(MAN_SERIAL_USB_PAGES) -else -if WITH_USB -man8_MANS += $(MAN_SERIAL_USB_PAGES) -endif -endif - -HTML_SERIAL_USB_MANS = \ - nutdrv_qx.html - # (--with-neon) SRC_NETXML_PAGES = netxml-ups.txt -if WITH_MANS MAN_NETXML_PAGES = netxml-ups.8 -endif if WITH_NEON -man8_MANS += $(MAN_NETXML_PAGES) + man8_MANS += $(MAN_NETXML_PAGES) endif HTML_NETXML_MANS = netxml-ups.html # (--with-powerman) SRC_POWERMAN_PAGES = powerman-pdu.txt -if WITH_MANS MAN_POWERMAN_PAGES = powerman-pdu.8 -endif if WITH_LIBPOWERMAN -man8_MANS += $(MAN_POWERMAN_PAGES) + man8_MANS += $(MAN_POWERMAN_PAGES) endif HTML_POWERMAN_MANS = powerman-pdu.html # (--with-ipmi) SRC_IPMIPSU_PAGES = nut-ipmipsu.txt -if WITH_MANS MAN_IPMIPSU_PAGES = nut-ipmipsu.8 -endif if WITH_IPMI -man8_MANS += $(MAN_IPMIPSU_PAGES) + man8_MANS += $(MAN_IPMIPSU_PAGES) endif HTML_IPMIPSU_MANS = nut-ipmipsu.html SRC_MACOSX_PAGES = macosx-ups.txt -if WITH_MANS MAN_MACOSX_PAGES = macosx-ups.8 -endif if WITH_MACOSX -man8_MANS += $(MAN_MACOSX_PAGES) + man8_MANS += $(MAN_MACOSX_PAGES) endif HTML_MACOSX_MANS = macosx-ups.html -SRC_MODBUS_PAGES = phoenixcontact_modbus.txt \ - generic_modbus.txt \ - huawei-ups2000.txt \ - socomec_jbus.txt \ - adelsystem_cbi.txt -if WITH_MANS -MAN_MODBUS_PAGES = phoenixcontact_modbus.8 \ - generic_modbus.8 \ - huawei-ups2000.8 \ - socomec_jbus.8 \ - adelsystem_cbi.8 -endif - -if WITH_MODBUS -man8_MANS += $(MAN_MODBUS_PAGES) -endif - -HTML_MODBUS_MANS = phoenixcontact_modbus.html \ - generic_modbus.html \ - huawei-ups2000.html \ - socomec_jbus.html \ - adelsystem_cbi.html - -SRC_LINUX_I2C_PAGES = asem.txt pijuice.txt -if WITH_MANS -MAN_LINUX_I2C_PAGES = asem.8 pijuice.8 -endif +SRC_LINUX_I2C_PAGES = asem.txt +MAN_LINUX_I2C_PAGES = asem.8 if WITH_LINUX_I2C -man8_MANS += $(MAN_LINUX_I2C_PAGES) + man8_MANS += $(LINUX_I2C_PAGES) endif -HTML_LINUX_I2C_MANS = asem.html pijuice.html +HTML_LINUX_I2C_MANS = asem.html # SOME_DRIVERS endif -MAN_MANS = -if WITH_MANS -MAN_MANS += \ +MAN_MANS = \ $(MAN_CONF_PAGES) \ $(MAN_CLIENT_PAGES) \ $(MAN_TOOL_PAGES) \ @@ -674,60 +539,31 @@ MAN_MANS += \ $(MAN_SERIAL_PAGES) \ $(MAN_SNMP_PAGES) \ $(MAN_USB_LIBUSB_PAGES) \ - $(MAN_SERIAL_USB_PAGES) \ $(MAN_NETXML_PAGES) \ $(MAN_POWERMAN_PAGES) \ $(MAN_IPMIPSU_PAGES) \ $(MAN_MACOSX_PAGES) \ - $(MAN_MODBUS_PAGES) \ $(MAN_LINUX_I2C_PAGES) -endif - -SRC_DRIVERS_PAGES = \ - $(SRC_SERIAL_PAGES) \ - $(SRC_SNMP_PAGES) \ - $(SRC_USB_LIBUSB_PAGES) \ - $(SRC_SERIAL_USB_PAGES) \ - $(SRC_NETXML_PAGES) \ - $(SRC_POWERMAN_PAGES) \ - $(SRC_IPMIPSU_PAGES) \ - $(SRC_MACOSX_PAGES) \ - $(SRC_MODBUS_PAGES) \ - $(SRC_LINUX_I2C_PAGES) # distribute everything, even those not installed by default # Note that 'dist' target requires AsciiDoc! -SRC_ALL_PAGES = \ +EXTRA_DIST = \ $(SRC_CONF_PAGES) \ $(SRC_CLIENT_PAGES) \ $(SRC_TOOL_PAGES) \ $(SRC_CGI_PAGES) \ $(SRC_DEV_PAGES) \ - $(SRC_DRIVERS_PAGES) - -EXTRA_DIST = \ - $(SRC_ALL_PAGES) \ + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(SRC_IPMIPSU_PAGES) \ + $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ $(MAN_MANS) \ asciidoc.conf -if ! WITH_MANS -if ! SKIP_MANS -# Cause "make dist" to fail, unless caller (like the stack of distcheck-dmf) -# runs ./configure --with-doc=skip (or --with-doc=man=skip specifically) -EXTRA_DIST += dist -dist: - @echo "ERROR: Manpage building was disabled by configure script, and these pages are required for our proper 'make dist'" >&2 ; false -endif -endif - -# For builds done from dist'ed sources, there may be a conflict of timestamps -# between original *.txt files and pre-built manpages etc. leading to skipping -# of manpage re-generation even if that activity is possible and requested. -# Possibly a cleaner, but less portable, solution would be to touch the -# generated files to long ago. Current solution assumes good valid clocks :) -dist-hook: - @echo "Fix up manpage source timestamps" && cd $(distdir) && touch $(SRC_ALL_PAGES) - HTML_MANS = \ $(HTML_CONF_MANS) \ $(HTML_CLIENT_MANS) \ @@ -737,244 +573,53 @@ HTML_MANS = \ $(HTML_SERIAL_MANS) \ $(HTML_SNMP_MANS) \ $(HTML_USB_LIBUSB_MANS) \ - $(HTML_SERIAL_USB_MANS) \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ $(HTML_MACOSX_MANS) \ - $(HTML_MODBUS_MANS) \ $(HTML_LINUX_I2C_MANS) -# Note: target documents, except nutupsdrv.txt itself, start the -# list of drivers with `- linkman:nutupsdrv[8]` entry -# To regenerate these files, do `make distclean` first -LINKMAN_INCLUDE_GENERATED = linkman-driver-names.txt linkman-drivertool-names.txt -LINKMAN_INCLUDE_CONSUMERS = index.txt upsd.txt nutupsdrv.txt - -linkman-driver-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ - ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ - fi ; \ - fi - @if test -s "$@" ; then exit 0 ; fi ; \ - (LC_ALL=C; LANG=C; export LC_ALL LANG; \ - for F in $(SRC_DRIVERS_PAGES) ; do echo "$$F" ; done \ - | grep -vE '^nutupsdrv\.txt$$' \ - | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ - ) > "$@" - -linkman-drivertool-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ - ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ - fi ; \ - fi - @if test -s "$@" ; then exit 0 ; fi ; \ - (LC_ALL=C; LANG=C; export LC_ALL LANG; \ - for F in $(SRC_DRIVERTOOL_PAGES) ; do echo "$$F" ; done \ - | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ - ) > "$@" - -# Dependencies are about particular filenames, since over time -# we might have several use-cases for LINKMAN_INCLUDE_GENERATED: -$(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names.txt - -# These files are generated when we build from git source so not tracked in -# git, and not part of tarball (to be in builddir) - so not in EXTRA_DIST. -DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) - all: -all-html html-man: $(HTML_MANS) index.html +html-man: $(HTML_MANS) index.html -# Have a way to build all man pages, not just those that fit currently -# configured drivers, daemons, developer aspect, etc. -all-man man-man: $(MAN_MANS) - -if WITH_MANS -if ! SKIP_MANS -check-local: check-man -else -check-local: check-man-txt check-man-pages - @echo "Man-page generation was SKIPPED per user request, so pregenerated pages were sanity-checked (if any)" >&2 -endif -else -check-local: check-man-txt check-man-pages - @echo "Man-page generation was not done, so pregenerated pages were sanity-checked (if any)" >&2 -endif - -check-man: check-man-txt check-man-pages check-html-man - -# the "for" loops might better use $^ but it might be not portable -check-man-html: check-html-man - -check-html-man: $(HTML_MANS) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(HTML_MANS) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-man sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-man sanity check (checked $$CHECKED files)"; exit 0 - -# Note: many man-pages here have code samples and are mis-identified as C code -check-man-page: check-man-pages - -# Man-pages may be pre-generated (srcdir), or re-built (builddir) -check-man-pages: $(MAN_MANS) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(MAN_MANS) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - ( test -s "$(abs_srcdir)/$$F" && { file "$(abs_srcdir)/$$F" | $(EGREP) -i '(roff.* input|C source|ASCII text)' > /dev/null ; } ) || \ - ( test -s "$(abs_builddir)/$$F" && { file "$(abs_builddir)/$$F" | $(EGREP) -i '(roff.* input|C source|ASCII text)' > /dev/null ; } ) || \ - FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED man-page sanity check for:$$FAILED" >&2 ; \ - ( echo "SRCDIR:"; cd "$(abs_srcdir)/" && file $$FAILED ; \ - echo "BUILDDIR:"; cd "$(abs_builddir)/" && file $$FAILED ; \ - ) >&2 ; exit 1; \ - fi; echo "PASSED man-page sanity check (checked $$CHECKED files)"; exit 0 - -check-man-source: check-man-txt - -# Note: (GNU) make can helpfully add VPATH to the short source filenames -# which we had listed above, so the "case" below handles two possibilities -check-man-txt: $(SRC_ALL_PAGES) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - ( cd $(abs_srcdir) ) || exit; \ - for F in $(SRC_ALL_PAGES) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - case "$$F" in \ - */*) ;; \ - *) F="$(abs_srcdir)/$$F" ;; \ - esac ; \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(ASCII|UTF-8|Unicode|ISO-8859|English).* text' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED man-source sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 - -CLEANFILES = *-spellchecked +CLEANFILES = *.xml *.html SUFFIXES = .txt .html .1 .3 .5 .8 -# For builds with allowed installation of prebuild man pages, check that -# they exist in sources (make would pull them automatically as a fallback -# from failed lookup in build products). For builds that require rebuild -# of man pages, abort with error if build product is missing. -if DOC_INSTALL_DISTED_MANS -SRC_PREBUILT_CLAUSE=|| [ -r "$(srcdir)/`basename $@`" ] -else -SRC_PREBUILT_CLAUSE= -endif - if HAVE_ASCIIDOC -CLEANFILES += *.1 *.3 *.5 *.8 *.xml *.html *.pdf - -# Working around a2x not friendly to parallelized runs. -# See more details in the main NUT docs/Makefile.am -DOCBUILD_BEGIN = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - rm -rf "./$${A2X_OUTDIR}" || true ; \ - test -d "$@" && rm -rf "$@" || true ; \ - mkdir -p "./$${A2X_OUTDIR}" || exit ; \ - for F in $(LINKMAN_INCLUDE_GENERATED) ; do \ - if [ -s "./$$F" ] ; then ln -f -s "../../$$F" "./$${A2X_OUTDIR}/" ; else \ - if [ -s "$(abs_srcdir)/$$F" ] ; then ln -f -s "$(abs_srcdir)/$$F" "./$${A2X_OUTDIR}/" ; fi ; fi ; \ - done ; \ - else A2X_OUTDIR='.' ; fi; \ - if test -s "${builddir}/docbook-xsl.css" \ - && test -r "${builddir}/docbook-xsl.css" \ - && ! test -w "${builddir}/docbook-xsl.css" \ - ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \ - chmod -R u+w "./$${A2X_OUTDIR}" || true ; \ - if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$<" && test -s "$(srcdir)/`basename $<`" ; then \ - ln -fs "$(srcdir)/`basename $<`" "$(builddir)/" ; \ - fi ; \ - fi ; \ - A2X_VERBOSE="$(ASCIIDOC_VERBOSE)"; if [ "$(V)" = 1 ]; then A2X_VERBOSE="--verbose"; fi; \ -} - -# Note that documents with sub-pages (see LIBNUTCLIENT_*_DEPS above) -# may generate multiple files in one go... so we move "*" and hope -# for no required hidden files (or would have to `find` them all). -DOCBUILD_END = { \ - if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ - chmod -R u+w "./$${A2X_OUTDIR}" || true ; \ - test -d "$@" && rm -rf "$@" || true ; \ - for F in $(LINKMAN_INCLUDE_GENERATED) ; do \ - rm -f "./$${A2X_OUTDIR}/$$F" || true ; \ - done ; \ - mv -f "./$${A2X_OUTDIR}/$(@F)" ./ || exit ; \ - mv -f "./$${A2X_OUTDIR}/"*.* ./ 2>/dev/null || true ; \ - rm -rf "./$${A2X_OUTDIR}" ; \ - fi ; \ -} - -### Regarding absolute paths in attributes below: by default asciidoc -### resolves include paths relative to the main document, so while we -### see the relative builddir as "." in the makefile, for included -### data it would mean the source directory where the .txt resides. .txt.html: - @A2X_OUTDIR="tmp/man-html.$(@F).$$$$" ; \ - echo " DOC-MAN-HTML Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(ASCIIDOC) --backend=xhtml11 $${A2X_VERBOSE} \ - --attribute localdate="`TZ=UTC date +%Y-%m-%d`" \ - --attribute localtime="`TZ=UTC date +%H:%M:%S`" \ + $(ASCIIDOC) --backend=xhtml11 \ + --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ + --attribute localtime=`TZ=UTC date +%H:%M:%S` \ --attribute nutversion="@PACKAGE_VERSION@" \ - --attribute srcdir="$(abs_srcdir)" \ - --attribute builddir="$(abs_builddir)" \ - -o "$${A2X_OUTDIR}/$(@F)" $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES + -o $@ $< ### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file. -### This parameter is currently required; see docs/Makefile.am for more detail. -A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ - --xsltproc-opts="--nonet" \ +A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ + --xsltproc-opts "--nonet" \ --attribute mansource="Network UPS Tools" \ --attribute manversion="@PACKAGE_VERSION@" \ --attribute manmanual="NUT Manual" \ - --attribute srcdir="$(abs_srcdir)" \ - --attribute builddir="$(abs_builddir)" \ - --destination-dir="$${A2X_OUTDIR}" + --destination-dir=. .txt.1: - @A2X_OUTDIR="tmp/man1.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES + $(A2X) $(A2X_MANPAGE_OPTS) $< .txt.3: - @A2X_OUTDIR="tmp/man3.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES + $(A2X) $(A2X_MANPAGE_OPTS) $< .txt.5: - @A2X_OUTDIR="tmp/man5.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES + $(A2X) $(A2X_MANPAGE_OPTS) $< .txt.8: - @A2X_OUTDIR="tmp/man8.$(@F).$$$$" ; \ - echo " DOC-MAN Generating $@"; \ - $(DOCBUILD_BEGIN) ; RES=0; \ - $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ - $(DOCBUILD_END) ; exit $$RES + $(A2X) $(A2X_MANPAGE_OPTS) $< else !HAVE_ASCIIDOC .txt.html: - @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ + @if [ -r "$@" ]; then \ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ else \ echo "Could not find prebuilt $@ manual page." ; \ @@ -983,7 +628,7 @@ else !HAVE_ASCIIDOC fi .txt.1: - @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ + @if [ -r "$@" ]; then \ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ else \ echo "Could not find prebuilt $@ manual page." ; \ @@ -992,7 +637,7 @@ else !HAVE_ASCIIDOC fi .txt.3: - @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ + @if [ -r "$@" ]; then \ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ else \ echo "Could not find prebuilt $@ manual page." ; \ @@ -1001,7 +646,7 @@ else !HAVE_ASCIIDOC fi .txt.5: - @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ + @if [ -r "$@" ]; then \ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ else \ echo "Could not find prebuilt $@ manual page." ; \ @@ -1010,7 +655,7 @@ else !HAVE_ASCIIDOC fi .txt.8: - @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ + @if [ -r "$@" ]; then \ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ else \ echo "Could not find prebuilt $@ manual page." ; \ @@ -1019,21 +664,3 @@ else !HAVE_ASCIIDOC fi endif !HAVE_ASCIIDOC - -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here -# by a wildcard target in case the make implementation can put the two together. -*.txt-spellchecked: Makefile.am $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -.txt.txt-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_DIR="$(srcdir)" $@ - -MAINTAINERCLEANFILES = Makefile.in .dirstamp - -clean-local: - rm -rf tmp diff --git a/docs/man/Makefile.in b/docs/man/Makefile.in index b0610d3..71b13d4 100644 --- a/docs/man/Makefile.in +++ b/docs/man/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,29 +20,15 @@ # Notes: # - sources (.txt) and groff formats are both distributed, # - only sources are versioned ; groff files are generated at worst -# during 'make dist' (while preparing a release tarball) +# during 'make dist' # - HTML files are built upon request, if AsciiDoc is available, # - groff update will only happen if AsciiDoc is available too, # - all this can probably (and hopefully) be improved, but I've not # found a way to do pattern replacement on the fly for target deps! # FIXME: investigate an autogen.sh hook # - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html -# - WITH_MANS can be enabled if either we are building man-pages, or if -# the --with-doc=man=auto detected an inability to build the man-pages -# but enabled the DOC_INSTALL_DISTED_MANS toggle so we deliver disted -# files from source tree VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -116,57 +102,24 @@ target_triplet = @target@ @SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_4 = $(MAN_SERIAL_PAGES) @SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_5 = $(MAN_SNMP_PAGES) @SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_6 = $(MAN_USB_LIBUSB_PAGES) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_7 = $(MAN_SERIAL_USB_PAGES) -@SOME_DRIVERS_FALSE@@WITH_SERIAL_FALSE@@WITH_USB_TRUE@am__append_8 = $(MAN_SERIAL_USB_PAGES) -@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__append_9 = $(MAN_NETXML_PAGES) -@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_10 = $(MAN_POWERMAN_PAGES) -@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_11 = $(MAN_IPMIPSU_PAGES) -@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_12 = $(MAN_MACOSX_PAGES) -@SOME_DRIVERS_FALSE@@WITH_MODBUS_TRUE@am__append_13 = $(MAN_MODBUS_PAGES) -@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_14 = $(MAN_LINUX_I2C_PAGES) -@WITH_MANS_TRUE@am__append_15 = \ -@WITH_MANS_TRUE@ $(MAN_CONF_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_CLIENT_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_TOOL_PAGES) \ -@WITH_MANS_TRUE@ $(MAN5_CGI_PAGES) \ -@WITH_MANS_TRUE@ $(MAN8_CGI_PAGES) \ -@WITH_MANS_TRUE@ $(MAN1_DEV_PAGES) \ -@WITH_MANS_TRUE@ $(MAN3_DEV_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_SERIAL_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_SNMP_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_USB_LIBUSB_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_SERIAL_USB_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_NETXML_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_POWERMAN_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_IPMIPSU_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_MACOSX_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_MODBUS_PAGES) \ -@WITH_MANS_TRUE@ $(MAN_LINUX_I2C_PAGES) - - -# Cause "make dist" to fail, unless caller (like the stack of distcheck-dmf) -# runs ./configure --with-doc=skip (or --with-doc=man=skip specifically) -@SKIP_MANS_FALSE@@WITH_MANS_FALSE@am__append_16 = dist -@HAVE_ASCIIDOC_TRUE@am__append_17 = *.1 *.3 *.5 *.8 *.xml *.html *.pdf +@SOME_DRIVERS_FALSE@@WITH_NEON_TRUE@am__append_7 = $(MAN_NETXML_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES) +@SOME_DRIVERS_FALSE@@WITH_IPMI_TRUE@am__append_9 = $(MAN_IPMIPSU_PAGES) +@SOME_DRIVERS_FALSE@@WITH_MACOSX_TRUE@am__append_10 = $(MAN_MACOSX_PAGES) +@SOME_DRIVERS_FALSE@@WITH_LINUX_I2C_TRUE@am__append_11 = $(LINUX_I2C_PAGES) subdir = docs/man +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ - $(top_srcdir)/m4/ax_c_pragmas.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_compare_version.m4 \ - $(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nut_arg_with.m4 \ $(top_srcdir)/m4/nut_check_asciidoc.m4 \ - $(top_srcdir)/m4/nut_check_cppcheck.m4 \ - $(top_srcdir)/m4/nut_check_headers_windows.m4 \ $(top_srcdir)/m4/nut_check_libavahi.m4 \ $(top_srcdir)/m4/nut_check_libfreeipmi.m4 \ $(top_srcdir)/m4/nut_check_libgd.m4 \ $(top_srcdir)/m4/nut_check_libltdl.m4 \ - $(top_srcdir)/m4/nut_check_libmodbus.m4 \ $(top_srcdir)/m4/nut_check_libneon.m4 \ $(top_srcdir)/m4/nut_check_libnetsnmp.m4 \ $(top_srcdir)/m4/nut_check_libnss.m4 \ @@ -175,17 +128,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \ $(top_srcdir)/m4/nut_check_libusb.m4 \ $(top_srcdir)/m4/nut_check_libwrap.m4 \ $(top_srcdir)/m4/nut_check_os.m4 \ - $(top_srcdir)/m4/nut_check_pkgconfig.m4 \ - $(top_srcdir)/m4/nut_check_python.m4 \ - $(top_srcdir)/m4/nut_compiler_family.m4 \ - $(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \ $(top_srcdir)/m4/nut_report_feature.m4 \ - $(top_srcdir)/m4/nut_stash_warnings.m4 \ $(top_srcdir)/m4/nut_type_socklen_t.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = @@ -245,7 +192,6 @@ man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) A2X = @A2X@ ACLOCAL = @ACLOCAL@ @@ -254,7 +200,6 @@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ ASCIIDOC = @ASCIIDOC@ ASPELL = @ASPELL@ -AUGPARSE = @AUGPARSE@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -265,7 +210,6 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONFPATH = @CONFPATH@ CPP = @CPP@ -CPPCHECK = @CPPCHECK@ CPPFLAGS = @CPPFLAGS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ @@ -279,7 +223,6 @@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOC_BUILD_LIST = @DOC_BUILD_LIST@ -DOC_CHECK_LIST = @DOC_CHECK_LIST@ DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@ DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@ DRIVER_MAN_LIST = @DRIVER_MAN_LIST@ @@ -289,12 +232,9 @@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ - -# Is "egrep == grep -E" always valid? (maybe all a job for configure.ac) -EGREP = egrep +EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GDLIB_CONFIG = @GDLIB_CONFIG@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -312,8 +252,6 @@ LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@ LIBIPMI_LIBS = @LIBIPMI_LIBS@ LIBLTDL_CFLAGS = @LIBLTDL_CFLAGS@ LIBLTDL_LIBS = @LIBLTDL_LIBS@ -LIBMODBUS_CFLAGS = @LIBMODBUS_CFLAGS@ -LIBMODBUS_LIBS = @LIBMODBUS_LIBS@ LIBNEON_CFLAGS = @LIBNEON_CFLAGS@ LIBNEON_LIBS = @LIBNEON_LIBS@ LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@ @@ -324,29 +262,21 @@ LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@ LIBS = @LIBS@ LIBSSL_CFLAGS = @LIBSSL_CFLAGS@ LIBSSL_LIBS = @LIBSSL_LIBS@ -LIBSSL_REQUIRES = @LIBSSL_REQUIRES@ LIBTOOL = @LIBTOOL@ -LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ -LIBUSB_CONFIG = @LIBUSB_CONFIG@ LIBUSB_LIBS = @LIBUSB_LIBS@ LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@ LIBWRAP_LIBS = @LIBWRAP_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ -LN_S_R = @LN_S_R@ LTLIBOBJS = @LTLIBOBJS@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NETLIBS = @NETLIBS@ -NET_SNMP_CONFIG = @NET_SNMP_CONFIG@ NM = @NM@ NMEDIT = @NMEDIT@ -NUT_DATADIR = @NUT_DATADIR@ -NUT_LIBEXECDIR = @NUT_LIBEXECDIR@ NUT_NETVERSION = @NUT_NETVERSION@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -366,9 +296,6 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PORT = @PORT@ -PYTHON = @PYTHON@ -PYTHON2 = @PYTHON2@ -PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RUN_AS_GROUP = @RUN_AS_GROUP@ RUN_AS_USER = @RUN_AS_USER@ @@ -382,7 +309,6 @@ STATEPATH = @STATEPATH@ STRIP = @STRIP@ SUN_LIBUSB = @SUN_LIBUSB@ TREE_VERSION = @TREE_VERSION@ -VALGRIND = @VALGRIND@ VERSION = @VERSION@ WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ XMLLINT = @XMLLINT@ @@ -400,7 +326,6 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ -auglensdir = @auglensdir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -414,9 +339,6 @@ datarootdir = @datarootdir@ devddir = @devddir@ docdir = @docdir@ driverexecdir = @driverexecdir@ -dummy_PKG_CONFIG = @dummy_PKG_CONFIG@ -dummy_PKG_CONFIG_CFLAGS = @dummy_PKG_CONFIG_CFLAGS@ -dummy_PKG_CONFIG_LIBS = @dummy_PKG_CONFIG_LIBS@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ @@ -442,14 +364,12 @@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ -systemdshutdowndir = @systemdshutdowndir@ +systemdsystemshutdowndir = @systemdsystemshutdowndir@ systemdsystemunitdir = @systemdsystemunitdir@ -systemdtmpfilesdir = @systemdtmpfilesdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ @@ -459,7 +379,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ udevdir = @udevdir@ -#EGREP = grep -E # Base configuration and client manpages, always installed SRC_CONF_PAGES = \ @@ -470,13 +389,13 @@ SRC_CONF_PAGES = \ upsmon.conf.txt \ upssched.conf.txt -@WITH_MANS_TRUE@MAN_CONF_PAGES = \ -@WITH_MANS_TRUE@ nut.conf.5 \ -@WITH_MANS_TRUE@ ups.conf.5 \ -@WITH_MANS_TRUE@ upsd.conf.5 \ -@WITH_MANS_TRUE@ upsd.users.5 \ -@WITH_MANS_TRUE@ upsmon.conf.5 \ -@WITH_MANS_TRUE@ upssched.conf.5 +MAN_CONF_PAGES = \ + nut.conf.5 \ + ups.conf.5 \ + upsd.conf.5 \ + upsd.users.5 \ + upsmon.conf.5 \ + upssched.conf.5 man5_MANS = $(MAN_CONF_PAGES) $(am__append_1) HTML_CONF_MANS = \ @@ -487,59 +406,45 @@ HTML_CONF_MANS = \ upsmon.conf.html \ upssched.conf.html - -# NOTE: Currently SRC_DRIVERTOOL_PAGES are a separate list to generate -# a linkman-drivertool-names.txt file, but historically remain part of -# MAN/HTML_CLIENT_PAGES in the bigger picture. -SRC_DRIVERTOOL_PAGES = \ - nut-driver-enumerator.txt \ - upsdrvctl.txt \ - upsdrvsvcctl.txt - SRC_CLIENT_PAGES = \ - $(SRC_DRIVERTOOL_PAGES) \ nutupsdrv.txt \ upsc.txt \ upscmd.txt \ upsd.txt \ + upsdrvctl.txt \ upslog.txt \ upsmon.txt \ upsrw.txt \ upssched.txt -@WITH_MANS_TRUE@MAN_CLIENT_PAGES = \ -@WITH_MANS_TRUE@ nutupsdrv.8 \ -@WITH_MANS_TRUE@ nut-driver-enumerator.8 \ -@WITH_MANS_TRUE@ upsc.8 \ -@WITH_MANS_TRUE@ upscmd.8 \ -@WITH_MANS_TRUE@ upsd.8 \ -@WITH_MANS_TRUE@ upsdrvctl.8 \ -@WITH_MANS_TRUE@ upsdrvsvcctl.8 \ -@WITH_MANS_TRUE@ upslog.8 \ -@WITH_MANS_TRUE@ upsmon.8 \ -@WITH_MANS_TRUE@ upsrw.8 \ -@WITH_MANS_TRUE@ upssched.8 +MAN_CLIENT_PAGES = \ + nutupsdrv.8 \ + upsc.8 \ + upscmd.8 \ + upsd.8 \ + upsdrvctl.8 \ + upslog.8 \ + upsmon.8 \ + upsrw.8 \ + upssched.8 man8_MANS = $(MAN_CLIENT_PAGES) $(MAN_TOOL_PAGES) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) $(am__append_7) $(am__append_8) \ - $(am__append_9) $(am__append_10) $(am__append_11) \ - $(am__append_12) $(am__append_13) $(am__append_14) + $(am__append_9) $(am__append_10) $(am__append_11) HTML_CLIENT_MANS = \ nutupsdrv.html \ - nut-driver-enumerator.html \ upsc.html \ upscmd.html \ upsd.html \ upsdrvctl.html \ - upsdrvsvcctl.html \ upslog.html \ upsmon.html \ upsrw.html \ upssched.html SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt -@WITH_MANS_TRUE@MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 +MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8 HTML_TOOL_MANS = nut-scanner.html nut-recorder.html # CGI (--with-cgi) related manpages @@ -551,15 +456,15 @@ SRC_CGI_PAGES = \ upsstats.cgi.txt \ upsimage.cgi.txt -@WITH_MANS_TRUE@MAN5_CGI_PAGES = \ -@WITH_MANS_TRUE@ hosts.conf.5 \ -@WITH_MANS_TRUE@ upsset.conf.5 \ -@WITH_MANS_TRUE@ upsstats.html.5 +MAN5_CGI_PAGES = \ + hosts.conf.5 \ + upsset.conf.5 \ + upsstats.html.5 -@WITH_MANS_TRUE@MAN8_CGI_PAGES = \ -@WITH_MANS_TRUE@ upsset.cgi.8 \ -@WITH_MANS_TRUE@ upsstats.cgi.8 \ -@WITH_MANS_TRUE@ upsimage.cgi.8 +MAN8_CGI_PAGES = \ + upsset.cgi.8 \ + upsstats.cgi.8 \ + upsimage.cgi.8 HTML_CGI_MANS = \ hosts.conf.html \ @@ -599,7 +504,7 @@ SRC_DEV_PAGES = \ nutscan.txt \ nutscan_scan_snmp.txt \ nutscan_scan_usb.txt \ - nutscan_scan_xml_http_range.txt \ + nutscan_scan_xml_http.txt \ nutscan_scan_nut.txt \ nutscan_scan_avahi.txt \ nutscan_scan_ipmi.txt \ @@ -618,98 +523,78 @@ SRC_DEV_PAGES = \ # NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt) -@WITH_MANS_TRUE@LIBNUTCLIENT_MISC_DEPS = \ -@WITH_MANS_TRUE@ nutclient_authenticate.3 \ -@WITH_MANS_TRUE@ nutclient_logout.3 \ -@WITH_MANS_TRUE@ nutclient_device_login.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_num_logins.3 \ -@WITH_MANS_TRUE@ nutclient_device_master.3 \ -@WITH_MANS_TRUE@ nutclient_device_forced_shutdown.3 +MAN3_DEV_PAGES = \ + upsclient.3 \ + upscli_add_host_cert.3 \ + upscli_cleanup.3 \ + upscli_connect.3 \ + upscli_disconnect.3 \ + upscli_fd.3 \ + upscli_get.3 \ + upscli_init.3 \ + upscli_list_next.3 \ + upscli_list_start.3 \ + upscli_readline.3 \ + upscli_sendline.3 \ + upscli_splitaddr.3 \ + upscli_splitname.3 \ + upscli_ssl.3 \ + upscli_strerror.3 \ + upscli_upserror.3 \ + libnutclient.3 \ + libnutclient_commands.3 \ + libnutclient_devices.3 \ + libnutclient_general.3 \ + libnutclient_misc.3 \ + libnutclient_tcp.3 \ + libnutclient_variables.3 \ + nutclient_authenticate.3 \ + nutclient_destroy.3 \ + nutclient_device_forced_shutdown.3 \ + nutclient_device_login.3 \ + nutclient_device_master.3 \ + nutclient_execute_device_command.3 \ + nutclient_get_device_command_description.3 \ + nutclient_get_device_commands.3 \ + nutclient_get_device_description.3 \ + nutclient_get_device_num_logins.3 \ + nutclient_get_device_rw_variables.3 \ + nutclient_get_devices.3 \ + nutclient_get_device_variable_description.3 \ + nutclient_get_device_variables.3 \ + nutclient_get_device_variable_values.3 \ + nutclient_has_device.3 \ + nutclient_has_device_command.3 \ + nutclient_has_device_variable.3 \ + nutclient_logout.3 \ + nutclient_set_device_variable_value.3 \ + nutclient_set_device_variable_values.3 \ + nutclient_tcp_create_client.3 \ + nutclient_tcp_disconnect.3 \ + nutclient_tcp_get_timeout.3 \ + nutclient_tcp_is_connected.3 \ + nutclient_tcp_reconnect.3 \ + nutclient_tcp_set_timeout.3 \ + nutscan.3 \ + nutscan_scan_snmp.3 \ + nutscan_scan_usb.3 \ + nutscan_scan_xml_http.3 \ + nutscan_scan_nut.3 \ + nutscan_scan_avahi.3 \ + nutscan_scan_ipmi.3 \ + nutscan_scan_eaton_serial.3 \ + nutscan_display_ups_conf.3 \ + nutscan_display_parsable.3 \ + nutscan_cidr_to_ip.3 \ + nutscan_new_device.3 \ + nutscan_free_device.3 \ + nutscan_add_option_to_device.3 \ + nutscan_add_device_to_device.3 \ + nutscan_get_serial_ports_list.3 \ + nutscan_init.3 -@WITH_MANS_TRUE@LIBNUTCLIENT_TCP_DEPS = \ -@WITH_MANS_TRUE@ nutclient_tcp_create_client.3 \ -@WITH_MANS_TRUE@ nutclient_tcp_disconnect.3 \ -@WITH_MANS_TRUE@ nutclient_tcp_get_timeout.3 \ -@WITH_MANS_TRUE@ nutclient_tcp_is_connected.3 \ -@WITH_MANS_TRUE@ nutclient_tcp_reconnect.3 \ -@WITH_MANS_TRUE@ nutclient_tcp_set_timeout.3 - -@WITH_MANS_TRUE@LIBNUTCLIENT_GENERAL_DEPS = \ -@WITH_MANS_TRUE@ nutclient_destroy.3 - -@WITH_MANS_TRUE@LIBNUTCLIENT_VARIABLES_DEPS = \ -@WITH_MANS_TRUE@ nutclient_get_device_rw_variables.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_variable_description.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_variables.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_variable_values.3 \ -@WITH_MANS_TRUE@ nutclient_has_device_variable.3 \ -@WITH_MANS_TRUE@ nutclient_set_device_variable_value.3 \ -@WITH_MANS_TRUE@ nutclient_set_device_variable_values.3 - -@WITH_MANS_TRUE@LIBNUTCLIENT_COMMANDS_DEPS = \ -@WITH_MANS_TRUE@ nutclient_execute_device_command.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_command_description.3 \ -@WITH_MANS_TRUE@ nutclient_get_device_commands.3 \ -@WITH_MANS_TRUE@ nutclient_has_device_command.3 - -@WITH_MANS_TRUE@LIBNUTCLIENT_DEVICES_DEPS = \ -@WITH_MANS_TRUE@ nutclient_get_device_description.3 \ -@WITH_MANS_TRUE@ nutclient_get_devices.3 \ -@WITH_MANS_TRUE@ nutclient_has_device.3 - -@WITH_MANS_TRUE@MAN3_DEV_PAGES = \ -@WITH_MANS_TRUE@ upsclient.3 \ -@WITH_MANS_TRUE@ upscli_add_host_cert.3 \ -@WITH_MANS_TRUE@ upscli_cleanup.3 \ -@WITH_MANS_TRUE@ upscli_connect.3 \ -@WITH_MANS_TRUE@ upscli_disconnect.3 \ -@WITH_MANS_TRUE@ upscli_fd.3 \ -@WITH_MANS_TRUE@ upscli_get.3 \ -@WITH_MANS_TRUE@ upscli_init.3 \ -@WITH_MANS_TRUE@ upscli_list_next.3 \ -@WITH_MANS_TRUE@ upscli_list_start.3 \ -@WITH_MANS_TRUE@ upscli_readline.3 \ -@WITH_MANS_TRUE@ upscli_readline_timeout.3 \ -@WITH_MANS_TRUE@ upscli_sendline.3 \ -@WITH_MANS_TRUE@ upscli_sendline_timeout.3 \ -@WITH_MANS_TRUE@ upscli_splitaddr.3 \ -@WITH_MANS_TRUE@ upscli_splitname.3 \ -@WITH_MANS_TRUE@ upscli_ssl.3 \ -@WITH_MANS_TRUE@ upscli_strerror.3 \ -@WITH_MANS_TRUE@ upscli_upserror.3 \ -@WITH_MANS_TRUE@ libnutclient.3 \ -@WITH_MANS_TRUE@ libnutclient_commands.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_COMMANDS_DEPS) \ -@WITH_MANS_TRUE@ libnutclient_devices.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_DEVICES_DEPS) \ -@WITH_MANS_TRUE@ libnutclient_general.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_GENERAL_DEPS) \ -@WITH_MANS_TRUE@ libnutclient_misc.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_MISC_DEPS) \ -@WITH_MANS_TRUE@ libnutclient_tcp.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_TCP_DEPS) \ -@WITH_MANS_TRUE@ libnutclient_variables.3 \ -@WITH_MANS_TRUE@ $(LIBNUTCLIENT_VARIABLES_DEPS) \ -@WITH_MANS_TRUE@ nutscan.3 \ -@WITH_MANS_TRUE@ nutscan_scan_snmp.3 \ -@WITH_MANS_TRUE@ nutscan_scan_usb.3 \ -@WITH_MANS_TRUE@ nutscan_scan_xml_http_range.3 \ -@WITH_MANS_TRUE@ nutscan_scan_nut.3 \ -@WITH_MANS_TRUE@ nutscan_scan_avahi.3 \ -@WITH_MANS_TRUE@ nutscan_scan_ipmi.3 \ -@WITH_MANS_TRUE@ nutscan_scan_eaton_serial.3 \ -@WITH_MANS_TRUE@ nutscan_display_ups_conf.3 \ -@WITH_MANS_TRUE@ nutscan_display_parsable.3 \ -@WITH_MANS_TRUE@ nutscan_cidr_to_ip.3 \ -@WITH_MANS_TRUE@ nutscan_new_device.3 \ -@WITH_MANS_TRUE@ nutscan_free_device.3 \ -@WITH_MANS_TRUE@ nutscan_add_option_to_device.3 \ -@WITH_MANS_TRUE@ nutscan_add_device_to_device.3 \ -@WITH_MANS_TRUE@ nutscan_get_serial_ports_list.3 \ -@WITH_MANS_TRUE@ nutscan_init.3 - -@WITH_MANS_TRUE@MAN1_DEV_PAGES = \ -@WITH_MANS_TRUE@ libupsclient-config.1 +MAN1_DEV_PAGES = \ + libupsclient-config.1 @WITH_DEV_TRUE@man3_MANS = $(MAN3_DEV_PAGES) @WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@man1_MANS = $(MAN1_DEV_PAGES) @@ -742,7 +627,7 @@ HTML_DEV_MANS = \ nutscan.html \ nutscan_scan_snmp.html \ nutscan_scan_usb.html \ - nutscan_scan_xml_http_range.html \ + nutscan_scan_xml_http.html \ nutscan_scan_nut.html \ nutscan_scan_avahi.html \ nutscan_scan_ipmi.html \ @@ -790,8 +675,7 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@ mge-utalk.txt \ @SOME_DRIVERS_FALSE@ oneac.txt \ @SOME_DRIVERS_FALSE@ microdowell.txt \ -@SOME_DRIVERS_FALSE@ microsol-apc.txt \ -@SOME_DRIVERS_FALSE@ nutdrv_siemens_sitop.txt \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.txt \ @SOME_DRIVERS_FALSE@ optiups.txt \ @SOME_DRIVERS_FALSE@ powercom.txt \ @SOME_DRIVERS_FALSE@ powerpanel.txt \ @@ -805,48 +689,47 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@ victronups.txt \ @SOME_DRIVERS_FALSE@ apcupsd-ups.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_SERIAL_PAGES = \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ al175.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ apcsmart.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ apcsmart-old.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bcmxcp.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ belkin.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ belkinunv.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bestfortress.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bestuferrups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bestups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bestfcom.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ blazer_ser.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ clone.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ dummy-ups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ etapro.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ everups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ gamatronic.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ genericups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ isbmex.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ ivtscd.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ liebert.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ liebert-esp2.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ masterguard.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ metasys.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ mge-shut.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ mge-utalk.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ oneac.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ microdowell.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ microsol-apc.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ nutdrv_siemens_sitop.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ optiups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ powercom.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ powerpanel.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ rhino.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ riello_ser.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ safenet.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ solis.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ tripplite.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ tripplitesu.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ upscode2.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ victronups.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ apcupsd-ups.8 +@SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \ +@SOME_DRIVERS_FALSE@ al175.8 \ +@SOME_DRIVERS_FALSE@ apcsmart.8 \ +@SOME_DRIVERS_FALSE@ apcsmart-old.8 \ +@SOME_DRIVERS_FALSE@ bcmxcp.8 \ +@SOME_DRIVERS_FALSE@ belkin.8 \ +@SOME_DRIVERS_FALSE@ belkinunv.8 \ +@SOME_DRIVERS_FALSE@ bestfortress.8 \ +@SOME_DRIVERS_FALSE@ bestuferrups.8 \ +@SOME_DRIVERS_FALSE@ bestups.8 \ +@SOME_DRIVERS_FALSE@ bestfcom.8 \ +@SOME_DRIVERS_FALSE@ blazer_ser.8 \ +@SOME_DRIVERS_FALSE@ clone.8 \ +@SOME_DRIVERS_FALSE@ dummy-ups.8 \ +@SOME_DRIVERS_FALSE@ etapro.8 \ +@SOME_DRIVERS_FALSE@ everups.8 \ +@SOME_DRIVERS_FALSE@ gamatronic.8 \ +@SOME_DRIVERS_FALSE@ genericups.8 \ +@SOME_DRIVERS_FALSE@ isbmex.8 \ +@SOME_DRIVERS_FALSE@ ivtscd.8 \ +@SOME_DRIVERS_FALSE@ liebert.8 \ +@SOME_DRIVERS_FALSE@ liebert-esp2.8 \ +@SOME_DRIVERS_FALSE@ masterguard.8 \ +@SOME_DRIVERS_FALSE@ metasys.8 \ +@SOME_DRIVERS_FALSE@ mge-shut.8 \ +@SOME_DRIVERS_FALSE@ mge-utalk.8 \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.8 \ +@SOME_DRIVERS_FALSE@ oneac.8 \ +@SOME_DRIVERS_FALSE@ microdowell.8 \ +@SOME_DRIVERS_FALSE@ optiups.8 \ +@SOME_DRIVERS_FALSE@ powercom.8 \ +@SOME_DRIVERS_FALSE@ powerpanel.8 \ +@SOME_DRIVERS_FALSE@ rhino.8 \ +@SOME_DRIVERS_FALSE@ riello_ser.8 \ +@SOME_DRIVERS_FALSE@ safenet.8 \ +@SOME_DRIVERS_FALSE@ solis.8 \ +@SOME_DRIVERS_FALSE@ tripplite.8 \ +@SOME_DRIVERS_FALSE@ tripplitesu.8 \ +@SOME_DRIVERS_FALSE@ upscode2.8 \ +@SOME_DRIVERS_FALSE@ victronups.8 \ +@SOME_DRIVERS_FALSE@ apcupsd-ups.8 @SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \ @SOME_DRIVERS_FALSE@ al175.html \ @@ -874,10 +757,9 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@ metasys.html \ @SOME_DRIVERS_FALSE@ mge-shut.html \ @SOME_DRIVERS_FALSE@ mge-utalk.html \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.html \ @SOME_DRIVERS_FALSE@ oneac.html \ @SOME_DRIVERS_FALSE@ microdowell.html \ -@SOME_DRIVERS_FALSE@ microsol-apc.html \ -@SOME_DRIVERS_FALSE@ nutdrv_siemens_sitop.html \ @SOME_DRIVERS_FALSE@ optiups.html \ @SOME_DRIVERS_FALSE@ powercom.html \ @SOME_DRIVERS_FALSE@ powerpanel.html \ @@ -894,7 +776,7 @@ HTML_DEV_MANS = \ # (--with-snmp) @SOME_DRIVERS_FALSE@SRC_SNMP_PAGES = snmp-ups.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_SNMP_PAGES = snmp-ups.8 +@SOME_DRIVERS_FALSE@MAN_SNMP_PAGES = snmp-ups.8 @SOME_DRIVERS_FALSE@HTML_SNMP_MANS = snmp-ups.html # (--with-usb) @@ -903,23 +785,26 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@ blazer-common.txt \ @SOME_DRIVERS_FALSE@ blazer_usb.txt \ @SOME_DRIVERS_FALSE@ nutdrv_atcl_usb.txt \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.txt \ @SOME_DRIVERS_FALSE@ richcomm_usb.txt \ @SOME_DRIVERS_FALSE@ riello_usb.txt \ @SOME_DRIVERS_FALSE@ tripplite_usb.txt \ @SOME_DRIVERS_FALSE@ usbhid-ups.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_USB_LIBUSB_PAGES = \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ bcmxcp_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ blazer_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ nutdrv_atcl_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ richcomm_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ riello_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ tripplite_usb.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ usbhid-ups.8 +@SOME_DRIVERS_FALSE@MAN_USB_LIBUSB_PAGES = \ +@SOME_DRIVERS_FALSE@ bcmxcp_usb.8 \ +@SOME_DRIVERS_FALSE@ blazer_usb.8 \ +@SOME_DRIVERS_FALSE@ nutdrv_atcl_usb.8 \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.8 \ +@SOME_DRIVERS_FALSE@ richcomm_usb.8 \ +@SOME_DRIVERS_FALSE@ riello_usb.8 \ +@SOME_DRIVERS_FALSE@ tripplite_usb.8 \ +@SOME_DRIVERS_FALSE@ usbhid-ups.8 @SOME_DRIVERS_FALSE@HTML_USB_LIBUSB_MANS = \ @SOME_DRIVERS_FALSE@ bcmxcp_usb.html \ @SOME_DRIVERS_FALSE@ blazer_usb.html \ +@SOME_DRIVERS_FALSE@ nutdrv_qx.html \ @SOME_DRIVERS_FALSE@ nutdrv_atcl_usb.html \ @SOME_DRIVERS_FALSE@ richcomm_usb.html \ @SOME_DRIVERS_FALSE@ riello_usb.html \ @@ -927,83 +812,65 @@ HTML_DEV_MANS = \ @SOME_DRIVERS_FALSE@ usbhid-ups.html -# (--with-serial / --with-usb) -@SOME_DRIVERS_FALSE@SRC_SERIAL_USB_PAGES = \ -@SOME_DRIVERS_FALSE@ nutdrv_qx.txt - -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_SERIAL_USB_PAGES = \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ nutdrv_qx.8 - -@SOME_DRIVERS_FALSE@HTML_SERIAL_USB_MANS = \ -@SOME_DRIVERS_FALSE@ nutdrv_qx.html - - # (--with-neon) @SOME_DRIVERS_FALSE@SRC_NETXML_PAGES = netxml-ups.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_NETXML_PAGES = netxml-ups.8 +@SOME_DRIVERS_FALSE@MAN_NETXML_PAGES = netxml-ups.8 @SOME_DRIVERS_FALSE@HTML_NETXML_MANS = netxml-ups.html # (--with-powerman) @SOME_DRIVERS_FALSE@SRC_POWERMAN_PAGES = powerman-pdu.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_POWERMAN_PAGES = powerman-pdu.8 +@SOME_DRIVERS_FALSE@MAN_POWERMAN_PAGES = powerman-pdu.8 @SOME_DRIVERS_FALSE@HTML_POWERMAN_MANS = powerman-pdu.html # (--with-ipmi) @SOME_DRIVERS_FALSE@SRC_IPMIPSU_PAGES = nut-ipmipsu.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_IPMIPSU_PAGES = nut-ipmipsu.8 +@SOME_DRIVERS_FALSE@MAN_IPMIPSU_PAGES = nut-ipmipsu.8 @SOME_DRIVERS_FALSE@HTML_IPMIPSU_MANS = nut-ipmipsu.html @SOME_DRIVERS_FALSE@SRC_MACOSX_PAGES = macosx-ups.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_MACOSX_PAGES = macosx-ups.8 +@SOME_DRIVERS_FALSE@MAN_MACOSX_PAGES = macosx-ups.8 @SOME_DRIVERS_FALSE@HTML_MACOSX_MANS = macosx-ups.html -@SOME_DRIVERS_FALSE@SRC_MODBUS_PAGES = phoenixcontact_modbus.txt \ -@SOME_DRIVERS_FALSE@ generic_modbus.txt \ -@SOME_DRIVERS_FALSE@ huawei-ups2000.txt \ -@SOME_DRIVERS_FALSE@ socomec_jbus.txt \ -@SOME_DRIVERS_FALSE@ adelsystem_cbi.txt - -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_MODBUS_PAGES = phoenixcontact_modbus.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ generic_modbus.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ huawei-ups2000.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ socomec_jbus.8 \ -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@ adelsystem_cbi.8 - -@SOME_DRIVERS_FALSE@HTML_MODBUS_MANS = phoenixcontact_modbus.html \ -@SOME_DRIVERS_FALSE@ generic_modbus.html \ -@SOME_DRIVERS_FALSE@ huawei-ups2000.html \ -@SOME_DRIVERS_FALSE@ socomec_jbus.html \ -@SOME_DRIVERS_FALSE@ adelsystem_cbi.html - -@SOME_DRIVERS_FALSE@SRC_LINUX_I2C_PAGES = asem.txt pijuice.txt -@SOME_DRIVERS_FALSE@@WITH_MANS_TRUE@MAN_LINUX_I2C_PAGES = asem.8 pijuice.8 -@SOME_DRIVERS_FALSE@HTML_LINUX_I2C_MANS = asem.html pijuice.html +@SOME_DRIVERS_FALSE@SRC_LINUX_I2C_PAGES = asem.txt +@SOME_DRIVERS_FALSE@MAN_LINUX_I2C_PAGES = asem.8 +@SOME_DRIVERS_FALSE@HTML_LINUX_I2C_MANS = asem.html # SOME_DRIVERS -MAN_MANS = $(am__append_15) -SRC_DRIVERS_PAGES = \ - $(SRC_SERIAL_PAGES) \ - $(SRC_SNMP_PAGES) \ - $(SRC_USB_LIBUSB_PAGES) \ - $(SRC_SERIAL_USB_PAGES) \ - $(SRC_NETXML_PAGES) \ - $(SRC_POWERMAN_PAGES) \ - $(SRC_IPMIPSU_PAGES) \ - $(SRC_MACOSX_PAGES) \ - $(SRC_MODBUS_PAGES) \ - $(SRC_LINUX_I2C_PAGES) +MAN_MANS = \ + $(MAN_CONF_PAGES) \ + $(MAN_CLIENT_PAGES) \ + $(MAN_TOOL_PAGES) \ + $(MAN5_CGI_PAGES) \ + $(MAN8_CGI_PAGES) \ + $(MAN1_DEV_PAGES) \ + $(MAN3_DEV_PAGES) \ + $(MAN_SERIAL_PAGES) \ + $(MAN_SNMP_PAGES) \ + $(MAN_USB_LIBUSB_PAGES) \ + $(MAN_NETXML_PAGES) \ + $(MAN_POWERMAN_PAGES) \ + $(MAN_IPMIPSU_PAGES) \ + $(MAN_MACOSX_PAGES) \ + $(MAN_LINUX_I2C_PAGES) # distribute everything, even those not installed by default # Note that 'dist' target requires AsciiDoc! -SRC_ALL_PAGES = \ +EXTRA_DIST = \ $(SRC_CONF_PAGES) \ $(SRC_CLIENT_PAGES) \ $(SRC_TOOL_PAGES) \ $(SRC_CGI_PAGES) \ $(SRC_DEV_PAGES) \ - $(SRC_DRIVERS_PAGES) + $(SRC_SERIAL_PAGES) \ + $(SRC_SNMP_PAGES) \ + $(SRC_USB_LIBUSB_PAGES) \ + $(SRC_NETXML_PAGES) \ + $(SRC_POWERMAN_PAGES) \ + $(SRC_IPMIPSU_PAGES) \ + $(SRC_MACOSX_PAGES) \ + $(SRC_LINUX_I2C_PAGES) \ + $(MAN_MANS) \ + asciidoc.conf -EXTRA_DIST = $(SRC_ALL_PAGES) $(MAN_MANS) asciidoc.conf \ - $(am__append_16) HTML_MANS = \ $(HTML_CONF_MANS) \ $(HTML_CLIENT_MANS) \ @@ -1013,93 +880,27 @@ HTML_MANS = \ $(HTML_SERIAL_MANS) \ $(HTML_SNMP_MANS) \ $(HTML_USB_LIBUSB_MANS) \ - $(HTML_SERIAL_USB_MANS) \ $(HTML_NETXML_MANS) \ $(HTML_POWERMAN_MANS) \ $(HTML_IPMIPSU_MANS) \ $(HTML_MACOSX_MANS) \ - $(HTML_MODBUS_MANS) \ $(HTML_LINUX_I2C_MANS) - -# Note: target documents, except nutupsdrv.txt itself, start the -# list of drivers with `- linkman:nutupsdrv[8]` entry -# To regenerate these files, do `make distclean` first -LINKMAN_INCLUDE_GENERATED = linkman-driver-names.txt linkman-drivertool-names.txt -LINKMAN_INCLUDE_CONSUMERS = index.txt upsd.txt nutupsdrv.txt - -# These files are generated when we build from git source so not tracked in -# git, and not part of tarball (to be in builddir) - so not in EXTRA_DIST. -DISTCLEANFILES = $(LINKMAN_INCLUDE_GENERATED) -CLEANFILES = *-spellchecked $(am__append_17) +CLEANFILES = *.xml *.html SUFFIXES = .txt .html .1 .3 .5 .8 -@DOC_INSTALL_DISTED_MANS_FALSE@SRC_PREBUILT_CLAUSE = - -# For builds with allowed installation of prebuild man pages, check that -# they exist in sources (make would pull them automatically as a fallback -# from failed lookup in build products). For builds that require rebuild -# of man pages, abort with error if build product is missing. -@DOC_INSTALL_DISTED_MANS_TRUE@SRC_PREBUILT_CLAUSE = || [ -r "$(srcdir)/`basename $@`" ] - -# Working around a2x not friendly to parallelized runs. -# See more details in the main NUT docs/Makefile.am -@HAVE_ASCIIDOC_TRUE@DOCBUILD_BEGIN = { \ -@HAVE_ASCIIDOC_TRUE@ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ -@HAVE_ASCIIDOC_TRUE@ rm -rf "./$${A2X_OUTDIR}" || true ; \ -@HAVE_ASCIIDOC_TRUE@ test -d "$@" && rm -rf "$@" || true ; \ -@HAVE_ASCIIDOC_TRUE@ mkdir -p "./$${A2X_OUTDIR}" || exit ; \ -@HAVE_ASCIIDOC_TRUE@ for F in $(LINKMAN_INCLUDE_GENERATED) ; do \ -@HAVE_ASCIIDOC_TRUE@ if [ -s "./$$F" ] ; then ln -f -s "../../$$F" "./$${A2X_OUTDIR}/" ; else \ -@HAVE_ASCIIDOC_TRUE@ if [ -s "$(abs_srcdir)/$$F" ] ; then ln -f -s "$(abs_srcdir)/$$F" "./$${A2X_OUTDIR}/" ; fi ; fi ; \ -@HAVE_ASCIIDOC_TRUE@ done ; \ -@HAVE_ASCIIDOC_TRUE@ else A2X_OUTDIR='.' ; fi; \ -@HAVE_ASCIIDOC_TRUE@ if test -s "${builddir}/docbook-xsl.css" \ -@HAVE_ASCIIDOC_TRUE@ && test -r "${builddir}/docbook-xsl.css" \ -@HAVE_ASCIIDOC_TRUE@ && ! test -w "${builddir}/docbook-xsl.css" \ -@HAVE_ASCIIDOC_TRUE@ ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \ -@HAVE_ASCIIDOC_TRUE@ chmod -R u+w "./$${A2X_OUTDIR}" || true ; \ -@HAVE_ASCIIDOC_TRUE@ if test x"$(srcdir)" != x"$(builddir)" ; then \ -@HAVE_ASCIIDOC_TRUE@ if ! test -s "$(builddir)/$<" && test -s "$(srcdir)/`basename $<`" ; then \ -@HAVE_ASCIIDOC_TRUE@ ln -fs "$(srcdir)/`basename $<`" "$(builddir)/" ; \ -@HAVE_ASCIIDOC_TRUE@ fi ; \ -@HAVE_ASCIIDOC_TRUE@ fi ; \ -@HAVE_ASCIIDOC_TRUE@ A2X_VERBOSE="$(ASCIIDOC_VERBOSE)"; if [ "$(V)" = 1 ]; then A2X_VERBOSE="--verbose"; fi; \ -@HAVE_ASCIIDOC_TRUE@} - - -# Note that documents with sub-pages (see LIBNUTCLIENT_*_DEPS above) -# may generate multiple files in one go... so we move "*" and hope -# for no required hidden files (or would have to `find` them all). -@HAVE_ASCIIDOC_TRUE@DOCBUILD_END = { \ -@HAVE_ASCIIDOC_TRUE@ if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \ -@HAVE_ASCIIDOC_TRUE@ chmod -R u+w "./$${A2X_OUTDIR}" || true ; \ -@HAVE_ASCIIDOC_TRUE@ test -d "$@" && rm -rf "$@" || true ; \ -@HAVE_ASCIIDOC_TRUE@ for F in $(LINKMAN_INCLUDE_GENERATED) ; do \ -@HAVE_ASCIIDOC_TRUE@ rm -f "./$${A2X_OUTDIR}/$$F" || true ; \ -@HAVE_ASCIIDOC_TRUE@ done ; \ -@HAVE_ASCIIDOC_TRUE@ mv -f "./$${A2X_OUTDIR}/$(@F)" ./ || exit ; \ -@HAVE_ASCIIDOC_TRUE@ mv -f "./$${A2X_OUTDIR}/"*.* ./ 2>/dev/null || true ; \ -@HAVE_ASCIIDOC_TRUE@ rm -rf "./$${A2X_OUTDIR}" ; \ -@HAVE_ASCIIDOC_TRUE@ fi ; \ -@HAVE_ASCIIDOC_TRUE@} - ### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file. -### This parameter is currently required; see docs/Makefile.am for more detail. -@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = --doctype manpage --format manpage $${A2X_VERBOSE} \ -@HAVE_ASCIIDOC_TRUE@ --xsltproc-opts="--nonet" \ +@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = --doctype manpage --format manpage \ +@HAVE_ASCIIDOC_TRUE@ --xsltproc-opts "--nonet" \ @HAVE_ASCIIDOC_TRUE@ --attribute mansource="Network UPS Tools" \ @HAVE_ASCIIDOC_TRUE@ --attribute manversion="@PACKAGE_VERSION@" \ @HAVE_ASCIIDOC_TRUE@ --attribute manmanual="NUT Manual" \ -@HAVE_ASCIIDOC_TRUE@ --attribute srcdir="$(abs_srcdir)" \ -@HAVE_ASCIIDOC_TRUE@ --attribute builddir="$(abs_builddir)" \ -@HAVE_ASCIIDOC_TRUE@ --destination-dir="$${A2X_OUTDIR}" +@HAVE_ASCIIDOC_TRUE@ --destination-dir=. -MAINTAINERCLEANFILES = Makefile.in .dirstamp all: all-am .SUFFIXES: -.SUFFIXES: .txt .html .1 .3 .5 .8 .txt-spellchecked +.SUFFIXES: .txt .html .1 .3 .5 .8 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -1112,13 +913,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/man/Makefile +.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -1306,10 +1108,7 @@ ctags CTAGS: cscope cscopelist: -distdir: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) distdir-am - -distdir-am: $(DISTFILES) +distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -1339,11 +1138,7 @@ distdir-am: $(DISTFILES) || exit 1; \ fi; \ done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(MANS) installdirs: @@ -1377,15 +1172,13 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libtool clean-local mostlyclean-am +clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -1452,202 +1245,48 @@ uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ uninstall-man8 -.MAKE: check-am install-am install-strip +.MAKE: install-am install-strip -.PHONY: all all-am check check-am check-local clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-man1 \ - install-man3 install-man5 install-man8 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-man uninstall-man1 uninstall-man3 \ - uninstall-man5 uninstall-man8 +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-man3 install-man5 install-man8 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am uninstall-man uninstall-man1 \ + uninstall-man3 uninstall-man5 uninstall-man8 -.PRECIOUS: Makefile - - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_MISC_DEPS): libnutclient_misc.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_TCP_DEPS): libnutclient_tcp.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_GENERAL_DEPS): libnutclient_general.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_VARIABLES_DEPS): libnutclient_variables.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_COMMANDS_DEPS): libnutclient_commands.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@$(LIBNUTCLIENT_DEVICES_DEPS): libnutclient_devices.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@upscli_readline_timeout.3: upscli_readline.3 -@WITH_MANS_TRUE@ touch $@ - -@WITH_MANS_TRUE@upscli_sendline_timeout.3: upscli_sendline.3 -@WITH_MANS_TRUE@ touch $@ -@SKIP_MANS_FALSE@@WITH_MANS_FALSE@dist: -@SKIP_MANS_FALSE@@WITH_MANS_FALSE@ @echo "ERROR: Manpage building was disabled by configure script, and these pages are required for our proper 'make dist'" >&2 ; false - -# For builds done from dist'ed sources, there may be a conflict of timestamps -# between original *.txt files and pre-built manpages etc. leading to skipping -# of manpage re-generation even if that activity is possible and requested. -# Possibly a cleaner, but less portable, solution would be to touch the -# generated files to long ago. Current solution assumes good valid clocks :) -dist-hook: - @echo "Fix up manpage source timestamps" && cd $(distdir) && touch $(SRC_ALL_PAGES) - -linkman-driver-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ - ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ - fi ; \ - fi - @if test -s "$@" ; then exit 0 ; fi ; \ - (LC_ALL=C; LANG=C; export LC_ALL LANG; \ - for F in $(SRC_DRIVERS_PAGES) ; do echo "$$F" ; done \ - | grep -vE '^nutupsdrv\.txt$$' \ - | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ - ) > "$@" - -linkman-drivertool-names.txt: - @if test x"$(srcdir)" != x"$(builddir)" ; then \ - if ! test -s "$(builddir)/$@" && test -s "$(srcdir)/$(@F)" ; then \ - ln -fs "$(srcdir)/$(@F)" "$(builddir)/" ; \ - fi ; \ - fi - @if test -s "$@" ; then exit 0 ; fi ; \ - (LC_ALL=C; LANG=C; export LC_ALL LANG; \ - for F in $(SRC_DRIVERTOOL_PAGES) ; do echo "$$F" ; done \ - | sort -n | uniq \ - | sed 's,^\(.*\)\.txt$$,- linkman:\1[8],' ; \ - ) > "$@" - -# Dependencies are about particular filenames, since over time -# we might have several use-cases for LINKMAN_INCLUDE_GENERATED: -$(LINKMAN_INCLUDE_CONSUMERS): linkman-driver-names.txt linkman-drivertool-names.txt all: -all-html html-man: $(HTML_MANS) index.html +html-man: $(HTML_MANS) index.html -# Have a way to build all man pages, not just those that fit currently -# configured drivers, daemons, developer aspect, etc. -all-man man-man: $(MAN_MANS) - -@SKIP_MANS_FALSE@@WITH_MANS_TRUE@check-local: check-man -@SKIP_MANS_TRUE@@WITH_MANS_TRUE@check-local: check-man-txt check-man-pages -@SKIP_MANS_TRUE@@WITH_MANS_TRUE@ @echo "Man-page generation was SKIPPED per user request, so pregenerated pages were sanity-checked (if any)" >&2 -@WITH_MANS_FALSE@check-local: check-man-txt check-man-pages -@WITH_MANS_FALSE@ @echo "Man-page generation was not done, so pregenerated pages were sanity-checked (if any)" >&2 - -check-man: check-man-txt check-man-pages check-html-man - -# the "for" loops might better use $^ but it might be not portable -check-man-html: check-html-man - -check-html-man: $(HTML_MANS) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(HTML_MANS) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED HTML-man sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED HTML-man sanity check (checked $$CHECKED files)"; exit 0 - -# Note: many man-pages here have code samples and are mis-identified as C code -check-man-page: check-man-pages - -# Man-pages may be pre-generated (srcdir), or re-built (builddir) -check-man-pages: $(MAN_MANS) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - for F in $(MAN_MANS) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - ( test -s "$(abs_srcdir)/$$F" && { file "$(abs_srcdir)/$$F" | $(EGREP) -i '(roff.* input|C source|ASCII text)' > /dev/null ; } ) || \ - ( test -s "$(abs_builddir)/$$F" && { file "$(abs_builddir)/$$F" | $(EGREP) -i '(roff.* input|C source|ASCII text)' > /dev/null ; } ) || \ - FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED man-page sanity check for:$$FAILED" >&2 ; \ - ( echo "SRCDIR:"; cd "$(abs_srcdir)/" && file $$FAILED ; \ - echo "BUILDDIR:"; cd "$(abs_builddir)/" && file $$FAILED ; \ - ) >&2 ; exit 1; \ - fi; echo "PASSED man-page sanity check (checked $$CHECKED files)"; exit 0 - -check-man-source: check-man-txt - -# Note: (GNU) make can helpfully add VPATH to the short source filenames -# which we had listed above, so the "case" below handles two possibilities -check-man-txt: $(SRC_ALL_PAGES) - @FAILED=""; CHECKED=0; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \ - ( cd $(abs_srcdir) ) || exit; \ - for F in $(SRC_ALL_PAGES) ; do \ - CHECKED="`expr $$CHECKED + 1`"; \ - case "$$F" in \ - */*) ;; \ - *) F="$(abs_srcdir)/$$F" ;; \ - esac ; \ - test -s "$$F" && { file "$$F" | $(EGREP) -i '(ASCII|UTF-8|Unicode|ISO-8859|English).* text' > /dev/null ; } || FAILED="$$FAILED $$F" ; \ - done; if test -n "$$FAILED" ; then \ - echo "FAILED man-source sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \ - fi; echo "PASSED man-source sanity check (checked $$CHECKED files)"; exit 0 - -### Regarding absolute paths in attributes below: by default asciidoc -### resolves include paths relative to the main document, so while we -### see the relative builddir as "." in the makefile, for included -### data it would mean the source directory where the .txt resides. @HAVE_ASCIIDOC_TRUE@.txt.html: -@HAVE_ASCIIDOC_TRUE@ @A2X_OUTDIR="tmp/man-html.$(@F).$$$$" ; \ -@HAVE_ASCIIDOC_TRUE@ echo " DOC-MAN-HTML Generating $@"; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_BEGIN) ; RES=0; \ -@HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 $${A2X_VERBOSE} \ -@HAVE_ASCIIDOC_TRUE@ --attribute localdate="`TZ=UTC date +%Y-%m-%d`" \ -@HAVE_ASCIIDOC_TRUE@ --attribute localtime="`TZ=UTC date +%H:%M:%S`" \ +@HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \ +@HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \ +@HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \ @HAVE_ASCIIDOC_TRUE@ --attribute nutversion="@PACKAGE_VERSION@" \ -@HAVE_ASCIIDOC_TRUE@ --attribute srcdir="$(abs_srcdir)" \ -@HAVE_ASCIIDOC_TRUE@ --attribute builddir="$(abs_builddir)" \ -@HAVE_ASCIIDOC_TRUE@ -o "$${A2X_OUTDIR}/$(@F)" $< || RES=$$? ; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_END) ; exit $$RES +@HAVE_ASCIIDOC_TRUE@ -o $@ $< @HAVE_ASCIIDOC_TRUE@.txt.1: -@HAVE_ASCIIDOC_TRUE@ @A2X_OUTDIR="tmp/man1.$(@F).$$$$" ; \ -@HAVE_ASCIIDOC_TRUE@ echo " DOC-MAN Generating $@"; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_BEGIN) ; RES=0; \ -@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_END) ; exit $$RES +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< @HAVE_ASCIIDOC_TRUE@.txt.3: -@HAVE_ASCIIDOC_TRUE@ @A2X_OUTDIR="tmp/man3.$(@F).$$$$" ; \ -@HAVE_ASCIIDOC_TRUE@ echo " DOC-MAN Generating $@"; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_BEGIN) ; RES=0; \ -@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_END) ; exit $$RES +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< @HAVE_ASCIIDOC_TRUE@.txt.5: -@HAVE_ASCIIDOC_TRUE@ @A2X_OUTDIR="tmp/man5.$(@F).$$$$" ; \ -@HAVE_ASCIIDOC_TRUE@ echo " DOC-MAN Generating $@"; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_BEGIN) ; RES=0; \ -@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_END) ; exit $$RES +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< @HAVE_ASCIIDOC_TRUE@.txt.8: -@HAVE_ASCIIDOC_TRUE@ @A2X_OUTDIR="tmp/man8.$(@F).$$$$" ; \ -@HAVE_ASCIIDOC_TRUE@ echo " DOC-MAN Generating $@"; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_BEGIN) ; RES=0; \ -@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< || RES=$$? ; \ -@HAVE_ASCIIDOC_TRUE@ $(DOCBUILD_END) ; exit $$RES +@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $< @HAVE_ASCIIDOC_FALSE@.txt.html: -@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ @HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ @HAVE_ASCIIDOC_FALSE@ else \ @HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ @@ -1656,7 +1295,7 @@ check-man-txt: $(SRC_ALL_PAGES) @HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.1: -@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ @HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ @HAVE_ASCIIDOC_FALSE@ else \ @HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ @@ -1665,7 +1304,7 @@ check-man-txt: $(SRC_ALL_PAGES) @HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.3: -@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ @HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ @HAVE_ASCIIDOC_FALSE@ else \ @HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ @@ -1674,7 +1313,7 @@ check-man-txt: $(SRC_ALL_PAGES) @HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.5: -@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ @HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ @HAVE_ASCIIDOC_FALSE@ else \ @HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ @@ -1683,7 +1322,7 @@ check-man-txt: $(SRC_ALL_PAGES) @HAVE_ASCIIDOC_FALSE@ fi @HAVE_ASCIIDOC_FALSE@.txt.8: -@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ] $(SRC_PREBUILT_CLAUSE); then \ +@HAVE_ASCIIDOC_FALSE@ @if [ -r "$@" ]; then \ @HAVE_ASCIIDOC_FALSE@ echo "Not (re)building $@ manual page, since 'asciidoc', 'xmllint' or 'xsltproc' were not found." ; \ @HAVE_ASCIIDOC_FALSE@ else \ @HAVE_ASCIIDOC_FALSE@ echo "Could not find prebuilt $@ manual page." ; \ @@ -1691,22 +1330,6 @@ check-man-txt: $(SRC_ALL_PAGES) @HAVE_ASCIIDOC_FALSE@ exit 1; \ @HAVE_ASCIIDOC_FALSE@ fi -# NOTE: Due to portability, we do not use a GNU percent-wildcard extension: -#%-spellchecked: % Makefile.am $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -# $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -# NOTE: Portable suffix rules do not allow prerequisites, so we shim them here -# by a wildcard target in case the make implementation can put the two together. -*.txt-spellchecked: Makefile.am $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT) -.txt.txt-spellchecked: - $(MAKE) -s -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC_ONE="$<" SPELLCHECK_DIR="$(srcdir)" $@ - -spellcheck spellcheck-interactive spellcheck-sortdict: - $(MAKE) -f $(top_builddir)/docs/Makefile SPELLCHECK_SRC="$(SRC_ALL_PAGES)" SPELLCHECK_DIR="$(srcdir)" $@ - -clean-local: - rm -rf tmp - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/docs/man/adelsystem_cbi.8 b/docs/man/adelsystem_cbi.8 deleted file mode 100644 index 38c08dc..0000000 --- a/docs/man/adelsystem_cbi.8 +++ /dev/null @@ -1,160 +0,0 @@ -'\" t -.\" Title: adelsystem_cbi -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "ADELSYSTEM_CBI" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -adelsystem_cbi \- Driver for the ADELSYSTEM CB/CBI DC\-UPS -.SH "SYNOPSIS" -.sp -\fBadelsystem_cbi\fR \-h -.sp -\fBadelsystem_cbi\fR \-a \fIDEVICE_NAME\fR [\fIOPTIONS\fR] -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This man page only documents the specific features of the \fBadelsystem_cbi\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -This is the driver for the adelsystem cb/cbi dc\-ups devices\&. -.sp -The driver has been tested against CBI2801224A, all in one 12/24Vdc DC\-UPS\&. -.PP -More information about this UPS can be found here: -.RS 4 -https://www\&.adelsystem\&.com/en/products/dc\-ups\-/ -.RE -.SH "EXTRA ARGUMENTS" -.sp -This driver supports the following optional settings in the \fBups.conf\fR(5) file: -.SS "Serial:" -.PP -\fBser_baud_rate\fR=\fIvalue\fR -.RS 4 -A integer specifying the serial port baud rate (default 9600)\&. -.RE -.PP -\fBser_data_bit\fR=\fIvalue\fR -.RS 4 -A integer specifying the serial port data bit (default 8)\&. -.RE -.PP -\fBser_parity\fR=\fIvalue\fR -.RS 4 -A character specifying the serial port parity (default N)\&. -.RE -.PP -\fBser_stop_bit\fR=\fIvalue\fR -.RS 4 -An integer specifying the serial port stop bit (default 1)\&. -.RE -.SS "Modbus:" -.PP -\fBdev_slave_id\fR=\fIvalue\fR -.RS 4 -An integer specifying the device modbus slave ID (default 1)\&. -.RE -.SH "CONFIGURATION" -.sp -Here is an example of adelsystem_cbi driver configuration in \fBups\&.conf\fR file: -.sp -.if n \{\ -.RS 4 -.\} -.nf -[adelsystem_cbi] - driver = adelsystem_cbi - port = /dev/ttyUSB0 - desc = "adelsystem cb/cbi ups driver" - # serial settings - ser_baud_rate = 9600 - ser_parity = N - ser_data_bit = 8 - ser_stop_bit = 1 - # modbus slave id - dev_slave_id = 5 -.fi -.if n \{\ -.RE -.\} -.SH "INSTANT COMMANDS" -.sp -This driver support the following instant commands: -.PP -load\&.off -.RS 4 -executes "instant poweroff" -.RE -.SH "INSTALLATION" -.sp -This driver is not built by default\&. You can build it by installing libmodbus and running configure \-\-with\-modbus=yes\&. -.sp -You also need to give proper permissions on the local serial device file (/dev/ttyUSB0 for example) to allow the run\-time NUT driver user account to access it\&. -.SH "AUTHOR" -.sp -Dimitris Economou -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8), \fBups.conf\fR(5) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -libmodbus home page: -http://libmodbus\&.org -.RE diff --git a/docs/man/adelsystem_cbi.txt b/docs/man/adelsystem_cbi.txt deleted file mode 100644 index e8d1bd9..0000000 --- a/docs/man/adelsystem_cbi.txt +++ /dev/null @@ -1,111 +0,0 @@ -ADELSYSTEM_CBI(8) -================= - -NAME ----- - -adelsystem_cbi - Driver for the ADELSYSTEM CB/CBI DC-UPS - -SYNOPSIS --------- - -*adelsystem_cbi* -h - -*adelsystem_cbi* -a 'DEVICE_NAME' ['OPTIONS'] - -NOTE: This man page only documents the specific features of the *adelsystem_cbi* -driver. For information about the core driver, see linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This is the driver for the adelsystem cb/cbi dc-ups devices. - -The driver has been tested against CBI2801224A, all in one 12/24Vdc DC-UPS. - -More information about this UPS can be found here: :: -https://www.adelsystem.com/en/products/dc-ups-/ - - -EXTRA ARGUMENTS ---------------- - -This driver supports the following optional settings in the -linkman:ups.conf[5] file: - -Serial: -~~~~~~ - -*ser_baud_rate*='value':: -A integer specifying the serial port baud rate (default 9600). - -*ser_data_bit*='value':: -A integer specifying the serial port data bit (default 8). - -*ser_parity*='value':: -A character specifying the serial port parity (default N). - -*ser_stop_bit*='value':: -An integer specifying the serial port stop bit (default 1). - -Modbus: -~~~~~~ - -*dev_slave_id*='value':: -An integer specifying the device modbus slave ID (default 1). - - -CONFIGURATION -------------- - -Here is an example of adelsystem_cbi driver configuration in *ups.conf* file: ----- -[adelsystem_cbi] - driver = adelsystem_cbi - port = /dev/ttyUSB0 - desc = "adelsystem cb/cbi ups driver" - # serial settings - ser_baud_rate = 9600 - ser_parity = N - ser_data_bit = 8 - ser_stop_bit = 1 - # modbus slave id - dev_slave_id = 5 ----- - -INSTANT COMMANDS ----------------- - -This driver support the following instant commands: - -load.off:: -executes "instant poweroff" - -INSTALLATION ------------- - -This driver is not built by default. You can build it by installing -libmodbus and running `configure --with-modbus=yes`. - -You also need to give proper permissions on the local serial device -file (/dev/ttyUSB0 for example) to allow the run-time NUT driver user -account to access it. - -AUTHOR ------- - -Dimitris Economou - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8], linkman:ups.conf[5] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* libmodbus home page: http://libmodbus.org diff --git a/docs/man/al175.8 b/docs/man/al175.8 index 40cdc34..5c48bf8 100644 --- a/docs/man/al175.8 +++ b/docs/man/al175.8 @@ -1,13 +1,13 @@ '\" t .\" Title: al175 .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "AL175" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "AL175" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -46,7 +46,7 @@ Eltek MPSU4000 with AL175 alarm module .RE .\} .sp -It may also work with other UPSes equipped with AL175 alarm module, but they have not been tested\&. +It may also work with other UPSes equiped with AL175 alarm module, but they have not been tested\&. .sp AL175 have to be configured to operate in COMLI mode\&. See documentation supplied with your hardware on how to do it\&. .SH "EXTRA ARGUMENTS" diff --git a/docs/man/al175.txt b/docs/man/al175.txt index 7ba616b..fc4f202 100644 --- a/docs/man/al175.txt +++ b/docs/man/al175.txt @@ -3,24 +3,21 @@ AL175(8) NAME ---- - al175 - Driver for Eltek UPS models with AL175 alarm module NOTE ---- - This man page only documents the hardware-specific features of the *al175* driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - The *al175* driver is known to work with the following UPSes: Eltek MPSU4000 with AL175 alarm module -It may also work with other UPSes equipped with AL175 alarm module, +It may also work with other UPSes equiped with AL175 alarm module, but they have not been tested. @@ -29,13 +26,11 @@ See documentation supplied with your hardware on how to do it. EXTRA ARGUMENTS --------------- - This driver does not support any extra settings in the linkman:ups.conf[5]. INSTANT COMMANDS ---------------- - This driver supports some extra commands (see linkman:upscmd[8]): *test.battery.start*:: @@ -46,7 +41,6 @@ Stop a battery test. VARIABLES --------- - Besides status, this driver reads UPS state into following variables: - *ups.test.result* @@ -59,14 +53,12 @@ Besides status, this driver reads UPS state into following variables: KNOWN ISSUES AND BUGS --------------------- - * Shutdown is not supported. FIXME * The driver was reworked to meet the project code quality criteria, without testing on real hardware. Some bugs may have crept in. AUTHOR ------ - Kirill Smelkov SEE ALSO @@ -74,10 +66,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/apcsmart-old.8 b/docs/man/apcsmart-old.8 index 829d0be..d4e2d85 100644 --- a/docs/man/apcsmart-old.8 +++ b/docs/man/apcsmart-old.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart-old -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "APCSMART\-OLD" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "APCSMART\-OLD" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -112,13 +112,9 @@ Mode 4 exploits an oddity in the CS 350 models since they only seem to support t Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. .sp APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. -.SH "AUTHORS AND HISTORY" +.SH "AUTHOR" .sp -Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. -.sp -This driver was called newapc for a time and was renamed in the 1\&.5 series\&. -.sp -In 2\&.6\&.2 the driver was renamed to apcsmart\-old, being superseded by updated version with new features\&. +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 the driver was renamed to apcsmart\-old, being superseded by updated version with new features\&. .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/apcsmart-old.txt b/docs/man/apcsmart-old.txt index 6ca4cff..43ed048 100644 --- a/docs/man/apcsmart-old.txt +++ b/docs/man/apcsmart-old.txt @@ -1,7 +1,7 @@ APCSMART-OLD(8) =============== -NAME +NAME ---- apcsmart-old - Driver for American Power Conversion Smart Protocol UPS equipment @@ -83,27 +83,21 @@ other unexpected values have occasionally slipped through. APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa. -AUTHORS AND HISTORY -------------------- - +AUTHOR +------ Nigel Metheringham (drawing -heavily on the original `apcsmart` driver by Russell Kroll). - -This driver was called `newapc` for a time and was renamed in -the 1.5 series. - -In 2.6.2 the driver was renamed to `apcsmart-old`, being superseded -by updated version with new features. +heavily on the original apcsmart driver by Russell Kroll). This driver +was called newapc for a time and was renamed in the 1.5 series. In 2.6.2 +the driver was renamed to apcsmart-old, being superseded by updated version +with new features. SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/apcsmart.8 b/docs/man/apcsmart.8 index 24000cf..30d20d5 100644 --- a/docs/man/apcsmart.8 +++ b/docs/man/apcsmart.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcsmart -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "APCSMART" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "APCSMART" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -89,7 +89,7 @@ Smart\-UPS 900I .PP "new" models .RS 4 -These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable EEPROM, report supported commands and capabilities, and should work just fine with the apcsmart driver\&. +These models usually come from late 1990s / pre\-2009 times\&. They are often referred as "3rd\&. gen"\&. For the most part, they have programmable EEPROM, report supported commands and capabilites, and should work just fine with the apcsmart driver\&. .RE .PP "microlink" models @@ -99,11 +99,9 @@ WARNING: these are not supported by \fBapcsmart\fR (or -\fBapcupsd\fR, for that matter, if you\(cqre wondering)\&. Around 2007, APC (now APC Schneider) decided to go back to its proprietary roots, and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS \- that uses cable with RJ45 on the one end, and DB\-9 on the other \- then you have such model\&. Your only option to support it through +\fBapcupsd\fR, for that matter, if you\(cqre wondering)\&. Around 2007, APC (now APC Schneider) decided to go back to its proprietry roots, and all the new models (SMT, SMX, SURTD) use completely different protocol and cables\&. If you purchased a new APC UPS \- that uses cable with RJ45 on the one end, and DB\-9 on the other \- then you have such model\&. Your only option to support it through \fBNUT\fR -is to purchase a "legacy communications card" \- part #AP9620 (google -\fIAP9620\fR -for more details)\&. Or if that\(cqs not an option, rely on official software\&. +is to purchase a "legacy communications card" \- part #AP9620 (google \*(AqAP9620\*(Aq for more details)\&. Or if that\(cqs not an option, rely on official software\&. .RE .PP Microsol models @@ -142,7 +140,7 @@ Back\-UPS BZ2200BI\-BR Another thing to remember is that Smart protocol is not USB protocol\&. If you have UPS with both USB and serial ports, then depending on how you connect it, you will need either apcsmart or usbhid\-ups driver\&. .SH "CABLING" .sp -This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the \fIcable=\fR definition described below\&. +This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the \*(Aqcable=\*(Aq definition described below\&. .sp If your 940\-xx24X cable is broken or missing, use this diagram to build a clone: .sp @@ -173,7 +171,7 @@ Alternatively, you can also provide it on the command line using: \-x \fBcable\fR=940\-0095B .SH "TTY MODES" .sp -By default the driver works in canonical mode, but it proved to be a problem in Windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-USB converters that could cause problems as well\&. You can use \fIttymode=\fR option to force non\-canonical discipline in \fBups.conf\fR(5): +By default the driver works in canonical mode, but it proved to be a problem in Windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-USB converters that could cause problems as well\&. You can use \*(Aqttymode=\*(Aq option to force non\-canonical discipline in \fBups.conf\fR(5): .sp \fBttymode\fR=raw .sp @@ -205,53 +203,47 @@ APC hardware supports a lot of shutdown methods, that themselves can differ in b This is most basic command present in probably all APC models\&. It will hibernate the UPS, and subsequently wake it up when the mains supply returns\&. \fBThe command doesn\(cqt work if the UPS is running on mains\&.\fR .PP -"old" models: +"old" models .RS 4 The behaviour here is unfortunately pretty primitive \- when the power returns, the UPS just wakes up\&. No grace periods, no min\&. battery charge condition, etc\&. This is probably not what you want\&. .RE .PP -"new" models: +"new" models .RS 4 -The behaviour here is as expected \- the power is cut off after the EEPROM defined grace period\&. The UPS will wake up when the power returns, after the EEPROM defined delay AND if the EEPROM defined min\&. battery charge level is met\&. The delay is counted from the power\(cqs return\&. +The behaviour here is as expected \- the power is cut off after the EEPROM defined grace period\&. The UPS will wake up when the power returns, after the EEPROM defined delay AND if the EEPROM defined min\&. battery charge level is met\&. The delay is counted from the power\*(Aqs return\&. .RE .RE .PP \fBCS\fR (aka "force OB hack") .RS 4 -This is a trick to make UPS power down even if it\(cqs running on mains\&. Immediately before issuing +This is a trick to make UPS power down even if it\*(Aqs running on mains\&. Immediately before issuing \fBS\fR, "simulate power failure" is issued\&. The remaining behaviour is as in \fBS\fR case\&. .sp -There\(cqs a delay between "simulate power failure" and -\fBS\fR -\- by default set to 3\&.5s\&. You can control it through -\fBcshdelay\fR -option (allowed values are from 0 to 9\&.9)\&. -.sp The name came from APC CS models, where such trick was used to power down UPSes in consistent fashion using only -\fBS\fR\&. It\(cqs better to use +\fBS\fR\&. It\*(Aqs better to use \fB@nnn\fR command if your UPS supports it (and is not too old, see below)\&. .RE .PP \fB@nnn\fR (hard hibernate) .RS 4 -This is basic command used to hibernate UPS regardless if it\(cqs running on batteries or on mains\&. The option takes 3 digits argument which can be used to specify additional wake\-up delay (in 6 minute units)\&. +This is basic command used to hibernate UPS regardless if it\*(Aqs running on batteries or on mains\&. The option takes 3 digits argument which can be used to specify additional wakeup delay (in 6 minute units)\&. .PP -"old" models: +"old" models .RS 4 -The behaviour is \- unfortunately \- similarly primitive to +The behaviour is \- unfortunately \- similary primitive to \fBS\fR\&. The UPS unconditionally wakes up after nnn*6 minutes \- -\fBit doesn\(cqt care if the power returned !\fR -If nnn = 000, then UPS will do precisely nothing\&. On those models you\(cqre better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment\&. Another thing to consider with "old" models \- you might lose the connection with the UPS, until it wakes up (with +\fBit doesn\*(Aqt care if the power returned !\fR +If nnn = 000, then UPS will do precisely nothing\&. On those models you\*(Aqre better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment\&. Another thing to consider with "old" models \- you might lose the connection with the UPS, until it wakes up (with \fBS\fR, the serial connection is kept alive)\&. .RE .PP -"new" models: +"new" models .RS 4 All the usual variables defined in EEPROM are respected (see -\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to EEPROM defined delay\&. UPS will not power up if it\(cqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. +\fBS\fR)\&. Additionally, if nnn > 0, the nnn*6 minutes are added to EEPROM defined delay\&. UPS will not power up if it\*(Aqs running on batteries, contrary to what "old" models used to do \- the combined delay is counted from the moment of power return\&. .RE .sp Supposedly there exist models that take 2 digits instead of 3\&. Just in case, NUT also supports such variation\&. You have to provide exactly 2 digits to trigger it (\fBawd\fR @@ -278,18 +270,18 @@ This option takes a single digit (0\-5) as an argument\&. See below for details\ .PP \fBadvorder\fR=no|[0\-4]+ .RS 4 -This option takes string of digits as an argument\&. Methods listed are tried in turn until one of them succeeds\&. Note that the meaning of digits is different from +This option takes string of digits as an argument\&. Methods listed are tried in turn until one of them succeedes\&. Note that the meaning of digits is different from \fBsdtype\fR\&. See below for details\&. .RE .PP \fBawd\fR=[0\-9]{1,3} .RS 4 -This option lets you specify additional wake\-up delay used by +This option lets you specify additional wakeup delay used by \fB@\fR\&. If you provide exactly 2 digits, the driver will try 2 digits variation (see previous section for more info)\&. Otherwise standard 3 digits variation is used\&. \fBNote: the time unit is 6 minutes !\fR .RE .sp -Keep in mind that \fBsdtype\fR and \fBadvorder\fR are mutually exclusive\&. If \fBadvorder\fR is provided, \fBsdtype\fR is ignored\&. If \fBadvorder\fR is set to \fIno\fR, \fBsdtype\fR is used instead\&. +Keep in mind that \fBsdtype\fR and \fBadvorder\fR are mutually exclusive\&. If \fBadvorder\fR is provided, \fBsdtype\fR is ignored\&. If \fBadvorder\fR is set to \*(Aqno\*(Aq, \fBsdtype\fR is used instead\&. .sp If nothing is provided, \fBNUT\fR will assume \fBsdtype\fR=0 \- which is generally fine for anything not too ancient or not too quirky\&. .SS "SDTYPE" @@ -338,14 +330,14 @@ issue hard hibernate (\fB@\fR) .ps -1 .br .sp -Hard hibernate\(cqs additional wake\-up delay can be provided by \fBawd\fR\&. +Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. .sp .5v .RE .SS "ADVORDER" .sp -The argument is either a word \fIno\fR, or a string of 1 \- 5 digits in [0 \- 4] range\&. Each digit maps to the one of shutdown methods supported by APC UPSes\&. Methods listed in this way are tried in order, until one of them succeeds\&. +The argument is either a word \*(Aqno\*(Aq, or a string of 1 \- 5 digits in [0 \- 4] range\&. Each digit maps to the one of shutdown methods supported by APC UPSes\&. Methods listed in this way are tried in order, until one of them succedes\&. .sp -If \fBadvorder\fR is undefined or set to \fIno\fR, \fBsdtype\fR is used instead\&. +If \fBadvorder\fR is undefined or set to \*(Aqno\*(Aq, \fBsdtype\fR is used instead\&. .sp The mapping is as follows: .TS @@ -405,7 +397,7 @@ T} .ps -1 .br .sp -Hard hibernate\(cqs additional wake\-up delay can be provided by \fBawd\fR\&. +Hard hibernate\*(Aqs additional wakeup delay can be provided by \fBawd\fR\&. .sp .5v .RE .SH "IGNORING LB STATE" @@ -443,7 +435,7 @@ This would cause apcsmart to go into shutdown \fIonly\fR if detected battery cha .sp You could ask \- why bother ? Well, the reason is already hinted above\&. APC units can be very picky about the batteries, and their firmware can underestimate the remaining runtime (especially right after going into OB state)\&. \fBignorelb\fR option and \fBoverride\&.*\fR let you remain in control of the UPS, not UPS in control of you\&. .sp -Furthermore, this allows to specify conditions similarly to how it\(cqs done in apcupsd daemon, so it should be welcome by people used to that software\&. +Furthermore, this allows to specify conditions similary to how it\(cqs done in apcupsd daemon, so it should be welcome by people used to that software\&. .SH "SUPPORTED INSTANT COMMANDS" .sp The apcsmart driver exposes following instant commands: @@ -460,7 +452,7 @@ executes "force OB hack" .PP shutdown\&.return at: .RS 4 -executes "hard hibernate" with *6 minutes additional wake\-up delay ( format is the same as of +executes "hard hibernate" with *6 minutes additional wakeup delay ( format is the same as of \fBawd\fR option) .RE @@ -475,7 +467,7 @@ load\&.off executes "instant poweroff" .RE .sp -All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call)\&. Those commands are mostly useful for manual testing, when your machine is not powered by the UPS you\(cqre testing\&. +All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call)\&. Those commands are mostly useful for manual testing, when your machine is not powered by the UPS you\*(Aqre testing\&. .sp Other supported commands: .sp @@ -579,19 +571,15 @@ calibrate\&.stop .RE .SH "PREVIOUS DRIVER VERSION" .sp -Previous driver is still available as \fBapcsmart\-old\fR, should there be any need to use earlier version (bugs, incompatibilities with new functionality, etc\&.)\&. In due time, \fBapcsmart\-old\fR will be phased out completely, but this won\(cqt happen until the new version gets solid exposure with no pending issues\&. +Previous driver is still available as \fBapcsmart\-old\fR, should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc\&.)\&. In due time, \fBapcsmart\-old\fR will be phased out completely, but this won\(cqt happen until the new version gets solid exposure with no pending issues\&. .SH "BUGS" .sp Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&. .sp APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&. -.SH "AUTHORS AND HISTORY" +.SH "AUTHOR" .sp -Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. -.sp -This driver was called newapc for a time and was renamed in the 1\&.5 series\&. -.sp -In 2\&.6\&.2 it was renamed to apcsmart\-old, being superseded by updated version with new features, which is maintained by Michal Soltys +Nigel Metheringham (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&. In 2\&.6\&.2 it was renamed to apcsmart\-old, being superseded by updated version with new features, which is maintained by Michal Soltys .SH "SEE ALSO" .sp \fBnutupsdrv\fR(8), \fBups.conf\fR(5), \fBusbhid-ups\fR(8), \fBsolis\fR(8) diff --git a/docs/man/apcsmart.txt b/docs/man/apcsmart.txt index 503ff57..6a474c7 100644 --- a/docs/man/apcsmart.txt +++ b/docs/man/apcsmart.txt @@ -1,7 +1,7 @@ APCSMART(8) =========== -NAME +NAME ---- apcsmart - Driver for American Power Conversion Smart Protocol UPS equipment @@ -46,18 +46,18 @@ division isn't strict by any means, and the borders between those are pretty fuz "new" models:: These models usually come from late 1990s / pre-2009 times. They are often referred as "3rd. gen". For the most part, they have programmable EEPROM, - report supported commands and capabilities, and should work just fine with the + report supported commands and capabilites, and should work just fine with the apcsmart driver. "microlink" models:: WARNING: these are not _natively_ supported by *apcsmart* (or *apcupsd*, for that matter, if you're wondering). Around 2007, APC (now APC Schneider) - decided to go back to its proprietary roots, and all the new models (SMT, + decided to go back to its proprietry roots, and all the new models (SMT, SMX, SURTD) use completely different protocol and cables. If you purchased a new APC UPS - that uses cable with RJ45 on the one end, and DB-9 on the other - then you have such model. Your only option to support it through *NUT* is to purchase a "legacy communications card" - part #AP9620 (google - 'AP9620' for more details). Or if that's not an option, rely on official + \'AP9620' for more details). Or if that's not an option, rely on official software. Microsol models:: @@ -80,7 +80,7 @@ CABLING ------- This driver expects to see a 940-0024C cable or a clone by default. You -can switch to the 940-0095B dual-mode cable support with the 'cable=' +can switch to the 940-0095B dual-mode cable support with the \'cable=' definition described below. If your 940-xx24X cable is broken or missing, use this diagram to build @@ -108,7 +108,7 @@ TTY MODES By default the driver works in canonical mode, but it proved to be a problem in Windows systems. Furthermore there's a possibility of some obscure serial cards or serial-USB converters that could cause problems as well. You can use -'ttymode=' option to force non-canonical discipline in linkman:ups.conf[5]: +\'ttymode=' option to force non-canonical discipline in linkman:ups.conf[5]: *ttymode*=raw @@ -128,54 +128,48 @@ behaviour quite a bit, depending on the model. This is most basic command present in probably all APC models. It will hibernate the UPS, and subsequently wake it up when the mains supply returns. *The command doesn't work if the UPS is running on mains.* -+ --- - "old" models: :: + + "old" models::: The behaviour here is unfortunately pretty primitive - when the power returns, the UPS just wakes up. No grace periods, no min. battery charge condition, etc. This is probably not what you want. - "new" models: :: + "new" models::: The behaviour here is as expected - the power is cut off after the EEPROM defined grace period. The UPS will wake up when the power returns, after the EEPROM defined delay AND if the EEPROM defined min. - battery charge level is met. The delay is counted from the power's + battery charge level is met. The delay is counted from the power\'s return. --- -+ + *CS* (aka "force OB hack"):: - This is a trick to make UPS power down even if it's running on mains. + This is a trick to make UPS power down even if it\'s running on mains. Immediately before issuing *S*, "simulate power failure" is issued. The remaining behaviour is as in *S* case. + -There's a delay between "simulate power failure" and *S* - by default set to -3.5s. You can control it through *cshdelay* option (allowed values are from 0 -to 9.9). -+ The name came from APC CS models, where such trick was used to power down -UPSes in consistent fashion using only *S*. It's better to use *@nnn* +UPSes in consistent fashion using only *S*. It\'s better to use *@nnn* command if your UPS supports it (and is not too old, see below). *@nnn* (hard hibernate):: - This is basic command used to hibernate UPS regardless if it's + This is basic command used to hibernate UPS regardless if it\'s running on batteries or on mains. The option takes 3 digits argument which - can be used to specify additional wake-up delay (in 6 minute units). + can be used to specify additional wakeup delay (in 6 minute units). + -- - "old" models: :: - The behaviour is - unfortunately - similarly primitive to *S*. The UPS - unconditionally wakes up after $$nnn*6$$ minutes - *it doesn't care if the + "old" models::: + The behaviour is - unfortunately - similary primitive to *S*. The UPS + unconditionally wakes up after $$nnn*6$$ minutes - *it doesn\'t care if the power returned !* If nnn = 000, then UPS will do precisely nothing. On - those models you're better specifying nnn > 0, if you can estimate + those models you\'re better specifying nnn > 0, if you can estimate the kind of power problems that might be happening in your environment. Another thing to consider with "old" models - you might lose the connection with the UPS, until it wakes up (with *S*, the serial connection is kept alive). - "new" models: :: + "new" models::: All the usual variables defined in EEPROM are respected (see *S*). Additionally, if nnn > 0, the $$nnn*6$$ minutes are added to EEPROM - defined delay. UPS will not power up if it's running on batteries, + defined delay. UPS will not power up if it\'s running on batteries, contrary to what "old" models used to do - the combined delay is counted from the moment of power return. -- @@ -203,17 +197,17 @@ There are three options used to control the shutdown behaviour. *advorder*=no|[0-4]+:: This option takes string of digits as an argument. Methods listed are tried - in turn until one of them succeeds. Note that the meaning of digits is + in turn until one of them succeedes. Note that the meaning of digits is different from *sdtype*. See below for details. *awd*=[0-9]{1,3}:: - This option lets you specify additional wake-up delay used by *@*. If you + This option lets you specify additional wakeup delay used by *@*. If you provide exactly 2 digits, the driver will try 2 digits variation (see previous section for more info). Otherwise standard 3 digits variation is used. *Note: the time unit is 6 minutes !* Keep in mind that *sdtype* and *advorder* are mutually exclusive. If *advorder* -is provided, *sdtype* is ignored. If *advorder* is set to 'no', *sdtype* is +is provided, *sdtype* is ignored. If *advorder* is set to \'no', *sdtype* is used instead. If nothing is provided, *NUT* will assume *sdtype*=0 - which is generally fine @@ -240,16 +234,16 @@ issue "force OB hack" (*CS*) 5:: issue hard hibernate (*@*) -NOTE: Hard hibernate's additional wake-up delay can be provided by *awd*. +NOTE: Hard hibernate\'s additional wakeup delay can be provided by *awd*. ADVORDER ~~~~~~~~ -The argument is either a word 'no', or a string of 1 - 5 digits in [0 - 4] +The argument is either a word \'no', or a string of 1 - 5 digits in [0 - 4] range. Each digit maps to the one of shutdown methods supported by APC UPSes. -Methods listed in this way are tried in order, until one of them succeeds. +Methods listed in this way are tried in order, until one of them succedes. -If *advorder* is undefined or set to 'no', *sdtype* is used instead. +If *advorder* is undefined or set to \'no', *sdtype* is used instead. The mapping is as follows: @@ -260,7 +254,7 @@ The mapping is as follows: 3:: instant poweroff (*Z*) 4:: "force OB hack" (*CS*) -NOTE: Hard hibernate's additional wake-up delay can be provided by *awd*. +NOTE: Hard hibernate\'s additional wakeup delay can be provided by *awd*. IGNORING LB STATE ----------------- @@ -269,7 +263,7 @@ APC units - even if they report LB mode - will not go into shutdown automatically. This gives us even more control with reference to "when to actually shutdown PSU". Since version 2.6.2, NUT supports *ignorelb* option in driver's section of linkman:ups.conf[5]. When such option is in effect, -the core driver will ignore LB state as reported by specific driver and +the core driver will ignore LB state as reported by specific driver and start shutdown basing the decision _only_ on two conditions: battery.charge < battery.charge.low @@ -295,6 +289,8 @@ shutdown. You might want to disable this condition entirely, when relying on such feature). Simple example: + +[source,conf] ---- [apc] ignorelb @@ -311,7 +307,7 @@ remaining runtime (especially right after going into OB state). *ignorelb* option and *$$override.*$$* let you remain in control of the UPS, not UPS in control of you. -Furthermore, this allows to specify conditions similarly to how it's done in +Furthermore, this allows to specify conditions similary to how it's done in apcupsd daemon, so it should be welcome by people used to that software. @@ -325,7 +321,7 @@ executes soft hibernate shutdown.return cs:: executes "force OB hack" shutdown.return at::: -executes "hard hibernate" with $$*6$$ minutes additional wake-up delay ( format +executes "hard hibernate" with $$*6$$ minutes additional wakeup delay ( format is the same as of *awd* option) shutdown.stayoff:: executes "delayed poweroff" @@ -335,7 +331,7 @@ executes "instant poweroff" All the above commands must be issued 2nd time to have any effect (no less than 3 seconds, and no more than 15 seconds after the initial call). Those commands are mostly useful for manual testing, when your machine is not powered by the UPS -you're testing. +you\'re testing. Other supported commands: @@ -353,7 +349,7 @@ PREVIOUS DRIVER VERSION ----------------------- Previous driver is still available as *apcsmart-old*, should there be any need to -use earlier version (bugs, incompatibilities with new functionality, etc.). In +use earlier version (bugs, incompatiblities with new functionality, etc.). In due time, *apcsmart-old* will be phased out completely, but this won't happen until the new version gets solid exposure with no pending issues. @@ -367,18 +363,14 @@ other unexpected values have occasionally slipped through. APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa. -AUTHORS AND HISTORY -------------------- +AUTHOR +------ Nigel Metheringham (drawing -heavily on the original `apcsmart` driver by Russell Kroll). - -This driver was called `newapc` for a time and was renamed in -the 1.5 series. - -In 2.6.2 it was renamed to `apcsmart-old`, being superseded by -updated version with new features, which is maintained by Michal -Soltys +heavily on the original apcsmart driver by Russell Kroll). This driver +was called newapc for a time and was renamed in the 1.5 series. In 2.6.2 +it was renamed to apcsmart-old, being superseded by updated version with +new features, which is maintained by Michal Soltys SEE ALSO -------- @@ -388,7 +380,6 @@ linkman:solis[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ // vim: tw=80 ai si ts=8 sts=4 sw=4 et : diff --git a/docs/man/apcupsd-ups.8 b/docs/man/apcupsd-ups.8 index c8e4657..9035797 100644 --- a/docs/man/apcupsd-ups.8 +++ b/docs/man/apcupsd-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: apcupsd-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "APCUPSD\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "APCUPSD\-UPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ apcupsd-ups \- Driver for apcupsd client access This man page only documents the specific features of the \fBapcupsd\-ups\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "DESCRIPTION" .sp -This driver is a client to \fBapcupsd\fR (another UPS monitoring project)\&. +This driver is a client to \fBapcupsd\fR\&. .sp \fBapcupsd\-ups\fR acts as an \fBapcupsd\fR client, simply forwarding data\&. This can be useful in cases where both protocols are required in a network, or in case apcupsd has a required UPS access mode missing from NUT\&. .SH "EXTRA ARGUMENTS" @@ -62,7 +62,7 @@ For instance: .\} .SH "BACKGROUND" .sp -This driver was originally written in one evening to allow interoperating with \fBapcupsd\fR\&. +This driver was originally written in one evening to allow interworking with \fBapcupsd\fR\&. .SH "SUPPORTED VARIABLES" .sp The following variables are translated from \fBapcupsd\fR to NUT\&. All times should be converted to seconds (please file a bug if you notice a mismatch in units)\&. @@ -352,26 +352,6 @@ Andreas Steinmetz \fBups.conf\fR(5), \fBnutupsdrv\fR(8) .SS "Internet Resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The apcupsd home page: -http://www\&.apcupsd\&.org/ -.RE +The apcupsd home page: http://www\&.apcupsd\&.org/ diff --git a/docs/man/apcupsd-ups.txt b/docs/man/apcupsd-ups.txt index 1017bd2..6c56aee 100644 --- a/docs/man/apcupsd-ups.txt +++ b/docs/man/apcupsd-ups.txt @@ -3,20 +3,17 @@ APCUPSD-UPS(8) NAME ---- - apcupsd-ups - Driver for apcupsd client access NOTE ---- - This man page only documents the specific features of the *apcupsd-ups* driver. For information about the core driver, see linkman:nutupsdrv[8]. DESCRIPTION ----------- - -This driver is a client to *apcupsd* (another UPS monitoring project). +This driver is a client to *apcupsd*. *apcupsd-ups* acts as an *apcupsd* client, simply forwarding data. This can be useful in cases where both protocols are required in a network, @@ -40,15 +37,13 @@ For instance: BACKGROUND ---------- -This driver was originally written in one evening to allow interoperating -with *apcupsd*. +This driver was originally written in one evening to allow interworking with *apcupsd*. SUPPORTED VARIABLES ------------------- -The following variables are translated from *apcupsd* to NUT. -All times should be converted to seconds (please file a bug -if you notice a mismatch in units). +The following variables are translated from *apcupsd* to NUT. All times should be +converted to seconds (please file a bug if you notice a mismatch in units). [width="50%",cols="m,m",options="header"] |=============================== @@ -90,7 +85,6 @@ if you notice a mismatch in units). LIMITATIONS ----------- - Access to *apcupsd* is strictly read only: no commands can be issued. This stems from the design of *apcupsd*, where the settings are changed in *apctest*. In order to run *apctest*, *apcupsd* must be stopped (and *apcupsd* @@ -98,7 +92,6 @@ exposes the UPS to the network). AUTHOR ------ - Andreas Steinmetz SEE ALSO @@ -109,6 +102,6 @@ linkman:nutupsdrv[8] Internet Resources: ~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The apcupsd home page: http://www.apcupsd.org/ +The apcupsd home page: http://www.apcupsd.org/ diff --git a/docs/man/asem.8 b/docs/man/asem.8 index 7903235..8f594e6 100644 --- a/docs/man/asem.8 +++ b/docs/man/asem.8 @@ -1,13 +1,13 @@ '\" t .\" Title: asem -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "ASEM" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "ASEM" "8" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -71,7 +71,7 @@ Beware that the SystemIO memory used by the I2C controller is reserved by ACPI\& .SH "KNOWN ISSUES AND BUGS" .sp The driver shutdown function is not implemented, so other arrangements must be made to turn off the UPS\&. -.SH "AUTHOR" +.SH "AUTHORS" .sp Giuseppe Corbelli .SH "SEE ALSO" @@ -80,38 +80,8 @@ Giuseppe Corbelli \fBnutupsdrv\fR(8) .SS "Internet resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -PB1300 specifications: -http://www\&.asem\&.it/en/products/industrial\-automation/box\-pcs/performance/pb1300/ -.RE +PB1300 specifications: http://www\&.asem\&.it/en/products/industrial\-automation/box\-pcs/performance/pb1300/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -BQ2060 datasheet: -http://www\&.ti\&.com/lit/ds/symlink/bq2060\&.pdf -.RE +BQ2060 datasheet: http://www\&.ti\&.com/lit/ds/symlink/bq2060\&.pdf .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/asem.txt b/docs/man/asem.txt index b45cf11..25f67ab 100644 --- a/docs/man/asem.txt +++ b/docs/man/asem.txt @@ -3,19 +3,16 @@ ASEM(8) NAME ---- - asem - driver for UPS in ASEM PB1300 NOTE ---- - This man page only documents the hardware-specific features of the *asem* driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - The *asem* driver supports the UPS in ASEM PB1300 embedded PCs. Likely other I2C devices from the same manufacturer will work too, since this is a "custom" charger. @@ -38,13 +35,12 @@ This driver also supports the following optional settings: *lb*='num':: Set the low battery threshold to 'num' volts. - + *hb*='num':: Set the high battery threshold to 'num' volts. INSTALLATION ------------ - This driver is specific to the Linux I2C API, and requires the lm_sensors libi2c-dev or its equivalent to compile. @@ -64,13 +60,11 @@ DIAGNOSTICS KNOWN ISSUES AND BUGS --------------------- - The driver shutdown function is not implemented, so other arrangements must be made to turn off the UPS. -AUTHOR ------- - +AUTHORS +------- Giuseppe Corbelli SEE ALSO @@ -78,13 +72,12 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ +PB1300 specifications: http://www.asem.it/en/products/industrial-automation/box-pcs/performance/pb1300/ -* PB1300 specifications: - http://www.asem.it/en/products/industrial-automation/box-pcs/performance/pb1300/ -* BQ2060 datasheet: http://www.ti.com/lit/ds/symlink/bq2060.pdf -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ +BQ2060 datasheet: http://www.ti.com/lit/ds/symlink/bq2060.pdf + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp.8 b/docs/man/bcmxcp.8 index 428f128..3088755 100644 --- a/docs/man/bcmxcp.8 +++ b/docs/man/bcmxcp.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BCMXCP" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BCMXCP" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,8 +58,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} -\fBshutdown_delay =\fR -\fI120\fR +\fBshutdown_delay =\fR\fI120\fR .RE .sp .RS 4 @@ -70,8 +69,7 @@ Communication speed for the UPS\&. If this is set to 9600, it tries to connect t .sp -1 .IP \(bu 2.3 .\} -\fBbaud_rate =\fR -\fInone\fR +\fBbaud_rate =\fR\fInone\fR .RE .SH "INSTANT COMMANDS" .sp diff --git a/docs/man/bcmxcp.txt b/docs/man/bcmxcp.txt index 037e1b0..3037a9c 100644 --- a/docs/man/bcmxcp.txt +++ b/docs/man/bcmxcp.txt @@ -8,14 +8,12 @@ bcmxcp - Driver for UPSes supporting the serial BCM/XCP protocol NOTE ---- - This man page only documents the hardware-specific features of the bcmxcp driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver should recognize all serial BCM/XCP-compatible UPSes. It has been developed and tested on Powerware PW5115 and PW9120 hardware. If your UPS has a USB connection, you may also consult the linkman:bcmxcp_usb[8] driver @@ -23,12 +21,11 @@ documentation. EXTRA ARGUMENTS --------------- - -This driver supports the following optional settings in the +This driver supports the following optional settings in the linkman:ups.conf[5]. *shutdown_delay=*'delay':: -The number of seconds that the UPS should wait between receiving the +The number of seconds that the UPS should wait between receiving the shutdown command (`upsdrvctl shutdown`) and actually shutting off. *baud_rate=*'rate':: @@ -36,20 +33,18 @@ Communication speed for the UPS. If this is set to 9600, it tries to connect to the UPS at 9600bps. If it fails to communicate, it will go into baud-hunting. It starts at 1200 and goes up to 19200. If it succeeds, it tell you the speed it connected with. If not included in the config, it defaults to baud-hunting. - + DEFAULT VALUES FOR THE EXTRA ARGUMENTS -------------------------------------- - - *shutdown_delay =* '120' - *baud_rate =* 'none' INSTANT COMMANDS ---------------- - This driver supports the following Instant Commands: *shutdown.return*:: -Turn off the load and return when power is back. +Turn off the load and return when power is back. *shutdown.stayoff*:: Turn off the load and remain off. @@ -59,7 +54,7 @@ Start a battery test. *outlet.n.shutdown.return*:: Turn off the load on outlet 'n' and return when power is back. -('n' is the outlet number reported by the upsc command) +('n' is the outlet number reported by the upsc command) TODO LIST --------- @@ -72,28 +67,22 @@ Access the config register to change settings. BUGS ---- - None known. AUTHOR ------ - Tore Ørpetveit SEE ALSO -------- - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] The USB BCM/XCP driver: ~~~~~~~~~~~~~~~~~~~~~~~ - linkman:bcmxcp_usb[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bcmxcp_usb.8 b/docs/man/bcmxcp_usb.8 index 60e2adf..77ed3f1 100644 --- a/docs/man/bcmxcp_usb.8 +++ b/docs/man/bcmxcp_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bcmxcp_usb -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BCMXCP_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BCMXCP_USB" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -71,7 +71,7 @@ Start a battery test\&. BCM/XCP supports reporting a wide range of UPS alarm conditions\&. .RE .PP -\fBReport UPS statistics information\fR +\fBReport UPS statistics informations\fR .RS 4 BCM/XCP supports reporting of UPS statistics data\&. .RE @@ -102,29 +102,9 @@ bcmxcp_usb only supports 1 UPS at this time\&. You can put the "auto" value for .SS ""Got EPERM: Operation not permitted upon driver startup"" .sp You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Tore Ørpetveit -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Wolfgang Ocker -.RE +Tore Ørpetveit , Wolfgang Ocker .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/bcmxcp_usb.txt b/docs/man/bcmxcp_usb.txt index 2eae9f5..a69d631 100644 --- a/docs/man/bcmxcp_usb.txt +++ b/docs/man/bcmxcp_usb.txt @@ -3,12 +3,10 @@ BCMXCP_USB(8) NAME ---- - bcmxcp_usb - Experimental driver for UPSes supporting the BCM/XCP protocol over USB NOTE ---- - This man page only documents the hardware-specific features of the bcmxcp_usb driver. For information about the core driver, see linkman:nutupsdrv[8]. @@ -16,7 +14,6 @@ This driver is a variant of the serial driver bcmxcp and uses the same core code SUPPORTED HARDWARE ------------------ - This driver should recognize all BCM/XCP-compatible UPSes that are connected via USB. It has been developed and tested on Powerware PW3501 hardware. It also has been tested on PW5110 hardware. @@ -24,25 +21,23 @@ been tested on PW5110 hardware. EXTRA ARGUMENTS --------------- -This driver supports the following optional settings in the +This driver supports the following optional settings in the linkman:ups.conf[5]. *shutdown_delay=*'delay':: -The number of seconds that the UPS should wait between receiving the +The number of seconds that the UPS should wait between receiving the shutdown command and actually shutting off. DEFAULT VALUES FOR THE EXTRA ARGUMENTS -------------------------------------- - *shutdown_delay =*'120' INSTANT COMMANDS ---------------- - This driver supports the following Instant Commands: *shutdown.return*:: -Turn off the load and return when power is back. +Turn off the load and return when power is back. *shutdown.stayoff*:: Turn off the load and remain off. @@ -56,12 +51,11 @@ TODO LIST *Report UPS alarm status*:: BCM/XCP supports reporting a wide range of UPS alarm conditions. -*Report UPS statistics information*:: +*Report UPS statistics informations*:: BCM/XCP supports reporting of UPS statistics data. EXPERIMENTAL DRIVER ------------------- - This driver has been tagged experimental, even if it has been reported to be stable. Thus it is not suitable for production systems and it is not built by default. This is mainly due to the fact that it is a @@ -69,7 +63,6 @@ new driver. INSTALLATION ------------ - This driver is not built by default. You can build it by using "configure --with-usb=yes". Note that it will also install other USB drivers. @@ -81,7 +74,6 @@ must have execution flag set (ie using chmod +x ...). IMPLEMENTATION -------------- - bcmxcp_usb only supports 1 UPS at this time. You can put the "auto" value for port in `ups.conf`, i.e.: @@ -91,7 +83,6 @@ bcmxcp_usb only supports 1 UPS at this time. You can put the KNOWN ISSUES AND BUGS --------------------- - "Got EPERM: Operation not permitted upon driver startup" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -99,21 +90,18 @@ You have forgotten to install the hotplug files, as explained in the INSTALLATION section above. Don't forget to restart hotplug so that it applies these changes. -AUTHORS -------- - -* Tore Ørpetveit -* Wolfgang Ocker +AUTHOR +------ +Tore Ørpetveit , +Wolfgang Ocker SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkin.8 b/docs/man/belkin.8 index 4798967..07089fa 100644 --- a/docs/man/belkin.8 +++ b/docs/man/belkin.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkin -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BELKIN" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BELKIN" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,8 +37,6 @@ This man page only documents the hardware\-specific features of the belkin drive The \fBbelkin\fR driver is known to support the Regulator Pro 525 (F6C525\-SER)\&. Other similar models such as the 425 and 625 should also work\&. .sp The Trust UPS and older Belkin units are not supported\&. -.sp -This driver only supports serial connections\&. If your UPS has a USB port, please consult the Hardware Compatibility List (HCL) to see which of the USB drivers you should use\&. .SH "EXTRA ARGUMENTS" .sp This driver does not support any extra settings in the \fBups.conf\fR(5)\&. @@ -65,9 +63,6 @@ the driver doesn\(cqt go anywhere near these character sequences, so it won\(cqt .SS "The core driver:" .sp \fBnutupsdrv\fR(8) -.SS "Other Belkin drivers:" -.sp -\fBbelkinunv\fR(8), \fBblazer_ser\fR(8), \fBblazer_usb\fR(8), \fBusbhid-ups\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/belkin.txt b/docs/man/belkin.txt index 57e0320..495201e 100644 --- a/docs/man/belkin.txt +++ b/docs/man/belkin.txt @@ -3,32 +3,27 @@ BELKIN(8) NAME ---- - + belkin - Driver for Belkin serial UPS equipment NOTE ---- This man page only documents the hardware-specific features of the -belkin driver. For information about the core driver, see +belkin driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - The *belkin* driver is known to support the Regulator Pro 525 (F6C525-SER). Other similar models such as the 425 and 625 should also work. The Trust UPS and older Belkin units are not supported. -This driver only supports serial connections. If your UPS has a USB port, -please consult the Hardware Compatibility List (HCL) to see which of the USB -drivers you should use. - EXTRA ARGUMENTS --------------- -This driver does not support any extra settings in the +This driver does not support any extra settings in the linkman:ups.conf[5]. BUGS @@ -47,18 +42,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] -Other Belkin drivers: -~~~~~~~~~~~~~~~~~~~~~ - -linkman:belkinunv[8], -linkman:blazer_ser[8], -linkman:blazer_usb[8], -linkman:usbhid-ups[8] - Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/belkinunv.8 b/docs/man/belkinunv.8 index 0e18d03..13d3ba5 100644 --- a/docs/man/belkinunv.8 +++ b/docs/man/belkinunv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: belkinunv .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BELKINUNV" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BELKINUNV" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,8 +32,6 @@ belkinunv \- Driver for Belkin "Universal UPS" and compatible .SH "NOTE" .sp This man page only documents the hardware\-specific features of the belkin driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp -This driver only supports serial connections\&. If your UPS has a USB port, please consult the Hardware Compatibility List (HCL) to see which of the USB drivers you should use\&. .SH "SUPPORTED HARDWARE" .sp The belkinunv driver is known to work with the Belkin Universal UPS models F6C800\-UNV and F6C120\-UNV, and is expected to work with other Belkin Universal UPS models\&. The driver only supports serial communication, not USB\&. @@ -320,16 +318,10 @@ When used with the \fB\-x wait\fR option, the exit status is normally \fB0\fR\&. .SH "EXTRA ARGUMENTS" .sp This driver does not support any extra settings in \fBups.conf\fR(5)\&. -.SH "AUTHOR" -.sp -Peter Selinger .SH "SEE ALSO" .SS "The core driver:" .sp \fBnutupsdrv\fR(8) -.SS "Other Belkin drivers:" -.sp -\fBbelkinunv\fR(8), \fBblazer_ser\fR(8), \fBblazer_usb\fR(8), \fBusbhid-ups\fR(8) .SS "Internet resources:" .sp .RS 4 @@ -354,5 +346,7 @@ http://www\&.networkupstools\&.org/ .\} The documentation for the protocol used by this UPS: belkin\-universal\-ups\&.html -(replica on NUT site) .RE +.SH "AUTHOR" +.sp +Peter Selinger diff --git a/docs/man/belkinunv.txt b/docs/man/belkinunv.txt index 4d8d8c2..cc8bb99 100644 --- a/docs/man/belkinunv.txt +++ b/docs/man/belkinunv.txt @@ -8,18 +8,12 @@ belkinunv - Driver for Belkin "Universal UPS" and compatible NOTE ---- - This man page only documents the hardware-specific features of the -belkin driver. For information about the core driver, see +belkin driver. For information about the core driver, see linkman:nutupsdrv[8]. -This driver only supports serial connections. If your UPS has a USB port, -please consult the Hardware Compatibility List (HCL) to see which of the USB -drivers you should use. - SUPPORTED HARDWARE ------------------ - The belkinunv driver is known to work with the Belkin Universal UPS models F6C800-UNV and F6C120-UNV, and is expected to work with other Belkin Universal UPS models. The driver only supports serial @@ -34,7 +28,6 @@ are supported using the linkman:genericups[8] driver with SOFT SHUTDOWN WORKAROUND ------------------------ - One problem with the Belkin Universal UPS is that it cannot enter a soft shutdown (shut down the load until AC power returns) unless the batteries are completely depleted. Thus, one cannot just shut off the @@ -58,7 +51,7 @@ system reboots in this case. If AC power does not come back on, the UPS will eventually run out of batteries, kill the computer's power supply, and go into soft shutdown mode, which means everything will reboot properly when the power returns. In either case, a deadlock is -avoided. +avoided. In addition, if an optional integer argument is given to the *-x wait* option, this causes *belkinunv* to wait not only for AC power to be present, @@ -76,7 +69,6 @@ startup scripts. OPTIONS ------- - See also linkman:nutupsdrv[8] for generic options. Never use the *-k* option with this driver; it does not work properly. @@ -100,7 +92,7 @@ used in a startup script, to ensure the computer remains bootable even if the UPS has been disconnected during the power failure (for instance, you attached your computer to a generator, carried it to a neighbor's house, or -whatever). +whatever). *-x flash*:: This option only has an effect when used in conjunction with the *-x wait* @@ -130,7 +122,6 @@ line. VARIABLES --------- - *battery.charge*:: *battery.runtime*:: @@ -254,7 +245,7 @@ load is online *ACFAIL*:: AC failure. Note that this refers to the AC input, and thus it is not the same as "OB". An AC failure can occur at any time, for instance, -during a battery test, or when the UPS load is off. +during a battery test, or when the UPS load is off. *OVER*:: overload @@ -273,7 +264,7 @@ charging *DEPLETED*:: the battery is depleted. When the UPS raises this flag, it -simultaneously switches off the load. +simultaneously switches off the load. *RB*:: replace battery @@ -332,32 +323,20 @@ EXTRA ARGUMENTS This driver does not support any extra settings in linkman:ups.conf[5]. -AUTHOR ------- - -Peter Selinger - SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] -Other Belkin drivers: -~~~~~~~~~~~~~~~~~~~~~ - -linkman:belkinunv[8], -linkman:blazer_ser[8], -linkman:blazer_usb[8], -linkman:usbhid-ups[8] - Internet resources: ~~~~~~~~~~~~~~~~~~~ + - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + - The documentation for the protocol used by this UPS: +link:http://www.mscs.dal.ca/~selinger/ups/belkin-universal-ups.html[belkin-universal-ups.html] -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The documentation for the protocol used by this UPS: - link:http://www.mscs.dal.ca/~selinger/ups/belkin-universal-ups.html[belkin-universal-ups.html] - (link:https://networkupstools.org/protocols/belkin-universal.html[replica - on NUT site]) +AUTHOR +------ + +Peter Selinger diff --git a/docs/man/bestfcom.8 b/docs/man/bestfcom.8 index f83b2cb..ec46368 100644 --- a/docs/man/bestfcom.8 +++ b/docs/man/bestfcom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfcom .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BESTFCOM" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BESTFCOM" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,49 +40,13 @@ Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f\-command s This driver does not support any extra settings in the \fBups.conf\fR(5)\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Kent Polk (bestfcom) -.RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Andreas Wrede, John Stone (bestuferrups) -.RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Grant Taylor (bestfort) -.RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Russell Kroll (bestups) -.RE .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/bestfcom.txt b/docs/man/bestfcom.txt index 6700185..d742e8a 100644 --- a/docs/man/bestfcom.txt +++ b/docs/man/bestfcom.txt @@ -8,40 +8,38 @@ bestfcom - Driver for Best Power Fortress/Ferrups NOTE ---- - This man page only documents the hardware-specific features of the bestfcom driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - Best Power Fortress/Ferrups implementing the Fortress UPS Protocol (f-command set). EXTRA ARGUMENTS --------------- -This driver does not support any extra settings in the +This driver does not support any extra settings in the linkman:ups.conf[5]. AUTHORS ------- +Kent Polk (bestfcom) -* Kent Polk (bestfcom) -* Andreas Wrede, John Stone (bestuferrups) -* Grant Taylor (bestfort) -* Russell Kroll (bestups) +Andreas Wrede, John Stone (bestuferrups) + +Grant Taylor (bestfort) + +Russell Kroll (bestups) SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestfortress.8 b/docs/man/bestfortress.8 index d96dee0..130fd8c 100644 --- a/docs/man/bestfortress.8 +++ b/docs/man/bestfortress.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestfortress -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BESTFORTRESS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BESTFORTRESS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -50,29 +50,9 @@ Set the full\-scale value of the \fBups\&.load\fR variable\&. .RE -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Holger Dietze -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Stuart D\&. Gathman -.RE +Holger Dietze , Stuart D\&. Gathman .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/bestfortress.txt b/docs/man/bestfortress.txt index aac0b8b..8bc969a 100644 --- a/docs/man/bestfortress.txt +++ b/docs/man/bestfortress.txt @@ -15,12 +15,10 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports old Best Fortress UPS equipment using a serial connection. EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in the linkman:ups.conf[5]: @@ -30,26 +28,22 @@ Set the speed of the serial connection - 1200, 2400, 4800 or 9600. *max_load*='VA':: Set the full-scale value of the *ups.load* variable. -AUTHORS -------- - -* Holger Dietze -* Stuart D. Gathman +AUTHOR +------ +Holger Dietze , +Stuart D. Gathman SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] The newer Best Power drivers: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:bestups[8], linkman:bestuferrups[8], linkman:bestfcom[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestuferrups.8 b/docs/man/bestuferrups.8 index 1fc7857..b56a422 100644 --- a/docs/man/bestuferrups.8 +++ b/docs/man/bestuferrups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestuferrups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BESTUFERRUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BESTUFERRUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,38 +40,11 @@ Best Power Micro\-Ferrups ME3100, probably other similar models too\&. This driver does not support any extra settings in the \fBups.conf\fR(5)\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Andreas Wrede, John Stone (bestuferrups) -.RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Grant Taylor (bestfort) -.RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} Russell Kroll (bestups) -.RE .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/bestuferrups.txt b/docs/man/bestuferrups.txt index cfe857d..49f4645 100644 --- a/docs/man/bestuferrups.txt +++ b/docs/man/bestuferrups.txt @@ -8,38 +8,35 @@ bestuferrups - Driver for Best Power Micro-Ferrups NOTE ---- - This man page only documents the hardware-specific features of the bestuferrups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - Best Power Micro-Ferrups ME3100, probably other similar models too. EXTRA ARGUMENTS --------------- -This driver does not support any extra settings in the +This driver does not support any extra settings in the linkman:ups.conf[5]. AUTHORS ------- +Andreas Wrede, John Stone (bestuferrups) -* Andreas Wrede, John Stone (bestuferrups) -* Grant Taylor (bestfort) -* Russell Kroll (bestups) +Grant Taylor (bestfort) + +Russell Kroll (bestups) SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/bestups.8 b/docs/man/bestups.8 index 009477a..0d6ab8e 100644 --- a/docs/man/bestups.8 +++ b/docs/man/bestups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: bestups -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BESTUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BESTUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,11 +32,6 @@ bestups \- Driver for Best Power / SOLA (Phoenixtec protocol) UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the bestups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "NOTE" -.sp -Please note that this driver is deprecated and will not receive new development\&. If it works for managing your devices \(em fine, but if you are running it to try setting up a new device, please consider the newer \fBnutdrv_qx\fR(8) instead, which should handle all \fIQ*\fR protocol variants for NUT\&. -.sp -Please do also report if your device works with this driver, but \fBnutdrv_qx\fR(8) would not actually support it with any subdriver! .SH "SUPPORTED HARDWARE" .sp \fBbestups\fR was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro\&. It also recognizes and supports SOLA units such as the 325, 520 and 620\&. In addition, the Best 610 is supported using the \(oqID\(cq option\&. @@ -95,32 +90,12 @@ Example: a Best 610 1\&.5KVA unit would use the string "610,1500,120,120,10\&.0, .sp The battery charge percentage value (in battery\&.charge) is derived from the voltage data that the UPS returns, since the UPS doesn\(cqt return that value directly\&. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out\&. You can confirm from the battery\&.voltage readings that this is a problem with the UPS and not this driver\&. .sp -Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immediately after the UPS goes back on\-line, so you can\(cqt tell when it is really recharged\&. +Similarly, the float from the charger in some models forces the battery charge percentage back up to 100% immedately after the UPS goes back on\-line, so you can\(cqt tell when it is really recharged\&. .sp Finally, some models give one value for the battery\(cqs nominal voltage and yet actually have a nominal voltage slightly below that\&. This leads to things such as the perpetual 98\&.7% charge on the author\(cqs Fortress 750, even when it\(cqs been charging for weeks\&. You can use nombattvolt= in \fBups.conf\fR(8) to fix this\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Russell Kroll -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Jason White -.RE +Russell Kroll, Jason White .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/bestups.txt b/docs/man/bestups.txt index f2904bf..61704f6 100644 --- a/docs/man/bestups.txt +++ b/docs/man/bestups.txt @@ -10,28 +10,14 @@ NOTE ---- This man page only documents the hardware-specific features of the -bestups driver. For information about the core driver, see +bestups driver. For information about the core driver, see linkman:nutupsdrv[8]. -NOTE ----- - -Please note that this driver is deprecated and will not receive -new development. If it works for managing your devices -- fine, -but if you are running it to try setting up a new device, please -consider the newer linkman:nutdrv_qx[8] instead, which should -handle all 'Q*' protocol variants for NUT. - -Please do also report if your device works with this driver, -but linkman:nutdrv_qx[8] would not actually support it with any -subdriver! - SUPPORTED HARDWARE ------------------ - *bestups* was designed to monitor Best Power UPS hardware like the Fortress, Fortress Telecom, Axxium Rackmount and Patriot Pro. It also recognizes -and supports SOLA units such as the 325, 520 and 620. In addition, the +and supports SOLA units such as the 325, 520 and 620. In addition, the Best 610 is supported using the `ID' option. Other UPS hardware using the Phoenixtec protocol should also work, but @@ -68,31 +54,31 @@ case you can set `battvoltmult = 12` in linkman:ups.conf[8] to fix this. *ID=*'string':: Set the Identification response string. This should only be used -with hardware that supports the Phoenixtec protocol status inquiry -commands, but not the "ID" command, such as the Best/SOLA 610. Format +with hardware that supports the Phoenixtec protocol status inquiry +commands, but not the "ID" command, such as the Best/SOLA 610. Format of the ID string is: AAA,BBBB,CCC,DDD,EE.E,FF.F + AAA is the three-character identification for the UPS model. + -BBBB is the output power in VA (volt amperes). B is an integer number +BBBB is the output power in VA (volt amperes). B is an integer number ranging from 0 to 9. + -CCC is the Nominal Input Voltage. C is an integer number ranging from 0 +CCC is the Nominal Input Voltage. C is an integer number ranging from 0 to 9. The unit is Volts AC. + -DDD is the Nominal Output Voltage. D is an integer number ranging from 0 +DDD is the Nominal Output Voltage. D is an integer number ranging from 0 to 9. The unit is Volts AC. + -EE.E is the Battery Voltage that will cause the UPS to shut itself off. -E is an integer number ranging from 0 to 9. Then unit is Volts DC and a +EE.E is the Battery Voltage that will cause the UPS to shut itself off. +E is an integer number ranging from 0 to 9. Then unit is Volts DC and a decimal point is present. + -FF.F or FFF.F is the Battery Voltage at full charge. F is an integer -number ranging from 0 to 9. Then unit is Volts DC. Typically, for 700VA, -1KVA and 1.5KVA units, the format is FF.F. For 2KVA and 3KVA units, the +FF.F or FFF.F is the Battery Voltage at full charge. F is an integer +number ranging from 0 to 9. Then unit is Volts DC. Typically, for 700VA, +1KVA and 1.5KVA units, the format is FF.F. For 2KVA and 3KVA units, the format is FFF.F. + -Example: a Best 610 1.5KVA unit would use the string +Example: a Best 610 1.5KVA unit would use the string "610,1500,120,120,10.0,48.0". BUGS @@ -103,33 +89,29 @@ the voltage data that the UPS returns, since the UPS doesn't return that value directly. On some hardware, the charge will remain at 100% for a long time and then drops quickly shortly before the battery runs out. You can confirm from the `battery.voltage` readings that this is a problem -with the UPS and not this driver. +with the UPS and not this driver. Similarly, the float from the charger in some models forces the battery -charge percentage back up to 100% immediately after the UPS goes back +charge percentage back up to 100% immedately after the UPS goes back on-line, so you can't tell when it is really recharged. Finally, some models give one value for the battery's nominal voltage and yet actually have a nominal voltage slightly below that. This leads to things such as the perpetual 98.7% charge on the author's Fortress 750, -even when it's been charging for weeks. You can use `nombattvolt=` in +even when it's been charging for weeks. You can use `nombattvolt=` in linkman:ups.conf[8] to fix this. -AUTHORS -------- - -* Russell Kroll -* Jason White +AUTHOR +------ +Russell Kroll, Jason White SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/blazer-common.txt b/docs/man/blazer-common.txt index dc53dc8..7449624 100644 --- a/docs/man/blazer-common.txt +++ b/docs/man/blazer-common.txt @@ -1,22 +1,9 @@ NOTE ---- - This man page only documents the hardware-specific features of the blazer driver. For information about the core driver, see linkman:nutupsdrv[8]. -NOTE ----- - -Please note that this driver is deprecated and will not receive -new development. If it works for managing your devices -- fine, -but if you are running it to try setting up a new device, please -consider the newer linkman:nutdrv_qx[8] instead, which should -handle all 'Q*' protocol variants for NUT. - -Please do also report if your device works with this driver, -but linkman:nutdrv_qx[8] would not actually support it with any -subdriver! SUPPORTED HARDWARE ------------------ @@ -157,18 +144,10 @@ Examples: *bus =* 'regex':: -Select a UPS on a specific USB bus or group of buses. The argument is +Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002", bus="00[2-3]"). -*device =* 'regex':: - -Select a UPS on a specific USB device or group of devices. The argument is -a regular expression that must match the device name where the UPS is -connected (e.g. device="001", device="00[1-2]"). -Note that device numbers are not guaranteed by the OS to be stable across -re-boots or device re-plugging. - *subdriver =* 'string':: Select a serial-over-USB subdriver to use. You have a choice between *phoenix*, @@ -317,8 +296,8 @@ The temperature and load value is known to be bogus in some models. AUTHORS ------- -* Arjen de Korte -* Alexander Gordeev +Arjen de Korte , +Alexander Gordeev SEE ALSO @@ -336,5 +315,7 @@ linkman:nutupsdrv[8], linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8] Internet Resources: ~~~~~~~~~~~~~~~~~~~ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT HCL: http://www.networkupstools.org/stable-hcl.html +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +The NUT HCL: http://www.networkupstools.org/stable-hcl.html + diff --git a/docs/man/blazer_ser.8 b/docs/man/blazer_ser.8 index dafaaa4..1939739 100644 --- a/docs/man/blazer_ser.8 +++ b/docs/man/blazer_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_ser .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BLAZER_SER" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BLAZER_SER" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,11 +32,6 @@ blazer_ser \- Driver for Megatec/Q1 protocol serial based UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the blazer driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "NOTE" -.sp -Please note that this driver is deprecated and will not receive new development\&. If it works for managing your devices \(em fine, but if you are running it to try setting up a new device, please consider the newer \fBnutdrv_qx\fR(8) instead, which should handle all \fIQ*\fR protocol variants for NUT\&. -.sp -Please do also report if your device works with this driver, but \fBnutdrv_qx\fR(8) would not actually support it with any subdriver! .SH "SUPPORTED HARDWARE" .sp The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, General Electric, Mustek and many others\&. The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested\&. @@ -265,52 +260,12 @@ Some models report a bogus value for the beeper status (will always be \fIenable The temperature and load value is known to be bogus in some models\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arjen de Korte -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Alexander Gordeev -.RE +Arjen de Korte , Alexander Gordeev .SH "SEE ALSO" .sp \fBblazer_usb\fR(8), \fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8) .SS "Internet Resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT HCL: -http://www\&.networkupstools\&.org/stable\-hcl\&.html -.RE +The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html diff --git a/docs/man/blazer_usb.8 b/docs/man/blazer_usb.8 index 262eb78..726070c 100644 --- a/docs/man/blazer_usb.8 +++ b/docs/man/blazer_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: blazer_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "BLAZER_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "BLAZER_USB" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,11 +32,6 @@ blazer_usb \- Driver for Megatec/Q1 protocol USB based UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the blazer driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "NOTE" -.sp -Please note that this driver is deprecated and will not receive new development\&. If it works for managing your devices \(em fine, but if you are running it to try setting up a new device, please consider the newer \fBnutdrv_qx\fR(8) instead, which should handle all \fIQ*\fR protocol variants for NUT\&. -.sp -Please do also report if your device works with this driver, but \fBnutdrv_qx\fR(8) would not actually support it with any subdriver! .SH "SUPPORTED HARDWARE" .sp The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, General Electric, Mustek and many others\&. The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested\&. @@ -188,12 +183,7 @@ Examples: .PP \fBbus =\fR \fIregex\fR .RS 4 -Select a UPS on a specific USB bus or group of buses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. -.RE -.PP -\fBdevice =\fR \fIregex\fR -.RS 4 -Select a UPS on a specific USB device or group of devices\&. The argument is a regular expression that must match the device name where the UPS is connected (e\&.g\&. device="001", device="00[1\-2]")\&. Note that device numbers are not guaranteed by the OS to be stable across re\-boots or device re\-plugging\&. +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. .RE .PP \fBsubdriver =\fR \fIstring\fR @@ -333,52 +323,12 @@ Some models report a bogus value for the beeper status (will always be \fIenable The temperature and load value is known to be bogus in some models\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arjen de Korte -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Alexander Gordeev -.RE +Arjen de Korte , Alexander Gordeev .SH "SEE ALSO" .sp \fBblazer_ser\fR(8), \fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8) .SS "Internet Resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT HCL: -http://www\&.networkupstools\&.org/stable\-hcl\&.html -.RE +The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html diff --git a/docs/man/clone.8 b/docs/man/clone.8 index 0519d89..9636925 100644 --- a/docs/man/clone.8 +++ b/docs/man/clone.8 @@ -1,13 +1,13 @@ '\" t .\" Title: clone .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "CLONE" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "CLONE" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -71,7 +71,7 @@ Set the timer (in seconds) before the outlet is turned off after the shutdown co .PP \fBondelay\fR=\fInum\fR .RS 4 -Set the timer (in seconds) for the outlet to switch on in case the power returns after the outlet has been switched off\&. Defaults to 30 seconds\&. +Set the timer (in seconds) for the outlet to switch on in case the power returns after the oulet has been switched off\&. Defaults to 30 seconds\&. .RE .PP \fBmincharge\fR=\fIvalue\fR @@ -91,44 +91,45 @@ The port specification in the \fBups.conf\fR(5) reference the driver socket that .RS 4 .\} .nf - [realups] - driver = usbhid\-ups - port = auto - - [clone\-outlet\-1] - driver = clone - port = usbhid\-ups\-realups - load\&.on = outlet\&.1\&.load\&.on - load\&.off = outlet\&.1\&.load\&.off - load\&.status = outlet\&.1\&.status - [\&.\&.\&.] +[realups] + driver = usbhid\-ups + port = auto +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[clone\-outlet\-1] + driver = clone + port = usbhid\-ups\-realups + load\&.on = outlet\&.1\&.load\&.on + load\&.off = outlet\&.1\&.load\&.off + load\&.status = outlet\&.1\&.status + [\&.\&.\&.] .fi .if n \{\ .RE .\} .SH "IMPORTANT" .sp -Unlike a real UPS, you should \fBnot\fR configure a upsmon primary mode for this driver\&. When a upsmon primary sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without restarting the upsd server\&. +Unlike a real UPS, you should \fBnot\fR configure a upsmon master for this driver\&. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without restarting the upsd server\&. .sp -This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on it\(cqs outlet, but returns before the real UPS begins shutting down\&. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon primary\&. +This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on it\(cqs outlet, but returns before the real UPS begins shutting down\&. The solution is in the clone driver, that will insert the FSD flag if needed without the help of a upsmon master\&. .SH "CAVEATS" .sp The clone UPS will follow the status on the real UPS driver\&. You can only make the clone UPS shutdown earlier than the real UPS driver, not later\&. If the real UPS driver initiates a shutdown, the clone UPS driver will immediately follow\&. .sp Be aware that the commands to shutdown/restart an outlet on the real UPS drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning\&. -.sp -If you use service management frameworks like systemd or SMF to manage the dependencies between driver instances and other units, then you may have to set up special dependencies (e\&.g\&. with systemd "drop\-in" snippet files) to queue your clone drivers to start after the "real" device drivers\&. .SH "AUTHOR" .sp Arjen de Korte .SH "SEE ALSO" .sp \fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) -.SS "Dummy driver:" -.sp -The "repeater" mode of \fIdummy\-ups\fR driver is in some ways similar to the \fIclone\fR driver, by relaying information from a locally or remotely running "real" device driver (and NUT data server)\&. -.sp -\fBdummy-ups\fR(8) .SS "Internet Resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/clone.txt b/docs/man/clone.txt index 555e5c7..6a844ac 100644 --- a/docs/man/clone.txt +++ b/docs/man/clone.txt @@ -3,26 +3,22 @@ CLONE(8) NAME ---- - clone - UPS driver clone NOTE ---- - This man page only documents the specific features of the clone driver. For information about the core driver, see linkman:nutupsdrv[8]. DESCRIPTION ----------- - This driver, which sits on top of another driver socket, allows users to group clients to a particular outlet of a device and deal with this output as if it was a normal UPS. EXTRA ARGUMENTS --------------- - This driver supports the following settings: *load.off*='command':: @@ -50,7 +46,7 @@ was issued. Defaults to 120 seconds. *ondelay*='num':: Set the timer (in seconds) for the outlet to switch on in case the power -returns after the outlet has been switched off. Defaults to 30 seconds. +returns after the oulet has been switched off. Defaults to 30 seconds. *mincharge*='value':: Set the remaining battery level when the clone UPS switches to LB @@ -62,11 +58,9 @@ Set the remaining battery runtime when the clone UPS switches to LB IMPLEMENTATION -------------- - The port specification in the linkman:ups.conf[5] reference the driver socket that the "real" UPS driver is using. For example: ------- [realups] driver = usbhid-ups port = auto @@ -78,13 +72,11 @@ socket that the "real" UPS driver is using. For example: load.off = outlet.1.load.off load.status = outlet.1.status [...] ------- IMPORTANT --------- - -Unlike a real UPS, you should *not* configure a upsmon primary mode for this -driver. When a upsmon primary sees the OB LB flags and tells the upsd server +Unlike a real UPS, you should *not* configure a upsmon master for this +driver. When a upsmon master sees the OB LB flags and tells the upsd server it is OK to initiate the shutdown sequence, the server will latch the FSD status and it will not be possible to restart the systems connected without restarting the upsd server. @@ -92,11 +84,10 @@ restarting the upsd server. This will be a problem if the power returns after the clone UPS initiated the shutdown sequence on it's outlet, but returns before the real UPS begins shutting down. The solution is in the clone driver, that will insert the -FSD flag if needed without the help of a upsmon primary. +FSD flag if needed without the help of a upsmon master. CAVEATS ------- - The clone UPS will follow the status on the real UPS driver. You can only make the clone UPS shutdown earlier than the real UPS driver, not later. If the real UPS driver initiates a shutdown, the clone UPS driver will @@ -107,19 +98,8 @@ drivers are not affected, so if you tell the real UPS driver to shutdown the outlet of the clone UPS driver, your clients will lose power without warning. -If you use service management frameworks like systemd or SMF to manage the -dependencies between driver instances and other units, then you may have -to set up special dependencies (e.g. with systemd "drop-in" snippet files) -to queue your `clone` drivers to start after the "real" device drivers. - -////////////////////////////////////// -TODO later: declare the driver as "optional", see -https://github.com/networkupstools/nut/issues/1389 -////////////////////////////////////// - AUTHOR ------ - Arjen de Korte SEE ALSO @@ -130,16 +110,6 @@ linkman:upsrw[1], linkman:ups.conf[5], linkman:nutupsdrv[8] -Dummy driver: -~~~~~~~~~~~~~ - -The "repeater" mode of 'dummy-ups' driver is in some ways similar to the -'clone' driver, by relaying information from a locally or remotely running -"real" device driver (and NUT data server). - -linkman:dummy-ups[8] - Internet Resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/dummy-ups.8 b/docs/man/dummy-ups.8 index 3a39b67..76731e0 100644 --- a/docs/man/dummy-ups.8 +++ b/docs/man/dummy-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: dummy-ups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "DUMMY\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "DUMMY\-UPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,110 +31,22 @@ dummy-ups \- Driver for multi\-purpose UPS emulation .SH "NOTE" .sp -This man page only documents the specific features of the \fBdummy\-ups\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +This man page only documents the specific features of the dummy\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "DESCRIPTION" .sp -This program is a multi\-purpose UPS emulation tool\&. Its general behavior depends on the running mode: "dummy" ("dummy\-once" or "dummy\-loop"), or "repeater"\&. +This program is a multi\-purpose UPS emulation tool\&. Its behavior depends on the running mode: .SS "Dummy Mode" .sp -In this mode, \fBdummy\-ups\fR looks like a standard NUT device driver to \fBupsd\fR(8) and allows one to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other "real" NUT driver\&. This mode is mostly useful for development and testing purposes\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -See below about the differences of dummy\-once vs\&. dummy\-loop modes \(em the former may be more suitable for "interactive" uses and tests\&. -.sp .5v -.RE +\fBdummy\-ups\fR looks like a standard device driver to \fBupsd\fR(8) and allows one to change any value for testing purposes\&. It is both interactive, controllable through the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands (or equivalent graphical tool), and batchable through script files\&. It can be configured, launched and used as any other real driver\&. This mode is mostly useful for development and testing purposes\&. .SS "Repeater Mode" .sp -In this mode, \fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This mode can also allow some load sharing between several upsd instances communicating with ultimate NUT clients, with a "central" one using a point\-to\-point communication with the UPS\&. This arrangement can also help with networked UPSes, whose network management cards can be overwhelmed with a farm of servers directly polling SNMP or other protocols every few seconds\&. +\fBdummy\-ups\fR acts as a NUT client, simply forwarding data\&. This can be useful for supervision purposes\&. This can also allow some load sharing between several UPS instances, using a point\-to\-point communication with the UPS\&. .SH "IMPLEMENTATION" .sp -The port specification in ups\&.conf depends on the running mode, and allows the driver to select the right mode of operation\&. -.sp -Since NUT v2\&.8\&.0, the mode specification in ups\&.conf allows users to override the mode of operation which would be otherwise guessed by the driver\&. +The port specification depends on the running mode, and allows the driver to select the right mode\&. .SS "Dummy Mode" .sp -In this context, port in the ups\&.conf block defines a file name for the \fBdummy\-ups\fR to read data from\&. This can either be an absolute or a relative path name\&. In the latter case the NUT sysconfig directory (i\&.e\&. /etc/nut, /usr/local/ups/etc, \&...) is prepended\&. -.sp -Since NUT v2\&.8\&.0 two aspects of this mode are differentiated: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -dummy\-once -reads the specified file once to the end (interrupting for -TIMER -lines, etc\&.) and does not re\-process it until the filesystem timestamp of the data file is changed; this reduces run\-time stress if you test with a lot of dummy devices, and allows use/test cases to -upsrw -variables into the driver instance \(em and they remain in memory until the driver is restarted (or the file is touched or modified); -.sp -Since NUT v2\&.8\&.0 -dummy\-once -is assigned by default to files with a -*\&.dev -naming pattern\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -dummy\-loop -reads the specified file again and again, with a short sleep between the processing cycles; for sequence files using a -TIMER -keyword (see below), or for use/test cases which modify file contents with external means, this allows an impression of a device whose state changes over time\&. -.sp -Before NUT v2\&.8\&.0 this was the only aspect, so a simple -dummy -mode value maps to this behavior for backwards compatibility\&. -.sp -Since NUT v2\&.8\&.0 -dummy\-loop -is assigned by default to files with a -*\&.seq -naming pattern, and -dummy -is assigned by default to files with other naming patterns that the driver could not classify\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -Said defaulting based on filename pattern can break third\-party test scripts which earlier expected *\&.dev files to work as a looping sequence with a TIMER keywords to change values slowly\&. Now such files should get processed to the end once\&. -.sp -Specify mode=dummy\-loop driver option or rename the data file used in the port option for legacy behavior\&. -.sp -Use/Test\-cases which modified such files content externally should not be impacted\&. -.sp .5v -.RE +Port is a definition file name for \fBdummy\-ups\fR\&. This can either be an absolute or a relative path name\&. In the latter case the NUT sysconfig directory (ie /etc/nut, /usr/local/ups/etc, \&...) is prepended\&. .sp For instance: .sp @@ -142,55 +54,22 @@ For instance: .RS 4 .\} .nf -[dummy1] +[dummy] driver = dummy\-ups - port = evolution500\&.seq - desc = "dummy\-ups in dummy\-loop mode" + port = evolution500\&.dev + desc = "dummy\-ups in dummy mode" .fi .if n \{\ .RE .\} .sp -.if n \{\ -.RS 4 -.\} -.nf -[dummy2] - driver = dummy\-ups - port = epdu\-managed\&.dev - desc = "dummy\-ups in dummy\-once mode" -.fi -.if n \{\ -.RE -.\} +This file is generally named "something\&.dev"\&. It contains a list of all valid data and associated values, and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easily create definition files from an existing UPS using "upsc > file\&.dev"\&. It can also be empty, in which case only a basic set of data is available: device\&.\fB, driver\&.\fR, ups\&.mfr, ups\&.model, ups\&.status .sp -This file is generally named something\&.dev or something\&.seq\&. It contains a list of all valid variables and associated values (you can later use upsrw only to modify values of these variables), and has the same format as an \fBupsc\fR(8) dump (: )\&. So you can easily create definition files from an existing UPS using upsc > file\&.dev\&. +Samples definition files are available in the "data" directory of the nut source tree, and generally in the sysconfig directory of your system distribution\&. .sp -Note that the Network UPS project provides an extensive DDL (Devices Dumps Library) with files which can be used for modelling real devices\&. Entries for the DDL library are best prepared with the tools/nut\-ddl\-dump\&.sh script from NUT sources instead of plain upsc, to provide some additional data points from other NUT clients as well\&. +Since \fBdummy\-ups\fR will loop on reading this file, you can dynamically modify it to interact with the driver\&. This will avoid message spam into your system log files, if you are using NUT default configuration\&. .sp -The file can also be empty, in which case only a basic set of data is available: device\&.*, driver\&.*, ups\&.mfr, ups\&.model, ups\&.status as filled by the driver itself\&. -.sp -Some sample definition files are available in the data directory of the NUT source tree, and generally in the sysconfig or share directory of your system distribution\&. -.sp -Since \fBdummy\-ups\fR will usually loop on reading this file, you can dynamically modify it with some external process to "interact" with the driver\&. This will avoid message spam into your system log files, if you are using NUT default configuration\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -By default since NUT v2\&.8\&.0, it will not loop on files in dummy\-once mode, e\&.g\&. those with a \&.dev extension, unless their timestamp changes\&. -.sp .5v -.RE -.sp -You can also use the TIMER instruction to create scheduled event sequences (such files are traditionally named with the \&.seq extension)\&. For example, the following sequence will loop on switching ups\&.status between "OL", "OB" and "OB LB" every minute: +You can also use the "TIMER " instruction to create scheduled events sequences\&. For example, the following sequence will loop on switching ups\&.status between "OL", "OB" and "OB LB" every minute: .sp .if n \{\ .RS 4 @@ -200,19 +79,17 @@ ups\&.status: OL TIMER 60 ups\&.status: OB TIMER 60 -ups\&.status: OB LB +ups\&.status: LB TIMER 60 .fi .if n \{\ .RE .\} .sp -It is wise to end the script for dummy\-loop mode with a TIMER keyword\&. Otherwise dummy\-ups will directly go back to the beginning of the file and, in particular, forget any values you could have just set with upsrw\&. -.sp -Note that to avoid CPU overload with an infinite loop, the driver "sleeps" a bit between file\-reading cycles (currently this delay is hardcoded to one second), independently of (and/or in addition to) any TIMER keywords\&. +It is wise to end the script with a TIMER\&. Otherwise dummy\-ups will directly go back to the beginning of the file\&. .SS "Repeater Mode" .sp -In this context, port in the ups\&.conf block is the name of a remote UPS, using the NUT format, i\&.e\&.: +Port is the name of a remote UPS, using the NUT form, ie: .sp .if n \{\ .RS 4 @@ -231,52 +108,40 @@ For instance: .\} .nf [repeater] - driver = dummy\-ups - port = ups1@remotehost - desc = "dummy\-ups in repeater mode" + driver = dummy\-ups + port = ups@hostname + desc = "dummy\-ups in repeater mode" .fi .if n \{\ .RE .\} .sp Unlike UPS specifications in the rest of NUT, the @hostname portion is not optional \- it is the @ character which enables Repeater Mode\&. To refer to an UPS on the same host as \fBdummy\-ups\fR, use port = upsname@localhost\&. -.sp -Note that to avoid CPU overload with an infinite loop, the driver "sleeps" a bit between data\-requesting cycles (currently this delay is hardcoded to one second), so propagation of data updates available to a remote upsd may lag by this much\&. .SH "INTERACTION" .sp Once the driver is loaded in dummy mode, you can change any variables, except those of the driver\&.* and server\&.* collections\&. You can do this by either editing the definition file, or use the \fBupsrw\fR(1) and \fBupscmd\fR(1) commands\&. .sp -Note that in simulation mode, new variables can be added on the fly, but only by adding these to the definition file (and waiting for it to be re\-read)\&. That is, the driver should not allow to define a new variable via upsrw\&. +Note that in simulation mode, new variables can be added on the fly, by adding these to the definition file\&. Conversely, if you need to remove variable (such as transient ones, like ups\&.alarm), simply update these by setting an empty value\&. As a result, they will get removed from the data\&. .sp -Conversely, if you need to remove a variable (such as transient ones, like ups\&.alarm), simply update these by setting an empty value\&. As a result, they will get removed from the data\&. -.sp -In repeater mode, the driver acts according to the capabilities of the UPS, and so supports the same instant commands and settable values\&. +In repeater mode, the driver acts according to the capabilities of the UPS, and so support the same instant commands and settable values\&. .SH "BACKGROUND" .sp -Dummy Mode was originally written in one evening to replace the previous \fIdummycons\fR testing driver, which was too limited, and required a terminal for interaction\&. +Dummy Mode was originally written in one evening to replace the previous dummycons testing driver, which was too limited, and required a terminal for interaction\&. .sp \fBdummy\-ups\fR is useful for NUT client development, and other testing purposes\&. .sp It also helps the NUT Quality Assurance effort, by automating some tests on the NUT framework\&. .sp -It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs), or perhaps represent the same device which supports several communication protocols and different media (Serial, USB, SNMP\&...) +It now offers a repeater mode\&. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices (either UPS, PDUs)\&. .SH "BUGS" .sp Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition\&. -.SH "CAVEATS" -.sp -If you use service management frameworks like systemd or SMF to manage the dependencies between driver instances and the data server, and some of these drivers are dummy\-ups in repeater mode representing data from another driver running on the same system, then you may have to set up special dependencies (e\&.g\&. with systemd "drop\-in" snippet files) to allow your nut\-server to start after the "real" device drivers and before such repeater drivers (without a responding server, they would fail to start anyway)\&. This may also need special care in upsd\&.conf and/or ups\&.conf files to not block the system start\-up for too long while the repeater driver has not started\&. .SH "AUTHOR" .sp Arnaud Quette .SH "SEE ALSO" .sp \fBupscmd\fR(1), \fBupsrw\fR(1), \fBups.conf\fR(5), \fBnutupsdrv\fR(8) -.SS "Clone driver:" -.sp -The "repeater" mode of \fIdummy\-ups\fR driver is in some ways similar to the \fIclone\fR driver, which sits on top of another driver socket, and allows users to group clients to a particular outlet of a device and deal with this output as if it were a normal UPS\&. -.sp -\fBclone\fR(8) .SS "Internet Resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/dummy-ups.txt b/docs/man/dummy-ups.txt index e3ed2f6..385f5be 100644 --- a/docs/man/dummy-ups.txt +++ b/docs/man/dummy-ups.txt @@ -3,262 +3,141 @@ DUMMY-UPS(8) NAME ---- - dummy-ups - Driver for multi-purpose UPS emulation NOTE ---- - This man page only documents the specific features of the -*dummy-ups* driver. For information about the core driver, see +dummy-ups driver. For information about the core driver, see linkman:nutupsdrv[8]. DESCRIPTION ----------- - This program is a multi-purpose UPS emulation tool. -Its general behavior depends on the running mode: "dummy" ("dummy-once" -or "dummy-loop"), or "repeater". -//////////////////////////////////////// -...or "meta" eventually. -//////////////////////////////////////// +Its behavior depends on the running mode: Dummy Mode ~~~~~~~~~~ -In this mode, *dummy-ups* looks like a standard NUT device driver to -linkman:upsd[8] and allows one to change any value for testing purposes. -It is both interactive, controllable through the linkman:upsrw[1] and -linkman:upscmd[1] commands (or equivalent graphical tool), and batchable -through script files. It can be configured, launched and used as any other -"real" NUT driver. This mode is mostly useful for development and testing -purposes. - -NOTE: See below about the differences of `dummy-once` vs. `dummy-loop` -modes -- the former may be more suitable for "interactive" uses and tests. +*dummy-ups* looks like a standard device driver to linkman:upsd[8] and +allows one to change any value for testing purposes. It is both interactive, +controllable through the linkman:upsrw[1] and linkman:upscmd[1] commands (or +equivalent graphical tool), and batchable through script files. It can be +configured, launched and used as any other real driver. This mode is mostly +useful for development and testing purposes. Repeater Mode ~~~~~~~~~~~~~ -In this mode, *dummy-ups* acts as a NUT client, simply forwarding data. -This can be useful for supervision purposes. This mode can also allow some -load sharing between several `upsd` instances communicating with ultimate -NUT clients, with a "central" one using a point-to-point communication with -the UPS. This arrangement can also help with networked UPSes, whose network -management cards can be overwhelmed with a farm of servers directly polling -SNMP or other protocols every few seconds. - -//////////////////////////////////////// -Future intention: Meta mode to aggregate several drivers as one device -e.g. to represent same UPS with Serial + USB + SNMP links, and/or cover -an SNMP UPS that supports different data in different MIBs. -//////////////////////////////////////// +*dummy-ups* acts as a NUT client, simply forwarding data. This can be useful +for supervision purposes. This can also allow some load sharing between several +UPS instances, using a point-to-point communication with the UPS. IMPLEMENTATION -------------- -The `port` specification in `ups.conf` depends on the running mode, and allows -the driver to select the right mode of operation. - -Since NUT v2.8.0, the `mode` specification in `ups.conf` allows users to -override the mode of operation which would be otherwise guessed by the driver. +The port specification depends on the running mode, and allows the driver to +select the right mode. Dummy Mode ~~~~~~~~~~ -In this context, `port` in the `ups.conf` block defines a file name for the -*dummy-ups* to read data from. This can either be an absolute or a relative -path name. In the latter case the NUT sysconfig directory (i.e. `/etc/nut`, -`/usr/local/ups/etc`, ...) is prepended. - -Since NUT v2.8.0 two aspects of this mode are differentiated: - -* `dummy-once` reads the specified file once to the end (interrupting for - `TIMER` lines, etc.) and does not re-process it until the filesystem - timestamp of the data file is changed; this reduces run-time stress if - you test with a lot of dummy devices, and allows use/test cases to - `upsrw` variables into the driver instance -- and they remain in memory - until the driver is restarted (or the file is touched or modified); -+ -Since NUT v2.8.0 `dummy-once` is assigned by default to files with a `*.dev` - naming pattern. - -* `dummy-loop` reads the specified file again and again, with a short sleep - between the processing cycles; for sequence files using a `TIMER` keyword - (see below), or for use/test cases which modify file contents with external - means, this allows an impression of a device whose state changes over time. -+ -Before NUT v2.8.0 this was the only aspect, so a simple `dummy` mode value - maps to this behavior for backwards compatibility. -+ -Since NUT v2.8.0 `dummy-loop` is assigned by default to files with a `*.seq` - naming pattern, and `dummy` is assigned by default to files with other - naming patterns that the driver could not classify. - -[NOTE] -====== -Said defaulting based on filename pattern can break third-party -test scripts which earlier expected `*.dev` files to work as a -looping sequence with a `TIMER` keywords to change values slowly. -Now such files should get processed to the end once. - -Specify `mode=dummy-loop` driver option or rename the data file -used in the `port` option for legacy behavior. - -Use/Test-cases which modified such files content externally should -not be impacted. -====== +Port is a definition file name for *dummy-ups*. This can either +be an absolute or a relative path name. In the latter case the NUT +sysconfig directory (ie /etc/nut, /usr/local/ups/etc, ...) is prepended. For instance: - [dummy1] + [dummy] driver = dummy-ups - port = evolution500.seq - desc = "dummy-ups in dummy-loop mode" + port = evolution500.dev + desc = "dummy-ups in dummy mode" - [dummy2] - driver = dummy-ups - port = epdu-managed.dev - desc = "dummy-ups in dummy-once mode" +This file is generally named "something.dev". It contains a list of all +valid data and associated values, and has the same format as an linkman:upsc[8] +dump (: ). So you can easily create definition +files from an existing UPS using "upsc > file.dev". +It can also be empty, in which case only a basic set of data is available: +device.*, driver.*, ups.mfr, ups.model, ups.status -This file is generally named `something.dev` or `something.seq`. It contains -a list of all valid variables and associated values (you can later use `upsrw` -only to modify values of these variables), and has the same format as an -linkman:upsc[8] dump (`: `). So you can easily create -definition files from an existing UPS using `upsc > file.dev`. +Samples definition files are available in the "data" directory of the nut source +tree, and generally in the sysconfig directory of your system distribution. -Note that the Network UPS project provides an extensive -link:https://networkupstools.org/ddl/index.html[DDL (Devices Dumps Library)] -with files which can be used for modelling real devices. -Entries for the DDL library are best prepared with the -link:https://raw.githubusercontent.com/networkupstools/nut/master/tools/nut-ddl-dump.sh[`tools/nut-ddl-dump.sh`] -script from NUT sources instead of plain `upsc`, to provide some additional -data points from other NUT clients as well. +Since *dummy-ups* will loop on reading this file, you can dynamically modify +it to interact with the driver. This will avoid message spam into your +system log files, if you are using NUT default configuration. -The file can also be empty, in which case only a basic set of data is -available: `device.*`, `driver.*`, `ups.mfr`, `ups.model`, `ups.status` -as filled by the driver itself. - -Some sample definition files are available in the `data` directory of the -NUT source tree, and generally in the sysconfig or share directory of your -system distribution. - -Since *dummy-ups* will usually loop on reading this file, you can dynamically -modify it with some external process to "interact" with the driver. -This will avoid message spam into your system log files, if you are -using NUT default configuration. - -NOTE: By default since NUT v2.8.0, it will not loop on files in `dummy-once` -mode, e.g. those with a `.dev` extension, unless their timestamp changes. - -You can also use the `TIMER ` instruction to create scheduled event -sequences (such files are traditionally named with the `.seq` extension). -For example, the following sequence will loop on switching `ups.status` +You can also use the "TIMER " instruction to create scheduled events +sequences. For example, the following sequence will loop on switching ups.status between "OL", "OB" and "OB LB" every minute: ups.status: OL TIMER 60 ups.status: OB TIMER 60 - ups.status: OB LB + ups.status: LB TIMER 60 -It is wise to end the script for `dummy-loop` mode with a `TIMER` keyword. -Otherwise `dummy-ups` will directly go back to the beginning of the file -and, in particular, forget any values you could have just set with `upsrw`. - -Note that to avoid CPU overload with an infinite loop, the driver "sleeps" -a bit between file-reading cycles (currently this delay is hardcoded to one -second), independently of (and/or in addition to) any `TIMER` keywords. +It is wise to end the script with a TIMER. Otherwise dummy-ups will directly +go back to the beginning of the file. Repeater Mode ~~~~~~~~~~~~~ -In this context, `port` in the `ups.conf` block is the name of a remote UPS, -using the NUT format, i.e.: +Port is the name of a remote UPS, using the NUT form, ie: @[:] For instance: - [repeater] + [repeater] driver = dummy-ups - port = ups1@remotehost + port = ups@hostname desc = "dummy-ups in repeater mode" Unlike UPS specifications in the rest of NUT, the `@hostname` portion is not optional - it is the `@` character which enables Repeater Mode. To refer to an UPS on the same host as *dummy-ups*, use `port = upsname@localhost`. -Note that to avoid CPU overload with an infinite loop, the driver "sleeps" a -bit between data-requesting cycles (currently this delay is hardcoded to one -second), so propagation of data updates available to a remote `upsd` may lag -by this much. - INTERACTION ----------- Once the driver is loaded in dummy mode, you can change any variables, except -those of the `driver.*` and `server.*` collections. +those of the driver.* and server.* collections. You can do this by either editing the definition file, or use the linkman:upsrw[1] and linkman:upscmd[1] commands. -Note that in simulation mode, new variables can be added on the fly, but only -by adding these to the definition file (and waiting for it to be re-read). -That is, the driver should not allow to define a new variable via `upsrw`. +Note that in simulation mode, new variables can be added on the fly, by +adding these to the definition file. Conversely, if you need to remove +variable (such as transient ones, like ups.alarm), simply update these +by setting an empty value. As a result, they will get removed from the data. -Conversely, if you need to remove a variable (such as transient ones, like -`ups.alarm`), simply update these by setting an empty value. As a result, -they will get removed from the data. - -In repeater mode, the driver acts according to the capabilities of the UPS, -and so supports the same instant commands and settable values. +In repeater mode, the driver acts according to the capabilities of the UPS, and +so support the same instant commands and settable values. BACKGROUND ---------- Dummy Mode was originally written in one evening to replace the previous -'dummycons' testing driver, which was too limited, and required a terminal -for interaction. +dummycons testing driver, which was too limited, and required a terminal for +interaction. *dummy-ups* is useful for NUT client development, and other testing purposes. -It also helps the NUT Quality Assurance effort, by automating some tests on -the NUT framework. +It also helps the NUT Quality Assurance effort, by automating some tests on the +NUT framework. It now offers a repeater mode. This will help in building the Meta UPS approach, which allows one to build a virtual device, composed of several other devices -(either UPS, PDUs), or perhaps represent the same device which supports -several communication protocols and different media (Serial, USB, SNMP...) +(either UPS, PDUs). BUGS ---- - Instant commands are not yet supported in Dummy Mode, and data need name/value checking enforcement, as well as boundaries or enumeration definition. -CAVEATS -------- - -If you use service management frameworks like systemd or SMF to manage -the dependencies between driver instances and the data server, and some -of these drivers are `dummy-ups` in repeater mode representing data -from another driver running on the same system, then you may have to -set up special dependencies (e.g. with systemd "drop-in" snippet files) -to allow your `nut-server` to start after the "real" device drivers and -before such repeater drivers (without a responding server, they would fail -to start anyway). This may also need special care in `upsd.conf` and/or -`ups.conf` files to not block the system start-up for too long while the -repeater driver has not started. - -////////////////////////////////////// -TODO later: declare the driver as "optional", see -https://github.com/networkupstools/nut/issues/1389 -////////////////////////////////////// - AUTHOR ------ - Arnaud Quette SEE ALSO @@ -269,17 +148,6 @@ linkman:upsrw[1], linkman:ups.conf[5], linkman:nutupsdrv[8] -Clone driver: -~~~~~~~~~~~~~ - -The "repeater" mode of 'dummy-ups' driver is in some ways similar to the -'clone' driver, which sits on top of another driver socket, and allows -users to group clients to a particular outlet of a device and deal with -this output as if it were a normal UPS. - -linkman:clone[8] - Internet Resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/etapro.8 b/docs/man/etapro.8 index e9c3c95..1a22ae7 100644 --- a/docs/man/etapro.8 +++ b/docs/man/etapro.8 @@ -1,13 +1,13 @@ '\" t .\" Title: etapro .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "ETAPRO" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "ETAPRO" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/etapro.txt b/docs/man/etapro.txt index 86d9212..3b827e2 100644 --- a/docs/man/etapro.txt +++ b/docs/man/etapro.txt @@ -3,41 +3,33 @@ ETAPRO(8) NAME ---- - etapro - Driver for ETA UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the etapro driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports ETA UPS equipment with the "PRO" option for smart mode. EXTRA ARGUMENTS --------------- - This driver does not support any extra settings in the linkman:ups.conf[5]. AUTHOR ------ - Marek Michalkiewicz SEE ALSO -------- - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/everups.8 b/docs/man/everups.8 index 66df659..59a9e4c 100644 --- a/docs/man/everups.8 +++ b/docs/man/everups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: everups .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "EVERUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "EVERUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/everups.txt b/docs/man/everups.txt index 7700982..cf01bc0 100644 --- a/docs/man/everups.txt +++ b/docs/man/everups.txt @@ -3,25 +3,22 @@ EVERUPS(8) NAME ---- - everups - Driver for Ever UPS models NOTE ---- - This man page only documents the hardware-specific features of the everups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver should recognize the NET *-DPC and AP *-PRO models. EXTRA ARGUMENTS --------------- -This driver does not support any extra settings in the +This driver does not support any extra settings in the linkman:ups.conf[5]. BUGS @@ -33,7 +30,6 @@ don't sleep and force a reboot. AUTHOR ------ - Bartek Szady SEE ALSO @@ -41,10 +37,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/gamatronic.8 b/docs/man/gamatronic.8 index 2fdb3a9..2453623 100644 --- a/docs/man/gamatronic.8 +++ b/docs/man/gamatronic.8 @@ -1,13 +1,13 @@ '\" t .\" Title: gamatronic .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "GAMATRONIC" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "GAMATRONIC" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/gamatronic.txt b/docs/man/gamatronic.txt index 9512295..ac9db3f 100644 --- a/docs/man/gamatronic.txt +++ b/docs/man/gamatronic.txt @@ -3,19 +3,16 @@ GAMATRONIC(8) NAME ---- - gamatronic - Driver for Gamatronic UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the gamatronic driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - Various - Rebuilt to work with Gamatronic UPS Units, but should recognize any UPS that speaks the SEC protocol at 1200-19200 bps. @@ -27,7 +24,6 @@ linkman:ups.conf[5]. AUTHOR ------ - Nadav Moskovitch SEE ALSO @@ -35,10 +31,8 @@ SEE ALSO The core driver ~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/generic_modbus.8 b/docs/man/generic_modbus.8 deleted file mode 100644 index cc2fd34..0000000 --- a/docs/man/generic_modbus.8 +++ /dev/null @@ -1,355 +0,0 @@ -'\" t -.\" Title: generic_modbus -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "GENERIC_MODBUS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -generic_modbus \- Driver for contact (direct) signal UPS devices connected via modbus remote I/O gateways -.SH "SYNOPSIS" -.sp -\fBgeneric_modbus\fR \-h -.sp -\fBgeneric_modbus\fR \-a \fIDEVICE_NAME\fR [\fIOPTIONS\fR] -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This man page only documents the specific features of the \fBgeneric_modbus\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -This is a generic modbus driver expected to work with contact (direct) signal UPS devices, connected via modbus RIO (remote I/O) either serial or TCP/IP\&. -.sp -The driver has been tested against PULS UPS (model UB40\&.241) via MOXA ioLogikR1212 (RS485) and ioLogikE1212 (TCP/IP)\&. -.PP -More information about this UPS can be found here: -.RS 4 -https://products\&.pulspower\&.com/ca/ubc10\-241\-n1\&.html -.RE -.PP -More information about Moxa ioLogik R1212, E1212 can be found here: -.RS 4 -https://www\&.moxa\&.com/en/products/industrial\-edge\-connectivity/controllers\-and\-ios -.RE -.sp -The PULS UPS UB40\&.241 supports the following signals: -.sp -.if n \{\ -.RS 4 -.\} -.nf -Ready contact (DO) <\-\-> HB -Buffering contact (DO) <\-\-> OL | OB -Battery\-low (DO) <\-\-> LB -Replace Battery (DO) <\-\-> RB -Inhibit (DI) <\-\-> FSD -.fi -.if n \{\ -.RE -.\} -.sp -Digital port direction (DI/DO) assumes the device perspective -.sp -The driver\(cqs concept is to map the UPS states (as defined in NUT) onto UPS contacts\*(Aq states\&. The driver has an extended configuration interface implemented using variables defined in ups\&.conf\&. -.SH "HARDWARE INTERCONNECTION" -.sp -The commission of modbus remote I/O server as well as UPS device is carried out following the corresponding instruction manuals\&. The following figure depicts the anticipated communication path and hardware interconnection: -.sp -.if n \{\ -.RS 4 -.\} -.nf -+\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-+ -| UPSD | <\-\-\-> | GENERIC_MODBUS | <\-\-\-> | MODBUS RIO | <\-\-\-> | UPS DEVICE | -+\-\-\-\-\-\-+ (1) +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ (2) +\-\-\-\-\-\-\-\-\-\-\-\-+ (3) +\-\-\-\-\-\-\-\-\-\-\-\-+ - | | - +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ - HOST CONTROLLER - -(1) Unix IPC -(2) RS232 | TCP/IP -(3) contacts -.fi -.if n \{\ -.RE -.\} -.SH "EXTRA ARGUMENTS" -.sp -This driver supports the following optional settings in the \fBups.conf\fR(5) file: -.SS "Generic:" -.PP -\fBdevice_mfr\fR=\fIvalue\fR -.RS 4 -A string specifying the manufacturer of the UPS device (default UNKNOWN)\&. -.RE -.PP -\fBdevice_model\fR=\fIvalue\fR -.RS 4 -A string specifying the model of the UPS device (default UNKNOWN)\&. -.RE -.SS "Serial:" -.PP -\fBser_baud_rate\fR=\fIvalue\fR -.RS 4 -A integer specifying the serial port baud rate (default 9600)\&. -.RE -.PP -\fBser_data_bit\fR=\fIvalue\fR -.RS 4 -A integer specifying the serial port data bit (default 8)\&. -.RE -.PP -\fBser_parity\fR=\fIvalue\fR -.RS 4 -A character specifying the serial port parity (default N)\&. -.RE -.PP -\fBser_stop_bit\fR=\fIvalue\fR -.RS 4 -An integer specifying the serial port stop bit (default 1)\&. -.RE -.SS "Modbus:" -.PP -\fBrio_slave_id\fR=\fIvalue\fR -.RS 4 -An integer specifying the RIO modbus slave ID (default 1)\&. -.RE -.SS "States (X = OL, OB, LB, HB, RB, CHRG, DISCHRG, FSD)" -.PP -\fB_addr\fR=\fIvalue\fR -.RS 4 -A number specifying the modbus address for the X state\&. -.RE -.PP -\fB_regtype\fR=\fIvalue\fR -.RS 4 -A number specifying the modbus register type for the X state -.RE -.PP -Default values: -.RS 4 -.sp -.if n \{\ -.RS 4 -.\} -.nf -1 for X = OL, OB, LB ,HB, RB, CHRG, DISCHRG -0 for X = FSD -.fi -.if n \{\ -.RE -.\} -.RE -.PP -Valid values: -.RS 4 -.sp -.if n \{\ -.RS 4 -.\} -.nf -0:COIL, 1:INPUT_B, 2:INPUT_R, 3:HOLDING -.fi -.if n \{\ -.RE -.\} -.RE -.PP -\fB_noro\fR=\fIvalue\fR -.RS 4 -A number specifying the contact configuration for the X state (default 1)\&. -.RE -.PP -Valid values: -.RS 4 -.sp -.if n \{\ -.RS 4 -.\} -.nf -0:NC, 1:NO -.fi -.if n \{\ -.RE -.\} -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -NO stands for normally open and NC for normally closed contact -.sp .5v -.RE -.RE -.SS "Shutdown" -.PP -\fBFSD_pulse_duration\fR=\fIvalue\fR -.RS 4 -A number specifying the duration in ms for the inhibit pulse\&. If it\(cqs not defined, signal has only one transition depending on FSD_noro configuration\&. -.sp -Examples for FSD signal configuration: -.RE -.sp -.if n \{\ -.RS 4 -.\} -.nf -FSD_noro = 1 -FSD_pulse_duration = 150 - - +\-\-\-\-\-+ - | | -inhibit pulse >\-\-\-\-\-+ +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> - <\-\-\-> - 150ms - - -FSD_noro = 0 - -inhibit pulse >\-\-\-\-\-+ - | - +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> -.fi -.if n \{\ -.RE -.\} -.SH "CONFIGURATION" -.sp -Here is an example of generic_modbus driver configuration in \fBups\&.conf\fR file: -.sp -.if n \{\ -.RS 4 -.\} -.nf -[generic_modbus] - driver = generic_modbus - port = /dev/ttyUSB0 - desc = "generic ups driver" - # device info - device_mfr = "PULS" - device_model = "UB40\&.241" - # serial settings - ser_baud_rate = 9600 - ser_parity = N - ser_data_bit = 8 - ser_stop_bit = 1 - # modbus slave id - rio_slave_id = 5 - # UPS signal state attributes - OB_addr = 0x0 - OB_regtype = 1 - OB_noro = 0 - LB_addr = 0x1 - LB_regtype = 1 - HB_addr = 0x2 - HB_regtype = 1 - RB_addr = 0x3 - RB_regtype = 1 - FSD_addr = 0x0 - FSD_regtype = 0 - FSD_pulse_duration = 150 -.fi -.if n \{\ -.RE -.\} -.SH "INSTANT COMMANDS" -.sp -This driver support the following instant commands: -.PP -load\&.off -.RS 4 -executes "instant poweroff" -.RE -.SH "INSTALLATION" -.sp -This driver is not built by default\&. You can build it by installing libmodbus and running configure \-\-with\-modbus=yes\&. -.sp -You also need to give proper permissions on the local serial device file (/dev/ttyUSB0 for example) to allow the run\-time NUT driver user account to access it\&. -.SH "OTHER NOTES" -.sp -The generic_modbus driver intends to support generic UPS devices with contact signals through modbus TCP/RTU gateways (also known as RIO \(em remote I/Os)\&. The data and signal path looks like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -[UPSD] <\-\-\- IPC \-\-\-> [GENERIC_UPS] <\-\-\- modbus TCP/RTU \-\-\-> MODBUS\-RIO <\-\-\- contacts \-\-\-> [UPS DEVICE] -.fi -.if n \{\ -.RE -.\} -.sp -On the other hand, you can setup any kind of modbus server, and configure the generic_modbus driver to connect and read or write specific registers\&. Your application / modbus server could then drive NUT statuses (e\&.g\&. OL, OB, HB etc) by writing over those registers\&. -.SH "AUTHOR" -.sp -Dimitris Economou -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8), \fBups.conf\fR(5) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -libmodbus home page: -http://libmodbus\&.org -.RE diff --git a/docs/man/generic_modbus.txt b/docs/man/generic_modbus.txt deleted file mode 100644 index 37f9de6..0000000 --- a/docs/man/generic_modbus.txt +++ /dev/null @@ -1,247 +0,0 @@ -GENERIC_MODBUS(8) -================= - -NAME ----- - -generic_modbus - Driver for contact (direct) signal UPS devices connected via modbus remote I/O gateways - -SYNOPSIS --------- - -*generic_modbus* -h - -*generic_modbus* -a 'DEVICE_NAME' ['OPTIONS'] - -NOTE: This man page only documents the specific features of the *generic_modbus* -driver. For information about the core driver, see linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This is a generic modbus driver expected to work with contact (direct) signal -UPS devices, connected via modbus RIO (remote I/O) either serial or TCP/IP. - -The driver has been tested against PULS UPS (model UB40.241) -via MOXA ioLogikR1212 (RS485) and ioLogikE1212 (TCP/IP). - -More information about this UPS can be found here: :: -https://products.pulspower.com/ca/ubc10-241-n1.html - -More information about Moxa ioLogik R1212, E1212 can be found here: :: -https://www.moxa.com/en/products/industrial-edge-connectivity/controllers-and-ios - -The PULS UPS UB40.241 supports the following signals: ----- -Ready contact (DO) <--> HB -Buffering contact (DO) <--> OL | OB -Battery-low (DO) <--> LB -Replace Battery (DO) <--> RB -Inhibit (DI) <--> FSD ----- - -Digital port direction (DI/DO) assumes the device perspective - -The driver's concept is to map the UPS states (as defined in NUT) onto -UPS contacts' states. The driver has an extended configuration interface -implemented using variables defined in ups.conf. - -HARDWARE INTERCONNECTION ------------------------- - -The commission of modbus remote I/O server as well as UPS device is carried -out following the corresponding instruction manuals. The following figure -depicts the anticipated communication path and hardware interconnection: ----- -+------+ +----------------+ +------------+ +------------+ -| UPSD | <---> | GENERIC_MODBUS | <---> | MODBUS RIO | <---> | UPS DEVICE | -+------+ (1) +----------------+ (2) +------------+ (3) +------------+ - | | - +-------------------+ - HOST CONTROLLER - -(1) Unix IPC -(2) RS232 | TCP/IP -(3) contacts ----- - -EXTRA ARGUMENTS ---------------- - -This driver supports the following optional settings in the -linkman:ups.conf[5] file: - -Generic: -~~~~~~~ - -*device_mfr*='value':: -A string specifying the manufacturer of the UPS device (default UNKNOWN). - -*device_model*='value':: -A string specifying the model of the UPS device (default UNKNOWN). - -Serial: -~~~~~~ - -*ser_baud_rate*='value':: -A integer specifying the serial port baud rate (default 9600). - -*ser_data_bit*='value':: -A integer specifying the serial port data bit (default 8). - -*ser_parity*='value':: -A character specifying the serial port parity (default N). - -*ser_stop_bit*='value':: -An integer specifying the serial port stop bit (default 1). - -Modbus: -~~~~~~ - -*rio_slave_id*='value':: -An integer specifying the RIO modbus slave ID (default 1). - -States (X = OL, OB, LB, HB, RB, CHRG, DISCHRG, FSD) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*_addr*='value':: -A number specifying the modbus address for the X state. - -*_regtype*='value':: -A number specifying the modbus register type for the X state -Default values: :: -+ ----- -1 for X = OL, OB, LB ,HB, RB, CHRG, DISCHRG -0 for X = FSD ----- -Valid values: :: -+ ----- -0:COIL, 1:INPUT_B, 2:INPUT_R, 3:HOLDING ----- - -*_noro*='value':: -A number specifying the contact configuration for the X state (default 1). -Valid values: :: -+ ----- -0:NC, 1:NO ----- -+ -NOTE: NO stands for normally open and NC for normally closed contact - -Shutdown -~~~~~~~~ - -*FSD_pulse_duration*='value':: -A number specifying the duration in ms for the inhibit pulse. -If it's not defined, signal has only one transition depending -on FSD_noro configuration. -+ -Examples for FSD signal configuration: ----- -FSD_noro = 1 -FSD_pulse_duration = 150 - - +-----+ - | | -inhibit pulse >-----+ +------------------> - <---> - 150ms - - -FSD_noro = 0 - -inhibit pulse >-----+ - | - +------------------------> - ----- - -CONFIGURATION -------------- - -Here is an example of generic_modbus driver configuration in *ups.conf* file: ----- -[generic_modbus] - driver = generic_modbus - port = /dev/ttyUSB0 - desc = "generic ups driver" - # device info - device_mfr = "PULS" - device_model = "UB40.241" - # serial settings - ser_baud_rate = 9600 - ser_parity = N - ser_data_bit = 8 - ser_stop_bit = 1 - # modbus slave id - rio_slave_id = 5 - # UPS signal state attributes - OB_addr = 0x0 - OB_regtype = 1 - OB_noro = 0 - LB_addr = 0x1 - LB_regtype = 1 - HB_addr = 0x2 - HB_regtype = 1 - RB_addr = 0x3 - RB_regtype = 1 - FSD_addr = 0x0 - FSD_regtype = 0 - FSD_pulse_duration = 150 ----- - -INSTANT COMMANDS ----------------- - -This driver support the following instant commands: - -load.off:: -executes "instant poweroff" - -INSTALLATION ------------- - -This driver is not built by default. You can build it by installing -libmodbus and running `configure --with-modbus=yes`. - -You also need to give proper permissions on the local serial device -file (/dev/ttyUSB0 for example) to allow the run-time NUT driver user -account to access it. - -OTHER NOTES ------------ - -The `generic_modbus` driver intends to support generic UPS devices with -contact signals through modbus TCP/RTU gateways (also known as RIO -- -remote I/Os). The data and signal path looks like this: - ----- -[UPSD] <--- IPC ---> [GENERIC_UPS] <--- modbus TCP/RTU ---> MODBUS-RIO <--- contacts ---> [UPS DEVICE] ----- - -On the other hand, you can setup any kind of modbus server, and configure -the `generic_modbus` driver to connect and read or write specific registers. -Your application / modbus server could then drive NUT statuses (e.g. OL, OB, -HB etc) by writing over those registers. - -AUTHOR ------- - -Dimitris Economou - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8], linkman:ups.conf[5] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* libmodbus home page: http://libmodbus.org diff --git a/docs/man/genericups.8 b/docs/man/genericups.8 index 77b8ff1..591a0b8 100644 --- a/docs/man/genericups.8 +++ b/docs/man/genericups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: genericups -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "GENERICUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "GENERICUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ This man page only documents the specific features of the genericups driver\&. F .sp This driver supports hardware from many different manufacturers as it only uses the very simplest of signaling schemes\&. Contact closure refers to a kind of interface where basic high/low signals are provided to indicate status\&. This kind of UPS can only report line power and battery status\&. .sp -This means that you will only get the essentials in ups\&.status: OL, OB, and LB (some UPSes may also support RB and BYPASS)\&. Anything else requires a smarter UPS\&. +This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. Anything else requires a smarter UPS\&. .SH "CABLING" .sp Cabling is different for every kind of UPS\&. See the table below for information on what is known to work with a given UPS type\&. @@ -137,16 +137,6 @@ LB Low battery .RE .PP -RB -.RS 4 -Replace battery -.RE -.PP -BYPASS -.RS 4 -Battery bypass active or no battery installed -.RE -.PP SD .RS 4 Shutdown load @@ -182,27 +172,10 @@ DTR Data Terminal Ready\&. Sent by the PC\&. .RE .PP -DSR -.RS 4 -Data Set Ready\&. Received from the UPS\&. -.RE -.PP ST .RS 4 Send a BREAK on the transmit data line .RE -.PP -NULL -.RS 4 -Disable this signal\&. Disabled signal will always be low except for OL which will always be high\&. -.RE -.PP -none -.RS 4 -Alias to -NULL -which matches some other documentation\&. -.RE .sp A "\-" in front of a signal name (like \-RNG) means that the indicated condition is signaled with an active low signal\&. For example, [LB=\-RNG] means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high\&. .SH "UPS TYPES" @@ -502,18 +475,6 @@ Check docs/cables/powerware\&.txt .if n \{\ .RE .\} -.sp -23 = Generic FTTx (Fiber to the x) battery backup with 4\-wire telemetry interface -.sp -.if n \{\ -.RS 4 -.\} -.nf -[CP=RTS] [OL=CTS] [LB=\-DCD] [RB=\-RNG] [BYPASS=\-DSR] [SD=none] -.fi -.if n \{\ -.RE -.\} .SH "SIMILAR MODELS" .sp Many different UPS companies make models with similar interfaces\&. The RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores\&. If your UPS works with an entry in the table above, but the model or manufacturer information don\(cqt match, don\(cqt despair\&. You can fix that easily by using the mfr and model variables documented above in your \fBups.conf\fR(5)\&. @@ -620,13 +581,13 @@ Types 7 and 10 should both work with the PhoenixTec A1000\&. .sp There is no way to reliably detect a contact\-closure UPS\&. This means the driver will start up happily even if no UPS is detected\&. It also means that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software\&. .sp -Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using secondary \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. .sp The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. .SH "SEE ALSO" .SS "The core driver" .sp \fBnutupsdrv\fR(8) -.SS "Internet resources:" +.SS "Internet resources" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/genericups.txt b/docs/man/genericups.txt index 54c4a6b..c54a10d 100644 --- a/docs/man/genericups.txt +++ b/docs/man/genericups.txt @@ -3,36 +3,30 @@ GENERICUPS(8) NAME ---- - genericups - Driver for contact-closure UPS equipment NOTE ---- - -This man page only documents the specific features of the genericups +This man page only documents the specific features of the genericups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - -This driver supports hardware from many different manufacturers as it only -uses the very simplest of signaling schemes. Contact closure refers to a -kind of interface where basic high/low signals are provided to indicate +This driver supports hardware from many different manufacturers as it only +uses the very simplest of signaling schemes. Contact closure refers to a +kind of interface where basic high/low signals are provided to indicate status. This kind of UPS can only report line power and battery status. This means that you will only get the essentials in ups.status: OL, OB, -and LB (some UPSes may also support RB and BYPASS). Anything else requires -a smarter UPS. +and LB. Anything else requires a smarter UPS. CABLING ------- - -Cabling is different for every kind of UPS. See the table below for +Cabling is different for every kind of UPS. See the table below for information on what is known to work with a given UPS type. EXTRA ARGUMENTS --------------- - This driver supports the following settings in the linkman:ups.conf[5]: upstype='type':: @@ -43,25 +37,25 @@ are available. mfr='string':: -Optional. The very nature of a generic UPS driver sometimes means that -the stock manufacturer data has no relation to the actual hardware that is -attached. With the `mfr` setting, you can change the value that is seen by +Optional. The very nature of a generic UPS driver sometimes means that +the stock manufacturer data has no relation to the actual hardware that is +attached. With the `mfr` setting, you can change the value that is seen by clients that monitor this UPS. model='string':: -Optional. This is like `mfr` above, but it overrides the model string +Optional. This is like `mfr` above, but it overrides the model string instead. serial='string':: Optional. This is like `mfr` above and intended to record the identification -string of the UPS. It is titled "serial" because usually this string is +string of the UPS. It is titled "serial" because usually this string is referred to as the serial number. sdtime='value':: -Optional. The driver will sleep for this many seconds after setting the +Optional. The driver will sleep for this many seconds after setting the shutdown signal. This is necessary for some hardware which requires a sustained level to activate the shutdown sequence. + @@ -94,18 +88,13 @@ recognizes a low battery condition when DCD is not held high. TYPE INFORMATION ---------------- - -The essence of a UPS definition in this driver is how it uses the serial +The essence of a UPS definition in this driver is how it uses the serial lines that are available. These are the abbreviations you will see below: OL:: On line (no power failure) (opposite of OB - on battery) LB:: Low battery -RB:: Replace battery - -BYPASS:: Battery bypass active or no battery installed - SD:: Shutdown load CP:: Cable power (must be present for cable to have valid reading) @@ -120,85 +109,78 @@ RNG:: Ring indicate. Received from the UPS. DTR:: Data Terminal Ready. Sent by the PC. -DSR:: Data Set Ready. Received from the UPS. - ST:: Send a BREAK on the transmit data line -NULL:: Disable this signal. Disabled signal will always be low except for OL - which will always be high. - -none:: Alias to `NULL` which matches some other documentation. - -A "-" in front of a signal name (like -RNG) means that the indicated -condition is signaled with an active low signal. For example, [LB=-RNG] -means the battery is low when the ring indicate line goes low, and that +A "-" in front of a signal name (like -RNG) means that the indicated +condition is signaled with an active low signal. For example, [LB=-RNG] +means the battery is low when the ring indicate line goes low, and that the battery is OK when that line is held high. UPS TYPES --------- -0 = UPSonic LAN Saver 600 +0 = UPSonic LAN Saver 600 [CP=DTR+RTS] [OL=-CTS] [LB=DCD] [SD=DTR] -1 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0095A/C cable +1 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0095A/C cable [CP=DTR] [OL=-RNG] [LB=DCD] [SD=RTS] -2 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0020B cable +2 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0020B cable [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR+RTS] Type 2 has also been reported to work with the 940-0020C cable. -3 = PowerTech Comp1000 with DTR cable power +3 = PowerTech Comp1000 with DTR cable power [CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS] -4 = Generic RUPS Model +4 = Generic RUPS Model [CP=RTS] [OL=CTS] [LB=-DCD] [SD=-RTS] -5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable) +5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable) [CP=DTR] [OL=CTS] [LB=-DCD] [SD=DTR+RTS] -6 = Best Patriot with INT51 cable +6 = Best Patriot with INT51 cable [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS] -7 = CyberPower Power99 +7 = CyberPower Power99 Also Upsonic Power Guardian PG-500, Belkin Belkin Home Office, F6H350-SER, F6H500-SER, F6H650-SER, Eaton Management Card Contact - Config3 with cable 66033 (shutdown does not work) [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] -8 = Nitram Elite 500 +8 = Nitram Elite 500 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???] -9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable +9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable [CP=none] [OL=-DCD] [LB=CTS] [SD=RTS] -10 = Victron Lite with crack cable +10 = Victron Lite with crack cable [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] -11 = Powerware 3115 +11 = Powerware 3115 [CP=DTR] [OL=-CTS] [LB=-DCD] [SD=ST] -12 = APC Back-UPS Office with 940-0119A cable +12 = APC Back-UPS Office with 940-0119A cable [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR] -13 = RPT Repoteck RPT-800A/RPT-162A +13 = RPT Repoteck RPT-800A/RPT-162A [CP=DTR+RTS] [OL=DCD] [LB=-CTS] [SD=ST] -14 = Online P-series +14 = Online P-series [CP=DTR] [OL=DCD] [LB=-CTS] [SD=RTS] @@ -237,26 +219,21 @@ UPS TYPES [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR] -23 = Generic FTTx (Fiber to the x) battery backup - with 4-wire telemetry interface - - [CP=RTS] [OL=CTS] [LB=-DCD] [RB=-RNG] [BYPASS=-DSR] [SD=none] - SIMILAR MODELS -------------- -Many different UPS companies make models with similar interfaces. The -RUPS cable seems to be especially popular in the "power strip" variety of +Many different UPS companies make models with similar interfaces. The +RUPS cable seems to be especially popular in the "power strip" variety of UPS found in office supply stores. If your UPS works with an entry in the table above, but the model or manufacturer information don't match, -don't despair. You can fix that easily by using the mfr and model +don't despair. You can fix that easily by using the mfr and model variables documented above in your linkman:ups.conf[5]. TESTING COMPATIBILITY --------------------- -If your UPS isn't listed above, you can try going through the list until -you find one that works. There is a lot of cable and interface reuse in +If your UPS isn't listed above, you can try going through the list until +you find one that works. There is a lot of cable and interface reuse in the UPS world, and you may find a match. To do this, first make sure nothing important is plugged into the @@ -267,7 +244,7 @@ supplied to the outlets. Now, you can either attempt to make an educated guess based on the documentation your manufacturer has provided (if any), or just start -going down the list. +going down the list. Step 1 ~~~~~~ @@ -342,20 +319,20 @@ Change the port and upstype values to match your system. NEW SUPPORT ----------- -If the above testing sequence fails, you will probably need to create a -new entry to support your hardware. All UPS types are determined from the +If the above testing sequence fails, you will probably need to create a +new entry to support your hardware. All UPS types are determined from the table in the genericups.h file in the source tree. -On a standard 9 pin serial port, there are 6 lines that are used as the -standard "high/low" signal levels. 4 of them are incoming (to the PC, -from the UPS), and the other 2 are outgoing (to the UPS, from the PC). +On a standard 9 pin serial port, there are 6 lines that are used as the +standard "high/low" signal levels. 4 of them are incoming (to the PC, +from the UPS), and the other 2 are outgoing (to the UPS, from the PC). The other 3 are the receive/transmit lines and the ground. -Be aware that many manufacturers remap pins within the cable. If you have -any doubts, a quick check with a multimeter should confirm whether the -cable is straight-through or not. Another thing to keep in mind is that -some cables have electronics in them to do special things. Some have -resistors and transistors on board to change behavior depending on what's +Be aware that many manufacturers remap pins within the cable. If you have +any doubts, a quick check with a multimeter should confirm whether the +cable is straight-through or not. Another thing to keep in mind is that +some cables have electronics in them to do special things. Some have +resistors and transistors on board to change behavior depending on what's being supplied by the PC. SPECIFIC MODEL NOTES @@ -363,17 +340,17 @@ SPECIFIC MODEL NOTES These have been contributed by users of this driver. -The Centralion CL series may power down the load if the driver starts up -with the UPS running on battery as the default line settings contain the +The Centralion CL series may power down the load if the driver starts up +with the UPS running on battery as the default line settings contain the shutdown sequence. - Neil Muller -The Tripp-Lite Internet Office 700 must be used with the black 73-0844 -cable instead of the gray 73-0743 cable. This entry should work with any -of their models with the Lan 2.2 interface - see the sticker by the DB9 +The Tripp-Lite Internet Office 700 must be used with the black 73-0844 +cable instead of the gray 73-0743 cable. This entry should work with any +of their models with the Lan 2.2 interface - see the sticker by the DB9 connector on the UPS. - Stephen Brown -Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724 -cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q +Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724 +cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q Giese Types 7 and 10 should both work with the PhoenixTec A1000. @@ -381,16 +358,16 @@ Types 7 and 10 should both work with the PhoenixTec A1000. BUGS ---- -There is no way to reliably detect a contact-closure UPS. This means the -driver will start up happily even if no UPS is detected. It also means -that if the connection between the UPS and computer is interrupted, you +There is no way to reliably detect a contact-closure UPS. This means the +driver will start up happily even if no UPS is detected. It also means +that if the connection between the UPS and computer is interrupted, you may not be able to sense this in software. -Most contact-closure UPSes will not power down the load if the line power -is present. This can create a race when using secondary linkman:upsmon[8] +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] systems. See the linkman:upsmon[8] man page for more information. -The solution to both of these problems is to upgrade to a smart protocol +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command. SEE ALSO @@ -398,10 +375,8 @@ SEE ALSO The core driver ~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +Internet resources +~~~~~~~~~~~~~~~~~~ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/hosts.conf.5 b/docs/man/hosts.conf.5 index 298105f..45ca6cc 100644 --- a/docs/man/hosts.conf.5 +++ b/docs/man/hosts.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: hosts.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "HOSTS\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "HOSTS\&.CONF" "5" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/hosts.conf.txt b/docs/man/hosts.conf.txt index 8d86ea8..273ae98 100644 --- a/docs/man/hosts.conf.txt +++ b/docs/man/hosts.conf.txt @@ -36,5 +36,4 @@ linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/huawei-ups2000.8 b/docs/man/huawei-ups2000.8 deleted file mode 100644 index 40ada33..0000000 --- a/docs/man/huawei-ups2000.8 +++ /dev/null @@ -1,489 +0,0 @@ -'\" t -.\" Title: huawei_ups2000 -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "HUAWEI_UPS2000" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -huawei-ups2000 \- Driver for Huawei UPS2000 (1kVA\-3kVA) UPS with USB or RS\-232 serial Modbus connection\&. -.SH "SYNOPSIS" -.sp -\fBhuawei\-ups2000\fR \-h -.sp -\fBhuawei\-ups2000\fR \-a \fIDEVICE_NAME\fR [\fIOPTIONS\fR] -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This man page only documents the hardware\-specific features of the huawei\-ups2000 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -This driver supports Huawei UPS2000 series, online (double conversion) UPS with the following characteristics\&. -.sp -.RS 4 -.ie n \{\ -\h'-04' 1.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 1." 4.2 -.\} -Output power: 1 kVA to 3 kVA (higher power models are unsupported)\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 2.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 2." 4.2 -.\} -Connection: USB or RS\-232 (USB is only supported on Linux 5\&.12 and newer kernels, read the section -\fBCabling\fR -carefully)\&. -.RE -.sp -The UPS2000 series has two variants: UPS2000\-A with a tower chassis, and UPS2000\-G with a rack\-mount chassis\&. Both should be equally supported, but more testers are needed\&. -.sp -Currently, it has been tested on the following models\&. -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -UPS2000\-A\-1KTTS (firmware: V2R1C1SPC40, P1\&.0\-D1\&.0) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -UPS2000\-A\-2KTTS (firmware: V2R1C1SPC50, P1\&.0\-D1\&.0) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -UPS2000\-G\-3KRTS (firmware: V2R1C1SPC40, P1\&.0\-D1\&.0) -.RE -.sp -If your model is not in the list, we encourage you to report successful or unsuccessful results to the bug tracker or the mailing list\&. Make sure to include the full model number of your UPS manually in your report, because the firmware only reports "UPS2000\-A" for all models, including the G series\&. -.sp -huawei\-ups2000 uses the libmodbus project, for Modbus implementation\&. -.SH "CABLING" -.sp -The UPS has a USB port and a RS\-232 port\&. Both are supported, but USB is only usable on Linux 5\&.12 and later, via the \fBxr_serial\fR kernel module (see subsection \fBUSB\fR for details)\&. RS\-232 is supported on all operating systems\&. -.sp -Only one port can be used at a time\&. When USB is used, RS\-232 should be unplugged from the UPS, and vice versa\&. Further, optional adapter cards, such as RS\-485 or SNMP, are not supported\&. They should be removed from the UPS\&. -.sp -Because the UPS port can be unresponsive under certain circumstances, it\(cqs recommended to power cycle your UPS after making a cabling change, especially after changing the port type\&. That is, turn off the UPS power output via the front panel, then unplug the UPS from line power input\&. Wait for the LCD screen to go black\&. Finally reconnect line power and restart your UPS\&. -.SS "USB" -.sp -The USB port on the UPS2000 is powered by a MaxLinear/Exar RX21V1410 USB\-to\-serial converter chip, it\(cqs only supported by Linux 5\&.12 or newer, via the \fBxr_serial\fR kernel module\&. -.sp -When the UPS2000 is connected via USB to a supported Linux system, you should see the following logs in \fBdmesg\fR\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -xr_serial 1\-1\&.2:1\&.1: xr_serial converter detected -usb 1\-1\&.2: xr_serial converter now attached to ttyUSB0 -.fi -.if n \{\ -.RE -.\} -.sp -The driver must be \fBxr_serial\fR\&. If your system doesn\(cqt have the necessary device driver, you will get this message instead: -.sp -.if n \{\ -.RS 4 -.\} -.nf -cdc_acm 1\-1\&.2:1\&.0: ttyACM0: USB ACM device -.fi -.if n \{\ -.RE -.\} -.sp -The generic driver \fBcdc_acm\fR is incompatible and cannot be used\&. You should upgrade your Linux kernel to Linux 5\&.12 or newer\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -.sp -On an unsupported system, the USB device can still be recognized as a USB ACM device, but communication is impossible, please don\(cqt waste your time on \fBcdc_acm\fR\&. -.sp .5v -.RE -.sp -If you\(cqre already running on Linux 5\&.12 or newer kernels, but still cannot see the \fBxr_serial\fR driver, it means the driver is not enabled in your kernel build\&. If you\(cqre a regular user, you should file a bug report to your Linux distro maintainers and ask them to enable \fBxr_serial\fR (kernel option CONFIG_USB_SERIAL_XR)\&. -.sp -When upgrading the Linux kernel isn\(cqt an option, or when you are using another operating system (e\&.g\&. FreeBSD), RS\-232 must be used\&. -.SS "RS\-232" -.sp -RS\-232 is supported on all operating systems, either via a built\-in serial port on your computer, or by using an external USB\-to\-RS\-232 converter\&. If you plan to use an USB\-to\-RS\-232 converter, make sure it\(cqs supported by your operating system\&. -.SH "INSTALLATION" -.sp -This driver is not built by default\&. You can build it by installing libmodbus (with development packages) and running -.sp -.if n \{\ -.RS 4 -.\} -.nf -configure \-\-with\-serial=yes \-\-with\-modbus=yes -.fi -.if n \{\ -.RE -.\} -.sp -You also need to give proper (R/W) permissions on the local serial device file to allow the NUT driver run\-time user to access it\&. This may need additional setup for start\-up scripting, udev or upower rules, to apply the rights on every boot \(em especially if your device nodes are tracked by a virtual filesystem\&. -.sp -For example, a USB\-to\-serial converter can be identified as /dev/ttyACM0 or /dev/ttyUSB0 on Linux, or /dev/ttyU0 on FreeBSD (note the capital "U")\&. A built\-in serial port can be identified as /dev/ttyS0 on Linux or one of /dev/cua* names on FreeBSD\&. -.SH "EXTRA ARGUMENTS" -.sp -This driver supports the following optional settings in the \fBups.conf\fR(5) file: -.PP -\fBoffdelay=\fR\fIvalue\fR -.RS 4 -Time to wait before shutting down the UPS (seconds), acceptable range is 6 seconds (0\&.1 minutes) to 5940 seconds (99 minutes)\&. Defaults to 60 seconds\&. Must be a multiple of 6 seconds\&. To ensure your system has adequate time to shut down after a power failure, it\(cqs highly recommended to adjust -\fBoffdelay\fR\&. -.RE -.PP -\fBrebootdelay=\fR\fIvalue\fR -.RS 4 -Time to wait before rebooting the UPS (seconds), acceptable range is 6 seconds (0\&.1 minutes) to 5940 seconds (99 minutes)\&. Defaults to 60 seconds\&. Must be a multiple of 6 seconds\&. This is used by the -\fBshutdown\&.reboot\&.graceful\fR -instant command\&. If you\(cqve adjusted -\fBoffdelay\fR, you should also adjust -\fBrebootdelay\fR\&. -.RE -.PP -\fBondelay=\fR\fIvalue\fR -.RS 4 -Time to wait before switching on the UPS (seconds), acceptable range is 60 seconds (1 minutes) to 5940 seconds (99 minutes)\&. Defaults to 60 seconds\&. Must be a multiple of 60 seconds (not 6 seconds)\&. You don\(cqt need to adjust this delay unless you have special requirements\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -Due to hardware limitation, in this driver, \fBondelay\fR is respected only when line power is available\&. If a power failure has occurred, the UPS and the load is always immediately switched on, as soon (or as late) as line power is restored\&. -.sp .5v -.RE -.SH "INSTANT COMMANDS" -.sp -This driver supports some instant commands (see \fBupscmd\fR(8)): -.PP -\fBshutdown\&.stayoff\fR -.RS 4 -After an -\fBoffdelay\fR, turn off the load\&. When line power is back, remain off\&. -.RE -.PP -\fBshutdown\&.return\fR -.RS 4 -After an -\fBoffdelay\fR, turn off the load\&. When line power is back, turn on the load, possibly after an -\fBondelay\fR\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -Normally, the load is turned on as soon as line power is back\&. But if line power is never lost, or has came back unexpectedly in the middle of an ongoing shutdown (an undesirable "power race" condition that many entry\-level products on the market fail to recover from), the load is turned on after an \fBondelay\fR\&. Thus, UPS2000 is unaffected by a power race, the load is guaranteed to always restart\&. -.sp .5v -.RE -.PP -\fBshutdown\&.reboot\fR -.RS 4 -Like -\fBshutdown\&.return\fR, except that the load is turned off immediately (6 seconds in this implementation)\&. -.RE -.PP -\fBshutdown\&.reboot\&.graceful\fR -.RS 4 -Like -\fBshutdown\&.return\fR, except that the load is turned off after a -\fBrebootdelay\fR, not an -\fBoffdelay\fR\&. -.RE -.PP -\fBbeeper\&.enable\fR -.RS 4 -Enable the UPS beeper\&. -.RE -.PP -\fBbeeper\&.disable\fR -.RS 4 -Disable the UPS beeper\&. -.RE -.PP -\fBbeeper\&.toggle\fR -.RS 4 -Toggle the UPS beeper\&. -.RE -.PP -\fBbypass\&.start\fR -.RS 4 -Put the UPS in bypass mode\&. Use with caution\&. It exposes your equipment to unregulated line power and provides no protection from power failures\&. Also, the UPS may shut down whenever the bypass input voltage is out of the nominal range\&. As a warning, the UPS beeps once every 10 seconds in bypass mode\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -The driver has a basic foolproof mechanism\&. If the bypass input is already abnormal due to a power failure, the driver refuses to enter bypass mode by aborting the command and logging an error\&. However, it offers no protection after the UPS has entered (or in the middle of entering) bypass mode\&. Thus, again, use with caution\&. -.sp .5v -.RE -.PP -\fBbypass\&.stop\fR -.RS 4 -Put the UPS out of bypass mode\&. -.RE -.PP -\fBload\&.on\fR -.RS 4 -Turn on the load immediately\&. -.RE -.PP -\fBload\&.off\fR -.RS 4 -Turn off the load immediately\&. Use with caution, everything on the UPS will lost power\&. -.RE -.PP -\fBtest\&.battery\&.start\&.quick\fR -.RS 4 -Perform a short battery test\&. -.RE -.PP -\fBtest\&.battery\&.start\&.deep\fR -.RS 4 -Perform a long battery test\&. -.RE -.PP -\fBtest\&.battery\&.stop\fR -.RS 4 -Stop a running battery test\&. -.RE -.SH "VARIABLES" -.sp -This driver supports some writable runtime variables (see \fBupsrw\fR(8)): -.PP -\fBups\&.beeper\&.status\fR -.RS 4 -Enable or disable the UPS beeper, -\fBdisabled\fR -or -\fBenabled\fR\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -The beeper can only be disabled completely, it cannot be temporally muted until the next alarm, but the option \fBmuted\fR is also accepted for convenience, \fBmuted\fR is treated as an alias of \fBdisabled\fR\&. -.sp .5v -.RE -.PP -\fBups\&.delay\&.shutdown\fR -.RS 4 -Seconds to wait after shutdown with delay command\&. It\(cqs the runtime equivalent of -\fBoffdelay\fR\&. See description of -\fBoffdelay\fR\&. -.RE -.PP -\fBups\&.delay\&.reboot\fR -.RS 4 -Seconds to wait before rebooting the UPS, it\(cqs the runtime equivalent of -\fBrebootdelay\fR\&. See description of -\fBrebootdelay\fR\&. -.RE -.PP -\fBups\&.delay\&.start\fR -.RS 4 -Seconds to wait before restarting the load, it\(cqs the runtime equivalent of -\fBondelay\fR\&. See description of -\fBondelay\fR\&. -.RE -.SH "KNOWN ISSUES AND BUGS" -.SS "Battery status has a non\-fatal read failure" -.sp -It\(cqs usually harmless and can be safely ignored\&. It\(cqs only logged for informative purposes (\fBLOG_INFO\fR), not as a warning or error\&. -.SS "Data stale" -.sp -Under certain circumstances, some registers can return invalid values and trigger a "data stale" error\&. Once a data stale error has occurred, you should see error messages similar to the example below in the system log\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -huawei\-ups2000: register 2002 has invalid value a000, -upsd: Data for UPS [huawei] is stale \- check driver -upsd: UPS [huawei] data is no longer stale -.fi -.if n \{\ -.RE -.\} -.sp -So far all known problems have been fixed by the author, but an unknown one cannot be ruled out\&. If you have encountered "data stale" problems during normal uses, please file a bug report with full logs attached\&. -.sp -Before troubleshooting or reporting a problem, it\(cqs important to check your \fBdmesg\fR log for USB connect and disconnect events to avoid wasting time on the NUT driver when the actual problem is USB\&. For example, if someone yanks the cable out of the USB port, or if a new USB device is plugged into a USB host/hub that is struggling to power its ports (common on single\-board computers like Raspberry Pi), or if you have flaky cabling or EMI noise, the serial converter can get disconnected from USB, at least briefly\&. This creates a permanent data stale, the driver must be restarted (plugging the USB back won\(cqt fix it, since the driver is still using the nonexistent serial device)\&. These USB problems usually have nothing to do with NUT\&. If it\(cqs the case, you should solve the underlying USB problem \- check the cable, check the converter, try a powered USB hub, try a full\-speed USB isolator, etc\&. -.SS "Serial port becomes unresponsive" -.sp -Some malformed commands are known to lock up the serial port (including USB, which is a USB\-to\-serial device)\&. Upon receiving them, UPS2000 stops all serial communications\&. The result is a completely unresponsive UPS, regardless of what you do \- restarting NUT, rebooting the computer \- cannot restore connectivity, as if someone has unplugged the RS\-232 cable\&. To recover, simply power cycle the UPS: Turn off the UPS output via the front panel, then unplug the UPS from line power\&. Wait for the LCD front screen to go black\&. Finally reconnect line power and restart your UPS\&. -.sp -That being said, a serial port lockup is unlikely to happen\&. To our best knowledge, this driver never sends malformed commands to the UPS (it was only a problem during early development)\&. Furthermore, due to a CRC checksum, they\(cqre unlikely to be accidentally generated\&. -.sp -Still, we recommend to power cycle your UPS after making a cabling change, especially after changing from RS\-485/USB to RS\-232, just to ensure the UPS selects the correct communication interface\&. Also, if you have discovered a reproducible serial port lockup problem, it can be an previously unknown bug, make sure to file a bug report\&. -.SS "USB is unsupported" -.sp -As previously stated, only RS\-232 is supported on all systems\&. USB requires a device\-specific driver, which is only available on Linux 5\&.12 and newer kernels\&. -.sp -On an unsupported system, the USB device can still be recognized as a USB ACM device, but in reality, communication is impossible\&. It can only be fixed by implementing a driver for your system, nothing can be done within NUT\&. -.sp -Finally, in the unlike scenario that you are using NUT on Microsoft Windows, you should be able to install the USB device driver following the steps in the Huawei UPS2000 (1 kVA\-3 kVA) Modbus Protocol Development Guide\&. -.SH "AUTHOR" -.sp -Yifeng Li -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Huawei UPS2000\-A (1 kVA\-3 kVA) User Manual: -https://support\&.huawei\&.com/enterprise/en/doc/EDOC1000084260 -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Huawei UPS2000 (1 kVA\-3 kVA) Modbus Protocol Development Guide: -https://support\&.huawei\&.com/enterprise/en/doc/EDOC1000110696 -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -libmodbus home page: -http://libmodbus\&.org -.RE diff --git a/docs/man/huawei-ups2000.txt b/docs/man/huawei-ups2000.txt deleted file mode 100644 index af38350..0000000 --- a/docs/man/huawei-ups2000.txt +++ /dev/null @@ -1,364 +0,0 @@ -HUAWEI_UPS2000(8) -================== - -NAME ----- - -huawei-ups2000 - Driver for Huawei UPS2000 (1kVA-3kVA) UPS with USB or -RS-232 serial Modbus connection. - -SYNOPSIS --------- - -*huawei-ups2000* -h - -*huawei-ups2000* -a 'DEVICE_NAME' ['OPTIONS'] - -NOTE: This man page only documents the hardware-specific features of the -huawei-ups2000 driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This driver supports Huawei UPS2000 series, online (double conversion) -UPS with the following characteristics. - -1. Output power: 1 kVA to 3 kVA (higher power models are unsupported). - -2. Connection: USB or RS-232 (USB is only supported on Linux 5.12 and -newer kernels, read the section *Cabling* carefully). - -The UPS2000 series has two variants: UPS2000-A with a tower chassis, -and UPS2000-G with a rack-mount chassis. Both should be equally supported, -but more testers are needed. - -Currently, it has been tested on the following models. - -* UPS2000-A-1KTTS (firmware: V2R1C1SPC40, P1.0-D1.0) -* UPS2000-A-2KTTS (firmware: V2R1C1SPC50, P1.0-D1.0) -* UPS2000-G-3KRTS (firmware: V2R1C1SPC40, P1.0-D1.0) - -If your model is not in the list, we encourage you to report successful -or unsuccessful results to the bug tracker or the mailing list. -Make sure to include the full model number of your UPS manually -in your report, because the firmware only reports "UPS2000-A" -for all models, including the G series. - -huawei-ups2000 uses the libmodbus project, for Modbus implementation. - -CABLING -------- - -The UPS has a USB port and a RS-232 port. Both are supported, but USB is -only usable on Linux 5.12 and later, via the *xr_serial* kernel module (see -subsection *USB* for details). RS-232 is supported on all operating systems. - -Only one port can be used at a time. When USB is used, RS-232 should be -unplugged from the UPS, and vice versa. Further, optional adapter cards, -such as RS-485 or SNMP, are not supported. They should be removed from -the UPS. - -Because the UPS port can be unresponsive under certain circumstances, it's -recommended to power cycle your UPS after making a cabling change, especially -after changing the port type. That is, turn off the UPS power output via the -front panel, then unplug the UPS from line power input. Wait for the LCD -screen to go black. Finally reconnect line power and restart your UPS. - -USB -~~~~ - -The USB port on the UPS2000 is powered by a MaxLinear/Exar RX21V1410 -USB-to-serial converter chip, it's only supported by Linux 5.12 or -newer, via the *xr_serial* kernel module. - -When the UPS2000 is connected via USB to a supported Linux system, -you should see the following logs in *dmesg*. - - xr_serial 1-1.2:1.1: xr_serial converter detected - usb 1-1.2: xr_serial converter now attached to ttyUSB0 - -The driver must be *xr_serial*. If your system doesn't have the -necessary device driver, you will get this message instead: - - cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device - -The generic driver *cdc_acm* is incompatible and cannot be used. -You should upgrade your Linux kernel to Linux 5.12 or newer. - -WARNING: On an unsupported system, the USB device can still be -recognized as a USB ACM device, but communication is impossible, -please don't waste your time on *cdc_acm*. - -If you're already running on Linux 5.12 or newer kernels, but still -cannot see the *xr_serial* driver, it means the driver is not enabled -in your kernel build. If you're a regular user, you should file a bug -report to your Linux distro maintainers and ask them to enable -*xr_serial* (kernel option `CONFIG_USB_SERIAL_XR`). - -When upgrading the Linux kernel isn't an option, or when you are using -another operating system (e.g. FreeBSD), RS-232 must be used. - -RS-232 -~~~~~~ - -RS-232 is supported on all operating systems, either via a built-in serial -port on your computer, or by using an external USB-to-RS-232 converter. If -you plan to use an USB-to-RS-232 converter, make sure it's supported by your -operating system. - - -INSTALLATION ------------- - -This driver is not built by default. You can build it by installing libmodbus -(with development packages) and running - - configure --with-serial=yes --with-modbus=yes - -You also need to give proper (R/W) permissions on the local serial device file -to allow the NUT driver run-time user to access it. This may need additional -setup for start-up scripting, udev or upower rules, to apply the rights on every -boot -- especially if your device nodes are tracked by a virtual filesystem. - -For example, a USB-to-serial converter can be identified as `/dev/ttyACM0` -or `/dev/ttyUSB0` on Linux, or `/dev/ttyU0` on FreeBSD (note the capital "U"). -A built-in serial port can be identified as `/dev/ttyS0` on Linux or one of -`/dev/cua*` names on FreeBSD. - -EXTRA ARGUMENTS ---------------- -This driver supports the following optional settings in the -linkman:ups.conf[5] file: - -*offdelay=*'value':: -Time to wait before shutting down the UPS (seconds), acceptable range is -6 seconds (0.1 minutes) to 5940 seconds (99 minutes). Defaults to 60 seconds. -Must be a multiple of 6 seconds. To ensure your system has adequate time -to shut down after a power failure, it's highly recommended to adjust -*offdelay*. - -*rebootdelay=*'value':: -Time to wait before rebooting the UPS (seconds), acceptable range is -6 seconds (0.1 minutes) to 5940 seconds (99 minutes). Defaults to 60 seconds. -Must be a multiple of 6 seconds. This is used by the *shutdown.reboot.graceful* -instant command. If you've adjusted *offdelay*, you should also adjust -*rebootdelay*. - -*ondelay=*'value':: -Time to wait before switching on the UPS (seconds), acceptable range is -60 seconds (1 minutes) to 5940 seconds (99 minutes). Defaults to 60 seconds. -Must be a multiple of 60 seconds (not 6 seconds). You don't need to adjust -this delay unless you have special requirements. - -NOTE: Due to hardware limitation, in this driver, *ondelay* is respected -only when line power is available. If a power failure has occurred, the -UPS and the load is always immediately switched on, as soon (or as late) -as line power is restored. - -INSTANT COMMANDS ----------------- - -This driver supports some instant commands (see linkman:upscmd[8]): - -*shutdown.stayoff*:: -After an *offdelay*, turn off the load. When line power is back, -remain off. - -*shutdown.return*:: -After an *offdelay*, turn off the load. When line power is back, -turn on the load, possibly after an *ondelay*. - -NOTE: Normally, the load is turned on as soon as line power is back. -But if line power is never lost, or has came back unexpectedly -in the middle of an ongoing shutdown (an undesirable "power race" -condition that many entry-level products on the market fail to -recover from), the load is turned on after an *ondelay*. Thus, -UPS2000 is unaffected by a power race, the load is guaranteed to -always restart. - -*shutdown.reboot*:: -Like *shutdown.return*, except that the load is turned off immediately -(6 seconds in this implementation). - -*shutdown.reboot.graceful*:: -Like *shutdown.return*, except that the load is turned off after a -*rebootdelay*, not an *offdelay*. - -*beeper.enable*:: - -Enable the UPS beeper. - -*beeper.disable*:: - -Disable the UPS beeper. - -*beeper.toggle*:: - -Toggle the UPS beeper. - -*bypass.start*:: - -Put the UPS in bypass mode. Use with caution. It exposes your equipment -to unregulated line power and provides no protection from power failures. -Also, the UPS may shut down whenever the bypass input voltage is out -of the nominal range. As a warning, the UPS beeps once every 10 seconds -in bypass mode. - -NOTE: The driver has a basic foolproof mechanism. If the bypass input -is already abnormal due to a power failure, the driver refuses to enter -bypass mode by aborting the command and logging an error. However, it -offers no protection after the UPS has entered (or in the middle of -entering) bypass mode. Thus, again, use with caution. - -*bypass.stop*:: - -Put the UPS out of bypass mode. - -*load.on*:: - -Turn on the load immediately. - -*load.off*:: - -Turn off the load immediately. Use with caution, everything on the UPS -will lost power. - -*test.battery.start.quick*:: - -Perform a short battery test. - -*test.battery.start.deep*:: - -Perform a long battery test. - -*test.battery.stop*:: - -Stop a running battery test. - -VARIABLES ---------- - -This driver supports some writable runtime variables (see linkman:upsrw[8]): - -**ups.beeper.status**:: -Enable or disable the UPS beeper, *disabled* or *enabled*. - -NOTE: The beeper can only be disabled completely, it cannot be -temporally muted until the next alarm, but the option *muted* is -also accepted for convenience, *muted* is treated as an alias of -*disabled*. - -**ups.delay.shutdown**:: -Seconds to wait after shutdown with delay command. It's the runtime -equivalent of *offdelay*. See description of *offdelay*. - -**ups.delay.reboot**:: -Seconds to wait before rebooting the UPS, it's the runtime -equivalent of *rebootdelay*. See description of *rebootdelay*. - -**ups.delay.start**:: -Seconds to wait before restarting the load, it's the runtime -equivalent of *ondelay*. See description of *ondelay*. - -KNOWN ISSUES AND BUGS ---------------------- - -Battery status has a non-fatal read failure -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -It's usually harmless and can be safely ignored. It's only logged for -informative purposes (*LOG_INFO*), not as a warning or error. - -Data stale -~~~~~~~~~~~ - -Under certain circumstances, some registers can return invalid values -and trigger a "data stale" error. Once a data stale error has occurred, -you should see error messages similar to the example below in the system -log. - - huawei-ups2000: register 2002 has invalid value a000, - upsd: Data for UPS [huawei] is stale - check driver - upsd: UPS [huawei] data is no longer stale - -So far all known problems have been fixed by the author, but an unknown one -cannot be ruled out. If you have encountered "data stale" problems during -normal uses, please file a bug report with full logs attached. - -Before troubleshooting or reporting a problem, it's important to check -your *dmesg* log for USB connect and disconnect events to avoid wasting -time on the NUT driver when the actual problem is USB. For example, if -someone yanks the cable out of the USB port, or if a new USB device is -plugged into a USB host/hub that is struggling to power its ports -(common on single-board computers like Raspberry Pi), or if you have -flaky cabling or EMI noise, the serial converter can get disconnected -from USB, at least briefly. This creates a permanent data stale, the driver -must be restarted (plugging the USB back won't fix it, since the driver -is still using the nonexistent serial device). These USB problems usually -have nothing to do with NUT. If it's the case, you should solve the -underlying USB problem - check the cable, check the converter, try a -powered USB hub, try a full-speed USB isolator, etc. - -Serial port becomes unresponsive -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Some malformed commands are known to lock up the serial port (including -USB, which is a USB-to-serial device). Upon receiving them, UPS2000 stops -all serial communications. The result is a completely unresponsive UPS, -regardless of what you do - restarting NUT, rebooting the computer - -cannot restore connectivity, as if someone has unplugged the RS-232 cable. -To recover, simply power cycle the UPS: Turn off the UPS output via the -front panel, then unplug the UPS from line power. Wait for the LCD front -screen to go black. Finally reconnect line power and restart your UPS. - -That being said, a serial port lockup is unlikely to happen. To our best -knowledge, this driver never sends malformed commands to the UPS (it was -only a problem during early development). Furthermore, due to a CRC checksum, -they're unlikely to be accidentally generated. - -Still, we recommend to power cycle your UPS after making a cabling change, -especially after changing from RS-485/USB to RS-232, just to ensure the -UPS selects the correct communication interface. Also, if you have -discovered a reproducible serial port lockup problem, it can be an -previously unknown bug, make sure to file a bug report. - -USB is unsupported -~~~~~~~~~~~~~~~~~~~ - -As previously stated, only RS-232 is supported on all systems. USB -requires a device-specific driver, which is only available on Linux -5.12 and newer kernels. - -On an unsupported system, the USB device can still be recognized as a -USB ACM device, but in reality, communication is impossible. It can -only be fixed by implementing a driver for your system, nothing can -be done within NUT. - -Finally, in the unlike scenario that you are using NUT on Microsoft -Windows, you should be able to install the USB device driver following -the steps in the Huawei UPS2000 (1 kVA-3 kVA) Modbus Protocol Development -Guide. - -AUTHOR ------- - -Yifeng Li - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* Huawei UPS2000-A (1 kVA-3 kVA) User Manual: - https://support.huawei.com/enterprise/en/doc/EDOC1000084260 -* Huawei UPS2000 (1 kVA-3 kVA) Modbus Protocol Development Guide: - https://support.huawei.com/enterprise/en/doc/EDOC1000110696 -* libmodbus home page: http://libmodbus.org diff --git a/docs/man/isbmex.8 b/docs/man/isbmex.8 index 6083184..3496fe2 100644 --- a/docs/man/isbmex.8 +++ b/docs/man/isbmex.8 @@ -1,13 +1,13 @@ '\" t .\" Title: isbmex .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "ISBMEX" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "ISBMEX" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/isbmex.txt b/docs/man/isbmex.txt index 985f0ff..9b97d16 100644 --- a/docs/man/isbmex.txt +++ b/docs/man/isbmex.txt @@ -15,7 +15,6 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports SOLA/BASIC Mexico ISBMEX protocol UPS equipment. EXTRA ARGUMENTS @@ -26,7 +25,6 @@ linkman:ups.conf[5]. AUTHOR ------ - Edscott Wilson Garcia SEE ALSO @@ -34,10 +32,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ivtscd.8 b/docs/man/ivtscd.8 index 6bdbb80..2854115 100644 --- a/docs/man/ivtscd.8 +++ b/docs/man/ivtscd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: ivtscd .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "IVTSCD" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "IVTSCD" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/ivtscd.txt b/docs/man/ivtscd.txt index 0696c87..6a2c7c4 100644 --- a/docs/man/ivtscd.txt +++ b/docs/man/ivtscd.txt @@ -3,40 +3,32 @@ IVTSCD(8) NAME ---- - ivtscd - driver for the IVT Solar Controller Device NOTE ---- - This man page only documents the hardware-specific features of the *ivtscd* driver. For information about the core driver, see linkman:nutupsdrv[8]. DESCRIPTION ----------- - This driver allows to access the IVT SCD-series devices. EXTRA ARGUMENTS --------------- - This driver does not support any extra argument. AUTHOR ------ - Arjen de Korte SEE ALSO -------- - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/libnutclient.3 b/docs/man/libnutclient.3 index f41cd09..1fdb60f 100644 --- a/docs/man/libnutclient.3 +++ b/docs/man/libnutclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libnutclient.txt b/docs/man/libnutclient.txt index 668eb83..d23b705 100644 --- a/docs/man/libnutclient.txt +++ b/docs/man/libnutclient.txt @@ -39,12 +39,10 @@ See the `nutclient.h` header for more information. ERROR HANDLING -------------- - There is currently no specific mechanism around error handling. SEE ALSO -------- - linkman:libnutclient_devices[3] linkman:libnutclient_commands[3] linkman:libnutclient_general[3] diff --git a/docs/man/libnutclient_commands.3 b/docs/man/libnutclient_commands.3 index e202009..649a757 100644 --- a/docs/man/libnutclient_commands.3 +++ b/docs/man/libnutclient_commands.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_commands -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_COMMAND" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_COMMAND" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,121 +40,26 @@ typedef void* NUTCLIENT_t; .fi .sp .nf -typedef char** strarr; -.fi -.sp -.nf -strarr nutclient_get_device_commands( - NUTCLIENT_t client, - const char* dev); -.fi -.sp -.nf -int nutclient_has_device_command( - NUTCLIENT_t client, - const char* dev, const char* cmd); -.fi -.sp -.nf -char* nutclient_get_device_command_description( - NUTCLIENT_t client, - const char* dev, const char* cmd); -.fi -.sp -.nf -void nutclient_execute_device_command( - NUTCLIENT_t client, - const char* dev, const char* cmd, - const char* param=""); +strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev); +int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd); +char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd); +void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd); .fi .SH "DESCRIPTION" .sp These functions allow to manage instant commands of devices\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_get_device_commands()\fR -function retrieves the list of command names for a device\&. +The \fBnutclient_get_device_commands()\fR function retrieve the list of command names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&. .sp -The returned strarr must be freed by -\fIstrarr_free\fR\&. -.RE +The \fBnutclient_has_device_command\fR function test if the specified command is supported by the device\&. Return 1 is supported and 0 if not\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_has_device_command\fR -function tests if the specified command is supported by the device\&. +The \fBnutclient_get_device_command_description\fR function retrieve the command description, if any\&. The resturned string must be freed\&. .sp -Return 1 is supported and 0 if not\&. -.RE +The \fBnutclient_execute_device_command\fR intend to execute the instant command\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_get_device_command_description\fR -function retrieves the command description, if any\&. +\fIdev\fR is the device name\&. .sp -The returned string must be freed\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_execute_device_command\fR -intends to execute the instant command, with an optional parameter\&. -.RE -.sp -Common arguments: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIdev\fR -is the device name\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIcmd\fR -is the instant command name\&. -.RE +\fIcmd\fR is the instant command name\&. .SH "SEE ALSO" .sp \fBlibnutclient\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3) diff --git a/docs/man/libnutclient_commands.txt b/docs/man/libnutclient_commands.txt index 33a90ca..339fd2c 100644 --- a/docs/man/libnutclient_commands.txt +++ b/docs/man/libnutclient_commands.txt @@ -4,11 +4,9 @@ LIBNUTCLIENT_COMMANDS(3) NAME ---- -libnutclient_commands, nutclient_get_device_commands, -nutclient_has_device_command, nutclient_get_device_command_description, -nutclient_execute_device_command - -Instant command related functions in Network UPS Tools high-level client -access library +libnutclient_commands, nutclient_get_device_commands, nutclient_has_device_command, +nutclient_get_device_command_description, nutclient_execute_device_command - +Instant command related functions in Network UPS Tools high-level client access library SYNOPSIS -------- @@ -17,57 +15,33 @@ SYNOPSIS typedef void* NUTCLIENT_t; - typedef char** strarr; - - strarr nutclient_get_device_commands( - NUTCLIENT_t client, - const char* dev); - - int nutclient_has_device_command( - NUTCLIENT_t client, - const char* dev, const char* cmd); - - char* nutclient_get_device_command_description( - NUTCLIENT_t client, - const char* dev, const char* cmd); - - void nutclient_execute_device_command( - NUTCLIENT_t client, - const char* dev, const char* cmd, - const char* param=""); + strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev); + int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd); + char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd); + void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd); DESCRIPTION ----------- These functions allow to manage instant commands of devices. -* The *nutclient_get_device_commands()* function retrieves - the list of command names for a device. -+ +The *nutclient_get_device_commands()* function retrieve the list of command names for a device. The returned strarr must be freed by 'strarr_free'. -* The *nutclient_has_device_command* function tests if the - specified command is supported by the device. -+ +The *nutclient_has_device_command* function test if the specified command is supported by the device. Return 1 is supported and 0 if not. -* The *nutclient_get_device_command_description* function - retrieves the command description, if any. -+ -The returned string must be freed. +The *nutclient_get_device_command_description* function retrieve the command description, if any. +The resturned string must be freed. -* The *nutclient_execute_device_command* intends to execute - the instant command, with an optional parameter. +The *nutclient_execute_device_command* intend to execute the instant command. -Common arguments: +'dev' is the device name. -* 'dev' is the device name. - -* 'cmd' is the instant command name. +'cmd' is the instant command name. SEE ALSO -------- - linkman:libnutclient[3] linkman:libnutclient_devices[3] linkman:libnutclient_general[3] diff --git a/docs/man/libnutclient_devices.3 b/docs/man/libnutclient_devices.3 index 9e9385e..5874269 100644 --- a/docs/man/libnutclient_devices.3 +++ b/docs/man/libnutclient_devices.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_devices -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_DEVICES" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_DEVICES" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,81 +40,21 @@ typedef void* NUTCLIENT_t; .fi .sp .nf -typedef char** strarr; -.fi -.sp -.nf strarr nutclient_get_devices(NUTCLIENT_t client); -.fi -.sp -.nf int nutclient_has_device(NUTCLIENT_t client, const char* dev); -.fi -.sp -.nf char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev); .fi .SH "DESCRIPTION" .sp These functions allow to manage devices\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_get_devices()\fR -function retrieves the list of devices monitored by a client\&. +The \fBnutclient_get_devices()\fR function retrieve the list of devices monitored by a client\&. The returned strarr must be freed by \fIstrarr_free\fR\&. .sp -The returned strarr must be freed by -\fIstrarr_free\fR\&. -.RE +The \fBnutclient_has_device()\fR function test if a device is monitored by a client\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_has_device()\fR -function tests if a device is monitored by a client\&. -.RE +The \fBnutclient_get_device_description()\fR function retrieve the device description\&. The returned description string must be freed\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The -\fBnutclient_get_device_description()\fR -function retrieves the device description\&. -.sp -The returned description string must be freed\&. -.RE -.sp -Common arguments: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIdev\fR -is the device name\&. -.RE +\fIdev\fR is the device name\&. .SH "SEE ALSO" .sp \fBlibnutclient\fR(3) \fBlibnutclient_commands\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3) \fBlibnutclient_variables\fR(3) diff --git a/docs/man/libnutclient_devices.txt b/docs/man/libnutclient_devices.txt index 700673f..dd69101 100644 --- a/docs/man/libnutclient_devices.txt +++ b/docs/man/libnutclient_devices.txt @@ -4,10 +4,8 @@ LIBNUTCLIENT_DEVICES(3) NAME ---- -libnutclient_devices, nutclient_get_devices, nutclient_has_device, -nutclient_get_device_description - -Device related functions in Network UPS Tools high-level client access -library +libnutclient_devices, nutclient_get_devices, nutclient_has_device, nutclient_get_device_description - +Device related functions in Network UPS Tools high-level client access library SYNOPSIS -------- @@ -16,12 +14,8 @@ SYNOPSIS typedef void* NUTCLIENT_t; - typedef char** strarr; - strarr nutclient_get_devices(NUTCLIENT_t client); - int nutclient_has_device(NUTCLIENT_t client, const char* dev); - char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev); DESCRIPTION @@ -29,28 +23,21 @@ DESCRIPTION These functions allow to manage devices. -* The *nutclient_get_devices()* function retrieves the list of devices - monitored by a client. -+ +The *nutclient_get_devices()* function retrieve the list of devices monitored by a client. The returned strarr must be freed by 'strarr_free'. -* The *nutclient_has_device()* function tests if a device is monitored - by a client. +The *nutclient_has_device()* function test if a device is monitored by a client. -* The *nutclient_get_device_description()* function retrieves the device - description. -+ +The *nutclient_get_device_description()* function retrieve the device description. The returned description string must be freed. -Common arguments: - -* 'dev' is the device name. +'dev' is the device name. SEE ALSO -------- - linkman:libnutclient[3] linkman:libnutclient_commands[3] linkman:libnutclient_devices[3] linkman:libnutclient_general[3] linkman:libnutclient_variables[3] + diff --git a/docs/man/libnutclient_general.3 b/docs/man/libnutclient_general.3 index 7487cad..925a2d6 100644 --- a/docs/man/libnutclient_general.3 +++ b/docs/man/libnutclient_general.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_general -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_GENERAL" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_GENERAL" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,9 +49,6 @@ typedef char** strarr; .sp .nf strarr strarr_alloc(unsigned short count); -.fi -.sp -.nf void strarr_free(strarr arr); .fi .SH "DESCRIPTION" diff --git a/docs/man/libnutclient_general.txt b/docs/man/libnutclient_general.txt index 7d41acf..909549a 100644 --- a/docs/man/libnutclient_general.txt +++ b/docs/man/libnutclient_general.txt @@ -5,8 +5,7 @@ NAME ---- libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free - -General and utility functions in Network UPS Tools high-level client -access library +General and utility functions in Network UPS Tools high-level client access library SYNOPSIS -------- @@ -20,7 +19,6 @@ SYNOPSIS typedef char** strarr; strarr strarr_alloc(unsigned short count); - void strarr_free(strarr arr); DESCRIPTION @@ -44,5 +42,4 @@ It also frees all pointed strings. SEE ALSO -------- - linkman:libnutclient[3] diff --git a/docs/man/libnutclient_misc.3 b/docs/man/libnutclient_misc.3 index 0485cba..0092a25 100644 --- a/docs/man/libnutclient_misc.3 +++ b/docs/man/libnutclient_misc.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_misc -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_MISC" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_MISC" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -libnutclient_misc, nutclient_authenticate, nutclient_logout, nutclient_device_login, nutclient_get_device_num_logins, nutclient_device_master, nutclient_device_forced_shutdown \- Miscellaneous functions in Network UPS Tools high\-level client access library +libnutclient_misc, nutclient_authenticate, nutclient_logout, nutclient_device_login, nutclient_get_device_num_logins, nutclient_device_master, nutclient_device_forced_shutdown \- Miscelaneous functions in Network UPS Tools high\-level client access library .SH "SYNOPSIS" .sp .nf @@ -40,67 +40,28 @@ typedef void* NUTCLIENT_t; .fi .sp .nf -void nutclient_authenticate( - NUTCLIENT_t client, - const char* login, const char* passwd); -.fi -.sp -.nf +void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd); void nutclient_logout(NUTCLIENT_t client); -.fi -.sp -.nf void nutclient_device_login(NUTCLIENT_t client, const char* dev); -.fi -.sp -.nf int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev); -.fi -.sp -.nf -void nutclient_device_primary(NUTCLIENT_t client, const char* dev); -/* OBSOLETED name: */ void nutclient_device_master(NUTCLIENT_t client, const char* dev); -.fi -.sp -.nf void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev); .fi .SH "DESCRIPTION" .sp -The \fBnutclient_authenticate()\fR function authenticates the user\&. +The \fBnutclient_authenticate()\fR function authenticate the user\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIlogin\fR -is the user name\&. -.RE +\fIlogin\fR is the user name\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIpasswd\fR -is the user password\&. -.RE +\fIpasswd\fR is the user password\&. .sp -The \fBnutclient_logout()\fR function disconnects gracefully from the server\&. +The \fBnutclient_logout()\fR function disconnect gracefully from the server\&. .sp -The \fBnutclient_device_login()\fR function logs the fact that a system is drawing power from this UPS\&. +The \fBnutclient_device_login()\fR function log the fact that a system is drawing power from this UPS\&. .sp -The \fBnutclient_get_device_num_logins()\fR function retrieves the number of clients which have been logged for this device\&. +The \fBnutclient_get_device_num_logins()\fR function retrieve the number of clients which have been logged for this device\&. .sp -The \fBnutclient_device_master()\fR and \fBnutclient_device_primary()\fR (note: the former is obsoleted since NUT v2\&.8\&.0 in favor of the latter) functions make sure that primary\-mode functions like FSD are available if necessary\&. +The \fBnutclient_device_master()\fR function make sure that master\-level functions like FSD are available if necessary\&. .sp The \fBnutclient_device_forced_shutdown()\fR function sets the "forced shutdown" flag on the device\&. .sp diff --git a/docs/man/libnutclient_misc.txt b/docs/man/libnutclient_misc.txt index 2635db4..d8b2fef 100644 --- a/docs/man/libnutclient_misc.txt +++ b/docs/man/libnutclient_misc.txt @@ -4,10 +4,10 @@ LIBNUTCLIENT_MISC(3) NAME ---- -libnutclient_misc, nutclient_authenticate, nutclient_logout, -nutclient_device_login, nutclient_get_device_num_logins, +libnutclient_misc, nutclient_authenticate, nutclient_logout, +nutclient_device_login, nutclient_get_device_num_logins, nutclient_device_master, nutclient_device_forced_shutdown - -Miscellaneous functions in Network UPS Tools high-level client access library +Miscelaneous functions in Network UPS Tools high-level client access library SYNOPSIS -------- @@ -16,49 +16,37 @@ SYNOPSIS typedef void* NUTCLIENT_t; - void nutclient_authenticate( - NUTCLIENT_t client, - const char* login, const char* passwd); - + void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd); void nutclient_logout(NUTCLIENT_t client); - void nutclient_device_login(NUTCLIENT_t client, const char* dev); - int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev); - - void nutclient_device_primary(NUTCLIENT_t client, const char* dev); - /* OBSOLETED name: */ void nutclient_device_master(NUTCLIENT_t client, const char* dev); - void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev); DESCRIPTION ----------- -The *nutclient_authenticate()* function authenticates the user. +The *nutclient_authenticate()* function authenticate the user. -* 'login' is the user name. +'login' is the user name. -* 'passwd' is the user password. +'passwd' is the user password. -The *nutclient_logout()* function disconnects gracefully from the server. +The *nutclient_logout()* function disconnect gracefully from the server. -The *nutclient_device_login()* function logs the fact that a system +The *nutclient_device_login()* function log the fact that a system is drawing power from this UPS. -The *nutclient_get_device_num_logins()* function retrieves the number of -clients which have been logged for this device. +The *nutclient_get_device_num_logins()* function retrieve the number of clients +which have been logged for this device. -The *nutclient_device_master()* and *nutclient_device_primary()* (note: -the former is obsoleted since NUT v2.8.0 in favor of the latter) functions -make sure that primary-mode functions like FSD are available if necessary. +The *nutclient_device_master()* function make sure that master-level +functions like FSD are available if necessary. -The *nutclient_device_forced_shutdown()* function sets the "forced shutdown" -flag on the device. +The *nutclient_device_forced_shutdown()* function sets the "forced shutdown" flag on the device. 'dev' is the device name. SEE ALSO -------- - linkman:libnutclient[3] diff --git a/docs/man/libnutclient_tcp.3 b/docs/man/libnutclient_tcp.3 index c341fd1..6460dda 100644 --- a/docs/man/libnutclient_tcp.3 +++ b/docs/man/libnutclient_tcp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_tcp -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_TCP" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_TCP" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,8 +33,6 @@ libnutclient_tcp, nutclient_tcp_create_client, nutclient_tcp_is_connected, nutcl .sp .nf #include -#include /* uint16_t */ -#include /* time_t */ .fi .sp .nf @@ -42,28 +40,12 @@ typedef NUTCLIENT_t NUTCLIENT_TCP_t; .fi .sp .nf -NUTCLIENT_TCP_t nutclient_tcp_create_client( - const char* host, uint16_t port); -.fi -.sp -.nf +NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port); int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client); -.fi -.sp -.nf void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client); -.fi -.sp -.nf int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client); -.fi -.sp -.nf -void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout); -.fi -.sp -.nf -time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); +void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout); +long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); .fi .SH "DESCRIPTION" .sp @@ -71,29 +53,9 @@ These functions allow to manage connections to \fBupsd\fR(8) using NUT TCP proto .sp The \fBnutclient_tcp_create_client()\fR function create the \fINUTCLIENT_TCP_t\fR context and intend to connect to upsd at \fIhost\fR and \fIport\fR\&. The context must be freed by \fInutclient_destroy()\fR .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIhost\fR -can be a sever name or a valid IPv4 or IPv6 address like "localhost", "127\&.0\&.0\&.1" or "::1"\&. -.RE +\fIhost\fR can be a sever name or a valid IPv4 or IPv6 adress like "localhost", "127\&.0\&.0\&.1" or "::1"\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIport\fR -is a valid TCP port, generally 3493\&. -.RE +\fIport\fR is a valid TCP port, genrally 3493\&. .sp The \fBnutclient_tcp_is_connected()\fR function test if the connection is valid\&. .sp diff --git a/docs/man/libnutclient_tcp.txt b/docs/man/libnutclient_tcp.txt index 299fce2..4c17300 100644 --- a/docs/man/libnutclient_tcp.txt +++ b/docs/man/libnutclient_tcp.txt @@ -7,64 +7,48 @@ NAME libnutclient_tcp, nutclient_tcp_create_client, nutclient_tcp_is_connected, nutclient_tcp_disconnect, nutclient_tcp_reconnect, nutclient_tcp_set_timeout, nutclient_tcp_get_timeout - -TCP protocol related function for Network UPS Tools high-level client -access library +TCP protocol related function for Network UPS Tools high-level client access library SYNOPSIS -------- #include - #include /* uint16_t */ - #include /* time_t */ typedef NUTCLIENT_t NUTCLIENT_TCP_t; - NUTCLIENT_TCP_t nutclient_tcp_create_client( - const char* host, uint16_t port); - + NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port); int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client); - void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client); - int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client); - - void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, time_t timeout); - - time_t nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); + void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout); + long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client); DESCRIPTION ----------- -These functions allow to manage connections to linkman:upsd[8] -using NUT TCP protocol. +These functions allow to manage connections to linkman:upsd[8] using NUT TCP protocol. -The *nutclient_tcp_create_client()* function create the 'NUTCLIENT_TCP_t' -context and intend to connect to upsd at 'host' and 'port'. -The context must be freed by 'nutclient_destroy()' +The *nutclient_tcp_create_client()* function create the 'NUTCLIENT_TCP_t' context and +intend to connect to upsd at 'host' and 'port'. The context must be freed by 'nutclient_destroy()' -* 'host' can be a sever name or a valid IPv4 or IPv6 address like -"localhost", "127.0.0.1" or "::1". +'host' can be a sever name or a valid IPv4 or IPv6 adress like "localhost", "127.0.0.1" or "::1". -* 'port' is a valid TCP port, generally 3493. +'port' is a valid TCP port, genrally 3493. The *nutclient_tcp_is_connected()* function test if the connection is valid. -The *nutclient_tcp_disconnect()* function force to disconnect the specified -connection. +The *nutclient_tcp_disconnect()* function force to disconnect the specified connection. The *nutclient_tcp_reconnect()* function force to reconnect a connection, disconnecting it if needed. -The *nutclient_tcp_set_timeout()* function set the timeout duration -for I/O operations. +The *nutclient_tcp_set_timeout()* function set the timeout duration for I/O operations. -The *nutclient_tcp_get_timeout()* function retrieve the timeout duration -for I/O operations. +The *nutclient_tcp_get_timeout()* function retrieve the timeout duration for I/O operations. 'timeout' values are specified in seconds, negatives values for blocking. SEE ALSO -------- - linkman:libnutclient[3] linkman:libnutclient_general[3] diff --git a/docs/man/libnutclient_variables.3 b/docs/man/libnutclient_variables.3 index ba2039e..6819c91 100644 --- a/docs/man/libnutclient_variables.3 +++ b/docs/man/libnutclient_variables.3 @@ -1,13 +1,13 @@ '\" t .\" Title: libnutclient_variables -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBNUTCLIENT_VARIABL" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBNUTCLIENT_VARIABL" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,110 +40,39 @@ typedef void* NUTCLIENT_t; .fi .sp .nf -typedef char** strarr; -.fi -.sp -.nf -strarr nutclient_get_device_variables(NUTCLIENT_t client, - const char* dev); -.fi -.sp -.nf -strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, - const char* dev); -.fi -.sp -.nf -int nutclient_has_device_variable(NUTCLIENT_t client, - const char* dev, const char* var); -.fi -.sp -.nf -char* nutclient_get_device_variable_description(NUTCLIENT_t client, - const char* dev, const char* var); -.fi -.sp -.nf -strarr nutclient_get_device_variable_values(NUTCLIENT_t client, - const char* dev, const char* var); -.fi -.sp -.nf -void nutclient_set_device_variable_value(NUTCLIENT_t client, - const char* dev, const char* var, const char* value); -.fi -.sp -.nf -void nutclient_set_device_variable_values(NUTCLIENT_t client, - const char* dev, const char* var, const strarr values); +strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev); +strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev); +int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var); +char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var); +strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var); +void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value); +void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values); .fi .SH "DESCRIPTION" .sp These functions allow to manage variables of devices\&. .sp -The \fBnutclient_get_device_variables()\fR function retrieves the list of variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&. +The \fBnutclient_get_device_variables()\fR function retrieve the list of variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&. .sp -The \fBnutclient_get_device_rw_variables\fR function retrieves the list of read\-write variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&. +The \fBnutclient_get_device_rw_variables\fR function retrieve the list of read\-write variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&. .sp -The \fBnutclient_has_device_variable\fR function tests if the specified variable is supported by the device\&. Return 1 is supported and 0 if not\&. +The \fBnutclient_has_device_variable\fR function test if the specified variable is supported by the device\&. Return 1 is supported and 0 if not\&. .sp -The \fBnutclient_get_device_variable_description\fR function retrieves the variable description, if any\&. The returned string must be freed\&. +The \fBnutclient_get_device_variable_description\fR function retrieve the variable description, if any\&. The resturned string must be freed\&. .sp The \fBnutclient_get_device_variable_values\fR returns variable values (generally only one)\&. The returned strarr must be freed by \fIstrarr_free\fR\&. .sp -The \fBnutclient_set_device_variable_value\fR intends to set the value of the specified variable\&. +The \fBnutclient_set_device_variable_value\fR intend to set the value of the specified variable\&. .sp -The \fBnutclient_set_device_variable_values\fR intends to set multiple values of the specified variable\&. +The \fBnutclient_set_device_variable_values\fR intend to set multiple values of the specified variable\&. .sp -Common arguments: +\fIdev\fR is the device name\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIdev\fR -is the device name\&. -.RE +\fIvar\fR is the variable name\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIvar\fR -is the variable name\&. -.RE +\fIvalue\fR is the variable value\&. .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIvalue\fR -is the variable value\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fIvalues\fR -is the variable array of values\&. -.RE +\fIvalues\fR is the variable array of values\&. .SH "SEE ALSO" .sp \fBlibnutclient\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3) diff --git a/docs/man/libnutclient_variables.txt b/docs/man/libnutclient_variables.txt index fbeeb3d..2e84c79 100644 --- a/docs/man/libnutclient_variables.txt +++ b/docs/man/libnutclient_variables.txt @@ -6,11 +6,9 @@ NAME libnutclient_variables, nutclient_get_device_variables, nutclient_get_device_rw_variables, nutclient_has_device_variable, -nutclient_get_device_variable_description, -nutclient_get_device_variable_values, +nutclient_get_device_variable_description, nutclient_get_device_variable_values, nutclient_set_device_variable_value, nutclient_set_device_variable_values - -Variable related functions in Network UPS Tools high-level client access -library +Variable related functions in Network UPS Tools high-level client access library SYNOPSIS -------- @@ -19,73 +17,48 @@ SYNOPSIS typedef void* NUTCLIENT_t; - typedef char** strarr; - - strarr nutclient_get_device_variables(NUTCLIENT_t client, - const char* dev); - - strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, - const char* dev); - - int nutclient_has_device_variable(NUTCLIENT_t client, - const char* dev, const char* var); - - char* nutclient_get_device_variable_description(NUTCLIENT_t client, - const char* dev, const char* var); - - strarr nutclient_get_device_variable_values(NUTCLIENT_t client, - const char* dev, const char* var); - - void nutclient_set_device_variable_value(NUTCLIENT_t client, - const char* dev, const char* var, const char* value); - - void nutclient_set_device_variable_values(NUTCLIENT_t client, - const char* dev, const char* var, const strarr values); + strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev); + strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev); + int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var); + char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var); + strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var); + void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value); + void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values); DESCRIPTION ----------- These functions allow to manage variables of devices. -The *nutclient_get_device_variables()* function retrieves the list -of variables names for a device. +The *nutclient_get_device_variables()* function retrieve the list of variables names for a device. The returned strarr must be freed by 'strarr_free'. -The *nutclient_get_device_rw_variables* function retrieves the list -of read-write variables names for a device. +The *nutclient_get_device_rw_variables* function retrieve the list of read-write variables names for a device. The returned strarr must be freed by 'strarr_free'. -The *nutclient_has_device_variable* function tests if the specified -variable is supported by the device. +The *nutclient_has_device_variable* function test if the specified variable is supported by the device. Return 1 is supported and 0 if not. -The *nutclient_get_device_variable_description* function retrieves -the variable description, if any. -The returned string must be freed. +The *nutclient_get_device_variable_description* function retrieve the variable description, if any. +The resturned string must be freed. -The *nutclient_get_device_variable_values* returns variable values -(generally only one). +The *nutclient_get_device_variable_values* returns variable values (generally only one). The returned strarr must be freed by 'strarr_free'. -The *nutclient_set_device_variable_value* intends to set the value -of the specified variable. +The *nutclient_set_device_variable_value* intend to set the value of the specified variable. -The *nutclient_set_device_variable_values* intends to set multiple -values of the specified variable. +The *nutclient_set_device_variable_values* intend to set multiple values of the specified variable. -Common arguments: +'dev' is the device name. -* 'dev' is the device name. +'var' is the variable name. -* 'var' is the variable name. +'value' is the variable value. -* 'value' is the variable value. - -* 'values' is the variable array of values. +'values' is the variable array of values. SEE ALSO -------- - linkman:libnutclient[3] linkman:libnutclient_devices[3] linkman:libnutclient_general[3] diff --git a/docs/man/libupsclient-config.1 b/docs/man/libupsclient-config.1 index bf0bf06..5094f7e 100644 --- a/docs/man/libupsclient-config.1 +++ b/docs/man/libupsclient-config.1 @@ -1,13 +1,13 @@ '\" t .\" Title: libupsclient-config .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIBUPSCLIENT\-CONFIG" "1" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIBUPSCLIENT\-CONFIG" "1" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/libupsclient-config.txt b/docs/man/libupsclient-config.txt index 526276c..730a5b2 100644 --- a/docs/man/libupsclient-config.txt +++ b/docs/man/libupsclient-config.txt @@ -4,12 +4,10 @@ LIBUPSCLIENT-CONFIG(1) NAME ---- -libupsclient-config - script to get information about the installed -version of libupsclient +libupsclient-config - script to get information about the installed version of libupsclient SYNOPSIS -------- - *libupsclient-config* [--version] [--libs] [--cflags] DESCRIPTION @@ -17,7 +15,7 @@ DESCRIPTION *libupsclient-config* is a tool that is used to determine the compiler and linker flags that should be used to compile and link programs that use -*libupsclient* from the Network UPS Tools project. +*libupsclient* from the Network UPS Tools project. OPTIONS ------- @@ -35,7 +33,6 @@ Print the compiler flags that are necessary to compile a *libupsclient* program. AUTHORS ------- - This manual page was written by Arnaud Quette . SEE ALSO @@ -45,5 +42,5 @@ linkman:upsclient[3] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/liebert-esp2.8 b/docs/man/liebert-esp2.8 index 829d00a..bd5373f 100644 --- a/docs/man/liebert-esp2.8 +++ b/docs/man/liebert-esp2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert-esp2 -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIEBERT\-ESP2" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIEBERT\-ESP2" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,27 +32,9 @@ liebert-esp2 \- Driver for Liebert UPS, using the ESP\-II serial protocol .SH "NOTE" .sp This man page only documents the hardware\-specific features of the liebert\-esp2 driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "SPECIAL CABLING NOTE" -.sp -Be aware that an RS\-232 cable with ONLY the RX, TX and ground pin must be used when interfacing with GXT2 series UPS units (and possibly others), since the handshaking lines are used for purposes other than RS\-232 flow control\&. Use of a standard RS\-232 cable with full handshaking may result in undesired operation and/or shutdown\&. It is therefore advisable to confirm the proper cable/wiring with the diagram provided in the manual with your UPS\&. .SH "SUPPORTED HARDWARE" .sp -Tested to work on the following units: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Liebert GXT2\-6000RT208 -.RE -.sp This is an experimental driver\&. You have been warned\&. -.sp -This driver currently does not support modification of configuration parameters, such as the low battery warning time and automatic restart policy\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional settings in \fBups.conf\fR(5): @@ -61,40 +43,9 @@ This driver supports the following optional settings in \fBups.conf\fR(5): .RS 4 Set the speed of the serial connection \- 1200, 2400 (default), 4800, 9600 or 19200\&. .RE -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Richard Gregory -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arjen de Korte -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Nash Kaminski -.RE +Richard Gregory , Arjen de Korte .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/liebert-esp2.txt b/docs/man/liebert-esp2.txt index e71fb72..e34fb06 100644 --- a/docs/man/liebert-esp2.txt +++ b/docs/man/liebert-esp2.txt @@ -1,40 +1,21 @@ LIEBERT-ESP2(8) ============== -NAME +NAME ---- liebert-esp2 - Driver for Liebert UPS, using the ESP-II serial protocol NOTE ---- - This man page only documents the hardware-specific features of the -liebert-esp2 driver. For information about the core driver, see +liebert-esp2 driver. For information about the core driver, see linkman:nutupsdrv[8]. -SPECIAL CABLING NOTE --------------------- - -Be aware that an RS-232 cable with ONLY the RX, TX and ground pin -must be used when interfacing with GXT2 series UPS units (and possibly others), -since the handshaking lines are used for purposes other than RS-232 flow control. -Use of a standard RS-232 cable with full handshaking may result in -undesired operation and/or shutdown. It is therefore advisable to confirm -the proper cable/wiring with the diagram provided in the manual with your UPS. - SUPPORTED HARDWARE ------------------ - -Tested to work on the following units: - -* Liebert GXT2-6000RT208 - This is an experimental driver. You have been warned. -This driver currently does not support modification of configuration parameters, -such as the low battery warning time and automatic restart policy. - EXTRA ARGUMENTS --------------- @@ -43,22 +24,17 @@ This driver supports the following optional settings in linkman:ups.conf[5]: *baudrate=*'num':: Set the speed of the serial connection - 1200, 2400 (default), 4800, 9600 or 19200. -AUTHORS -------- - -* Richard Gregory -* Arjen de Korte -* Nash Kaminski +AUTHOR +------ +Richard Gregory , Arjen de Korte SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/liebert.8 b/docs/man/liebert.8 index d4fc4b6..7fe9f6c 100644 --- a/docs/man/liebert.8 +++ b/docs/man/liebert.8 @@ -1,13 +1,13 @@ '\" t .\" Title: liebert -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "LIEBERT" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "LIEBERT" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/liebert.txt b/docs/man/liebert.txt index b913659..dfaa795 100644 --- a/docs/man/liebert.txt +++ b/docs/man/liebert.txt @@ -8,14 +8,12 @@ liebert - Driver for Liebert contact-closure UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the liebert driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports some Liebert UPS equipment with a contact-closure interface. This includes the UPStation GXT2 with their contact-closure cable. The smart mode ("Multilink") cable is not supported by this @@ -44,10 +42,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/macosx-ups.8 b/docs/man/macosx-ups.8 index b726d06..953fb65 100644 --- a/docs/man/macosx-ups.8 +++ b/docs/man/macosx-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: macosx-ups -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "MACOSX\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "MACOSX\-UPS" "8" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,7 +43,7 @@ If the UPS is visible in the Energy Saver preferences pane of System Preferences .RS 4 Due to changes in the way that Mac OS X lists power sources, the \fBport\fR -parameter no longer has any effect\&. The rest of NUT still requires a value here, and our traditional "don\(cqt care" value is +parameter no longer has any effect\&. The rest of NUT still requres a value here, and our traditional "don\(cqt care" value is auto\&. .RE .PP @@ -63,7 +63,7 @@ This driver is a monitoring\-only driver, and cannot shut down an UPS on its own The default distribution of \fBapcupsd\fR installs a kernel extension which prevents Mac OS X from attaching to the UPS\&. In order to use this driver after installing apcupsd, you must first run the apcupsd\-uninstall script and reboot\&. .sp Note that other UPS monitoring solutions may show more detail than what is provided by the built\-in Mac OS X driver\&. In particular, voltages other than the battery voltage, as well as current and frequency, are typically not shown\&. It may be possible to monitor these values with \fBapcupsd\fR (for APC hardware only) or \fBusbhid-ups\fR(8)\&. -.SH "AUTHOR" +.SH "AUTHORS" .sp Charles Lepple .SH "SEE ALSO" @@ -74,26 +74,6 @@ Charles Lepple \fBnutupsdrv\fR(8) .SS "Internet resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The apcupsd home page: -http://www\&.apcupsd\&.org/ -.RE +The apcupsd home page: http://www\&.apcupsd\&.org/ diff --git a/docs/man/macosx-ups.txt b/docs/man/macosx-ups.txt index 2338be2..956abde 100644 --- a/docs/man/macosx-ups.txt +++ b/docs/man/macosx-ups.txt @@ -3,19 +3,16 @@ MACOSX-UPS(8) NAME ---- - macosx-ups - monitor for Mac OS X built-in UPS and battery driver NOTE ---- - This man page only documents the hardware-specific features of the *macosx-ups* driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - *macosx-ups* supports any USB HID Power Device Class (PDC) UPS which is matched by the Mac OS X built-in drivers. It also can monitor a laptop internal battery as though it were an UPS. @@ -26,10 +23,9 @@ Preferences, this driver should be able to monitor it. EXTRA ARGUMENTS ---------------- - *port*=auto:: Due to changes in the way that Mac OS X lists power sources, the *port* -parameter no longer has any effect. The rest of NUT still requires a value here, +parameter no longer has any effect. The rest of NUT still requres a value here, and our traditional "don't care" value is `auto`. *model*='regex':: @@ -64,9 +60,8 @@ the battery voltage, as well as current and frequency, are typically not shown. It may be possible to monitor these values with *apcupsd* (for APC hardware only) or linkman:usbhid-ups[8]. -AUTHOR ------- - +AUTHORS +------- Charles Lepple SEE ALSO @@ -76,11 +71,10 @@ linkman:usbhid-ups[8], *pmset*(8), *regex*(3) The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The apcupsd home page: http://www.apcupsd.org/ +The apcupsd home page: http://www.apcupsd.org/ diff --git a/docs/man/masterguard.8 b/docs/man/masterguard.8 index 072a1cb..0947360 100644 --- a/docs/man/masterguard.8 +++ b/docs/man/masterguard.8 @@ -1,13 +1,13 @@ '\" t .\" Title: masterguard .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "MASTERGUARD" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "MASTERGUARD" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,14 +32,9 @@ masterguard \- Driver for Masterguard UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the masterguard driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "NOTE" -.sp -Please note that this driver is deprecated and will not receive new development\&. If it works for managing your devices \(em fine, but if you are running it to try setting up a new device, please consider the newer \fBnutdrv_qx\fR(8) instead, which should handle all \fIQ*\fR protocol variants for NUT\&. -.sp -Please do also report if your device works with this driver, but \fBnutdrv_qx\fR(8) would not actually support it with any subdriver! .SH "SUPPORTED HARDWARE" .sp -This driver supports Masterguard UPS equipment (serial connection only)\&. +This driver supports Masterguard UPS equipment\&. .SH "EXTRA ARGUMENTS" .PP \fBCS\fR @@ -50,9 +45,6 @@ Cancel the shutdown procedure\&. .sp Michael Spanier .SH "SEE ALSO" -.SS "Newer driver:" -.sp -\fBnutdrv_qx\fR(8) .SS "The core driver:" .sp \fBnutupsdrv\fR(8) diff --git a/docs/man/masterguard.txt b/docs/man/masterguard.txt index 373fc2f..0820025 100644 --- a/docs/man/masterguard.txt +++ b/docs/man/masterguard.txt @@ -3,33 +3,17 @@ MASTERGUARD(8) NAME ---- - masterguard - Driver for Masterguard UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the masterguard driver. For information about the core driver, see linkman:nutupsdrv[8]. -NOTE ----- - -Please note that this driver is deprecated and will not receive -new development. If it works for managing your devices -- fine, -but if you are running it to try setting up a new device, please -consider the newer linkman:nutdrv_qx[8] instead, which should -handle all 'Q*' protocol variants for NUT. - -Please do also report if your device works with this driver, -but linkman:nutdrv_qx[8] would not actually support it with any -subdriver! - SUPPORTED HARDWARE ------------------ - -This driver supports Masterguard UPS equipment (serial connection only). +This driver supports Masterguard UPS equipment. EXTRA ARGUMENTS --------------- @@ -39,23 +23,15 @@ Cancel the shutdown procedure. AUTHOR ------ - Michael Spanier SEE ALSO -------- -Newer driver: -~~~~~~~~~~~~~ - -linkman:nutdrv_qx[8] - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/metasys.8 b/docs/man/metasys.8 index 3e4ae30..0ef74a8 100644 --- a/docs/man/metasys.8 +++ b/docs/man/metasys.8 @@ -1,13 +1,13 @@ '\" t .\" Title: metasys .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "METASYS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "METASYS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/metasys.txt b/docs/man/metasys.txt index d134fe5..4a6fc2e 100644 --- a/docs/man/metasys.txt +++ b/docs/man/metasys.txt @@ -1,7 +1,7 @@ METASYS(8) ========== -NAME +NAME ---- metasys - Driver for Meta System UPS equipment @@ -10,7 +10,7 @@ NOTE ---- This man page only documents the hardware-specific features of the -metasys driver. For information about the core driver, see +metasys driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE @@ -32,19 +32,16 @@ The driver should support all the common features of the ups models: CABLING ------- - The needed cable is a standard pin-to-pin serial cable with at least pins 2, 3, and 5 (on DB9 connector) connected. EXTRA ARGUMENTS --------------- - This driver supports no extra arguments from linkman:ups.conf[5]. BUGS ---- - -This driver has been tested on Meta System HF Millennium 820 and +This driver has been tested on Meta System HF Millennium 820 and ally HF 1000 only. Any information about the use of the driver with the other listed @@ -52,7 +49,6 @@ UPS are really welcome. AUTHOR ------ - Fabio Di Niro SEE ALSO @@ -60,10 +56,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-shut.8 b/docs/man/mge-shut.8 index 4e7d572..c3faf44 100644 --- a/docs/man/mge-shut.8 +++ b/docs/man/mge-shut.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-shut .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "MGE\-SHUT" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "MGE\-SHUT" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -89,7 +89,7 @@ The default value is 30 (in seconds)\&. Usually this \fBmust be greater\fR than offdelay, but the driver will \fBnot\fR -warn you upon startup if it isn\(cqt\&. Some UPSes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting \fIondelay = \-1\fR in \fBups\&.conf\fR diff --git a/docs/man/mge-shut.txt b/docs/man/mge-shut.txt index 91d96b7..d8e19c3 100644 --- a/docs/man/mge-shut.txt +++ b/docs/man/mge-shut.txt @@ -1,4 +1,4 @@ -MGE-SHUT(8) +MGE-SHUT(8) =========== NAME @@ -44,7 +44,7 @@ sent (via the *-k* switch). + The default value is 20 (in seconds). Usually this *must be lower* than 'ondelay', but the driver will *not* warn you upon startup if it isn't. - + *ondelay*='num':: Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off. This @@ -53,7 +53,7 @@ a power failure. + The default value is 30 (in seconds). Usually this *must be greater* than offdelay, but the driver will *not* warn you upon startup if it -isn't. Some UPSes will restart no matter what, even if the power is +isn't. Some UPS'es will restart no matter what, even if the power is (still) out at the moment this timer elapses. In that case, you could try if setting 'ondelay = -1' in *ups.conf* helps. + @@ -90,10 +90,8 @@ SEE ALSO The core driver ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/mge-utalk.8 b/docs/man/mge-utalk.8 index e84fc4f..0c8d5d9 100644 --- a/docs/man/mge-utalk.8 +++ b/docs/man/mge-utalk.8 @@ -1,13 +1,13 @@ '\" t .\" Title: mge-utalk -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "MGE\-UTALK" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "MGE\-UTALK" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -54,93 +54,22 @@ This man page only documents the hardware\-specific features of the mge\-utalk d .sp mge\-utalk supports the following legacy units, using the MGE UTalk protocol: .sp +.if n \{\ .RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c .\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Pulsar ESV+ +.nf +Pulsar ESV+, +Pulsar ES+, +Pulsar EL, +Pulsar EX, +Pulsar EXtreme, +Comet EXtreme, +Comet (Utalk Serial Card, ref 66060), +Galaxy (Utalk Serial Card, ref 66060)\&. +.fi +.if n \{\ .RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c .\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Pulsar ES+ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Pulsar EL -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Pulsar EX -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Pulsar EXtreme -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Comet EXtreme -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Comet (Utalk Serial Card, ref 66060) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Galaxy (Utalk Serial Card, ref 66060) -.RE .sp This driver also support some newer models with backward UTalk compatibility, such as Pulsar Evolution and Pulsar EXtreme C\&. As these models also support the SHUT protocol, prefer mge\-shut for serial communication, or use the USB port, if available, with the usbhid\-ups driver\&. .SH "EXTRA ARGUMENTS" @@ -179,84 +108,9 @@ Set this flag if you are running Linux on an Oldworld Macintosh box (all beige A .SS "Repetitive timeout and staleness" .sp Older models, such as ES/ESV ones, might report repetitive "data stale" errors\&. This is due to the fact that these models don\(cqt support too much polling\&. To solve this problem, add "pollinterval=20" in ups\&.conf, and change the value of MAXAGE to 25 in upsd\&.conf, and DEADTIME to 25 in upsmon\&.conf\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Hans Ekkehard Plesser -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arnaud Quette -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Martin Loyer -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Patrick Agrain -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Nicholas Reilly -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Dave Abbott -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Marek Kralewski -.RE +Hans Ekkehard Plesser, Arnaud Quette, Martin Loyer, Patrick Agrain, Nicholas Reilly, Dave Abbott, Marek Kralewski .SH "SEE ALSO" .SS "The core driver" .sp diff --git a/docs/man/mge-utalk.txt b/docs/man/mge-utalk.txt index 4dd0384..ef11baa 100644 --- a/docs/man/mge-utalk.txt +++ b/docs/man/mge-utalk.txt @@ -1,4 +1,4 @@ -MGE-UTALK(8) +MGE-UTALK(8) ============ NAME @@ -14,7 +14,7 @@ SYNOPSIS *mge-utalk* -a 'UPS_NAME' ['OPTIONS'] NOTE: This man page only documents the hardware-specific features of the -mge-utalk driver. For information about the core driver, see +mge-utalk driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE @@ -22,14 +22,14 @@ SUPPORTED HARDWARE mge-utalk supports the following legacy units, using the MGE UTalk protocol: -* Pulsar ESV+ -* Pulsar ES+ -* Pulsar EL -* Pulsar EX -* Pulsar EXtreme -* Comet EXtreme -* Comet (Utalk Serial Card, ref 66060) -* Galaxy (Utalk Serial Card, ref 66060) + Pulsar ESV+, + Pulsar ES+, + Pulsar EL, + Pulsar EX, + Pulsar EXtreme, + Comet EXtreme, + Comet (Utalk Serial Card, ref 66060), + Galaxy (Utalk Serial Card, ref 66060). This driver also support some newer models with backward UTalk compatibility, such as Pulsar Evolution and Pulsar EXtreme C. As these models also support @@ -75,26 +75,24 @@ This is due to the fact that these models don't support too much polling. To solve this problem, add "pollinterval=20" in ups.conf, and change the value of MAXAGE to 25 in upsd.conf, and DEADTIME to 25 in upsmon.conf. -AUTHORS -------- +AUTHOR +------ -* Hans Ekkehard Plesser -* Arnaud Quette -* Martin Loyer -* Patrick Agrain -* Nicholas Reilly -* Dave Abbott -* Marek Kralewski +Hans Ekkehard Plesser, +Arnaud Quette, +Martin Loyer, +Patrick Agrain, +Nicholas Reilly, +Dave Abbott, +Marek Kralewski SEE ALSO -------- The core driver ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/microdowell.8 b/docs/man/microdowell.8 index 8cfe267..86eb1a8 100644 --- a/docs/man/microdowell.8 +++ b/docs/man/microdowell.8 @@ -1,13 +1,13 @@ '\" t .\" Title: microdowell .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "MICRODOWELL" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "MICRODOWELL" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/microdowell.txt b/docs/man/microdowell.txt index a23ead2..9277379 100644 --- a/docs/man/microdowell.txt +++ b/docs/man/microdowell.txt @@ -15,9 +15,8 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - -This driver was developed for the Enterprise Nxx and Bxx models. -Other Microdowell models may work, too. +This driver was developed for the Enterprise Nxx and Bxx models. Other +Microdowell models may work, too. EXTRA ARGUMENTS --------------- @@ -27,7 +26,6 @@ linkman:ups.conf[5]. AUTHOR ------ - Elio Corbolante SEE ALSO @@ -35,10 +33,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/microsol-apc.8 b/docs/man/microsol-apc.8 deleted file mode 100644 index 4d06ad0..0000000 --- a/docs/man/microsol-apc.8 +++ /dev/null @@ -1,146 +0,0 @@ -'\" t -.\" Title: microsol-apc -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "MICROSOL\-APC" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -microsol-apc \- Driver for APC Back\-UPS BR UPS equipment -.SH "NOTE" -.sp -This man page only documents the hardware\-specific features of the microsol\-apc driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "SUPPORTED HARDWARE" -.sp -This driver supports the following UPS models: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -APC Back\-UPS BZ1500\-BR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -APC Back\-UPS BZ2200I\-BR -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -APC Back\-UPS BZ2200BI\-BR -.RE -.sp -In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the entire Microsol line was being sold under the APC brand\&. This driver supports these newer, APC\-branded models\&. Older equipment should use \fBsolis\fR(8)\&. -.SH "EXTRA ARGUMENTS" -.sp -This driver support the following extra optional settings in the \fBups.conf\fR(5)\&. -.sp -\fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) -.sp -\fBprgshut = 1\fR \- (default = 0, no programmable shutdown ) -.SH "COMMANDS" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -shutdown\&.return \- Shut down in \&.3 minutes and restart in \&.3 minutes -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -shutdown\&.stayoff \- Shut down in \&.3 minutes and do not return -.RE -.SH "ISSUES" -.sp -For other APC\-Microsol models, the reported voltages, currents and power will be incorrect, as the communication protocol reports unprocessed data instead of real values, needing model\-specific post\-processing by the driver\&. Monitoring of UPS state (on\-battery/on\-line, critical battery) should work for other models, but is untested\&. -.SH "AUTHORS" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Ygor A\&. S\&. Regados -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Roberto P\&. Velloso -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Silvino B\&. Magalhães -.RE -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/microsol-apc.txt b/docs/man/microsol-apc.txt deleted file mode 100644 index 74e3225..0000000 --- a/docs/man/microsol-apc.txt +++ /dev/null @@ -1,73 +0,0 @@ -MICROSOL-APC(8) -=============== - -NAME ----- - -microsol-apc - Driver for APC Back-UPS BR UPS equipment - -NOTE ----- - -This man page only documents the hardware-specific features of the -microsol-apc driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This driver supports the following UPS models: - - * APC Back-UPS BZ1500-BR - * APC Back-UPS BZ2200I-BR - * APC Back-UPS BZ2200BI-BR - -In 2009, Schneider Electric acquired Microsol Technologies, and by 2012, the -entire Microsol line was being sold under the APC brand. This driver supports -these newer, APC-branded models. Older equipment should use linkman:solis[8]. - -EXTRA ARGUMENTS ---------------- - -This driver support the following extra optional settings in the -linkman:ups.conf[5]. - -*battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) - -*prgshut = 1* - (default = 0, no programmable shutdown ) - -COMMANDS --------- - - * shutdown.return - Shut down in .3 minutes and restart in .3 minutes - - * shutdown.stayoff - Shut down in .3 minutes and do not return - -ISSUES ------- - -For other APC-Microsol models, the reported voltages, currents and power will -be incorrect, as the communication protocol reports unprocessed data instead of -real values, needing model-specific post-processing by the driver. Monitoring -of UPS state (on-battery/on-line, critical battery) should work for other -models, but is untested. - -AUTHORS -------- - -* Ygor A. S. Regados -* Roberto P. Velloso -* Silvino B. Magalhães - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/netxml-ups.8 b/docs/man/netxml-ups.8 index ebb1a93..3548020 100644 --- a/docs/man/netxml-ups.8 +++ b/docs/man/netxml-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: netxml-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NETXML\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NETXML\-UPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ netxml-ups \- Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP P This man page only documents the hardware\-specific features of the netxml\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -netxml\-ups supports all recent Eaton / MGE models which use a Network Management Card or Proxy (MGE XML/HTTP protocol based)\&. This applies to both Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS\&. Supported card and proxy models are: +netxml\-ups support all recent Eaton / MGE models which use a Network Management Card or Proxy (MGE XML/HTTP protocol based)\&. This applies to both Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS\&. Supported card and proxy models are: .sp .RS 4 .ie n \{\ @@ -142,11 +142,6 @@ Set the shutdown timer, in seconds\&. After \fIvalue\fR seconds running on battery, the local system will receive a notification to shutdown\&. Defaults to "none" (disabled)\&. .RE -.PP -\fBdo_convert_deci\fR -.RS 4 -If this flag value is present, the driver assumes you have a very old MGE networked UPS (or rather an old network management card firmware) which serves certain measurements spelled 10x too big in the XML markup\&. Originally such measurements were decimated by the driver \(em but this is wrong for newer, more sane, devices \(em so this behavior was deprecated and is now disabled by default\&. Enabling this flag in configuration of a particular driver instance restores the old behavior for those measurements\&. -.RE .SH "IMPLEMENTATION" .sp The hostname of the UPS is specified with the "port" value in \fBups\&.conf\fR, i\&.e\&.: diff --git a/docs/man/netxml-ups.txt b/docs/man/netxml-ups.txt index acc672e..86c86dc 100644 --- a/docs/man/netxml-ups.txt +++ b/docs/man/netxml-ups.txt @@ -1,23 +1,20 @@ netxml-ups(8) ============= -NAME +NAME ---- - netxml-ups - Driver for Eaton / MGE Network Management Card / Proxy (XML/HTTP Protocol) equipment NOTE ---- - This man page only documents the hardware-specific features of the -netxml-ups driver. For information about the core driver, see +netxml-ups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - -netxml-ups supports all recent Eaton / MGE models which use a Network +netxml-ups support all recent Eaton / MGE models which use a Network Management Card or Proxy (MGE XML/HTTP protocol based). This applies to both Eaton (previously MGE Office Protection Systems) and to MGE UPS SYSTEMS. Supported card and proxy models are: @@ -27,7 +24,7 @@ Supported card and proxy models are: * NMC Transverse (Ref 66074), * NMC & Modbus/JBus (Ref 66103), * Network Management Proxy, - * ePDU Monitored (newer version). + * ePDU Monitored (newer version). Older models, such as SNMP card (Ref 66062 and Ref 66045), use the SNMP protocol and should use the linkman:snmp-ups[8] driver with the "mibs=mge" @@ -35,8 +32,7 @@ parameter. EXTRA ARGUMENTS --------------- - -This driver supports the following optional settings in the +This driver supports the following optional settings in the linkman:ups.conf[5]: *timeout*='value':: @@ -70,18 +66,8 @@ Set the shutdown timer, in seconds. After 'value' seconds running on battery, the local system will receive a notification to shutdown. Defaults to "none" (disabled). -*do_convert_deci*:: -If this flag value is present, the driver assumes you have a very old -MGE networked UPS (or rather an old network management card firmware) -which serves certain measurements spelled 10x too big in the XML markup. -Originally such measurements were decimated by the driver -- but this is -wrong for newer, more sane, devices -- so this behavior was deprecated -and is now disabled by default. Enabling this flag in configuration of a -particular driver instance restores the old behavior for those measurements. - IMPLEMENTATION -------------- - The hostname of the UPS is specified with the "port" value in *ups.conf*, i.e.: @@ -99,7 +85,6 @@ linkman:ups.conf[5]) to at least 5 seconds. KNOWN ISSUES ------------ - Don't connect to the UPS through a proxy. Although it would be trivial to add support for proxies, this is not recommended and don't ask for it. Not only because it will prevent the driver to make a persistent connection to the UPS, @@ -108,7 +93,6 @@ whatever reason), the driver will no longer be able to reach the UPS. AUTHORS ------- - Arjen de Korte SEE ALSO @@ -116,10 +100,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut-driver-enumerator.8 b/docs/man/nut-driver-enumerator.8 deleted file mode 100644 index 49576a9..0000000 --- a/docs/man/nut-driver-enumerator.8 +++ /dev/null @@ -1,158 +0,0 @@ -'\" t -.\" Title: nut-driver-enumerator -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "NUT\-DRIVER\-ENUMERA" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -nut-driver-enumerator \- tool to map NUT device entries to service instances -.SH "SYNOPSIS" -.sp -\fBnut\-driver\-enumerator\&.sh\fR \-h -.sp -\fBnut\-driver\-enumerator\&.sh\fR (no args) -.sp -\fBnut\-driver\-enumerator\&.sh\fR [\-\-COMMAND] -.SH "DESCRIPTION" -.sp -\fBnut\-driver\-enumerator\&.sh\fR implements the set\-up and querying of the mapping between NUT driver configuration sections for each individual monitored device, and the operating system service management framework service instances into which such drivers are wrapped for independent execution and management (on platforms where NUT currently supports this integration \(em currently this covers Linux distributions with systemd and systems derived from Solaris 10 codebase, including proprietary Sun/Oracle Solaris and numerous open\-source illumos distributions with SMF)\&. It may be not installed in packaging for other operating systems\&. -.sp -This script provides a uniform interface for further NUT tools such as \fBupsdrvsvcctl\fR(8) to implement their logic as platform\-independently as was possible and practical\&. It is not currently intended for end\-user consumption (and so is located in the \fIlibexec\fR directory), with \fBupsdrvsvcctl\fR exposing the most useful data and actions with its \fIlist\fR and \fIresync\fR arguments\&. -.sp -One part of the platform complexity that \fBnut\-driver\-enumerator\&.sh\fR hides is the difference of rules for valid service instance names in various frameworks, as well as system tools and naming patterns involved\&. -.SH "COMMANDS" -.PP -\fBnut\-driver\-enumerator\&.sh (no args)\fR -.RS 4 -Update wrapping of devices into services -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-daemon(=freq)\fR -.RS 4 -Update wrapping of devices into services in an infinite loop; Default freq is 60 sec\&. -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-reconfigure\fR -.RS 4 -Stop and un\-register all service instances and recreate them (e\&.g\&. if new dependency template was defined in a new version of the script or package) -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-get\-service\-framework\fR -.RS 4 -Print the detected service management framework in this OS -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-list\-devices\fR -.RS 4 -Print list of devices in NUT config -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-list\-services\fR -.RS 4 -Print list of service instances which wrap registered NUT devices (full name of service unit) -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-list\-instances\fR -.RS 4 -Print list of service instances which wrap registered NUT devices (just instance suffix) -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-get\-service\-for\-device DEV\fR -.RS 4 -Print the full name of service unit which wraps a NUT device named -DEV -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-get\-device\-for\-service SVC\fR -.RS 4 -Print the NUT device name for full or instance\-suffix name of a service unit -SVC -which wraps it -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-list\-services\-for\-devices\fR -.RS 4 -Print a TAB\-separated list of service units and corresponding NUT device names which each such unit wraps -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-show\-all\-configs\fR -.RS 4 -Show the complete normalized list of device configuration blocks (same as used later by the parser in the script to make decisions) -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-show\-device\-config DEV\fR -.RS 4 -Show configuration block of the specified NUT device -.RE -.PP -\fBnut\-driver\-enumerator\&.sh \-\-show\-device\-config\-value DEV KEY\fR -.RS 4 -Show single configuration key of the specified NUT device -.RE -.SH "ENVIRONMENT VARIABLES" -.sp -By default \fBnut\-driver\-enumerator\&.sh\fR executed without arguments would automatically start any newly registered service instances wrapping the NUT devices, and would also restart the nut\-server service if the configuration was changed\&. Environment variable AUTO_START=no disables this default part of the action\&. -.sp -Also see below for environment variable REPORT_RESTART_42=no value\&. -.SH "DIAGNOSTICS" -.sp -\fBnut\-driver\-enumerator\&.sh\fR will return a zero exit code if it had nothing to do (all currently defined drivers match all of the currently defined service instances, one\-to\-one) and if it had no errors in its operation\&. -.sp -Other codes can be returned as a result of re\-synchronization of mappings: -.PP -\fB42\fR -.RS 4 -NUT device sections and system service instances differed before, but now match up \(em so now the caller should likely restart some services\&. Note that the drivers\*(Aq service instances may have been started or stopped as required (by -AUTO_START=yes) \(em but maybe the upsmon or upssched services should restart\&. If you pass environment variable -REPORT_RESTART_42=no -then this codepath would return 0 (as a non\-error exit code)\&. In default mode, such non\-null reconfiguration should cause the nut\-driver\-enumerator service to restart and this would propagate to other NUT services that depend on it\&. -.RE -.PP -\fB13\fR -.RS 4 -Sections and services differed, and still do not match up -.RE -.PP -\fB1\fR -.RS 4 -Bad inputs, e\&.g\&. unrecognized service management framework -.RE -.PP -\fB2\fR -.RS 4 -Absent or unreadable -ups\&.conf -file -.RE -.SH "AUTHOR" -.sp -Jim Klimov -.SH "SEE ALSO" -.sp -\fBupsdrvsvcctl\fR(8), \fBups.conf\fR(5) -.SS "Internet resources:" -.sp -The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nut-driver-enumerator.txt b/docs/man/nut-driver-enumerator.txt deleted file mode 100644 index 6fe92db..0000000 --- a/docs/man/nut-driver-enumerator.txt +++ /dev/null @@ -1,150 +0,0 @@ -NUT-DRIVER-ENUMERATOR(8) -======================== - -NAME ----- - -nut-driver-enumerator - tool to map NUT device entries to service instances - -SYNOPSIS --------- - -*nut-driver-enumerator.sh* -h - -*nut-driver-enumerator.sh* (no args) - -*nut-driver-enumerator.sh* [--COMMAND] - - -DESCRIPTION ------------ - -*nut-driver-enumerator.sh* implements the set-up and querying of the -mapping between NUT driver configuration sections for each individual -monitored device, and the operating system service management framework -service instances into which such drivers are wrapped for independent -execution and management (on platforms where NUT currently supports -this integration -- currently this covers Linux distributions with -systemd and systems derived from Solaris 10 codebase, including -proprietary Sun/Oracle Solaris and numerous open-source illumos -distributions with SMF). It may be not installed in packaging for -other operating systems. - -This script provides a uniform interface for further NUT tools -such as linkman:upsdrvsvcctl[8] to implement their logic as -platform-independently as was possible and practical. It is not -currently intended for end-user consumption (and so is located in -the 'libexec' directory), with *upsdrvsvcctl* exposing the most -useful data and actions with its 'list' and 'resync' arguments. - -One part of the platform complexity that *nut-driver-enumerator.sh* -hides is the difference of rules for valid service instance names -in various frameworks, as well as system tools and naming patterns -involved. - -COMMANDS --------- - -*nut-driver-enumerator.sh (no args)*:: -Update wrapping of devices into services - -*nut-driver-enumerator.sh --daemon(=freq)*:: -Update wrapping of devices into services in an infinite loop; -Default freq is 60 sec. - -*nut-driver-enumerator.sh --reconfigure*:: -Stop and un-register all service instances and recreate them -(e.g. if new dependency template was defined in a new -version of the script or package) - -*nut-driver-enumerator.sh --get-service-framework*:: -Print the detected service management framework in this OS - -*nut-driver-enumerator.sh --list-devices*:: -Print list of devices in NUT config - -*nut-driver-enumerator.sh --list-services*:: -Print list of service instances which wrap registered -NUT devices (full name of service unit) - -*nut-driver-enumerator.sh --list-instances*:: -Print list of service instances which wrap registered -NUT devices (just instance suffix) - -*nut-driver-enumerator.sh --get-service-for-device DEV*:: -Print the full name of service unit which wraps a NUT -device named `DEV` - -*nut-driver-enumerator.sh --get-device-for-service SVC*:: -Print the NUT device name for full or instance-suffix name of -a service unit `SVC` which wraps it - -*nut-driver-enumerator.sh --list-services-for-devices*:: -Print a TAB-separated list of service units and corresponding -NUT device names which each such unit wraps - -*nut-driver-enumerator.sh --show-all-configs*:: -Show the complete normalized list of device configuration blocks -(same as used later by the parser in the script to make decisions) - -*nut-driver-enumerator.sh --show-device-config DEV*:: -Show configuration block of the specified NUT device - -*nut-driver-enumerator.sh --show-device-config-value DEV KEY*:: -Show single configuration key of the specified NUT device - -ENVIRONMENT VARIABLES ---------------------- - -By default *nut-driver-enumerator.sh* executed without arguments would -automatically start any newly registered service instances wrapping the -NUT devices, and would also restart the `nut-server` service if the -configuration was changed. Environment variable `AUTO_START=no` disables -this default part of the action. - -Also see below for environment variable `REPORT_RESTART_42=no` value. - -DIAGNOSTICS ------------ - -*nut-driver-enumerator.sh* will return a zero exit code if it had nothing -to do (all currently defined drivers match all of the currently defined -service instances, one-to-one) and if it had no errors in its operation. - -Other codes can be returned as a result of re-synchronization of mappings: - -*42*:: -NUT device sections and system service instances differed before, but -now match up -- so now the caller should likely restart some services. -Note that the drivers' service instances may have been started or stopped -as required (by `AUTO_START=yes`) -- but maybe the upsmon or upssched -services should restart. -If you pass environment variable `REPORT_RESTART_42=no` then -this codepath would return 0 (as a non-error exit code). -In default mode, such non-null reconfiguration should cause -the nut-driver-enumerator service to restart and this would -propagate to other NUT services that depend on it. - -*13*:: -Sections and services differed, and still do not match up - -*1*:: -Bad inputs, e.g. unrecognized service management framework - -*2*:: -Absent or unreadable `ups.conf` file - -AUTHOR ------- - -Jim Klimov - -SEE ALSO --------- - -linkman:upsdrvsvcctl[8], linkman:ups.conf[5] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut-ipmipsu.8 b/docs/man/nut-ipmipsu.8 index 021d322..c5fb963 100644 --- a/docs/man/nut-ipmipsu.8 +++ b/docs/man/nut-ipmipsu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-ipmipsu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUT\-IPMIPSU" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUT\-IPMIPSU" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -223,26 +223,6 @@ Arnaud Quette \fBnutupsdrv\fR(8) .SS "Internet resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -GNU FreeIPMI home page: -http://www\&.gnu\&.org/software/freeipmi/ -.RE +GNU FreeIPMI home page: http://www\&.gnu\&.org/software/freeipmi/ diff --git a/docs/man/nut-ipmipsu.txt b/docs/man/nut-ipmipsu.txt index 5191ea2..11c4f5c 100644 --- a/docs/man/nut-ipmipsu.txt +++ b/docs/man/nut-ipmipsu.txt @@ -1,4 +1,4 @@ -NUT-IPMIPSU(8) +NUT-IPMIPSU(8) ============== NAME @@ -100,19 +100,16 @@ Here is an example output for a Dell r610 server: AUTHOR ------ - Arnaud Quette SEE ALSO -------- - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* GNU FreeIPMI home page: http://www.gnu.org/software/freeipmi/ +GNU FreeIPMI home page: http://www.gnu.org/software/freeipmi/ diff --git a/docs/man/nut-recorder.8 b/docs/man/nut-recorder.8 index 856902d..1b03f48 100644 --- a/docs/man/nut-recorder.8 +++ b/docs/man/nut-recorder.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-recorder .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUT\-RECORDER" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUT\-RECORDER" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -96,9 +96,8 @@ You can then define a dummy device in \fBups.conf\fR(5): .sp Arnaud Quette .SH "SEE ALSO" -.SS "The dummy\-ups driver:" .sp \fBdummy-ups\fR(8) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nut-recorder.txt b/docs/man/nut-recorder.txt index edde4ae..e202239 100644 --- a/docs/man/nut-recorder.txt +++ b/docs/man/nut-recorder.txt @@ -1,19 +1,17 @@ NUT-RECORDER(8) =============== + NAME ---- - nut-recorder - utility to record device status and values changes SYNOPSIS -------- - *nut-recorder* 'device-name' [output-file] [interval] DESCRIPTION ----------- - *nut-recorder* is an utility to record sequences from running devices (such as power failures, or any other value changes) from upsd, and dump it in a .seq format. @@ -23,7 +21,6 @@ to replay the sequence. OPTIONS ------- - 'device-name':: Record the changes of this device. The format for this option is @@ -63,18 +60,14 @@ You can then define a dummy device in linkman:ups.conf[5]: AUTHOR ------ - Arnaud Quette SEE ALSO -------- -The dummy-ups driver: -~~~~~~~~~~~~~~~~~~~~~ - linkman:dummy-ups[8] -Internet resources: -~~~~~~~~~~~~~~~~~~~ +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut-scanner.8 b/docs/man/nut-scanner.8 index e1eaeb9..a18ba23 100644 --- a/docs/man/nut-scanner.8 +++ b/docs/man/nut-scanner.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nut-scanner -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUT\-SCANNER" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUT\-SCANNER" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -103,7 +103,7 @@ Scan NUT compatible power supplies available via IPMI on the current host, or ov .PP \fB\-E\fR | \fB\-\-eaton_serial\fR \fIserial ports\fR .RS 4 -Scan Eaton devices (XCP and SHUT) available via serial bus on the current host\&. This option must be requested explicitly, even for a complete scan\&. +Scan Eaton devices (XCP and SHUT) available via serial bus on the current host\&. This option must be requested explicitely, even for a complete scan\&. \fIserial ports\fR can be expressed in various forms: .sp @@ -127,7 +127,7 @@ to scan all serial ports\&. .sp -1 .IP \(bu 2.3 .\} -a single character indicating a port number (\fI0\fR +a single charcater indicating a port number (\fI0\fR (zero) for /dev/ttyS0 and /dev/ttyUSB0 on Linux, \fI1\fR for COM1 on Windows, @@ -144,7 +144,7 @@ for /dev/ttya on Solaris\&...) .IP \(bu 2.3 .\} a range of N characters, hyphen separated, describing the range of ports using -\fIX\-Y\fR, where X and Y are characters referring to the port number\&. +\fIX\-Y\fR, where X and Y are characters refering to the port number\&. .RE .sp .RS 4 @@ -229,9 +229,7 @@ used for authenticated SNMPv3 messages\&. This parameter is mandatory if you set .RS 4 Set the \fIauthentication protocol\fR -used for authenticated SNMPv3 messages\&. Allowed values are MD5, SHA, SHA256, SHA384 or SHA512 (depending on Net\-SNMP library capabilities; check help of the -nut\-scanner -binary program for the run\-time supported list)\&. Default value is MD5\&. +used for authenticated SNMPv3 messages\&. Allowed values are MD5 or SHA\&. Default value is MD5\&. .RE .PP \fB\-W\fR | \fB\-\-authPassword\fR \fIauthentication pass phrase\fR @@ -247,9 +245,7 @@ to authNoPriv or authPriv\&. .RS 4 Set the \fIprivacy protocol\fR -used for encrypted SNMPv3 messages\&. Allowed values are DES, AES, AES192 or AES256 (depending on Net\-SNMP library capabilities; check help of the -nut\-scanner -binary program for the run\-time supported list)\&. Default value is DES\&. +used for encrypted SNMPv3 messages\&. Allowed values are DES or AES\&. Default value is DES\&. .RE .PP \fB\-X\fR | \fB\-\-privPassword\fR \fIprivacy pass phrase\fR @@ -279,7 +275,7 @@ Specify the IPMI 1\&.5 authentication type to use (NONE, STRAIGHT_PASSWORD_KEY, IPMI interface , thus in IPMI 1\&.5 mode\&. .RE .PP -\fB\-L\fR | \fB\-\-cipher_suite_id\fR \fIcipher suite identifier\fR +\fB\-D\fR | \fB\-\-cipher_suite_id\fR \fIcipher suite identifier\fR .RS 4 Specify the IPMI 2\&.0 cipher suite ID to use\&. The Cipher Suite ID identifies a set of authentication, integrity, and confidentiality algorithms to use for IPMI 2\&.0 communication\&. The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the confidentiality algorithm identifies the algorithm to use for payload encryption (default=3)\&. .sp @@ -433,11 +429,6 @@ Display available bus that can be scanned , depending on how the binary has been .RS 4 Display only scan result\&. No information on currently scanned bus is displayed\&. .RE -.PP -\fB\-D\fR | \fB\-\-nut_debug_level\fR -.RS 4 -Raise the debugging level\&. Use this multiple times to see more details\&. -.RE .SH "EXAMPLES" .sp To scan USB devices only: @@ -470,6 +461,6 @@ To scan for Eaton serial devices on ports 1 and 2 (COM1 and COM2 on Windows): .SH "SEE ALSO" .sp \fBups.conf\fR(5) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nut-scanner.txt b/docs/man/nut-scanner.txt index 9560360..7f99465 100644 --- a/docs/man/nut-scanner.txt +++ b/docs/man/nut-scanner.txt @@ -1,14 +1,13 @@ NUT-SCANNER(8) ============== + NAME ---- - nut-scanner - scan communication buses for NUT devices SYNOPSIS -------- - *nut-scanner* -h *nut-scanner* ['OPTIONS'] @@ -30,7 +29,6 @@ both during compilation and runtime, then SNMP discovery will be available. OPTIONS ------- - *-h*:: Display the help text. @@ -56,7 +54,7 @@ List all NUT-compatible USB devices currently plugged in. Scan SNMP devices. Requires at least a 'start IP', and optionally, an 'end IP'. See specific SNMP OPTIONS for community and security settings. *-M* | *--xml_scan*:: -Scan XML/HTTP devices. Broadcast a network message on the current network interfaces to retrieve XML/HTTP capable devices. No IP required. +Scan XML/HTTP devices. Broadcast a network message on the current network interfaces to retrieve XML/HTTP capable devices. No IP required. *-O* | *--oldnut_scan*:: Scan NUT devices (i.e. upsd daemon) on IP ranging from 'start IP' to 'end IP'. @@ -69,14 +67,14 @@ Scan NUT compatible power supplies available via IPMI on the current host, or ov *-E* | *--eaton_serial* 'serial ports':: Scan Eaton devices (XCP and SHUT) available via serial bus on the current host. -This option must be requested explicitly, even for a complete scan. +This option must be requested explicitely, even for a complete scan. 'serial ports' can be expressed in various forms: - 'auto' to scan all serial ports. -- a single character indicating a port number ('0' (zero) for /dev/ttyS0 and +- a single charcater indicating a port number ('0' (zero) for /dev/ttyS0 and /dev/ttyUSB0 on Linux, '1' for COM1 on Windows, 'a' for /dev/ttya on Solaris...) - a range of N characters, hyphen separated, describing the range of -ports using 'X-Y', where X and Y are characters referring to the port number. +ports using 'X-Y', where X and Y are characters refering to the port number. - a single port name. - a list of ports name, coma separated, like '/dev/ttyS1,/dev/ttyS4'. @@ -118,13 +116,13 @@ Set the 'security level' used for SNMPv3 messages. Allowed values are: noAuthNoP Set the 'security name' used for authenticated SNMPv3 messages. This parameter is mandatory if you set 'security level'. *-w* | *--authProtocol* 'authentication protocol':: -Set the 'authentication protocol' used for authenticated SNMPv3 messages. Allowed values are MD5, SHA, SHA256, SHA384 or SHA512 (depending on Net-SNMP library capabilities; check help of the `nut-scanner` binary program for the run-time supported list). Default value is MD5. +Set the 'authentication protocol' used for authenticated SNMPv3 messages. Allowed values are MD5 or SHA. Default value is MD5. *-W* | *--authPassword* 'authentication pass phrase':: Set the 'authentication pass phrase' used for authenticated SNMPv3 messages. This parameter is mandatory if you set 'security level' to authNoPriv or authPriv. *-x* | *--privProtocol* 'privacy protocol':: -Set the 'privacy protocol' used for encrypted SNMPv3 messages. Allowed values are DES, AES, AES192 or AES256 (depending on Net-SNMP library capabilities; check help of the `nut-scanner` binary program for the run-time supported list). Default value is DES. +Set the 'privacy protocol' used for encrypted SNMPv3 messages. Allowed values are DES or AES. Default value is DES. *-X* | *--privPassword* 'privacy pass phrase':: Set the 'privacy pass phrase' used for encrypted SNMPv3 messages. This parameter is mandatory if you set 'security level' to authPriv. @@ -142,7 +140,7 @@ Specify the password to use when authenticating with the remote host (mandatory Specify the IPMI 1.5 authentication type to use (NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5) with the remote host (default=MD5). This forces connection through the 'lan' IPMI interface , thus in IPMI 1.5 mode. -*-L* | *--cipher_suite_id* 'cipher suite identifier':: +*-D* | *--cipher_suite_id* 'cipher suite identifier':: Specify the IPMI 2.0 cipher suite ID to use. The Cipher Suite ID identifies a set of authentication, integrity, and confidentiality algorithms to use for IPMI 2.0 communication. The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the @@ -175,9 +173,6 @@ Display available bus that can be scanned , depending on how the binary has been *-q* | *--quiet*:: Display only scan result. No information on currently scanned bus is displayed. -*-D* | *--nut_debug_level*:: -Raise the debugging level. Use this multiple times to see more details. - EXAMPLES -------- @@ -215,7 +210,7 @@ SEE ALSO linkman:ups.conf[5] -Internet resources: -~~~~~~~~~~~~~~~~~~~ +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nut.conf.5 b/docs/man/nut.conf.5 index cf06517..f7b7e24 100644 --- a/docs/man/nut.conf.5 +++ b/docs/man/nut.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: nut.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUT\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUT\&.CONF" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -94,7 +94,7 @@ above indicates that no upsmon should be running\&. .PP \fBPOWEROFF_WAIT\fR .RS 4 -Optional\&. At the end of an emergency system halt, the upsmon primary will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/FAQ\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. +Optional\&. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off\&. This may fail for a number of reasons\&. Most notably is the case that mains power returns during the shutdown process\&. See the section "Power races" in /usr/share/doc/nut/FAQ\&.txt\&.gz\&. The system will wait this long for the UPS to cut power, and then reboot\&. It should be long enough to exhaust the batteries, in case line power continues to be unavailable\&. On the other hand, it should not be so long that the system remains offline for an unreasonable amount of time if line power has returned\&. See sleep(1) for compatible time syntax\&. If you specify the time in seconds, use the "s" suffix\&. .RE .if n \{\ .sp @@ -118,25 +118,57 @@ this workaround might be dangerous under some circumstances\&. Please read http: .RS 4 .\} .nf - # /etc/nut/nut\&.conf\&. See nut\&.conf(5) - - MODE=none - - UPSD_OPTIONS="" - - UPSMON_OPTIONS="" - - # POWEROFF_WAIT=15m +# /etc/nut/nut\&.conf\&. See nut\&.conf(5) +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +MODE=none +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSD_OPTIONS="" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +UPSMON_OPTIONS="" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +# POWEROFF_WAIT=15m .fi .if n \{\ .RE .\} .SH "INTEGRATION" .sp -An init script, such as /etc/init\&.d/nut, is expected to source this file in order to determine which components have to be started\&. +An init script, such as /etc/init\&.d/nut, is expected to source this file in order to determine which component(s) has to be started\&. .SH "SEE ALSO" .sp \fBups.conf\fR(5), \fBupsd.conf\fR(5), \fBupsd.users\fR(5), \fBupsmon.conf\fR(5) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nut.conf.txt b/docs/man/nut.conf.txt index 90f7106..881a08a 100644 --- a/docs/man/nut.conf.txt +++ b/docs/man/nut.conf.txt @@ -3,7 +3,6 @@ NUT.CONF(5) NAME ---- - nut.conf - UPS definitions for Network UPS Tools DESCRIPTION @@ -65,7 +64,7 @@ more details. It is ignored when 'MODE' above indicates that no upsmon should be running. *POWEROFF_WAIT*:: -Optional. At the end of an emergency system halt, the upsmon primary +Optional. At the end of an emergency system halt, the upsmon master will signal the UPS to switch off. This may fail for a number of reasons. Most notably is the case that mains power returns during the shutdown process. See the section "Power races" in @@ -83,7 +82,6 @@ Please read http://bugs.debian.org/358696 for more details. EXAMPLE ------- ------- # /etc/nut/nut.conf. See nut.conf(5) MODE=none @@ -93,13 +91,12 @@ EXAMPLE UPSMON_OPTIONS="" # POWEROFF_WAIT=15m ------- INTEGRATION ----------- An init script, such as /etc/init.d/nut, is expected to source this -file in order to determine which components have to be started. +file in order to determine which component(s) has to be started. SEE ALSO -------- @@ -107,7 +104,6 @@ SEE ALSO linkman:ups.conf[5], linkman:upsd.conf[5], linkman:upsd.users[5], linkman:upsmon.conf[5] -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nutclient_authenticate.3 b/docs/man/nutclient_authenticate.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_authenticate.3 +++ b/docs/man/nutclient_authenticate.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_destroy.3 b/docs/man/nutclient_destroy.3 index 8269028..b2f546d 100644 --- a/docs/man/nutclient_destroy.3 +++ b/docs/man/nutclient_destroy.3 @@ -1 +1 @@ -.so man3/libnutclient_general.3 +.so libnutclient_general.3 diff --git a/docs/man/nutclient_device_forced_shutdown.3 b/docs/man/nutclient_device_forced_shutdown.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_device_forced_shutdown.3 +++ b/docs/man/nutclient_device_forced_shutdown.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_device_login.3 b/docs/man/nutclient_device_login.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_device_login.3 +++ b/docs/man/nutclient_device_login.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_device_master.3 b/docs/man/nutclient_device_master.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_device_master.3 +++ b/docs/man/nutclient_device_master.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_execute_device_command.3 b/docs/man/nutclient_execute_device_command.3 index ae0e4eb..36dc188 100644 --- a/docs/man/nutclient_execute_device_command.3 +++ b/docs/man/nutclient_execute_device_command.3 @@ -1 +1 @@ -.so man3/libnutclient_commands.3 +.so libnutclient_commands.3 diff --git a/docs/man/nutclient_get_device_command_description.3 b/docs/man/nutclient_get_device_command_description.3 index ae0e4eb..36dc188 100644 --- a/docs/man/nutclient_get_device_command_description.3 +++ b/docs/man/nutclient_get_device_command_description.3 @@ -1 +1 @@ -.so man3/libnutclient_commands.3 +.so libnutclient_commands.3 diff --git a/docs/man/nutclient_get_device_commands.3 b/docs/man/nutclient_get_device_commands.3 index ae0e4eb..36dc188 100644 --- a/docs/man/nutclient_get_device_commands.3 +++ b/docs/man/nutclient_get_device_commands.3 @@ -1 +1 @@ -.so man3/libnutclient_commands.3 +.so libnutclient_commands.3 diff --git a/docs/man/nutclient_get_device_description.3 b/docs/man/nutclient_get_device_description.3 index 6499d7b..95bc2dc 100644 --- a/docs/man/nutclient_get_device_description.3 +++ b/docs/man/nutclient_get_device_description.3 @@ -1 +1 @@ -.so man3/libnutclient_devices.3 +.so libnutclient_devices.3 diff --git a/docs/man/nutclient_get_device_num_logins.3 b/docs/man/nutclient_get_device_num_logins.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_get_device_num_logins.3 +++ b/docs/man/nutclient_get_device_num_logins.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_get_device_rw_variables.3 b/docs/man/nutclient_get_device_rw_variables.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_get_device_rw_variables.3 +++ b/docs/man/nutclient_get_device_rw_variables.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_get_device_variable_description.3 b/docs/man/nutclient_get_device_variable_description.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_get_device_variable_description.3 +++ b/docs/man/nutclient_get_device_variable_description.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_get_device_variable_values.3 b/docs/man/nutclient_get_device_variable_values.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_get_device_variable_values.3 +++ b/docs/man/nutclient_get_device_variable_values.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_get_device_variables.3 b/docs/man/nutclient_get_device_variables.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_get_device_variables.3 +++ b/docs/man/nutclient_get_device_variables.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_get_devices.3 b/docs/man/nutclient_get_devices.3 index 6499d7b..95bc2dc 100644 --- a/docs/man/nutclient_get_devices.3 +++ b/docs/man/nutclient_get_devices.3 @@ -1 +1 @@ -.so man3/libnutclient_devices.3 +.so libnutclient_devices.3 diff --git a/docs/man/nutclient_has_device.3 b/docs/man/nutclient_has_device.3 index 6499d7b..95bc2dc 100644 --- a/docs/man/nutclient_has_device.3 +++ b/docs/man/nutclient_has_device.3 @@ -1 +1 @@ -.so man3/libnutclient_devices.3 +.so libnutclient_devices.3 diff --git a/docs/man/nutclient_has_device_command.3 b/docs/man/nutclient_has_device_command.3 index ae0e4eb..36dc188 100644 --- a/docs/man/nutclient_has_device_command.3 +++ b/docs/man/nutclient_has_device_command.3 @@ -1 +1 @@ -.so man3/libnutclient_commands.3 +.so libnutclient_commands.3 diff --git a/docs/man/nutclient_has_device_variable.3 b/docs/man/nutclient_has_device_variable.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_has_device_variable.3 +++ b/docs/man/nutclient_has_device_variable.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_logout.3 b/docs/man/nutclient_logout.3 index d2c6e59..b7346a9 100644 --- a/docs/man/nutclient_logout.3 +++ b/docs/man/nutclient_logout.3 @@ -1 +1 @@ -.so man3/libnutclient_misc.3 +.so libnutclient_misc.3 diff --git a/docs/man/nutclient_set_device_variable_value.3 b/docs/man/nutclient_set_device_variable_value.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_set_device_variable_value.3 +++ b/docs/man/nutclient_set_device_variable_value.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_set_device_variable_values.3 b/docs/man/nutclient_set_device_variable_values.3 index cfb1867..087bc31 100644 --- a/docs/man/nutclient_set_device_variable_values.3 +++ b/docs/man/nutclient_set_device_variable_values.3 @@ -1 +1 @@ -.so man3/libnutclient_variables.3 +.so libnutclient_variables.3 diff --git a/docs/man/nutclient_tcp_create_client.3 b/docs/man/nutclient_tcp_create_client.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_create_client.3 +++ b/docs/man/nutclient_tcp_create_client.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutclient_tcp_disconnect.3 b/docs/man/nutclient_tcp_disconnect.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_disconnect.3 +++ b/docs/man/nutclient_tcp_disconnect.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutclient_tcp_get_timeout.3 b/docs/man/nutclient_tcp_get_timeout.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_get_timeout.3 +++ b/docs/man/nutclient_tcp_get_timeout.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutclient_tcp_is_connected.3 b/docs/man/nutclient_tcp_is_connected.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_is_connected.3 +++ b/docs/man/nutclient_tcp_is_connected.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutclient_tcp_reconnect.3 b/docs/man/nutclient_tcp_reconnect.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_reconnect.3 +++ b/docs/man/nutclient_tcp_reconnect.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutclient_tcp_set_timeout.3 b/docs/man/nutclient_tcp_set_timeout.3 index 350e176..7df5982 100644 --- a/docs/man/nutclient_tcp_set_timeout.3 +++ b/docs/man/nutclient_tcp_set_timeout.3 @@ -1 +1 @@ -.so man3/libnutclient_tcp.3 +.so libnutclient_tcp.3 diff --git a/docs/man/nutdrv_atcl_usb.8 b/docs/man/nutdrv_atcl_usb.8 index 31554a4..540c12e 100644 --- a/docs/man/nutdrv_atcl_usb.8 +++ b/docs/man/nutdrv_atcl_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_atcl_usb -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/09/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTDRV_ATCL_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTDRV_ATCL_USB" "8" "03/09/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,11 +34,7 @@ nutdrv_atcl_usb \- Driver for \*(AqATCL FOR UPS\*(Aq equipment This man page only documents the specific features of the nutdrv_atcl_usb driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -This driver is for UPS hardware which identifies itself as USB idVendor 0001 and idProduct 0000, and iManufacturer ATCL FOR UPS\&. Known manufacturers include Kanji and Plexus\&. -.sp -The UPS interface seems to be a generic USB\-to\-serial chip, and for hardware manufactured by Kanji and Plexus, the microcontroller appears to emulate a traditional contact\-closure interface\&. This translates into only three states in ups\&.status: \fBOL\fR, \fBOB\fR and \fBOB LB\fR (similar to \fBgenericups\fR(8)), with no other dynamic status values reported\&. -.sp -Note that these USB identifiers (including the iManufacturer string) have also been seen on devices that are supported by the fuji subdriver of \fBnutdrv_qx\fR(8)\&. +This driver is for UPS hardware which identifies itself as USB idVendor 0001 and idProduct 0000, and iManufacturer ATCL FOR UPS\&. Known manufacturers include Kanji and Plexus\&. The UPS interface seems to be a generic USB\-to\-serial chip, and for hardware manufactured by Kanji and Plexus, the microcontroller appears to emulate a traditional contact\-closure interface\&. This translates into only three states in ups\&.status: \fBOL\fR, \fBOB\fR and \fBOB LB\fR (similar to \fBgenericups\fR(8)), with no other dynamic status values reported\&. Note that these USB identifiers (including the iManufacturer string) have also been seen on devices that are supported by the fuji subdriver of \fBnutdrv_qx\fR(8)\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional setting: @@ -53,12 +49,12 @@ devices, such as .RE .SH "BUGS" .sp -The UPS returns the same code for "load power is off" as for "on line power"\&. This condition will not be observed if the NUT upsmon in primary mode runs on the box powered by the UPS, but may be an issue if the UPS is monitored by a remote (secondary) system\&. +The UPS returns the same code for "load power is off" as for "on line power"\&. This condition will not be observed if the NUT master is powered by the UPS, but may be an issue if the UPS is monitored by a remote system\&. .sp The time between the shutdown command and removal of power seems to be fixed at 30 seconds\&. Ensure that the NUT shutdown script is invoked as late as possible in the shutdown procedure (in case some services take longer than others to clean up)\&. .sp -Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using secondary \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. The solution to this problem is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. -.SH "AUTHOR" +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. The solution to this problem is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. +.SH "AUTHORS" .sp Charles Lepple .SH "SEE ALSO" diff --git a/docs/man/nutdrv_atcl_usb.txt b/docs/man/nutdrv_atcl_usb.txt index e955a01..8443e4a 100644 --- a/docs/man/nutdrv_atcl_usb.txt +++ b/docs/man/nutdrv_atcl_usb.txt @@ -3,31 +3,24 @@ NUTDRV_ATCL_USB(8) NAME ---- - nutdrv_atcl_usb - Driver for 'ATCL FOR UPS' equipment NOTE ---- - -This man page only documents the specific features of the nutdrv_atcl_usb +This man page only documents the specific features of the nutdrv_atcl_usb driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver is for UPS hardware which identifies itself as USB idVendor 0001 and idProduct 0000, and iManufacturer +ATCL FOR UPS+. Known manufacturers -include Kanji and Plexus. - -The UPS interface seems to be a generic USB-to-serial chip, and for -hardware manufactured by Kanji and Plexus, the microcontroller +include Kanji and Plexus. The UPS interface seems to be a generic USB-to-serial +chip, and for hardware manufactured by Kanji and Plexus, the microcontroller appears to emulate a traditional contact-closure interface. This translates into only three states in ups.status: *OL*, *OB* and *OB LB* (similar to -linkman:genericups[8]), with no other dynamic status values reported. - -Note that these USB identifiers (including the iManufacturer string) -have also been seen on devices that are supported by the `fuji` -subdriver of linkman:nutdrv_qx[8]. +linkman:genericups[8]), with no other dynamic status values reported. Note that +these USB identifiers (including the iManufacturer string) have also been seen +on devices that are supported by the `fuji` subdriver of linkman:nutdrv_qx[8]. EXTRA ARGUMENTS --------------- @@ -42,26 +35,23 @@ devices, such as linkman:nutdrv_qx[8]. BUGS ---- - The UPS returns the same code for "load power is off" as for "on line power". -This condition will not be observed if the NUT `upsmon` in primary mode runs -on the box powered by the UPS, but may be an issue if the UPS is monitored -by a remote (secondary) system. +This condition will not be observed if the NUT master is powered by the UPS, +but may be an issue if the UPS is monitored by a remote system. The time between the shutdown command and removal of power seems to be fixed at 30 seconds. Ensure that the NUT shutdown script is invoked as late as possible in the shutdown procedure (in case some services take longer than others to clean up). -Most contact-closure UPSes will not power down the load if the line power is -present. This can create a race when using secondary linkman:upsmon[8] -systems. See the linkman:upsmon[8] man page for more information. -The solution to this problem is to upgrade to a smart protocol UPS of some -kind that allows detection and proper load cycling on command. - -AUTHOR ------- +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] systems. +See the linkman:upsmon[8] man page for more information. The solution to this +problem is to upgrade to a smart protocol UPS of some kind that allows +detection and proper load cycling on command. +AUTHORS +------- Charles Lepple SEE ALSO @@ -69,20 +59,16 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] The generic serial driver: ~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:genericups[8] The Qx driver: ~~~~~~~~~~~~~~ - linkman:nutdrv_qx[8] (`fuji` subdriver) Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nutdrv_qx.8 b/docs/man/nutdrv_qx.8 index 1336d83..59e946f 100644 --- a/docs/man/nutdrv_qx.8 +++ b/docs/man/nutdrv_qx.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutdrv_qx .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/09/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTDRV_QX" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTDRV_QX" "8" "03/09/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,11 +34,9 @@ nutdrv_qx \- Driver for Q* protocol serial and USB based UPS equipment This man page only documents the hardware\-specific features of the \fBnutdrv_qx\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -The \fBnutdrv_qx\fR driver is known to work with various UPSes from \fIArmac\fR, \fIBlazer\fR, \fIEnergy Sistem\fR, \fIFenton Technologies\fR, \fIGeneral Electric\fR, \fIHunnox\fR, \fIMasterguard\fR, \fIMustek\fR, \fIPowercool\fR, \fIVoltronic Power\fR (rebranded by many, many \- have I said many? \- others\&... +The \fBnutdrv_qx\fR driver is known to work with various UPSes from \fIBlazer\fR, \fIEnergy Sistem\fR, \fIFenton Technologies\fR, \fIGeneral Electric\fR, \fIMustek\fR, \fIVoltronic Power\fR (rebranded by many, many \- have I said many? \- others\&.\&. Long story short: if your UPS came with a software called \fIViewpower\fR, chances are high that it works with this driver with one of the \fIvoltronic*\fR protocols or with the \fImecer\fR one) and many others\&. .sp -Long story short: if your UPS came with a software called \fIViewpower\fR, chances are high that it works with this driver with one of the \fIvoltronic*\fR protocols or with the \fImecer\fR one), and many others\&. -.sp -The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested or reported back\&. +The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested\&. .sp All devices with a serial interface and many with a USB interface are supported\&. .SH "EXTRA ARGUMENTS" @@ -115,8 +113,6 @@ seconds (if mains meanwhile returned)\&. .RS 4 Skip autodetection of the protocol to use and only use the one specified\&. Supported values: \fIbestups\fR, -\fIhunnox\fR, -\fImasterguard\fR, \fImecer\fR, \fImegatec\fR, \fImegatec/old\fR, @@ -140,16 +136,9 @@ ones setting the (only one, or both)\&. .RE .PP -\fBpollfreq =\fR \fInum\fR +\fBpollfreq =\fR \fIvalue\fR .RS 4 -Set polling interval for full updates, in seconds, to reduce the message traffic\&. Between two polling requests, the driver will do -\fIquick polls\fR -dealing just with -\fBups\&.status\fR -at an interval specified by the -\fBpollinterval\fR -driver option (details in -\fBups.conf\fR(5))\&. The default value is 30 (in seconds)\&. +Set polling frequency, in seconds, to reduce the data flow\&. Between two polling requests the driver will do \(oqquick polls\(cq dealing just with ups\&.status\&. The default value is 30 (in seconds)\&. .RE .sp If your UPS doesn\(cqt report either \fBbattery\&.charge\fR or \fBbattery\&.runtime\fR you may want to add the following ones in order to have guesstimated values: @@ -270,20 +259,6 @@ on the UPS DB9 communication port (Per Best Power\(cqs EPS\-0059) to \fIvalue\fR [0\&.\&.6]\&. .RE -.SS "MASTERGUARD PROTOCOL" -.PP -\fBslave_addr =\fR \fIvalue\fR -.RS 4 -Make the claim function verify it\(cqs talking to the specified -\fIslave address\fR -(\fBups\&.id\fR)\&. Safeguard against talking to the wrong one of several identical UPSes on the same USB bus\&. Note that when changing -\fBups\&.id\fR -(through -\fBupsrw\fR(8)) the driver will continue to talk to the UPS with the new -\fIslave address\fR, but won\(cqt claim it again on restart until the -\fBslave_addr\fR -parameter is adjusted\&. -.RE .SS "Q1 PROTOCOL" .PP \fBondelay\fR @@ -372,7 +347,7 @@ and \fBinput\&.frequency\&.low\fR\&. .RE .sp -These UPSes can be fine\-tuned to suit your needs enabling or disabling the following options (the driver should tell you which one the UPS is capable of on startup: the settable ones will be reported either are \fIenabled\fR or \fIdisabled\fR in the logs): +These UPSes can be fine\-tuned to suit your needs enabling or disabling the following options (the driver should tell you which one the UPS is capable of on startup: the settable ones will be reported either ar \fIenabled\fR or \fIdisabled\fR in the logs): .PP \fBalarm_control =\fR \fIstring\fR .RS 4 @@ -502,7 +477,7 @@ Device grid working range for P31 UPSes [Appliance/UPS]\&. \fBTESTING\fR .RS 4 .sp -This protocol comes with a couple of functions that are not enabled by default because of the lack of knowledge of some part of the communication protocol used by these UPSes by your friendly neighborhood developer\&. Since these functions are supposed to be queries to the UPS for some kind of information, they \fIshould\fR not make your UPS go boom\&. So if you are brave enough to risk your UPS and attached devices\*(Aq life to help the developers, this will be very appreciated\&.\&. \fBDo it at your own risk\fR\&. +This protocol comes with a couple of functions that are not enabled by default because of the lack of knowledge of some part of the communication protocol used by these UPSes by your friendly neighborhood developer\&. Since these functions are supposed to be queries to the UPS for some kind of informations, they \fIshould\fR not make your UPS go boom\&. So if you are brave enough to risk your UPS and attached devices\*(Aq life to help the developers, this will be very appreciated\&.\&. \fBDo it at your own risk\fR\&. .PP \fBtesting\fR .RS 4 @@ -571,34 +546,22 @@ Examples: .PP \fBbus =\fR \fIregex\fR .RS 4 -Select a UPS on a specific USB bus or group of buses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. .RE .PP -\fBdevice =\fR \fIregex\fR -.RS 4 -Select a UPS on a specific USB device or group of devices\&. The argument is a regular expression that must match the device name where the UPS is connected (e\&.g\&. -device="001", -device="00[1\-2]")\&. Note that device numbers are not guaranteed by the OS to be stable across re\-boots or device re\-plugging\&. -.RE -.PP \fBsubdriver =\fR \fIstring\fR .RS 4 Select a serial\-over\-USB subdriver to use\&. You have a choice between \fBcypress\fR, \fBfabula\fR, \fBfuji\fR, -\fBhunnox\fR, \fBippon\fR, \fBkrauler\fR, -\fBphoenix\fR, -\fBphoenixtec\fR, -\fBsgs\fR, -\fBsnr\fR, -\fBarmac\fR +\fBphoenix\fR and -\fBablerex\fR\&. When using this option, it is mandatory to also specify the +\fBsgs\fR\&. When using this option, it is mandatory to also specify the \fBvendorid\fR and \fBproductid\fR\&. @@ -614,11 +577,6 @@ subdriver\&. This is mandatory for some devices to work (LDLC, Dynamix and other or 0x4095), according to your device entry in NUT hardware compatibility list (HCL)\&. .RE -.PP -\fBnoscanlangid\fR -.RS 4 -If this flag is set, don\(cqt autoscan valid range for langid\&. -.RE .sp .it 1 an-trap .nr an-no-space-flag 1 @@ -628,13 +586,6 @@ If this flag is set, don\(cqt autoscan valid range for langid\&. \fBIMPLEMENTATION NOTES\fR .RS 4 .PP -\fB\fIarmac\fR\fR\fB subdriver\fR -.RS 4 -The Armac communication subdriver reproduces a communication protocol used by an old release of "PowerManagerII" software, which doesn\(cqt seem to be Armac specific: its banner is "2004 Richcomm Technologies, Inc\&. Dec 27 2005 ver 1\&.1\&." Maybe other Richcomm UPSes would work with this \(em maybe better than with the older standalone -richcomm_usb -driver\&. -.RE -.PP \fB\fIfabula\fR\fR\fB subdriver\fR .RS 4 This subdriver, meant to be used with the @@ -650,13 +601,6 @@ command ignores the values set in and makes the UPS turn on the load as soon as power is back\&. .RE .PP -\fB\fIhunnox\fR\fR\fB subdriver\fR -.RS 4 -This protocol subdriver is closely related to -\fIfabula\fR -one, with a few tweaks for devices not directly supported by that driver\&. -.RE -.PP \fB\fIfuji\fR\fR\fB subdriver\fR .RS 4 This subdriver, meant to be used with the @@ -686,19 +630,6 @@ support the shutdown commands, i\&.e\&.: and \fBload\&.off\fR\&. .RE -.PP -\fB\fIsnr\fR\fR\fB subdriver\fR -.RS 4 -This subdriver, meant to be used with the -\fImegatec\fR -protocol, does -\fBnot\fR -support the shutdown commands, i\&.e\&.: -\fBshutdown\&.return\fR, -\fBshutdown\&.stayoff\fR -and -\fBload\&.off\fR\&. -.RE .RE .SH "UPS COMMANDS" .sp @@ -762,34 +693,6 @@ Perform a battery test for the duration of \fIvalue\fR seconds (truncated to 60 seconds) [60\&.\&.5940]\&. .RE -.SS "MASTERGUARD PROTOCOL" -.PP -\fBbeeper\&.enable\fR -.RS 4 -Enable the UPS beeper\&. -.RE -.PP -\fBbeeper\&.disable\fR -.RS 4 -Disable the UPS beeper\&. -.RE -.PP -\fBtest\&.battery\&.start\fR \fIvalue\fR -.RS 4 -Perform a battery test for the duration of -\fIvalue\fR -seconds (truncated to 60 seconds) [0\&.\&.5940]\&. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds)\&. -.RE -.PP -\fBbypass\&.start\fR -.RS 4 -Put the UPS in bypass mode -.RE -.PP -\fBbypass\&.stop\fR -.RS 4 -Take the UPS in normal mode -.RE .sp .it 1 an-trap .nr an-no-space-flag 1 @@ -1157,9 +1060,6 @@ Both the \fBload\&.off\fR and \fBshutdown\&.stayoff\fR instant commands are mean Some models report a bogus value for the beeper status (will always be \fIenabled\fR or \fIdisabled\fR)\&. So, the \fBbeeper\&.toggle\fR command may appear to have no effect in the status reported by the driver when, in fact, it is working fine\&. .sp The temperature and load value is known to be bogus in some models\&. -.SS "MASTERGUARD UNITS" -.sp -The driver is supposed to support both "new" A series (A700/1000/2000/3000 and their \-19 cousins) and E series (E60/100/200) but was tested only on A due to lack of E hardware\&. .SS "VOLTRONIC\-QS UNITS" .sp Both \fBload\&.off\fR and \fBshutdown\&.stayoff\fR instant commands are known to work as expected (i\&.e\&. turn the load off indefinitely) only if mains is present, otherwise, as soon as mains returns the load will be powered\&. @@ -1175,11 +1075,9 @@ After issuing a \fBshutdown\&.return\fR instant command, the UPS won\(cqt wait \ .IP \(bu 2.3 .\} if the load has been previously (no matter how long before) powered off through -\fBload\&.off\fR/\fBshutdown\&.stayoff\fR -\fIand\fR +\fBload\&.off\fR/\fBshutdown\&.stayoff\fR\fIand\fR powered on through -\fBload\&.on\fR/\fBshutdown\&.stop\fR -\fIand\fR +\fBload\&.on\fR/\fBshutdown\&.stop\fR\fIand\fR .RE .sp .RS 4 @@ -1707,107 +1605,12 @@ T} .sp 1 .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Daniele Pezzini -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arnaud Quette -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -John Stamp -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Peter Selinger -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arjen de Korte -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Alexander Gordeev -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Edgar Fuß -.RE +Daniele Pezzini , Arnaud Quette , John Stamp , Peter Selinger , Arjen de Korte , Alexander Gordeev .SH "SEE ALSO" .sp \fBblazer_ser\fR(8), \fBblazer_usb\fR(8), \fBnutupsdrv\fR(8), \fBups.conf\fR(5), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsdrvctl\fR(8), \fBupsmon\fR(8), \fBupsrw\fR(8) .SS "Internet Resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT HCL: -http://www\&.networkupstools\&.org/stable\-hcl\&.html -.RE +The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html diff --git a/docs/man/nutdrv_qx.txt b/docs/man/nutdrv_qx.txt index 905b561..5436131 100644 --- a/docs/man/nutdrv_qx.txt +++ b/docs/man/nutdrv_qx.txt @@ -17,22 +17,12 @@ For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -The *nutdrv_qx* driver is known to work with various UPSes from -'Armac', 'Blazer', 'Energy Sistem', 'Fenton Technologies', 'General Electric', -'Hunnox', 'Masterguard', 'Mustek', 'Powercool', 'Voltronic Power' -(rebranded by many, many - have I said many? - others... +The *nutdrv_qx* driver is known to work with various UPSes from 'Blazer', 'Energy Sistem', 'Fenton Technologies', 'General Electric', 'Mustek', 'Voltronic Power' (rebranded by many, many - have I said many? - others.. Long story short: if your UPS came with a software called 'Viewpower', chances are high that it works with this driver with one of the <<_extra_arguments,'voltronic*' protocols or with the 'mecer' one>>) and many others. -Long story short: if your UPS came with a software called 'Viewpower', -chances are high that it works with this driver with one of the -<<_extra_arguments,'voltronic*' protocols or with the 'mecer' one>>), -and many others. +The <<_internet_resources,NUT compatibility table>> lists all the known supported models. +Keep in mind, however, that other models not listed there may also be supported, but haven't been tested. -The <<_internet_resources,NUT compatibility table>> lists all the known -supported models. Keep in mind, however, that other models not listed -there may also be supported, but haven't been tested or reported back. - -All devices with a serial interface and many with a USB interface are -supported. +All devices with a serial interface and many with a USB interface are supported. EXTRA ARGUMENTS @@ -62,15 +52,13 @@ If you set stayoff in linkman:ups.conf[5] when FSD arises the UPS will call a *s *protocol =* 'string':: Skip autodetection of the protocol to use and only use the one specified. -Supported values: 'bestups', 'hunnox', 'masterguard', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'. +Supported values: 'bestups', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'. + Note that if you end up using the 'q1' protocol, you may want to give a try to the 'mecer', 'megatec' and 'zinto' ones setting the <> (only one, or both). -*pollfreq =* 'num':: -Set polling interval for full updates, in seconds, to reduce the message traffic. -Between two polling requests, the driver will do 'quick polls' dealing just -with *ups.status* at an interval specified by the *pollinterval* driver option -(details in linkman:ups.conf[5]). +*pollfreq =* 'value':: +Set polling frequency, in seconds, to reduce the data flow. +Between two polling requests the driver will do `quick polls' dealing just with ups.status. The default value is 30 (in seconds). If your UPS doesn't report either *battery.charge* or *battery.runtime* you may want to add the following ones in order to have guesstimated values: @@ -152,16 +140,7 @@ The acceptable range is +60..599940+ seconds. The acceptable range is +12..5940+ seconds. *pins_shutdown_mode =* 'value':: -Set http://www.networkupstools.org/protocols/sola.html#_shutdown_set_command[shutdown mode functionality of Pin 1 and Pin 7] on the UPS DB9 communication port (Per Best Power's EPS-0059) to 'value' [+0..6+]. - - -MASTERGUARD PROTOCOL -~~~~~~~~~~~~~~~~~~~~ - -*slave_addr =* 'value':: -Make the claim function verify it's talking to the specified 'slave address' (*ups.id*). -Safeguard against talking to the wrong one of several identical UPSes on the same USB bus. -Note that when changing *ups.id* (through linkman:upsrw[8]) the driver will continue to talk to the UPS with the new 'slave address', but won't claim it again on restart until the *slave_addr* parameter is adjusted. +Set http://www.networkupstools.org/protocols/sola.html#_shutdown_set_command[shutdown mode functionality of Pin 1 and Pin 7] on the UPS DB9 communication port (Per Best Power’s EPS-0059) to 'value' [+0..6+]. Q1 PROTOCOL @@ -213,7 +192,7 @@ Reset capability options and their voltage and frequency limits to safe default + Note that setting this option will reset also *ups.start.auto*, *battery.protection*, *battery.energysave*, *ups.start.battery*, *outlet.0.switchable*, *input.transfer.high*, *input.transfer.low*, *input.frequency.high* and *input.frequency.low*. -These UPSes can be fine-tuned to suit your needs enabling or disabling the following options (the driver should tell you which one the UPS is capable of on startup: the settable ones will be reported either are 'enabled' or 'disabled' in the logs): +These UPSes can be fine-tuned to suit your needs enabling or disabling the following options (the driver should tell you which one the UPS is capable of on startup: the settable ones will be reported either ar 'enabled' or 'disabled' in the logs): *alarm_control =* 'string':: Enable or disable alarm (BEEP!) [+enabled+/+disabled+]. @@ -300,7 +279,7 @@ TESTING ^^^^^^^ This protocol comes with a couple of functions that are not enabled by default because of the lack of knowledge of some part of the communication protocol used by these UPSes by your friendly neighborhood developer. -Since these functions are supposed to be queries to the UPS for some kind of information, they _should_ not make your UPS go boom. +Since these functions are supposed to be queries to the UPS for some kind of informations, they _should_ not make your UPS go boom. So if you are brave enough to risk your UPS and attached devices' life to help the developers, this will be very appreciated.. *Do it at your own risk*. @@ -338,17 +317,12 @@ Examples: - `-x product=".*(Smart|Back)-?UPS.*"` *bus =* 'regex':: -Select a UPS on a specific USB bus or group of buses. +Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is connected (e.g. +bus="002"+, +bus="00[2-3]"+). -*device =* 'regex':: -Select a UPS on a specific USB device or group of devices. -The argument is a regular expression that must match the device name where the UPS is connected (e.g. +device="001"+, +device="00[1-2]"+). -Note that device numbers are not guaranteed by the OS to be stable across re-boots or device re-plugging. - *subdriver =* 'string':: Select a serial-over-USB subdriver to use. -You have a choice between *cypress*, *fabula*, *fuji*, *hunnox*, *ippon*, *krauler*, *phoenix*, *phoenixtec*, *sgs*, *snr*, *armac* and *ablerex*. +You have a choice between *cypress*, *fabula*, *fuji*, *ippon*, *krauler*, *phoenix* and *sgs*. When using this option, it is mandatory to also specify the *vendorid* and *productid*. *langid_fix =* 'value':: @@ -356,27 +330,14 @@ Apply the language ID workaround to the *krauler* subdriver. This is mandatory for some devices to work (LDLC, Dynamix and others). You must provide *value* (+0x409+ or +0x4095+), according to your device entry in NUT hardware compatibility list (HCL). -*noscanlangid*:: -If this flag is set, don't autoscan valid range for langid. - IMPLEMENTATION NOTES ^^^^^^^^^^^^^^^^^^^^ -*'armac' subdriver*:: -The Armac communication subdriver reproduces a communication protocol used by -an old release of "PowerManagerII" software, which doesn't seem to be Armac -specific: its banner is "2004 Richcomm Technologies, Inc. Dec 27 2005 ver 1.1." -Maybe other Richcomm UPSes would work with this -- maybe better than with -the older standalone `richcomm_usb` driver. - *'fabula' subdriver*:: This subdriver, meant to be used with the 'megatec' protocol, does *not* support the various *test.battery* commands. Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. -*'hunnox' subdriver*:: -This protocol subdriver is closely related to 'fabula' one, with a few tweaks for devices not directly supported by that driver. - *'fuji' subdriver*:: This subdriver, meant to be used with the 'megatec' protocol, does *not* support the *shutdown.stayoff* and *load.off* commands. Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/*ondelay* and makes the UPS turn on the load as soon as power is back. @@ -384,9 +345,6 @@ Plus, the *shutdown.return* command ignores the values set in 'ups.delay.start'/ *'krauler' subdriver*:: This subdriver, meant to be used with the 'megatec' protocol, does *not* support the shutdown commands, i.e.: *shutdown.return*, *shutdown.stayoff* and *load.off*. -*'snr' subdriver*:: -This subdriver, meant to be used with the 'megatec' protocol, does *not* support the shutdown commands, i.e.: *shutdown.return*, *shutdown.stayoff* and *load.off*. - UPS COMMANDS ------------ @@ -434,26 +392,6 @@ BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS Perform a battery test for the duration of 'value' seconds (truncated to 60 seconds) [+60..5940+]. -MASTERGUARD PROTOCOL -~~~~~~~~~~~~~~~~~~~~ - -*beeper.enable*:: -Enable the UPS beeper. - -*beeper.disable*:: -Disable the UPS beeper. - -*test.battery.start* 'value':: -Perform a battery test for the duration of 'value' seconds (truncated to 60 seconds) [+0..5940+]. -This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds). - -*bypass.start*:: -Put the UPS in bypass mode - -*bypass.stop*:: -Take the UPS in normal mode - - VOLTRONIC POWER P98 UNITS (WITH MECER PROTOCOL) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -639,22 +577,22 @@ If disabled, the UPS will provide continuous power to programmable outlets until *max_eco_volt*:: -> *input.transfer.high* + Maximum voltage for ECO Mode (V). -If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled). +If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it’s enabled). *min_eco_volt*:: -> *input.transfer.low* + Minimum voltage for ECO Mode (V). -If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled). +If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it’s enabled). *max_eco_freq*:: -> *input.frequency.high* + Maximum frequency for ECO Mode (Hz). -If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled). +If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it’s enabled). *min_eco_freq*:: -> *input.frequency.low* + Minimum frequency for ECO Mode (Hz). -If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled). +If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it’s enabled). *outlet1_delay*:: -> *outlet.1.delay.shutdown* + @@ -693,12 +631,6 @@ So, the *beeper.toggle* command may appear to have no effect in the status repor The temperature and load value is known to be bogus in some models. -MASTERGUARD UNITS -~~~~~~~~~~~~~~~~~ - -The driver is supposed to support both "new" A series (A700/1000/2000/3000 and their -19 cousins) and E series (E60/100/200) but was tested only on A due to lack of E hardware. - - VOLTRONIC-QS UNITS ~~~~~~~~~~~~~~~~~~ @@ -795,13 +727,12 @@ If you want to know the explanation of that bit you can either watch the log or AUTHORS ------- -* Daniele Pezzini -* Arnaud Quette -* John Stamp -* Peter Selinger -* Arjen de Korte -* Alexander Gordeev -* Edgar Fuß +Daniele Pezzini , +Arnaud Quette , +John Stamp , +Peter Selinger , +Arjen de Korte , +Alexander Gordeev SEE ALSO @@ -821,5 +752,7 @@ linkman:upsrw[8] Internet Resources: ~~~~~~~~~~~~~~~~~~~ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT HCL: http://www.networkupstools.org/stable-hcl.html +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + +The NUT HCL: http://www.networkupstools.org/stable-hcl.html + diff --git a/docs/man/nutdrv_siemens_sitop.8 b/docs/man/nutdrv_siemens_sitop.8 deleted file mode 100644 index b2f5f74..0000000 --- a/docs/man/nutdrv_siemens_sitop.8 +++ /dev/null @@ -1,269 +0,0 @@ -'\" t -.\" Title: nutdrv_siemens_sitop -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "NUTDRV_SIEMENS_SITOP" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -nutdrv_siemens_sitop \- driver for the Siemens SITOP UPS500 series UPS -.SH "NOTE" -.sp -This man page only documents the hardware\-specific features of the \fBnutdrv_siemens_sitop\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.SH "SUPPORTED HARDWARE" -.sp -\fBnutdrv_siemens_sitop\fR supports Siemens UPS models from the SITOP UPS500 series\&. Some models have a serial port, others have a USB port\&. The models with USB port actually contain a serial\-over\-USB chip, so as far as this driver is concerned, all models are serial models\&. This driver should work with all models in the SITOP UPS500 series, as long as your kernel has support for the serial port device (see section \fBUSB driver\fR below)\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This driver has only been tested with the SITOP UPS500S\-2\&.5 with USB port (Siemens product number 6EP1933\-2EC41)\&. -.sp .5v -.RE -.SH "DEVICE SETTINGS" -.sp -The UPS is configured via DIP\-switches\&. For correct functioning in combination with NUT, set the DIP\-switches to the following: -.PP -\fBswitch 1\-4\fR -.RS 4 -Choose whatever suits your situation\&. Any combination will work with NUT\&. -.RE -.PP -\fBswitch 5\fR (⇒ / t) -.RS 4 -Set to OFF (t)\&. This ensures that the UPS will not cut power unless NUT tells it to do so (or unless the batteries are exhausted)\&. -.RE -.PP -\fBswitch 6\-10\fR (delay) -.RS 4 -Set to OFF (minimum delay)\&. Setting a higher delay will actually also work, but any command from NUT will be delayed as well before being executed by the UPS\&. With the minimum setting, it will already take 5 seconds before a command from NUT is executed\&. -.RE -.PP -\fBswitch 11\fR (INTERR\&.) -.RS 4 -Set to ON (interrupt the output after the timer expires)\&. This ensures that the UPS briefly interrupts the output power in response to the shutdown\&.return command\&. See the section -\fBInstant Commands\fR -below\&. -.RE -.PP -\fBswitch 12\fR (ON/OFF) -.RS 4 -set to ON (enable the UPS functionality)\&. Without this, the UPS will never supply power from its batteries\&. -.RE -.SH "USB DRIVER" -.sp -The USB\-versions of the UPS contain an FTDI USB\-to\-serial converter chip\&. It is programmed with a non\-standard product ID (for example \fI0403:e0e3\fR), but can still be used with the normal ftdi_sio driver\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -The following hints may be specific to GNU/Linux\&. -.sp .5v -.RE -.sp -Use \fBlsusb\fR to figure out which product ID is used in your model, and replace all occurrences of \fIe0e3\fR in the following examples with the actual Product ID\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -modprobe ftdi_sio -echo 0403 e0e3 > /sys/bus/usb\-serial/drivers/ftdi_sio/new_id -.fi -.if n \{\ -.RE -.\} -.sp -If your system uses \fBudev\fR, this can be automated via a udev rule: -.sp -.if n \{\ -.RS 4 -.\} -.nf -ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="e0e3", \e - RUN+="/sbin/modprobe ftdi_sio", \e - RUN+="/bin/sh \-c \*(Aqecho 0403 e0e3 > /sys/bus/usb\-serial/drivers/ftdi_sio/new_id\*(Aq" -.fi -.if n \{\ -.RE -.\} -.sp -You can use the following udev rule to obtain a predictable device name, for example \fI/dev/ttyUPS\fR: -.sp -.if n \{\ -.RS 4 -.\} -.nf -SUBSYSTEM=="tty" ATTRS{idVendor}=="0403", ATTRS{idProduct}=="e0e3" SYMLINK+="ttyUPS" -.fi -.if n \{\ -.RE -.\} -.SH "POLLING" -.sp -The UPS does not have a special \fIget status\fR command\&. Instead, it continuously sends out status update messages (tens of messages per second)\&. Every \fBpollinterval\fR, these messages are read from the serial port buffer\&. In order to react quickly on status changes from the UPS, and to prevent the serial buffer from overflowing, \fBpollinterval\fR should be set to a relatively low value\&. The recommended value is 1 (second)\&. -.SH "EXTRA ARGUMENTS" -.sp -This driver supports the following optional settings: -.PP -\fBmax_polls_without_data\fR=\fInum\fR -.RS 4 -The serial port is polled periodically for new data (see -\fBPolling\fR)\&. If there is no valid new data after -\fInum\fR -polls, it is assumed that communication with the UPS is lost\&. The default value is 2\&. Lower values may cause spurious -\fIData stale\fR -messages, especially at startup\&. -.RE -.SH "INSTANT COMMANDS" -.PP -\fBshutdown\&.return\fR -.RS 4 -The behavior of this command depends on the line state: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBon line\fR: after 5 seconds (or longer, if DIP switches 6\-10 are not OFF), the UPS will shut off its output\&. After another 5 seconds, the output is activated again\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBon battery\fR: after 5 seconds (or longer, if DIP switches 6\-10 are not OFF), the UPS will shut off its output\&. The output will stay off, until the line voltage has returned\&. -.RE -.RE -.PP -\fBshutdown\&.stayoff\fR -.RS 4 -The behavior of this command depends on the line state: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBon line\fR: after 5 seconds (or longer, if DIP switches 6\-10 are not OFF), the UPS will shut off its output\&. The output stays off, until the line voltage has been removed for at least 1 second, and has been re\-applied\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBon battery\fR: this command behaves the same as -\fBshutdown\&.return\fR\&. -.RE -.RE -.SH "INSTALLATION" -.sp -Make sure that your operating system has created a serial device for the UPS\&. See the section \fBUSB driver\fR for more information\&. -.sp -Next, make sure that NUT has access rights to this device file\&. For example, by creating a udev rule that grants permission to the NUT user, or by adding the NUT user to a user group that can access serial devices (e\&.g\&. the \fBdialout\fR group on Debian\-based systems)\&. -.SH "DIAGNOSTICS" -.sp -You can verify the correct functioning of the hardware, by monitoring the serial port with a terminal program, for example picocom: -.sp -.if n \{\ -.RS 4 -.\} -.nf -picocom \-b 9600 \-d 8 \-p n /dev/ttyUPS -.fi -.if n \{\ -.RE -.\} -.sp -NUT must not be running when you do this\&. You should now see a continuous stream of 5\-character texts coming in, for example: -.sp -.if n \{\ -.RS 4 -.\} -.nf -BUFRD -BA>85 -DC_OK -.fi -.if n \{\ -.RE -.\} -.sp -To exit picocom, use Ctrl\-A Ctrl\-X\&. -.SH "KNOWN ISSUES AND BUGS" -.PP -\fBUntested models\fR -.RS 4 -As mentioned under -\fBSupported hardware\fR, this driver has not been tested with all models in the SITOP UPS500 series\&. -.RE -.PP -\fBData stale messages\fR -.RS 4 -The firmware in these UPSes is quite buggy\&. After sending data to the UPS, it sometimes stops sending status updates\&. This driver tries to prevent this (e\&.g\&. by sending commands twice, and by sending additional LF characters after each command)\&. Once the UPS is in this state, communication can only be restored by rebooting the UPS, or by unplugging and reconnecting the USB cable\&. During normal operation, no commands are sent to the UPS at all (only at shutdown), so this issue is expected to have little impact on usability\&. It is not sure if the serial models are affected by this issue as well\&. -.RE -.SH "AUTHOR" -.sp -Matthijs H\&. ten Berge -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nutdrv_siemens_sitop.txt b/docs/man/nutdrv_siemens_sitop.txt deleted file mode 100644 index 193f99d..0000000 --- a/docs/man/nutdrv_siemens_sitop.txt +++ /dev/null @@ -1,201 +0,0 @@ -NUTDRV_SIEMENS_SITOP(8) -======================= - -NAME ----- - -nutdrv_siemens_sitop - driver for the Siemens SITOP UPS500 series UPS - -NOTE ----- - -This man page only documents the hardware-specific features of the -*nutdrv_siemens_sitop* driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -*nutdrv_siemens_sitop* supports Siemens UPS models from the SITOP UPS500 series. -Some models have a serial port, others have a USB port. -The models with USB port actually contain a serial-over-USB chip, -so as far as this driver is concerned, all models are serial models. -This driver should work with all models in the SITOP UPS500 series, -as long as your kernel has support for the serial port device -(see section *USB driver* below). - -NOTE: This driver has only been tested with the SITOP UPS500S-2.5 -with USB port (Siemens product number 6EP1933-2EC41). - -DEVICE SETTINGS ---------------- - -The UPS is configured via DIP-switches. -For correct functioning in combination with NUT, set the DIP-switches -to the following: - -*switch 1-4*:: -Choose whatever suits your situation. Any combination will work with NUT. - -*switch 5* (=> / t):: -Set to OFF (t). This ensures that the UPS will not cut power unless NUT -tells it to do so (or unless the batteries are exhausted). - -*switch 6-10* (delay):: -Set to OFF (minimum delay). Setting a higher delay will actually also work, -but any command from NUT will be delayed as well before being executed -by the UPS. With the minimum setting, it will already take 5 seconds -before a command from NUT is executed. - -*switch 11* (INTERR.):: -Set to ON (interrupt the output after the timer expires). This ensures that -the UPS briefly interrupts the output power in response to the shutdown.return -command. See the section *Instant Commands* below. - -*switch 12* (ON/OFF):: -set to ON (enable the UPS functionality). Without this, the UPS will never -supply power from its batteries. - -USB driver ----------- - -The USB-versions of the UPS contain an FTDI USB-to-serial converter chip. -It is programmed with a non-standard product ID (for example _0403:e0e3_), -but can still be used with the normal ftdi_sio driver. - -NOTE: The following hints may be specific to GNU/Linux. - -Use *lsusb* to figure out which product ID is used in your model, and -replace all occurrences of _e0e3_ in the following examples with the actual -Product ID. - -.... -modprobe ftdi_sio -echo 0403 e0e3 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id -.... - -If your system uses *udev*, this can be automated via a udev rule: - ----- -ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="e0e3", \ - RUN+="/sbin/modprobe ftdi_sio", \ - RUN+="/bin/sh -c 'echo 0403 e0e3 > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'" ----- - -You can use the following udev rule to obtain a predictable device name, -for example _/dev/ttyUPS_: ----- -SUBSYSTEM=="tty" ATTRS{idVendor}=="0403", ATTRS{idProduct}=="e0e3" SYMLINK+="ttyUPS" ----- - -POLLING -------- - -The UPS does not have a special 'get status' command. Instead, it continuously -sends out status update messages (tens of messages per second). -Every *pollinterval*, these messages are read from the serial port buffer. -In order to react quickly on status changes from the UPS, and to prevent the serial buffer -from overflowing, *pollinterval* should be set to a relatively low value. The recommended -value is 1 (second). - -EXTRA ARGUMENTS ---------------- - -This driver supports the following optional settings: - -*max_polls_without_data*='num':: -The serial port is polled periodically for new data (see *Polling*). -If there is no valid new data after 'num' polls, it is assumed that communication -with the UPS is lost. -The default value is 2. Lower values may cause spurious 'Data stale' messages, -especially at startup. - -INSTANT COMMANDS ----------------- - -*shutdown.return*:: -The behavior of this command depends on the line state: - -* *on line*: after 5 seconds (or longer, if DIP switches 6-10 are not OFF), -the UPS will shut off its output. After another 5 seconds, the output is -activated again. -* *on battery*: after 5 seconds (or longer, if DIP switches 6-10 are not OFF), -the UPS will shut off its output. The output will stay off, until the -line voltage has returned. - -*shutdown.stayoff*:: -The behavior of this command depends on the line state: - -* *on line*: after 5 seconds (or longer, if DIP switches 6-10 are not OFF), -the UPS will shut off its output. The output stays off, until the line voltage -has been removed for at least 1 second, and has been re-applied. -* *on battery*: this command behaves the same as *shutdown.return*. - -INSTALLATION ------------- - -Make sure that your operating system has created a serial device for the UPS. -See the section *USB driver* for more information. - -Next, make sure that NUT has access rights to this device file. -For example, by creating a udev rule that grants permission to the NUT user, -or by adding the NUT user to a user group that can access serial devices -(e.g. the *dialout* group on Debian-based systems). - -DIAGNOSTICS ------------ - -You can verify the correct functioning of the hardware, by monitoring the -serial port with a terminal program, for example picocom: - -.... -picocom -b 9600 -d 8 -p n /dev/ttyUPS -.... - -NUT must not be running when you do this. -You should now see a continuous stream of 5-character texts coming in, -for example: - -.... -BUFRD -BA>85 -DC_OK -.... -To exit picocom, use Ctrl-A Ctrl-X. - -KNOWN ISSUES AND BUGS ---------------------- - -*Untested models*:: -As mentioned under *Supported hardware*, this driver has not been tested -with all models in the SITOP UPS500 series. - -*Data stale messages*:: -The firmware in these UPSes is quite buggy. After sending data to the UPS, -it sometimes stops sending status updates. This driver tries to prevent this -(e.g. by sending commands twice, and by sending additional LF characters after -each command). -Once the UPS is in this state, communication can only be restored by rebooting -the UPS, or by unplugging and reconnecting the USB cable. -During normal operation, no commands are sent to the UPS at all -(only at shutdown), so this issue is expected to have little impact on -usability. -It is not sure if the serial models are affected by this issue as well. - -AUTHOR ------- - -Matthijs H. ten Berge - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/nutscan.3 b/docs/man/nutscan.3 index 22c4df4..6b93089 100644 --- a/docs/man/nutscan.3 +++ b/docs/man/nutscan.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,7 +33,7 @@ nutscan \- Network UPS Tools (NUT) device discovery library .sp The Network UPS Tools (NUT) \fBnutscan\fR library provides the same discovery related features that are also offered by \fBnut-scanner\fR(8)\&. .sp -It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (either using Avahi, or the classic connection method)\&. +It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (using Avahi, or the classic connection method)\&. .SH "DISCOVERY FUNCTIONS" .sp First, include the required header file: @@ -82,7 +82,7 @@ for supported SNMP agents, .sp -1 .IP \(bu 2.3 .\} -\fBnutscan_scan_xml_http_range\fR(3) +\fBnutscan_scan_xml_http\fR(3) for Eaton Network Management Card, .RE .sp @@ -95,7 +95,7 @@ for Eaton Network Management Card, .IP \(bu 2.3 .\} \fBnutscan_scan_nut\fR(3) -for NUT servers (upsd), using the classic method (search for port), +for NUT servers (upsd), using the classic method, .RE .sp .RS 4 @@ -154,7 +154,4 @@ for ups\&.conf style\&. There is currently no specific mechanism for error handling\&. .SH "SEE ALSO" .sp -\fBnut-scanner\fR(8), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) -.SS "Internet resources:" -.sp -http://avahi\&.org/ +\fBnut-scanner\fR(8), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3), http://avahi\&.org/ diff --git a/docs/man/nutscan.txt b/docs/man/nutscan.txt index 99cb247..90ac366 100644 --- a/docs/man/nutscan.txt +++ b/docs/man/nutscan.txt @@ -13,8 +13,7 @@ The Network UPS Tools (NUT) *nutscan* library provides the same discovery related features that are also offered by linkman:nut-scanner[8]. It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP -and IPMI) and NUT servers (either using Avahi, or the classic connection -method). +and IPMI) and NUT servers (using Avahi, or the classic connection method). DISCOVERY FUNCTIONS @@ -28,17 +27,14 @@ Then, to discover new devices, use the appropriate function: - linkman:nutscan_scan_usb[3] for supported USB devices, - linkman:nutscan_scan_snmp[3] for supported SNMP agents, -- linkman:nutscan_scan_xml_http_range[3] for Eaton Network Management Card, -- linkman:nutscan_scan_nut[3] for NUT servers (upsd), using the classic - method (search for port), -- linkman:nutscan_scan_avahi[3] for NUT servers (upsd), using the mDNS - (Avahi) method, +- linkman:nutscan_scan_xml_http[3] for Eaton Network Management Card, +- linkman:nutscan_scan_nut[3] for NUT servers (upsd), using the classic method, +- linkman:nutscan_scan_avahi[3] for NUT servers (upsd), using the mDNS (Avahi) method, - linkman:nutscan_scan_ipmi[3] for supported IPMI PSU. -All of these functions return a list of devices found, using the -`nutscan_device_t` structure. This structure is described in -linkman:nutscan_add_device_to_device[3]. +All of these functions return a list of devices found, using the nutscan_device_t +structure. This structure is described in linkman:nutscan_add_device_to_device[3]. Helper functions are also provided to output data using standard formats: @@ -48,24 +44,17 @@ Helper functions are also provided to output data using standard formats: ERROR HANDLING -------------- - There is currently no specific mechanism for error handling. SEE ALSO -------- - linkman:nut-scanner[8], linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3], -linkman:nutscan_scan_xml_http_range[3], linkman:nutscan_scan_nut[3], +linkman:nutscan_scan_xml_http[3], linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], -linkman:nutscan_add_device_to_device[3], -linkman:nutscan_add_option_to_device[3], -linkman:nutscan_cidr_to_ip[3] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +linkman:nutscan_add_device_to_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_cidr_to_ip[3], http://avahi.org/ diff --git a/docs/man/nutscan_add_device_to_device.3 b/docs/man/nutscan_add_device_to_device.3 index d571750..5f51677 100644 --- a/docs/man/nutscan_add_device_to_device.3 +++ b/docs/man/nutscan_add_device_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_device_to_device -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_ADD_DEVICE_T" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_ADD_DEVICE_T" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,9 +36,7 @@ nutscan_add_device_to_device \- Concatenate two devices structure\&. .fi .sp .nf -nutscan_device_t * nutscan_add_device_to_device( - nutscan_device_t * first, - nutscan_device_t * second); +nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second); .fi .SH "DESCRIPTION" .sp @@ -61,13 +59,10 @@ struct nutscan_device * next; .sp This is a double linked list of device\&. Each device is described by its type, its driver name, its port and any number of optional data\&. .sp -The \fBnutscan_add_device_to_device()\fR concatenates \fIfirst\fR and \fIsecond\fR devices to a unique device\&. No new device is created, the two linked lists are simply linked to each other\&. So \fIfirst\fR and \fIsecond\fR devices are likely to be modified by this function\&. +The \fBnutscan_add_device_to_device()\fR concatenates \fIfirst\fR and \fIsecond\fR devices to a unique device\&. No new device is created, the two linked list are simply linked to each other\&. So \fIfirst\fR and \fIsecond\fR devices are likely to be modified by this function\&. .SH "RETURN VALUE" .sp -The \fBnutscan_add_device_to_device()\fR functions returns a pointer to a device containing both passed devices\&. Note that it\(cqs not a new device, so it is either \fIfirst\fR or \fIsecond\fR which is returned\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-device\&.h\fR file\&. +The \fBnutscan_add_device_to_device()\fR functions returns a pointer to a device containg both passed devices\&. Note that it\(cqs not a new device, so it is either \fIfirst\fR or \fIsecond\fR which is returned\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) diff --git a/docs/man/nutscan_add_device_to_device.txt b/docs/man/nutscan_add_device_to_device.txt index 6f5aed6..7ccc3c8 100644 --- a/docs/man/nutscan_add_device_to_device.txt +++ b/docs/man/nutscan_add_device_to_device.txt @@ -11,9 +11,7 @@ SYNOPSIS #include - nutscan_device_t * nutscan_add_device_to_device( - nutscan_device_t * first, - nutscan_device_t * second); + nutscan_device_t * nutscan_add_device_to_device(nutscan_device_t * first, nutscan_device_t * second); DESCRIPTION @@ -22,37 +20,25 @@ DESCRIPTION The `nutscan_device_t` contains the following variables: nutscan_device_type_t type; - char * driver; - char * port; - nutscan_options_t opt; - struct nutscan_device * prev; - struct nutscan_device * next; + char * driver; + char * port; + nutscan_options_t opt; + struct nutscan_device * prev; + struct nutscan_device * next; -This is a double linked list of device. Each device is described by its -`type`, its `driver` name, its `port` and any number of optional data. +This is a double linked list of device. Each device is described by its `type`, its `driver` name, its `port` and any number of optional data. -The *nutscan_add_device_to_device()* concatenates 'first' and 'second' -devices to a unique device. No new device is created, the two linked -lists are simply linked to each other. So 'first' and 'second' devices -are likely to be modified by this function. +The *nutscan_add_device_to_device()* concatenates 'first' and 'second' devices to a unique device. No new device is created, the two linked list are simply linked to each other. So 'first' and 'second' devices are likely to be modified by this function. RETURN VALUE ------------ -The *nutscan_add_device_to_device()* functions returns a pointer to a -device containing both passed devices. Note that it's not a new device, -so it is either 'first' or 'second' which is returned. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-device.h' file. +The *nutscan_add_device_to_device()* functions returns a pointer to a device containg both passed devices. Note that it's not a new device, so it is either 'first' or 'second' which is returned. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], diff --git a/docs/man/nutscan_add_option_to_device.3 b/docs/man/nutscan_add_option_to_device.3 index 8599526..3db6a23 100644 --- a/docs/man/nutscan_add_option_to_device.3 +++ b/docs/man/nutscan_add_option_to_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_add_option_to_device -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_ADD_OPTION_T" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_ADD_OPTION_T" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,10 +36,7 @@ nutscan_add_option_to_device \- Add option data to the specified device\&. .fi .sp .nf -void nutscan_add_option_to_device( - nutscan_device_t * device, - char * option_name, - char * value); +void nutscan_add_option_to_device(nutscan_device_t * device,char * option_name, char * value); .fi .SH "DESCRIPTION" .sp @@ -62,10 +59,7 @@ struct nutscan_device * next; .sp This is a double linked list of device\&. Each device is described by its type, its driver name, its port and any number of optional data\&. .sp -The \fBnutscan_add_option_to_device()\fR adds an optional data in the given device\&. Optional data are made of an \fIoption_name\fR and an associated \fIvalue\fR\&. Copies of \fIoption_name\fR and \fIvalue\fR are stored in the device, so the caller can safely free both of the original strings used as arguments\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-device\&.h\fR file\&. +The \fBnutscan_add_option_to_device()\fR adds an optional data in the given devcie\&. Optional data are made of an \fIoption_name\fR and an associated \fIvalue\fR\&. Copies of \fIoption_name\fR and \fIvalue\fR are stored in the device, so the caller can safely free both of them\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_add_option_to_device.txt b/docs/man/nutscan_add_option_to_device.txt index 2dbf669..636f056 100644 --- a/docs/man/nutscan_add_option_to_device.txt +++ b/docs/man/nutscan_add_option_to_device.txt @@ -11,10 +11,7 @@ SYNOPSIS #include - void nutscan_add_option_to_device( - nutscan_device_t * device, - char * option_name, - char * value); + void nutscan_add_option_to_device(nutscan_device_t * device,char * option_name, char * value); DESCRIPTION @@ -23,31 +20,20 @@ DESCRIPTION The `nutscan_device_t` contains the following variables: nutscan_device_type_t type; - char * driver; - char * port; - nutscan_options_t opt; - struct nutscan_device * prev; - struct nutscan_device * next; + char * driver; + char * port; + nutscan_options_t opt; + struct nutscan_device * prev; + struct nutscan_device * next; -This is a double linked list of device. Each device is described by -its `type`, its `driver` name, its `port` and any number of optional data. +This is a double linked list of device. Each device is described by its `type`, its `driver` name, its `port` and any number of optional data. -The *nutscan_add_option_to_device()* adds an optional data in the -given device. Optional data are made of an 'option_name' and an -associated 'value'. Copies of 'option_name' and 'value' are stored -in the device, so the caller can safely free both of the original -strings used as arguments. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-device.h' file. +The *nutscan_add_option_to_device()* adds an optional data in the given devcie. Optional data are made of an 'option_name' and an associated 'value'. Copies of 'option_name' and 'value' are stored in the device, so the caller can safely free both of them. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], diff --git a/docs/man/nutscan_cidr_to_ip.3 b/docs/man/nutscan_cidr_to_ip.3 index c572999..c9f68c5 100644 --- a/docs/man/nutscan_cidr_to_ip.3 +++ b/docs/man/nutscan_cidr_to_ip.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_cidr_to_ip -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_CIDR_TO_IP" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_CIDR_TO_IP" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,15 +40,10 @@ int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_cidr_to_ip()\fR function converts a range of IP address in the CIDR format given as a string in \fIcidr\fR, to two IPs in strings pointed by \fIstart_ip\fR and \fIstop_ip\fR which can be used as input parameters in the scanning functions of the libnutscan API\&. -.sp -It is the caller\(cqs responsibility to free \fIstart_ip\fR and \fIstop_ip\fR strings\&. +The \fBnutscan_cidr_to_ip()\fR function converts a range of IP address in the CIDR format given as a string in \fIcidr\fR, to two IPs in strings pointed by \fIstart_ip\fR and \fIstop_ip\fR which can be used as input paramters in the scanning functions of the libnutscan API\&. It is the caller\(cqs responsability to free \fIstart_ip\fR and \fIstop_ip\fR strings\&. .SH "RETURN VALUE" .sp -The \fBnutscan_cidr_to_ip()\fR function returns 0 if an error occurred (invalid \fIcidr\fR address) or 1 if successful\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-ip\&.h\fR file\&. +The \fBnutscan_cidr_to_ip()\fR function returns 0 if an error occured (invalid \fIcidr\fR address) or 1 if successful\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) diff --git a/docs/man/nutscan_cidr_to_ip.txt b/docs/man/nutscan_cidr_to_ip.txt index 5f18213..6ebe237 100644 --- a/docs/man/nutscan_cidr_to_ip.txt +++ b/docs/man/nutscan_cidr_to_ip.txt @@ -16,28 +16,16 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_cidr_to_ip()* function converts a range of IP address in -the CIDR format given as a string in 'cidr', to two IPs in strings -pointed by 'start_ip' and 'stop_ip' which can be used as input -parameters in the scanning functions of the libnutscan API. - -It is the caller's responsibility to free 'start_ip' and 'stop_ip' strings. +The *nutscan_cidr_to_ip()* function converts a range of IP address in the CIDR format given as a string in 'cidr', to two IPs in strings pointed by 'start_ip' and 'stop_ip' which can be used as input paramters in the scanning functions of the libnutscan API. It is the caller's responsability to free 'start_ip' and 'stop_ip' strings. RETURN VALUE ------------ -The *nutscan_cidr_to_ip()* function returns 0 if an error occurred -(invalid 'cidr' address) or 1 if successful. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-ip.h' file. +The *nutscan_cidr_to_ip()* function returns 0 if an error occured (invalid 'cidr' address) or 1 if successful. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3] diff --git a/docs/man/nutscan_display_parsable.3 b/docs/man/nutscan_display_parsable.3 index 3df0739..33f7ec9 100644 --- a/docs/man/nutscan_display_parsable.3 +++ b/docs/man/nutscan_display_parsable.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_parsable -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_PARS" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_DISPLAY_PARS" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,48 +42,9 @@ void nutscan_display_parsable(nutscan_device_t * device); .sp The \fBnutscan_display_parsable()\fR function displays all NUT devices in \fIdevice\fR to stdout\&. It displays them in a way that can be easily parsed which is: .sp -.if n \{\ -.RS 4 -.\} -.nf -:driver="",port=""[,="",="",\&.\&.\&.] -.fi -.if n \{\ -.RE -.\} +:driver="",port=""[,="",="",\&...] .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} - may be one of USB, SNMP, XML, NUT, IPMI or AVAHI\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} - is the name of the driver\(cqs binary corresponding to this device\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} - and depend on , see the corresponding driver\(cqs man page\&. -.RE + may be one of USB, SNMP, XML, NUT, IPMI or AVAHI\&. is the name of the driver\(cqs binary corresponding to this device\&. and depend on , see the corresponding driver\(cqs man page\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_display_parsable.txt b/docs/man/nutscan_display_parsable.txt index 9e27515..7379d65 100644 --- a/docs/man/nutscan_display_parsable.txt +++ b/docs/man/nutscan_display_parsable.txt @@ -4,8 +4,7 @@ NUTSCAN_DISPLAY_PARSABLE(3) NAME ---- -nutscan_display_parsable - Display the specified `nutscan_device_t` -structure on stdout. +nutscan_display_parsable - Display the specified `nutscan_device_t` structure on stdout. SYNOPSIS -------- @@ -17,24 +16,19 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_display_parsable()* function displays all NUT devices in -'device' to stdout. It displays them in a way that can be easily parsed -which is: +The *nutscan_display_parsable()* function displays all NUT devices in 'device' to stdout. It displays them in a way that can be easily parsed which is: - :driver="",port=""[,="",="",...] +:driver="",port=""[,="",="",...] -* may be one of USB, SNMP, XML, NUT, IPMI or AVAHI. -* is the name of the driver's binary corresponding - to this device. -* and depend on , - see the corresponding driver's man page. + may be one of USB, SNMP, XML, NUT, IPMI or AVAHI. + is the name of the driver's binary corresponding to this device. + and depend on , see the corresponding driver's man page. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_display_ups_conf.3 b/docs/man/nutscan_display_ups_conf.3 index 955d042..0b1c6d5 100644 --- a/docs/man/nutscan_display_ups_conf.3 +++ b/docs/man/nutscan_display_ups_conf.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_display_ups_conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_DISPLAY_UPS_" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_DISPLAY_UPS_" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,7 +40,7 @@ void nutscan_display_ups_conf(nutscan_device_t * device); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_display_ups_conf()\fR function displays all NUT devices in \fIdevice\fR to stdout\&. It displays them in a way that it can be directly copied into the \fIups\&.conf\fR file\&. +The \fBnutscan_display_ups_conf()\fR function displays all NUT devices in \fIdevice\fR to stdout\&. It displays them in a way that it can be directly copied into the ups\&.conf file\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_display_ups_conf.txt b/docs/man/nutscan_display_ups_conf.txt index b79c90f..8d95e07 100644 --- a/docs/man/nutscan_display_ups_conf.txt +++ b/docs/man/nutscan_display_ups_conf.txt @@ -4,8 +4,7 @@ NUTSCAN_DISPLAY_UPS_CONF(3) NAME ---- -nutscan_display_ups_conf - Display the specified `nutscan_device_t` -structure on stdout. +nutscan_display_ups_conf - Display the specified `nutscan_device_t` structure on stdout. SYNOPSIS -------- @@ -17,16 +16,13 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_display_ups_conf()* function displays all NUT devices in -'device' to stdout. It displays them in a way that it can be directly -copied into the 'ups.conf' file. +The *nutscan_display_ups_conf()* function displays all NUT devices in 'device' to stdout. It displays them in a way that it can be directly copied into the ups.conf file. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3] diff --git a/docs/man/nutscan_free_device.3 b/docs/man/nutscan_free_device.3 index 6c13797..af13c90 100644 --- a/docs/man/nutscan_free_device.3 +++ b/docs/man/nutscan_free_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_free_device -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_FREE_DEVICE" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_FREE_DEVICE" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -nutscan_free_device \- Free a `nutscan_device_t` structure created by `nutscan_new_device`\&. +nutscan_free_device \- Free a nutscan_device_t structure created by nutscan_new_device\&. .SH "SYNOPSIS" .sp .nf @@ -40,10 +40,7 @@ void nutscan_free_device(nutscan_device_t * device); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_free_device()\fR function can free a nutscan_device_type_t structure\&. Doing so, it frees the whole linked list, not only the given device\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-device\&.h\fR file\&. +The \fBnutscan_free_device()\fR function free a nutscan_device_type_t structure\&. Doing so, it free the whole linked list, not only the given device\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_free_device.txt b/docs/man/nutscan_free_device.txt index 4420f36..062bb4b 100644 --- a/docs/man/nutscan_free_device.txt +++ b/docs/man/nutscan_free_device.txt @@ -4,8 +4,7 @@ NUTSCAN_FREE_DEVICE(3) NAME ---- -nutscan_free_device - Free a `nutscan_device_t` structure created by -`nutscan_new_device`. +nutscan_free_device - Free a nutscan_device_t structure created by nutscan_new_device. SYNOPSIS -------- @@ -17,20 +16,12 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_free_device()* function can free a `nutscan_device_type_t` -structure. Doing so, it frees the whole linked list, not only the given -device. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-device.h' file. +The *nutscan_free_device()* function free a `nutscan_device_type_t` structure. Doing so, it free the whole linked list, not only the given device. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_add_option_to_device[3], diff --git a/docs/man/nutscan_get_serial_ports_list.3 b/docs/man/nutscan_get_serial_ports_list.3 index 9758534..12fb92c 100644 --- a/docs/man/nutscan_get_serial_ports_list.3 +++ b/docs/man/nutscan_get_serial_ports_list.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_get_serial_ports_list -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_GET_SERIAL_P" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_GET_SERIAL_P" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,7 +40,7 @@ char ** nutscan_get_serial_ports_list(const char *ports_range); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_get_serial_ports_list()\fR function returns a null terminated array of strings generated from a port range\&. \fIports_range\fR may be one of: +The \fBnutscan_get_serial_ports_list()\fR function returns a null terminated array of string generated from a port range\&. \fIports_range\fR may be one of: .sp .RS 4 .ie n \{\ @@ -50,7 +50,7 @@ The \fBnutscan_get_serial_ports_list()\fR function returns a null terminated arr .sp -1 .IP \(bu 2.3 .\} -a single character from 0 to 9 or a to z representing a serial communication port depending on the operating system\&. For instance "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; "1" is converted to COM1 on Windows; "c" is converted to /dev/ttyc on Solaris\&... +a single character from 0 to 9 or a to z representing a serial communication port depending on the operating system\&. For instance "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; "1" is converted to COM1 on Windows; "c" is converted to /dev/ttyc on solaris\&... .RE .sp .RS 4 @@ -83,16 +83,13 @@ a single port name (/dev/ttyS5, COM4\&...)\&. .sp -1 .IP \(bu 2.3 .\} -a list of port names separated with commas: "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"\&... +a list of port names separated with comas : "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"\&... .RE .sp The returned array can be used in a call to \fBnutscan_scan_eaton_serial\fR to get the serial device on a system\&. .SH "RETURN VALUE" .sp -The \fBnutscan_get_serial_ports_list()\fR function returns NULL if an error occurred (invalid port range) or a pointer to a null terminated array of strings on success\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-serial\&.h\fR file\&. +The \fBnutscan_get_serial_ports_list()\fR function returns NULL if an error occured (invalid port range) or a pointer to a nll terminated array of string on success\&. .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_display_ups_conf\fR(3) diff --git a/docs/man/nutscan_get_serial_ports_list.txt b/docs/man/nutscan_get_serial_ports_list.txt index 8b38bed..dfe0d65 100644 --- a/docs/man/nutscan_get_serial_ports_list.txt +++ b/docs/man/nutscan_get_serial_ports_list.txt @@ -16,44 +16,25 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_get_serial_ports_list()* function returns a null -terminated array of strings generated from a port range. +The *nutscan_get_serial_ports_list()* function returns a null terminated array of string generated from a port range. 'ports_range' may be one of: - - a single character from 0 to 9 or a to z representing a serial - communication port depending on the operating system. For instance - "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; - "1" is converted to COM1 on Windows; - "c" is converted to /dev/ttyc on Solaris... - - a range of character in the form "X-Y". For instance - "0-1" will be converted to /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0 - and /dev/ttyUSB1 on Linux; - "1-3" will be converted to COM1, COM2 and COM3 on Windows; - "a-c" will be converted to /dev/ttya, /dev/ttyb and /dev/ttyc on Solaris. + - a single character from 0 to 9 or a to z representing a serial communication port depending on the operating system. For instance "0" is converted to /dev/ttyS0 and /dev/ttyUSB0 on Linux; "1" is converted to COM1 on Windows; "c" is converted to /dev/ttyc on solaris... + - a range of character in the form "X-Y". For instance "0-1" will be converted to /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0 and /dev/ttyUSB1 on Linux; "1-3" will be converted to COM1, COM2 and COM3 on Windows; "a-c" will be converted to /dev/ttya, /dev/ttyb and /dev/ttyc on Solaris. - a single port name (/dev/ttyS5, COM4...). - - a list of port names separated with commas: - "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"... + - a list of port names separated with comas : "/dev/ttyS0,/dev/ttyS2,/dev/ttyS4" or "COM1,COM3"... -The returned array can be used in a call to *nutscan_scan_eaton_serial* -to get the serial device on a system. +The returned array can be used in a call to *nutscan_scan_eaton_serial* to get the serial device on a system. RETURN VALUE ------------ -The *nutscan_get_serial_ports_list()* function returns NULL if an error -occurred (invalid port range) or a pointer to a null terminated array -of strings on success. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-serial.h' file. +The *nutscan_get_serial_ports_list()* function returns NULL if an error occured (invalid port range) or a pointer to a nll terminated array of string on success. SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_eaton_serial[3], linkman:nutscan_display_parsable[3], linkman:nutscan_display_ups_conf[3] diff --git a/docs/man/nutscan_init.3 b/docs/man/nutscan_init.3 index 8afbfd1..bad6e1e 100644 --- a/docs/man/nutscan_init.3 +++ b/docs/man/nutscan_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_init -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_INIT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_INIT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,15 +36,13 @@ nutscan_init \- Initialize the nutscan library\&. .fi .sp .nf -void nutscan_init(void); +void nutscan_init(); .fi .SH "DESCRIPTION" .sp The \fBnutscan_init()\fR function must be called at least once before using any other function of the nutscan library\&. .sp -It updates the following global variables which can be used by nutscan library user to know which scan methods are available at run\-time\&. -.sp -This depends on the libraries installed on the system: +It updates the following global variables which can be used by nutscan library user to know which scan methods are available at run\-time\&. This depends on the libraries installed on the system: .sp .if n \{\ .RS 4 @@ -62,9 +60,6 @@ nutscan_avail_xml_http = 1 : XML HTTP method is available .\} .sp Note that if a method is reported as unavailable by those variables, the call to the corresponding nutscan_scan_* function will always return NULL\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-init\&.h\fR file\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_init.txt b/docs/man/nutscan_init.txt index 17e6ddf..203eb63 100644 --- a/docs/man/nutscan_init.txt +++ b/docs/man/nutscan_init.txt @@ -11,18 +11,14 @@ SYNOPSIS #include - void nutscan_init(void); + void nutscan_init(); DESCRIPTION ----------- -The *nutscan_init()* function must be called at least once before using -any other function of the nutscan library. +The *nutscan_init()* function must be called at least once before using any other function of the nutscan library. -It updates the following global variables which can be used by nutscan -library user to know which scan methods are available at run-time. - -This depends on the libraries installed on the system: +It updates the following global variables which can be used by nutscan library user to know which scan methods are available at run-time. This depends on the libraries installed on the system: nutscan_avail_avahi = 1 : AVAHI scan is available nutscan_avail_ipmi = 1 : IPMI scan is available @@ -31,21 +27,14 @@ This depends on the libraries installed on the system: nutscan_avail_usb = 1 : USB method is available nutscan_avail_xml_http = 1 : XML HTTP method is available -Note that if a method is reported as unavailable by those variables, the -call to the corresponding `nutscan_scan_*` function will always return NULL. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-init.h' file. +Note that if a method is reported as unavailable by those variables, the call to the corresponding nutscan_scan_* function will always return NULL. SEE ALSO -------- - linkman:nutscan_init[3], linkman:nutscan_scan_usb[3], -linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3] diff --git a/docs/man/nutscan_new_device.3 b/docs/man/nutscan_new_device.3 index 8ae2ecf..1196eff 100644 --- a/docs/man/nutscan_new_device.3 +++ b/docs/man/nutscan_new_device.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_new_device -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_NEW_DEVICE" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_NEW_DEVICE" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,17 +36,14 @@ nutscan_new_device \- Create a new nutscan_device_t structure\&. .fi .sp .nf -nutscan_device_t * nutscan_new_device(void); +nutscan_device_t * nutscan_new_device(); .fi .SH "DESCRIPTION" .sp The \fBnutscan_new_device()\fR function allocates a new nutscan_device_type_t structure\&. .SH "RETURN VALUE" .sp -The \fBnutscan_new_device()\fR function returns the newly allocated nutscan_device_type_t structure\&. -.SH "NOTES" -.sp -Technically, the function is currently defined in \fInutscan\-device\&.h\fR file\&. +The \fBnutscan_new_device()\fR function returns the newly allocated nutscan_device_type_t structure .SH "SEE ALSO" .sp -\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3) \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3) \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) \fBnutscan_add_device_to_device\fR(3) +\fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_scan_snmp\fR(3) \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3) \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3) \fBnutscan_add_device_to_device\fR(3) diff --git a/docs/man/nutscan_new_device.txt b/docs/man/nutscan_new_device.txt index 81cf26d..1b887cc 100644 --- a/docs/man/nutscan_new_device.txt +++ b/docs/man/nutscan_new_device.txt @@ -11,30 +11,22 @@ SYNOPSIS #include - nutscan_device_t * nutscan_new_device(void); + nutscan_device_t * nutscan_new_device(); DESCRIPTION ----------- -The *nutscan_new_device()* function allocates a new `nutscan_device_type_t` -structure. +The *nutscan_new_device()* function allocates a new `nutscan_device_type_t` structure. RETURN VALUE ------------ -The *nutscan_new_device()* function returns the newly allocated -`nutscan_device_type_t` structure. - -NOTES ------ - -Technically, the function is currently defined in 'nutscan-device.h' file. +The *nutscan_new_device()* function returns the newly allocated `nutscan_device_type_t` structure SEE ALSO -------- - -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], linkman:nutscan_scan_ipmi[3], linkman:nutscan_scan_snmp[3] linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3] linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3] diff --git a/docs/man/nutscan_scan_avahi.3 b/docs/man/nutscan_scan_avahi.3 index c7c52a9..61ac99f 100644 --- a/docs/man/nutscan_scan_avahi.3 +++ b/docs/man/nutscan_scan_avahi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_avahi -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_AVAHI" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_AVAHI" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,11 +33,10 @@ nutscan_scan_avahi \- Scan network for NUT services via mDNS .sp .nf #include -#include /* useconds_t */ .fi .sp .nf -nutscan_device_t * nutscan_scan_avahi(useconds_t usec_timeout); +nutscan_device_t * nutscan_scan_avahi(long usec_timeout); .fi .SH "DESCRIPTION" .sp @@ -45,15 +44,10 @@ The \fBnutscan_scan_avahi()\fR function tries to detect the NUT service via mDNS .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .sp -This function can query perspective IP addresses using NUT protocol, and in this case it waits up to \fIusec_timeout\fR microseconds before considering an IP address to be unresponsive\&. +This function waits up to \fIusec_timeout\fR microseconds before considering an IP address to be unresponsive\&. .SH "RETURN VALUE" .sp -The \fBnutscan_scan_avahi()\fR function returns a pointer to a nutscan_device_t structure containing all found devices\&. -.sp -It returns NULL if an error occurs, or if no device is found\&. +The \fBnutscan_scan_avahi()\fR function returns a pointer to a nutscan_device_t structure containing all found devices\&. It returns NULL if an error occurs, or if no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3), \fBnutscan_scan_eaton_serial\fR(3) -.SS "Internet resources:" -.sp -http://avahi\&.org/ +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_cidr_to_ip\fR(3), \fBnutscan_scan_eaton_serial\fR(3), http://avahi\&.org/ diff --git a/docs/man/nutscan_scan_avahi.txt b/docs/man/nutscan_scan_avahi.txt index 01f02e9..fe82e12 100644 --- a/docs/man/nutscan_scan_avahi.txt +++ b/docs/man/nutscan_scan_avahi.txt @@ -10,43 +10,35 @@ SYNOPSIS -------- #include - #include /* useconds_t */ - nutscan_device_t * nutscan_scan_avahi(useconds_t usec_timeout); + nutscan_device_t * nutscan_scan_avahi(long usec_timeout); DESCRIPTION ----------- -The *nutscan_scan_avahi()* function tries to detect the NUT service via -mDNS, and its associated devices. It uses the Avahi library to do so. +The *nutscan_scan_avahi()* function tries to detect the NUT service via mDNS, +and its associated devices. It uses the Avahi library to do so. You MUST call linkman:nutscan_init[3] before using this function. -This function can query perspective IP addresses using NUT protocol, and -in this case it waits up to 'usec_timeout' microseconds before considering -an IP address to be unresponsive. +This function waits up to 'usec_timeout' microseconds before considering an IP +address to be unresponsive. RETURN VALUE ------------ -The *nutscan_scan_avahi()* function returns a pointer to a -`nutscan_device_t` structure containing all found devices. - -It returns NULL if an error occurs, or if no device is found. +The *nutscan_scan_avahi()* function returns a pointer to a `nutscan_device_t` +structure containing all found devices. It returns NULL if an error occurs, or +if no device is found. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_snmp[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_cidr_to_ip[3], -linkman:nutscan_scan_eaton_serial[3] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +linkman:nutscan_scan_eaton_serial[3], http://avahi.org/ diff --git a/docs/man/nutscan_scan_eaton_serial.3 b/docs/man/nutscan_scan_eaton_serial.3 index c468577..8f5df50 100644 --- a/docs/man/nutscan_scan_eaton_serial.3 +++ b/docs/man/nutscan_scan_eaton_serial.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_eaton_serial -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_EATON_S" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_EATON_S" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,9 +40,7 @@ nutscan_device_t * nutscan_scan_eaton_serial(const char* ports_list); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_eaton_serial()\fR function tries to detect NUT devices which are compatible with Eaton\(cqs serial device protocols (SHUT, XCP and Q1 (aka blazer))\&. -.sp -\fIports_list\fR is a NULL terminated array of pointers to strings containing serial device name (/dev/ttyS0, COM1, /dev/ttya\&...) +The \fBnutscan_scan_eaton_serial()\fR function tries to detect NUT devices which are compatible with Eaton\(cqs serial device protocols (SHUT, XCP and Q1 (aka blazer))\&. \fIports_list\fR is a NULL terminated array of pointers to strings containing serial device name (/dev/ttyS0, COM1, /dev/ttya\&...) .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .SH "RETURN VALUE" @@ -50,4 +48,4 @@ You MUST call \fBnutscan_init\fR(3) before using this function\&. The \fBnutscan_scan_eaton_serial()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_get_serial_ports_list\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_get_serial_ports_list\fR(3) diff --git a/docs/man/nutscan_scan_eaton_serial.txt b/docs/man/nutscan_scan_eaton_serial.txt index 068db12..7a38172 100644 --- a/docs/man/nutscan_scan_eaton_serial.txt +++ b/docs/man/nutscan_scan_eaton_serial.txt @@ -4,8 +4,7 @@ NUTSCAN_SCAN_EATON_SERIAL(3) NAME ---- -nutscan_scan_eaton_serial - Scan serial ports for Eaton devices (XCP, SHUT -and Q1). +nutscan_scan_eaton_serial - Scan serial ports for Eaton devices (XCP, SHUT and Q1). SYNOPSIS -------- @@ -17,10 +16,8 @@ SYNOPSIS DESCRIPTION ----------- -The *nutscan_scan_eaton_serial()* function tries to detect NUT devices -which are compatible with Eaton's serial device protocols (SHUT, XCP -and Q1 (aka blazer)). - +The *nutscan_scan_eaton_serial()* function tries to detect NUT devices which are +compatible with Eaton's serial device protocols (SHUT, XCP and Q1 (aka blazer)). 'ports_list' is a NULL terminated array of pointers to strings containing serial device name (/dev/ttyS0, COM1, /dev/ttya...) @@ -29,17 +26,14 @@ You MUST call linkman:nutscan_init[3] before using this function. RETURN VALUE ------------ -The *nutscan_scan_eaton_serial()* function returns a pointer to -a `nutscan_device_t` structure containing all found devices or -NULL if an error occurs or no device is found. +The *nutscan_scan_eaton_serial()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], diff --git a/docs/man/nutscan_scan_ipmi.3 b/docs/man/nutscan_scan_ipmi.3 index 4d2d55d..51a9f36 100644 --- a/docs/man/nutscan_scan_ipmi.3 +++ b/docs/man/nutscan_scan_ipmi.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_ipmi -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_IPMI" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_IPMI" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,26 +36,16 @@ nutscan_scan_ipmi \- Scan local IPMI devices\&. .fi .sp .nf -nutscan_device_t * nutscan_scan_ipmi( - const char * startIP, - const char * stopIP, - nutscan_ipmi_t * sec); +nutscan_device_t * nutscan_scan_ipmi(void); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_ipmi()\fR function tries to detect IPMI manageable devices\&. -.sp -If \fIstart_ip\fR is NULL, the function searches for a local PSU\&. -.sp -Otherwise, it searches for remote hosts that would serve IPMI protocols, and would try to authenticate using the data in \fIsec\fR structure\&. It issues a NUT request on every IP ranging from \fIstartIP\fR to \fIstopIP\fR, where \fIstopIP\fR is optional\&. Those IP arguments may be either IPv4 or IPv6 addresses or host names\&. +The \fBnutscan_scan_ipmi()\fR function is not implemented yet\&. .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. -.SH "BUGS" -.sp -Design or implementation of this function may be incomplete: until recently, this man page stated that it was not implemented yet\&. Source code is present, although some blocks are commented away or hidden with #if 0\&. .SH "RETURN VALUE" .sp The \fBnutscan_scan_ipmi()\fR function is not implemented yet\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_ipmi.txt b/docs/man/nutscan_scan_ipmi.txt index 9d463f4..a5ee61c 100644 --- a/docs/man/nutscan_scan_ipmi.txt +++ b/docs/man/nutscan_scan_ipmi.txt @@ -11,34 +11,15 @@ SYNOPSIS #include - nutscan_device_t * nutscan_scan_ipmi( - const char * startIP, - const char * stopIP, - nutscan_ipmi_t * sec); + nutscan_device_t * nutscan_scan_ipmi(void); DESCRIPTION ----------- -The *nutscan_scan_ipmi()* function tries to detect IPMI manageable devices. - -If 'start_ip' is NULL, the function searches for a local PSU. - -Otherwise, it searches for remote hosts that would serve IPMI protocols, -and would try to authenticate using the data in 'sec' structure. -It issues a NUT request on every IP ranging from 'startIP' to 'stopIP', -where 'stopIP' is optional. Those IP arguments may be either IPv4 or IPv6 -addresses or host names. +The *nutscan_scan_ipmi()* function is not implemented yet. You MUST call linkman:nutscan_init[3] before using this function. -BUGS ----- - -Design or implementation of this function may be incomplete: until -recently, this man page stated that it was not implemented yet. -Source code is present, although some blocks are commented away -or hidden with `#if 0`. - RETURN VALUE ------------ @@ -46,11 +27,10 @@ The *nutscan_scan_ipmi()* function is not implemented yet. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3], diff --git a/docs/man/nutscan_scan_nut.3 b/docs/man/nutscan_scan_nut.3 index 6dc3a4b..68487e1 100644 --- a/docs/man/nutscan_scan_nut.3 +++ b/docs/man/nutscan_scan_nut.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_nut -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_NUT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_NUT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,19 +33,14 @@ nutscan_scan_nut \- Scan network for available NUT services\&. .sp .nf #include -#include /* useconds_t */ .fi .sp .nf -nutscan_device_t * nutscan_scan_nut( - const char * startIP, - const char * stopIP, - const char * port, - useconds_t usec_timeout); +nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_nut()\fR function try to detect available NUT services and their associated devices\&. It issues a NUT request on every IP ranging from \fIstartIP\fR to \fIstopIP\fR\&. \fIstartIP\fR is mandatory, \fIstopIP\fR is optional\&. Those IP arguments may be either IPv4 or IPv6 addresses or host names\&. +The \fBnutscan_scan_nut()\fR function try to detect available NUT services and their associated devices\&. It issues a NUT request on every IP ranging from \fIstartIP\fR to \fIstopIP\fR\&. \fIstartIP\fR is mandatory, \fIstopIP\fR is optional\&. Those IP may be either IPv4 or IPv6 addresses or host names\&. .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .sp @@ -57,4 +52,4 @@ This function waits up to \fIusec_timeout\fR microseconds before considering an The \fBnutscan_scan_nut()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_nut.txt b/docs/man/nutscan_scan_nut.txt index 7d0b543..367a819 100644 --- a/docs/man/nutscan_scan_nut.txt +++ b/docs/man/nutscan_scan_nut.txt @@ -10,43 +10,31 @@ SYNOPSIS -------- #include - #include /* useconds_t */ - nutscan_device_t * nutscan_scan_nut( - const char * startIP, - const char * stopIP, - const char * port, - useconds_t usec_timeout); + nutscan_device_t * nutscan_scan_nut(const char * startIP, const char * stopIP, const char * port, long usec_timeout); DESCRIPTION ----------- -The *nutscan_scan_nut()* function try to detect available NUT services -and their associated devices. It issues a NUT request on every IP ranging -from 'startIP' to 'stopIP'. 'startIP' is mandatory, 'stopIP' is optional. -Those IP arguments may be either IPv4 or IPv6 addresses or host names. +The *nutscan_scan_nut()* function try to detect available NUT services and their associated devices. It issues a NUT request on every IP ranging from 'startIP' to 'stopIP'. 'startIP' is mandatory, 'stopIP' is optional. Those IP may be either IPv4 or IPv6 addresses or host names. You MUST call linkman:nutscan_init[3] before using this function. A specific 'port' number may be passed, or NULL to use the default NUT port. -This function waits up to 'usec_timeout' microseconds before considering -an IP address does not respond to NUT queries. +This function waits up to 'usec_timeout' microseconds before considering an IP address does not respond to NUT queries. RETURN VALUE ------------ -The *nutscan_scan_nut()* function returns a pointer to a `nutscan_device_t` -structure containing all found devices or NULL if an error occurs or no -device is found. +The *nutscan_scan_nut()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3], diff --git a/docs/man/nutscan_scan_snmp.3 b/docs/man/nutscan_scan_snmp.3 index 5b75a62..6db38fe 100644 --- a/docs/man/nutscan_scan_snmp.3 +++ b/docs/man/nutscan_scan_snmp.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_snmp -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_SNMP" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_SNMP" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,19 +33,14 @@ nutscan_scan_snmp \- Scan network for SNMP devices\&. .sp .nf #include -#include /* useconds_t */ .fi .sp .nf -nutscan_device_t * nutscan_scan_snmp( - const char * start_ip, - const char * stop_ip, - useconds_t timeout, - nutscan_snmp_t * sec); +nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long timeout, nutscan_snmp_t * sec); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_snmp()\fR function try to detect NUT compatible SNMP devices\&. It tries SNMP queries on every IP ranging from \fIstart_ip\fR to \fIstop_ip\fR\&. Those IP arguments may be either IPv4 or IPv6 addresses or host names\&. +The \fBnutscan_scan_snmp()\fR function try to detect NUT compatible SNMP devices\&. It tries SNMP queries on every IP ranging from \fIstart_ip\fR to \fIstop_ip\fR\&. Those IP may be either IPv4 or IPv6 addresses or host names\&. .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .sp @@ -91,4 +86,4 @@ If \fIprivProtocol\fR is NULL, DES protocol is used\&. Else you can set \fIprivP The \fBnutscan_scan_snmp()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3), \fBnutscan_cidr_to_ip\fR(3) diff --git a/docs/man/nutscan_scan_snmp.txt b/docs/man/nutscan_scan_snmp.txt index ecc893f..4dbec4b 100644 --- a/docs/man/nutscan_scan_snmp.txt +++ b/docs/man/nutscan_scan_snmp.txt @@ -10,31 +10,21 @@ SYNOPSIS -------- #include - #include /* useconds_t */ - nutscan_device_t * nutscan_scan_snmp( - const char * start_ip, - const char * stop_ip, - useconds_t timeout, - nutscan_snmp_t * sec); + nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long timeout, nutscan_snmp_t * sec); DESCRIPTION ----------- -The *nutscan_scan_snmp()* function try to detect NUT compatible SNMP -devices. It tries SNMP queries on every IP ranging from 'start_ip' to -'stop_ip'. Those IP arguments may be either IPv4 or IPv6 addresses or -host names. +The *nutscan_scan_snmp()* function try to detect NUT compatible SNMP devices. It tries SNMP queries on every IP ranging from 'start_ip' to 'stop_ip'. Those IP may be either IPv4 or IPv6 addresses or host names. You MUST call linkman:nutscan_init[3] before using this function. -This function waits up to 'timeout' microseconds before considering -an IP address does not respond to SNMP queries. +This function waits up to 'timeout' microseconds before considering an IP address does not respond to SNMP queries. A valid `nutscan_snmp_t` structure must be passed to this function. -The `nutscan_snmp_t` structure contains the following members which -must be filled as described below: +The `nutscan_snmp_t` structure contains the following members which must be filled as described below: char * 'community'; char * 'secLevel'; @@ -46,43 +36,31 @@ must be filled as described below: If 'community' is not NULL, SNMP v1 request are sent using this 'community'. -If 'community' is NULL and 'secLevel' is NULL, SNMP v1 is selected -and 'community' is set to "public". +If 'community' is NULL and 'secLevel' is NULL, SNMP v1 is selected and 'community' is set to "public". -In the other cases, SNMP v3 is used. 'secLevel' may be one -of `SNMP_SEC_LEVEL_NOAUTH`, `SNMP_SEC_LEVEL_AUTHNOPRIV` -or `SNMP_SEC_LEVEL_AUTHPRIV`. -'secName' is the security name and must be non NULL. +In the other cases, SNMP v3 is used. 'secLevel' may be one of `SNMP_SEC_LEVEL_NOAUTH`, `SNMP_SEC_LEVEL_AUTHNOPRIV` or `SNMP_SEC_LEVEL_AUTHPRIV`. 'secName' is the security name and must be non NULL. -If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHNOPRIV`, 'authPassword' -must be non NULL. +If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHNOPRIV`, 'authPassword' must be non NULL. -If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHPRIV`, 'authPassword' -and 'privPassword' must be non NULL. +If 'secLevel' is set to `SNMP_SEC_LEVEL_AUTHPRIV`, 'authPassword' and 'privPassword' must be non NULL. -If 'authProtocol' is NULL, MD5 protocol is used. -Else you can set 'authProtocol' to either "MD5" or "SHA". +If 'authProtocol' is NULL, MD5 protocol is used. Else you can set 'authProtocol' to either "MD5" or "SHA". -If 'privProtocol' is NULL, DES protocol is used. -Else you can set 'privProtocol' to either "AES" or "DES". +If 'privProtocol' is NULL, DES protocol is used. Else you can set 'privProtocol' to either "AES" or "DES". -'peername' and 'handle' are used internally and do not need any -initialization. +'peername' and 'handle' are used internally and do not need any initialization. RETURN VALUE ------------ -The *nutscan_scan_snmp()* function returns a pointer to a -`nutscan_device_t` structure containing all found devices -or NULL if an error occurs or no device is found. +The *nutscan_scan_snmp()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3], diff --git a/docs/man/nutscan_scan_usb.3 b/docs/man/nutscan_scan_usb.3 index e5fa2ce..d3c8fb9 100644 --- a/docs/man/nutscan_scan_usb.3 +++ b/docs/man/nutscan_scan_usb.3 @@ -1,13 +1,13 @@ '\" t .\" Title: nutscan_scan_usb -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_USB" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_USB" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ nutscan_scan_usb \- Scan NUT compatible USB devices\&. .fi .sp .nf -nutscan_device_t * nutscan_scan_usb(void); +nutscan_device_t * nutscan_scan_usb(); .fi .SH "DESCRIPTION" .sp @@ -48,4 +48,4 @@ You MUST call \fBnutscan_init\fR(3) before using this function\&. The \fBnutscan_scan_usb()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. .SH "SEE ALSO" .sp -\fBnutscan_init\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http_range\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3) +\fBnutscan_init\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_xml_http\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3) diff --git a/docs/man/nutscan_scan_usb.txt b/docs/man/nutscan_scan_usb.txt index 878c712..a48009c 100644 --- a/docs/man/nutscan_scan_usb.txt +++ b/docs/man/nutscan_scan_usb.txt @@ -11,7 +11,7 @@ SYNOPSIS #include - nutscan_device_t * nutscan_scan_usb(void); + nutscan_device_t * nutscan_scan_usb(); DESCRIPTION ----------- @@ -23,17 +23,14 @@ You MUST call linkman:nutscan_init[3] before using this function. RETURN VALUE ------------ -The *nutscan_scan_usb()* function returns a pointer to a `nutscan_device_t` -structure containing all found devices or NULL if an error occurs or no -device is found. +The *nutscan_scan_usb()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. SEE ALSO -------- - linkman:nutscan_init[3], -linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_xml_http_range[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_scan_snmp[3], linkman:nutscan_scan_xml_http[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3] diff --git a/docs/man/nutscan_scan_xml_http_range.3 b/docs/man/nutscan_scan_xml_http.3 similarity index 54% rename from docs/man/nutscan_scan_xml_http_range.3 rename to docs/man/nutscan_scan_xml_http.3 index 74ba7a3..4a1161a 100644 --- a/docs/man/nutscan_scan_xml_http_range.3 +++ b/docs/man/nutscan_scan_xml_http.3 @@ -1,13 +1,13 @@ '\" t -.\" Title: nutscan_scan_xml_http_range -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Title: nutscan_scan_xml_http +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTSCAN_SCAN_XML_HTT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTSCAN_SCAN_XML_HTT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,35 +28,24 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -nutscan_scan_xml_http_range \- Scan network for XML/HTTP devices\&. +nutscan_scan_xml_http \- Scan network for XML/HTTP devices\&. .SH "SYNOPSIS" .sp .nf #include -#include /* useconds_t */ .fi .sp .nf -nutscan_device_t * nutscan_scan_xml_http_range( - const char * start_ip, - const char * end_ip, - useconds_t usec_timeout, - nutscan_xml_t * sec) +nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); .fi .SH "DESCRIPTION" .sp -The \fBnutscan_scan_xml_http_range()\fR function tries to detect NUT compatible XML/HTTP devices\&. -.sp -If \fIstart_ip\fR is NULL, the function does this by issuing a broadcast message on currently configured network interfaces\&. -.sp -Otherwise, it queries every IP ranging from \fIstart_ip\fR to \fIstop_ip\fR\&. Those IP arguments may be either IPv4 or IPv6 addresses or host names\&. -.sp -It waits up to \fIusec_timeout\fR microseconds for a response from potential devices\&. +The \fBnutscan_scan_xml_http()\fR function try to detect NUT compatible XML/HTTP devices\&. It does this by issuing a broadcast message on currently configured network interfaces\&. It waits up to \fIusec_timeout\fR microseconds for a response from potential devices\&. .sp You MUST call \fBnutscan_init\fR(3) before using this function\&. .SH "RETURN VALUE" .sp -The \fBnutscan_scan_xml_http_range()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. +The \fBnutscan_scan_xml_http()\fR function returns a pointer to a nutscan_device_t structure containing all found devices or NULL if an error occurs or no device is found\&. .SH "SEE ALSO" .sp \fBnutscan_init\fR(3), \fBnutscan_scan_usb\fR(3), \fBnutscan_scan_snmp\fR(3), \fBnutscan_scan_nut\fR(3), \fBnutscan_scan_avahi\fR(3), \fBnutscan_scan_ipmi\fR(3), \fBnutscan_display_ups_conf\fR(3), \fBnutscan_display_parsable\fR(3), \fBnutscan_new_device\fR(3), \fBnutscan_free_device\fR(3), \fBnutscan_add_option_to_device\fR(3), \fBnutscan_add_device_to_device\fR(3), \fBnutscan_scan_eaton_serial\fR(3) diff --git a/docs/man/nutscan_scan_xml_http.txt b/docs/man/nutscan_scan_xml_http.txt new file mode 100644 index 0000000..42bfe84 --- /dev/null +++ b/docs/man/nutscan_scan_xml_http.txt @@ -0,0 +1,36 @@ +NUTSCAN_SCAN_XML_HTTP(3) +======================== + +NAME +---- + +nutscan_scan_xml_http - Scan network for XML/HTTP devices. + +SYNOPSIS +-------- + + #include + + nutscan_device_t * nutscan_scan_xml_http(long usec_timeout); + +DESCRIPTION +----------- + +The *nutscan_scan_xml_http()* function try to detect NUT compatible XML/HTTP devices. It does this by issuing a broadcast message on currently configured network interfaces. It waits up to 'usec_timeout' microseconds for a response from potential devices. + +You MUST call linkman:nutscan_init[3] before using this function. + +RETURN VALUE +------------ + +The *nutscan_scan_xml_http()* function returns a pointer to a `nutscan_device_t` structure containing all found devices or NULL if an error occurs or no device is found. + +SEE ALSO +-------- +linkman:nutscan_init[3], +linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3], +linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], +linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], +linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], +linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], +linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3] diff --git a/docs/man/nutscan_scan_xml_http_range.txt b/docs/man/nutscan_scan_xml_http_range.txt deleted file mode 100644 index 15cb2af..0000000 --- a/docs/man/nutscan_scan_xml_http_range.txt +++ /dev/null @@ -1,54 +0,0 @@ -NUTSCAN_SCAN_XML_HTTP_RANGE(3) -============================== - -NAME ----- - -nutscan_scan_xml_http_range - Scan network for XML/HTTP devices. - -SYNOPSIS --------- - - #include - #include /* useconds_t */ - - nutscan_device_t * nutscan_scan_xml_http_range( - const char * start_ip, - const char * end_ip, - useconds_t usec_timeout, - nutscan_xml_t * sec) - -DESCRIPTION ------------ - -The *nutscan_scan_xml_http_range()* function tries to detect NUT compatible -XML/HTTP devices. - -If 'start_ip' is NULL, the function does this by issuing a broadcast message -on currently configured network interfaces. - -Otherwise, it queries every IP ranging from 'start_ip' to 'stop_ip'. -Those IP arguments may be either IPv4 or IPv6 addresses or host names. - -It waits up to 'usec_timeout' microseconds for a response from potential -devices. - -You MUST call linkman:nutscan_init[3] before using this function. - -RETURN VALUE ------------- - -The *nutscan_scan_xml_http_range()* function returns a pointer to -a `nutscan_device_t` structure containing all found devices -or NULL if an error occurs or no device is found. - -SEE ALSO --------- - -linkman:nutscan_init[3], -linkman:nutscan_scan_usb[3], linkman:nutscan_scan_snmp[3], -linkman:nutscan_scan_nut[3], linkman:nutscan_scan_avahi[3], -linkman:nutscan_scan_ipmi[3], linkman:nutscan_display_ups_conf[3], -linkman:nutscan_display_parsable[3], linkman:nutscan_new_device[3], -linkman:nutscan_free_device[3], linkman:nutscan_add_option_to_device[3], -linkman:nutscan_add_device_to_device[3], linkman:nutscan_scan_eaton_serial[3] diff --git a/docs/man/nutupsdrv.8 b/docs/man/nutupsdrv.8 index c331441..daa4556 100644 --- a/docs/man/nutupsdrv.8 +++ b/docs/man/nutupsdrv.8 @@ -1,13 +1,13 @@ '\" t .\" Title: nutupsdrv -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "NUTUPSDRV" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "NUTUPSDRV" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -42,11 +42,9 @@ For information on the specific drivers, see their individual man pages\&. .sp UPS drivers provide a communication channel between the physical UPS hardware and the \fBupsd\fR(8) server\&. The driver is responsible for translating the native protocol of the UPS to the common format used by the rest of this package\&. .sp -The core has three modes of operation which are determined by the command line switches\&. In the normal mode, the driver will periodically poll the UPS for its state and parameters, as per the \fBpollinterval\fR parameter in \fBups.conf\fR(5)\&. The results of this command are presented to upsd\&. The driver will also handle setting variables and instant commands if available\&. +The core has two modes of operation which are determined by the command line switches\&. In the normal mode, the driver will periodically poll the UPS for its state and parameters\&. The results of this command is presented to upsd\&. The driver will also handle setting variables and instant commands if available\&. .sp -In the second mode, using \fB\-k\fR, the driver can instruct the UPS to shut down the load, possibly after some delay\&. This mode of operation is intended for cases when it is known that the UPS is running out of battery power and the systems attached must be turned off to ensure a proper reboot when power returns\&. -.sp -In the third mode, using \fB\-d\fR, the driver will exit after some update loops, dumping the data tree (in upsc\-like format) to stdout\&. This can be useful to complement the nut\-scanner to discover devices, along with in\-depth data\&. +The driver can also instruct the UPS to shut down the load, possibly after some delay\&. This mode of operation is intended for cases when it is known that the UPS is running out of battery power and the systems attached must be turned off to ensure a proper reboot when power returns\&. .if n \{\ .sp .\} @@ -81,31 +79,13 @@ section of \fBThis argument is mandatory when calling the driver directly\&.\fR .RE .PP -\fB\-s\fR \fIid\fR -.RS 4 -Configure this driver only with command line arguments instead of reading -\fBups.conf\fR(5)\&. To be used instead of -\fB\-a\fR -option when need to run a driver not present in driver configuration file\&. Instead, driver configuration have to be set with -\fB\-x\fR -options directly in the command line\&. As the driver instance cannot be controlled by -\fBupsdrvctl\fR(8), this option should be used for specific needs only\&. -.RE -.PP \fB\-D\fR .RS 4 -Raise the debugging level\&. Use this multiple times to see more details\&. Running a driver in debug mode will (by default) prevent it from backgrounding after startup\&. It will keep on logging information to the console until it receives a SIGINT (usually Ctrl\-C) or SIGTERM signal\&. +Raise the debugging level\&. Use this multiple times to see more details\&. Running a driver in debug mode will prevent it from backgrounding after startup\&. It will keep on logging information to the console until it receives a SIGINT (usually Ctrl\-C) or SIGTERM signal\&. .sp The level of debugging needed depends both on the driver and the problem you\(cqre trying to diagnose\&. Therefore, first explain the problem you have with a driver to a developer/maintainer, before sending them debugging output\&. More often than not, if you just pick a level, the output may be either too limited or too verbose to be of any use\&. .RE .PP -\fB\-d\fR \fIupdate_count\fR -.RS 4 -Dump the data tree (in upsc\-like format) to stdout after running the driver update loop for -\fIupdate_count\fR -times and exit\&. By default this prevents the driver process from backgrounding after startup\&. Note that the driver banner will be printed too, so when using this option in scripts, don\(cqt forget to trim the first line\&. -.RE -.PP \fB\-q\fR .RS 4 Raise log level threshold\&. Use this multiple times to log more details\&. @@ -113,19 +93,9 @@ Raise log level threshold\&. Use this multiple times to log more details\&. The debugging comment above also applies here\&. .RE .PP -\fB\-F\fR -.RS 4 -Enforce running the driver as a foreground process, regardless of debugging or data\-dumping settings\&. -.RE -.PP -\fB\-B\fR -.RS 4 -Enforce running the driver as a background process, regardless of debugging or data\-dumping settings\&. -.RE -.PP \fB\-i\fR \fIinterval\fR .RS 4 -Set the poll interval for the device\&. The default value is 2 (in seconds)\&. +Set the poll interval for the device\&. .RE .PP \fB\-V\fR @@ -135,7 +105,7 @@ Print only version information, then exit\&. .PP \fB\-L\fR .RS 4 -Print a parsable list of driver variables\&. Mostly useful for configuration wizard programs\&. +Print a parseable list of driver variables\&. Mostly useful for configuration wizard programs\&. .RE .PP \fB\-k\fR @@ -160,27 +130,11 @@ for this to work\&. The serial ports are opened before the chroot call, so you d .PP \fB\-u\fR \fIusername\fR .RS 4 -Override the unprivileged username that the driver may use after startup\&. If started as root, after opening configuration files (and optionally calling chroot(2), as described in the previous option), the driver will look up -\fIusername\fR -in the -passwd -database, then change to the user and group identities associated with -\fIusername\fR\&. (If started with a nonzero UID or effective UID, the driver will silently ignore this option\&.) +If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. .sp -When compiling NUT from source, the default username is typically -nobody, and this may cause permission errors when the driver opens the UPS device node\&. You can use this option to temporarily override the defaults\&. For testing purposes, you can set this option to -root -to bypass permission errors, especially with USB\-based drivers\&. However, you will want to remove this option later in order to avoid permission conflicts between the driver and the unprivileged copy of -\fBupsd\fR(8)\&. -.RE -.PP -\fB\-g\fR \fIgroupname\fR -.RS 4 -Override the unprivileged group name that the driver may use after startup to set permissions for the filesystem socket so -upsd -may still access it if the run\-time -user -of the driver normally would deny that access\&. +If you do not specify this value and start it as root, the driver will switch to the default value that was compiled into the code\&. This is typically +\fInobody\fR, and is far from ideal\&. .RE .PP \fB\-x\fR \fIvar\fR=\fIval\fR @@ -210,836 +164,19 @@ ups\&.conf .RS 4 Required configuration file\&. This contains all details on which drivers to start and where the hardware is attached\&. .RE -.SH "ENVIRONMENT VARIABLES" -.sp -\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /usr/local/ups/etc\&. -.sp -\fBNUT_STATEPATH\fR is the path name of the directory in which \fBupsd\fR keeps state information\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /var/state/ups\&. The \fBSTATEPATH\fR directive in \fBupsd.conf\fR(5) overrides this variable\&. -.sp -\fBNUT_ALTPIDPATH\fR is the path name of the directory in which \fBupsd\fR and drivers store \&.pid files\&. If this variable is not set, \fBupsd\fR and drivers use either \fBNUT_STATEPATH\fR if set, or ALTPIDPATH if set, or otherwise the built\-in default \fBSTATEPATH\fR\&. .SH "BUGS" .sp Some of the drivers may have bugs\&. See their manuals for more information\&. .SH "SEE ALSO" -.SS "Server:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsd\fR(8) -.RE -.SS "Clients:" +Server: \fBupsd\fR(8) .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsc\fR(8) -.RE +Clients: \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupscmd\fR(8) -.RE +CGI programs: \fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsrw\fR(8) -.RE +Driver control: \fBupsdrvctl\fR(8) .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupslog\fR(8) -.RE +Drivers: \fBal175\fR(8) \fBapcsmart\fR(8), \fBbcmxcp\fR(8), \fBbcmxcp_usb\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestfcom\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBblazer_ser\fR(8), \fBblazer_usb\fR(8), \fBcyberpower\fR(8), \fBdummy-ups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgamatronic\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmetasys\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBmge-xml\fR(8), \fBnewmge-shut\fR(8), \fBnitram\fR(8), \fBnutdrv_qx\fR(8), \fBoneac\fR(8), \fBoptiups\fR(8), \fBpowercom\fR(8), \fBpowerman-pdu\fR(8), \fBpowerpanel\fR(8), \fBrhino\fR(8), \fBrichcomm_usb\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBsolis\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBtripplite_usb\fR(8), \fBusbhid-ups\fR(8), \fBupscode2\fR(8), \fBvictronups\fR(8) .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsmon\fR(8) -.RE -.SS "CGI programs:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsset.cgi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsstats.cgi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsimage.cgi\fR(8) -.RE -.SS "Driver control:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnut-driver-enumerator\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsdrvctl\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsdrvsvcctl\fR(8) -.RE -.SS "Drivers:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBadelsystem_cbi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBal175\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcsmart-old\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcsmart\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcupsd-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBasem\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbcmxcp\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbcmxcp_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbelkin\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbelkinunv\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestfcom\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestfortress\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestuferrups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer-common\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer_ser\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBclone\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBdummy-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBetapro\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBeverups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgamatronic\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgeneric_modbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgenericups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBhuawei-ups2000\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBisbmex\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBivtscd\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBliebert-esp2\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBliebert\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmacosx-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmasterguard\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmetasys\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmge-shut\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmge-utalk\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmicrodowell\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmicrosol-apc\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnetxml-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnut-ipmipsu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_atcl_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_qx\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_siemens_sitop\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBoneac\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBoptiups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBphoenixcontact_modbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpijuice\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowercom\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowerman-pdu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowerpanel\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBrhino\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBrichcomm_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBriello_ser\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBriello_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsafenet\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsnmp-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsocomec_jbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsolis\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplite\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplite_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplitesu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupscode2\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBusbhid-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBvictronups\fR(8) -.RE -.SS "Internet resources:" -.sp -The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ +Internet resources: The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/nutupsdrv.txt b/docs/man/nutupsdrv.txt index 01ddbf5..88878cd 100644 --- a/docs/man/nutupsdrv.txt +++ b/docs/man/nutupsdrv.txt @@ -1,7 +1,7 @@ NUTUPSDRV(8) ============ -NAME +NAME ---- nutupsdrv - generic manual for unified NUT drivers @@ -27,21 +27,16 @@ hardware and the linkman:upsd[8] server. The driver is responsible for translating the native protocol of the UPS to the common format used by the rest of this package. -The core has three modes of operation which are determined by the +The core has two modes of operation which are determined by the command line switches. In the normal mode, the driver will periodically -poll the UPS for its state and parameters, as per the *pollinterval* parameter -in linkman:ups.conf[5]. The results of this command are presented to upsd. -The driver will also handle setting variables and instant commands if available. +poll the UPS for its state and parameters. The results of this command +is presented to upsd. The driver will also handle setting variables and +instant commands if available. -In the second mode, using *-k*, the driver can instruct the UPS to shut down -the load, possibly after some delay. This mode of operation is intended for -cases when it is known that the UPS is running out of battery power and the -systems attached must be turned off to ensure a proper reboot when power -returns. - -In the third mode, using *-d*, the driver will exit after some update loops, -dumping the data tree (in upsc-like format) to stdout. This can be useful to -complement the nut-scanner to discover devices, along with in-depth data. +The driver can also instruct the UPS to shut down the load, possibly +after some delay. This mode of operation is intended for cases when it is +known that the UPS is running out of battery power and the systems +attached must be turned off to ensure a proper reboot when power returns. NOTE: You probably don't want to use any of these options directly. You should use linkman:upsdrvctl[8] to control your drivers, and @@ -50,7 +45,6 @@ options and parameters that generally are not needed by normal users. OPTIONS ------- - *-h*:: Display a help message without doing anything else. This will also list possible values for '-x' in that driver, and other help text that the @@ -60,18 +54,10 @@ driver's author may have provided. Autoconfigure this driver using the 'id' section of linkman:ups.conf[5]. *This argument is mandatory when calling the driver directly.* -*-s* 'id':: -Configure this driver only with command line arguments instead of reading -linkman:ups.conf[5]. To be used instead of *-a* option when need to run -a driver not present in driver configuration file. Instead, driver -configuration have to be set with *-x* options directly in the command line. -As the driver instance cannot be controlled by linkman:upsdrvctl[8], -this option should be used for specific needs only. - *-D*:: Raise the debugging level. Use this multiple times to see more details. -Running a driver in debug mode will (by default) prevent it from backgrounding -after startup. It will keep on logging information to the console until it +Running a driver in debug mode will prevent it from backgrounding after +startup. It will keep on logging information to the console until it receives a SIGINT (usually Ctrl-C) or SIGTERM signal. + The level of debugging needed depends both on the driver and the @@ -80,34 +66,19 @@ have with a driver to a developer/maintainer, before sending them debugging output. More often than not, if you just pick a level, the output may be either too limited or too verbose to be of any use. -*-d* 'update_count':: -Dump the data tree (in upsc-like format) to stdout after running the driver -update loop for 'update_count' times and exit. -By default this prevents the driver process from backgrounding after startup. -Note that the driver banner will be printed too, so when using this option in -scripts, don't forget to trim the first line. - *-q*:: Raise log level threshold. Use this multiple times to log more details. + The debugging comment above also applies here. - -*-F*:: -Enforce running the driver as a foreground process, regardless of debugging -or data-dumping settings. - -*-B*:: -Enforce running the driver as a background process, regardless of debugging -or data-dumping settings. - + *-i* 'interval':: -Set the poll interval for the device. The default value is 2 (in seconds). +Set the poll interval for the device. *-V*:: Print only version information, then exit. *-L*:: -Print a parsable list of driver variables. Mostly useful for configuration +Print a parseable list of driver variables. Mostly useful for configuration wizard programs. *-k*:: @@ -127,30 +98,17 @@ opened before the chroot call, so you do not need to create them inside the jail. In fact, it is somewhat safer if you do not. *-u* 'username':: -Override the unprivileged username that the driver may use after startup. If -started as root, after opening configuration files (and optionally calling -chroot(2), as described in the previous option), the driver will look up -'username' in the `passwd` database, then change to the user and group -identities associated with 'username'. (If started with a nonzero UID or -effective UID, the driver will silently ignore this option.) +If started as root, the driver will setuid(2) to the user id +associated with 'username'. + -When compiling NUT from source, the default username is typically `nobody`, and -this may cause permission errors when the driver opens the UPS device node. You -can use this option to temporarily override the defaults. For testing purposes, -you can set this option to `root` to bypass permission errors, especially with -USB-based drivers. However, you will want to remove this option later in order -to avoid permission conflicts between the driver and the unprivileged copy of -linkman:upsd[8]. - -*-g* 'groupname':: -Override the unprivileged group name that the driver may use after startup -to set permissions for the filesystem socket so `upsd` may still access it -if the run-time `user` of the driver normally would deny that access. +If you do not specify this value and start it as root, the driver will +switch to the default value that was compiled into the code. This is +typically 'nobody', and is far from ideal. *-x* 'var'='val':: Define a variable called 'var' with the value of 'var' in the driver. This varies from driver to driver - see the specific man pages -for more information. +for more information. + This is like setting 'var'='val' in linkman:ups.conf[5], but *-x* overrides any settings from that file. @@ -172,28 +130,10 @@ production use. FILES ----- - ups.conf:: Required configuration file. This contains all details on which drivers to start and where the hardware is attached. -ENVIRONMENT VARIABLES ---------------------- - -*NUT_CONFPATH* is the path name of the directory that contains -`upsd.conf` and other configuration files. If this variable is not set, -*upsd* uses a built-in default, which is often `/usr/local/ups/etc`. - -*NUT_STATEPATH* is the path name of the directory in which -*upsd* keeps state information. If this variable is not set, -*upsd* uses a built-in default, which is often `/var/state/ups`. -The *STATEPATH* directive in linkman:upsd.conf[5] overrides this variable. - -*NUT_ALTPIDPATH* is the path name of the directory in which -*upsd* and drivers store .pid files. If this variable is not set, -*upsd* and drivers use either *NUT_STATEPATH* if set, or ALTPIDPATH if set, -or otherwise the built-in default *STATEPATH*. - BUGS ---- @@ -204,37 +144,62 @@ SEE ALSO -------- Server: -~~~~~~~ - -- linkman:upsd[8] +linkman:upsd[8] Clients: -~~~~~~~~ - -- linkman:upsc[8] -- linkman:upscmd[8] -- linkman:upsrw[8] -- linkman:upslog[8] -- linkman:upsmon[8] +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] CGI programs: -~~~~~~~~~~~~~ - -- linkman:upsset.cgi[8] -- linkman:upsstats.cgi[8] -- linkman:upsimage.cgi[8] +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] Driver control: -~~~~~~~~~~~~~~~ - -include::{builddir}/linkman-drivertool-names.txt[] +linkman:upsdrvctl[8] Drivers: -~~~~~~~~ - -include::{builddir}/linkman-driver-names.txt[] +linkman:al175[8] +linkman:apcsmart[8], +linkman:bcmxcp[8], +linkman:bcmxcp_usb[8], +linkman:belkin[8], +linkman:belkinunv[8], +linkman:bestfcom[8], +linkman:bestuferrups[8], +linkman:bestups[8], +linkman:blazer_ser[8], +linkman:blazer_usb[8], +linkman:cyberpower[8], +linkman:dummy-ups[8], +linkman:etapro[8], +linkman:everups[8], +linkman:gamatronic[8], +linkman:genericups[8], +linkman:isbmex[8], +linkman:liebert[8], +linkman:masterguard[8], +linkman:metasys[8], +linkman:mge-shut[8], +linkman:mge-utalk[8], +linkman:mge-xml[8], +linkman:newmge-shut[8], +linkman:nitram[8], +linkman:nutdrv_qx[8], +linkman:oneac[8], +linkman:optiups[8], +linkman:powercom[8], +linkman:powerman-pdu[8], +linkman:powerpanel[8], +linkman:rhino[8], +linkman:richcomm_usb[8], +linkman:safenet[8], +linkman:snmp-ups[8], +linkman:solis[8], +linkman:tripplite[8], +linkman:tripplitesu[8], +linkman:tripplite_usb[8], +linkman:usbhid-ups[8], +linkman:upscode2[8], +linkman:victronups[8] Internet resources: -~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/oneac.8 b/docs/man/oneac.8 index 8db799b..3187817 100644 --- a/docs/man/oneac.8 +++ b/docs/man/oneac.8 @@ -1,13 +1,13 @@ '\" t .\" Title: oneac -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "ONEAC" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "ONEAC" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -204,29 +204,9 @@ If your UPS supports writing battery\&.runtime\&.low, the new set value is to be If your UPS supports input\&.transfer\&.low and input\&.transfer\&.high, those values are used to create an allowable output range\&. The UPS will do what it can to keep the output voltage value within the defined range (for example: tap change or switch to inverter)\&. .sp .5v .RE -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Bill Elliot -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Eric Lawson -.RE +Bill Elliot , Eric Lawson .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/oneac.txt b/docs/man/oneac.txt index beb257e..fe6c779 100644 --- a/docs/man/oneac.txt +++ b/docs/man/oneac.txt @@ -28,7 +28,6 @@ linkman:genericups[8] driver. EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in the linkman:ups.conf[5] file: @@ -40,7 +39,6 @@ Change shutdown delay time from 0 second default. INSTANT COMMANDS ---------------- - This driver supports the following Instant Commands. (See linkman:upscmd[8]) @@ -99,7 +97,6 @@ Mutes the UPS beeper/buzzer for the current alarm condition(s). Writable Variables ------------------ - See linkman:upsrw[8] to see what variables are writable for the UPS. NOTE: If your UPS supports writing battery.runtime.low, the new set value @@ -107,25 +104,22 @@ is to be entered in minutes (up to 99) but the reported value is reported in seconds (set value * 60). NOTE: If your UPS supports input.transfer.low and input.transfer.high, -those values are used to create an allowable output range. The UPS -will do what it can to keep the output voltage value within the +those values are used to create an allowable output range. The UPS +will do what it can to keep the output voltage value within the defined range (for example: tap change or switch to inverter). -AUTHORS -------- - -* Bill Elliot -* Eric Lawson +AUTHOR +------ +Bill Elliot , +Eric Lawson SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/optiups.8 b/docs/man/optiups.8 index 46e090d..140e059 100644 --- a/docs/man/optiups.8 +++ b/docs/man/optiups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: optiups -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "OPTIUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "OPTIUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -86,40 +86,9 @@ Zinto D from ONLINE\-USV cannot be identified when switched to standby\&. Set th .SH "BUGS" .sp On the 420E, ups\&.serial and ups\&.temperature are unsupported features\&. This is not a bug in NUT or the NUT driver, just the way things are with this UPS\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Russell Kroll -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Scott Heavner -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Matthias Goebl -.RE +Russell Kroll, Scott Heavner, Matthias Goebl .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/optiups.txt b/docs/man/optiups.txt index 1e1d904..25f7342 100644 --- a/docs/man/optiups.txt +++ b/docs/man/optiups.txt @@ -1,7 +1,7 @@ OPTIUPS(8) ========== -NAME +NAME ---- optiups - Driver for Opti-UPS (Viewsonic) UPS and Zinto D (ONLINE-USV) equipment @@ -10,7 +10,7 @@ NOTE ---- This man page only documents the hardware-specific features of the -optiups driver. For information about the core driver, see +optiups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE @@ -56,14 +56,13 @@ sent to your system logs each time NUT polls the UPS. If you specify *fake_lowbatt*:: -This forces the low battery flag true. Without it, if you want to test -your UPS, you will have to unplug it and wait until the battery drops -to a low/critical voltage level before NUT will respond and power down -your system. With the flag, NUT should power down the system soon after -you pull the plug. When you are done testing, you should remove this flag. +This forces the low battery flag true. Without it, if you want to test your +UPS, you will have to unplug it and wait until the battery drops to a low/critical +voltage level before NUT will respond and power down your system. With the flag, +NUT should power down the system soon after you pull the plug. When you are done +testing, you should remove this flag. + -For basic shutdown configuration testing, the command 'upsmon -c fsd' is -preferred. +For basic shutdown configuration testing, the command 'upsmon -c fsd' is preferred. *powerup*:: @@ -74,26 +73,20 @@ This will also power-up your equipment connected to the UPS! BUGS ---- -On the 420E, `ups.serial` and `ups.temperature` are unsupported features. -This is not a bug in NUT or the NUT driver, just the way things are with -this UPS. +On the 420E, `ups.serial` and `ups.temperature` are unsupported features. This +is not a bug in NUT or the NUT driver, just the way things are with this UPS. -AUTHORS -------- - -* Russell Kroll -* Scott Heavner -* Matthias Goebl +AUTHOR +------ +Russell Kroll, Scott Heavner, Matthias Goebl SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/phoenixcontact_modbus.8 b/docs/man/phoenixcontact_modbus.8 deleted file mode 100644 index c085453..0000000 --- a/docs/man/phoenixcontact_modbus.8 +++ /dev/null @@ -1,254 +0,0 @@ -'\" t -.\" Title: phoenixcontact_modbus -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "PHOENIXCONTACT_MODBU" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -phoenixcontact_modbus \- Driver for Phoenix Contact -.SH "SYNOPSIS" -.sp -\fBphoenixcontact_modbus\fR \-h -.sp -\fBphoenixcontact_modbus\fR \-a \fIDEVICE_NAME\fR [\fIOPTIONS\fR] -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This man page only documents the hardware\-specific features of the phoenixcontact_modbus driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -This driver should support the PhoenixContact QUINT\-UPS industrial DC UPS, model 2320461 and all compatible models\&. More information about this UPS can be found here: https://www\&.phoenixcontact\&.com/online/portal/us?uri=pxc\-oc\-itemdetail:pid=2320461 -.sp -phoenixcontact_modbus uses the libmodbus project, for Modbus implementation\&. -.SH "HOW TO CONFIGURE THE UPS" -.sp -Note: this UPS and its manual refers to Low\-Batt as "Shutdown Event"\&. -.sp -You need the "IFS\-RS232\-DATACABLE" to communicate with the UPS in Linux as the IFS\-USB cable doesn\(cqt seem to be supported\&. FYI communication parameters are: 115200,E,8,1\&. -.sp -You also need the UPS\-CONF Windows software (free; download from their site), to configure the UPS signals and timers\&. -.sp -.RS 4 -.ie n \{\ -\h'-04' 1.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 1." 4.2 -.\} -Run the UPS\-CONF -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 2.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 2." 4.2 -.\} -Go to Settings→Time Setting -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 3.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 3." 4.2 -.\} -Choose "state of charge shutdown delay" -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 4.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 4." 4.2 -.\} -Choose Remote starts PC\-Shutdown in Mains and Battery mode -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 5.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 5." 4.2 -.\} -On the PC\-Shutdown enter the maximum value (5 minutes) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 6.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 6." 4.2 -.\} -On the PC\-Restart delay enter the time you want the UPS to leave the output power off before restarting (e\&.g\&. 60 seconds), after mains power is restored\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 7.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 7." 4.2 -.\} -On the UPS, turn the screw to the "PC\-MODE" position -.RE -.sp -Configuring the above way ensures that: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -When power is lost, UPS constantly calculates remaining battery time -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -When remaining battery time is less than 5 minutes (PC\-Shutdown setting), it will raise the "Shutdown" event (seen as LOW\-BATT in NUT) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -From that moment even if input power is restored, the UPS will cut the output power to its load after 5 minutes -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -When the input power is restored, the UPS will restore output power after 60 seconds (PC\-RESTART delay setting)\&. -.RE -.sp -Meaning of settings: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -PC\-Shutdown: How long before output cutoff the UPS will raise the "shutdown event" signal\&. Max value for this is 5 minutes\&. So PC should be able to shutdown within 5 minutes\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -PC\-Restart: How long to delay output power after power is restored\&. Max is 60 seconds\&. -.RE -.SH "EXTRA ARGUMENTS" -.sp -This driver doesn\(cqt support any optional settings\&. -.SH "INSTALLATION" -.sp -This driver is not built by default\&. You can build it by installing libmodbus and running configure \-\-with\-modbus=yes\&. -.sp -You also need to give proper permissions on the local serial device file (/dev/ttyS0 for example) to allow the NUT user to access it\&. -.SH "INSTANT COMMANDS" -.sp -This driver doesn\(cqt support any instant commands\&. -.SH "AUTHOR" -.sp -Spiros Ioannou -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -libmodbus home page: -http://libmodbus\&.org -.RE diff --git a/docs/man/phoenixcontact_modbus.txt b/docs/man/phoenixcontact_modbus.txt deleted file mode 100644 index e173089..0000000 --- a/docs/man/phoenixcontact_modbus.txt +++ /dev/null @@ -1,107 +0,0 @@ -PHOENIXCONTACT_MODBUS(8) -======================== - -NAME ----- - -phoenixcontact_modbus - Driver for Phoenix Contact - -SYNOPSIS --------- - -*phoenixcontact_modbus* -h - -*phoenixcontact_modbus* -a 'DEVICE_NAME' ['OPTIONS'] - -NOTE: This man page only documents the hardware-specific features of the -phoenixcontact_modbus driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This driver should support the PhoenixContact QUINT-UPS industrial DC UPS, -model 2320461 and all compatible models. More information about this UPS -can be found here: -https://www.phoenixcontact.com/online/portal/us?uri=pxc-oc-itemdetail:pid=2320461 - -phoenixcontact_modbus uses the libmodbus project, for Modbus implementation. - -How to configure the UPS ------------------------- - -Note: this UPS and its manual refers to Low-Batt as "Shutdown Event". - -You need the "IFS-RS232-DATACABLE" to communicate with the UPS in Linux -as the IFS-USB cable doesn't seem to be supported. FYI communication -parameters are: 115200,E,8,1. - -You also need the UPS-CONF Windows software (free; download from their -site), to configure the UPS signals and timers. - -1. Run the UPS-CONF -2. Go to Settings->Time Setting -3. Choose "state of charge shutdown delay" -4. Choose Remote starts PC-Shutdown in Mains and Battery mode -5. On the PC-Shutdown enter the maximum value (5 minutes) -6. On the PC-Restart delay enter the time you want the UPS to leave - the output power off before restarting (e.g. 60 seconds), after - mains power is restored. -7. On the UPS, turn the screw to the "PC-MODE" position - -Configuring the above way ensures that: - - * When power is lost, UPS constantly calculates remaining battery time - * When remaining battery time is less than 5 minutes (PC-Shutdown setting), - it will raise the "Shutdown" event (seen as LOW-BATT in NUT) - * From that moment even if input power is restored, the UPS will cut the - output power to its load after 5 minutes - * When the input power is restored, the UPS will restore output power - after 60 seconds (PC-RESTART delay setting). - -Meaning of settings: - - * PC-Shutdown: How long before output cutoff the UPS will raise - the "shutdown event" signal. Max value for this is 5 minutes. - So PC should be able to shutdown within 5 minutes. - * PC-Restart: How long to delay output power after power is restored. - Max is 60 seconds. - - -EXTRA ARGUMENTS ---------------- - -This driver doesn't support any optional settings. - -INSTALLATION ------------- - -This driver is not built by default. You can build it by installing -libmodbus and running `configure --with-modbus=yes`. - -You also need to give proper permissions on the local serial device file -(/dev/ttyS0 for example) to allow the NUT user to access it. - -INSTANT COMMANDS ----------------- - -This driver doesn't support any instant commands. - -AUTHOR ------- - -Spiros Ioannou - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* libmodbus home page: http://libmodbus.org diff --git a/docs/man/pijuice.8 b/docs/man/pijuice.8 deleted file mode 100644 index 15af10a..0000000 --- a/docs/man/pijuice.8 +++ /dev/null @@ -1,167 +0,0 @@ -'\" t -.\" Title: pijuice -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "PIJUICE" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -pijuice \- driver for UPS in PiJuice HAT -.SH "NOTE" -.sp -This man page only documents the hardware\-specific features of the \fBpijuice\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This manual page was hastily adapted from related asem driver manpage based on information from the original pull request, and so may not fully apply to PiJuice HAT, patches from experts are welcome\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -The \fBpijuice\fR driver supports the portable PiJuice HAT UPS for Raspberry Pi embedded PCs\&. -.SH "EXTRA ARGUMENTS" -.sp -The required parameter for this driver is the I2C bus name: -.PP -\fBport\fR=\fIdev\-node\fR -.RS 4 -On the PiJuice HAT, this should be -/dev/i2c\-1\&. -.RE -.SH "INSTALLATION" -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This section was copied from asem driver manpage and may not fully apply to PiJuice HAT, patches are welcome\&. -.sp .5v -.RE -.sp -This driver is specific to the Linux I2C API, and requires the lm_sensors libi2c\-dev or its equivalent to compile\&. -.sp -Beware that the SystemIO memory used by the I2C controller is reserved by ACPI\&. If only a native I2C driver (e\&.g\&. i2c_i801, as of 3\&.5\&.X Linux kernels) is available, then you\(cqll need to relax the ACPI resources check\&. For example, you can boot with the acpi_enforce_resources=lax option\&. -.SH "KNOWN ISSUES AND BUGS" -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This section was copied from asem driver manpage and may not fully apply to PiJuice HAT, patches are welcome\&. -.sp .5v -.RE -.sp -The driver shutdown function is not implemented, so other arrangements must be made to turn off the UPS\&. -.SH "AUTHORS" -.sp -Andrew Anderson -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Initial pull requests adding this driver: -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -https://github\&.com/networkupstools/nut/pull/730 -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -https://github\&.com/PiSupply/PiJuice/issues/124 -.RE -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Product home page: -https://uk\&.pi\-supply\&.com/products/pijuice\-standard -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE diff --git a/docs/man/pijuice.txt b/docs/man/pijuice.txt deleted file mode 100644 index 801646a..0000000 --- a/docs/man/pijuice.txt +++ /dev/null @@ -1,88 +0,0 @@ -PIJUICE(8) -========== - -NAME ----- - -pijuice - driver for UPS in PiJuice HAT - -NOTE ----- - -This man page only documents the hardware-specific features of the -*pijuice* driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -NOTE: This manual page was hastily adapted from related `asem` driver -manpage based on information from the original pull request, and so -may not fully apply to PiJuice HAT, patches from experts are welcome. - -SUPPORTED HARDWARE ------------------- - -The *pijuice* driver supports the portable PiJuice HAT UPS for Raspberry Pi -embedded PCs. - -EXTRA ARGUMENTS ---------------- - -The required parameter for this driver is the I2C bus name: - -*port*='dev-node':: -On the PiJuice HAT, this should be `/dev/i2c-1`. - -INSTALLATION ------------- - -NOTE: This section was copied from `asem` driver manpage and may not fully -apply to PiJuice HAT, patches are welcome. - -This driver is specific to the Linux I2C API, and requires the lm_sensors -libi2c-dev or its equivalent to compile. - -Beware that the SystemIO memory used by the I2C controller is reserved by ACPI. -If only a native I2C driver (e.g. i2c_i801, as of 3.5.X Linux kernels) is -available, then you'll need to relax the ACPI resources check. For example, you -can boot with the `acpi_enforce_resources=lax` option. - -////////////////////////////////////////// -Optional: use DIAGNOSTICS to describe troubleshooting techniques that are -longer than what can be conveniently described in the driver error messages. - -DIAGNOSTICS ------------ - -////////////////////////////////////////// - -KNOWN ISSUES AND BUGS ---------------------- - -NOTE: This section was copied from `asem` driver manpage and may not fully -apply to PiJuice HAT, patches are welcome. - -The driver shutdown function is not implemented, so other arrangements must be -made to turn off the UPS. - -AUTHORS -------- - -Andrew Anderson - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* Initial pull requests adding this driver: -** https://github.com/networkupstools/nut/pull/730 -** https://github.com/PiSupply/PiJuice/issues/124 - -* Product home page: https://uk.pi-supply.com/products/pijuice-standard - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powercom.8 b/docs/man/powercom.8 index 9c5c801..a90dfbe 100644 --- a/docs/man/powercom.8 +++ b/docs/man/powercom.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powercom -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "POWERCOM" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "POWERCOM" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -129,11 +129,6 @@ or .RS 4 (Only for types KP625AP, Trust, Egys\&.) A quad that is used convert the raw voltage data to a human\-readable voltage reading using the function A*x+B\&. If the raw value x IS HALF the Voltage, then set A=2, B=0\&. The default is type\-dependent and is given below\&. Do note that the braces and commas are mandatory, as well as the lack of whitespace characters\&. .RE -.PP -\fBnobt\fR -.RS 4 -If this flag is present, the battery check on startup is skipped\&. This is useful for systems that tend to overload the UPS when testing the battery on system startup \(em just when the power consumption tends to be high\&. -.RE .SH "DEFAULT VALUES FOR THE EXTRA ARGUMENTS" .sp .if n \{\ @@ -279,51 +274,9 @@ shutdownArguments = {{1,30},y} .if n \{\ .RE .\} -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Peter Bieringer -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Alexey Sidorov -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Keven L\&. Ates -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Rouben Tchakhmakhtchian -.RE +Peter Bieringer , Alexey Sidorov , Keven L\&. Ates .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/powercom.txt b/docs/man/powercom.txt index db7e936..0657508 100644 --- a/docs/man/powercom.txt +++ b/docs/man/powercom.txt @@ -1,21 +1,19 @@ POWERCOM(8) =========== -NAME +NAME ---- powercom - UPS driver for serial Powercom/Trust/Advice UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the powercom driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports many similar kinds of serial UPS hardware (as well as a few USB UPS models with USB-to-serial adapters). The most common ones are the Trust 425/625, Powercom, and Advice Partner/King PR750. Others using the same @@ -26,12 +24,11 @@ see the NUT Hardware Compatibility List (HCL). EXTRA ARGUMENTS --------------- - -This driver supports the following optional settings in the +This driver supports the following optional settings in the linkman:ups.conf[5] file: *linevoltage*='value':: -An integer specifying the line voltage. It can't be auto detected. Acceptable +An integer specifying the line voltage. It can't be auto detected. Acceptable values are in the range of 110-120 or 220-240. The default is '230'. *manufacturer*='name':: @@ -39,7 +36,7 @@ Specify the manufacturer name, which also can't be auto detected. This is a user defined string, so any name is acceptable. The default is 'PowerCom'. *modelname*='name':: -Specify the model name, which also can't be auto detected. This is a user +Specify the model name, which also can't be auto detected. This is a user defined string, so any name is acceptable. The default is 'Unknown'. *serialnumber*='value':: @@ -52,14 +49,14 @@ modelname that was coded with that protocol. The acceptable names are 'Trust', 'Egys', 'KP625AP', 'IMP', 'KIN', 'BNT', 'BNT-other' and 'OPTI'. The default is 'Trust'. + -'BNT-other' is a special type for other BNT models (such as the 1500A at 120V +'BNT-other' is a special type for other BNT models (such as the 1500A at 120V and can be used to override ALL models using ALL of the following values. *shutdownArguments*={{'minutes','seconds'},'whether_minutes_should_be_used'}:: -The minutes and seconds that the UPS should wait between receiving the +The minutes and seconds that the UPS should wait between receiving the shutdown command and actually shutting off. The other argument should be set -to the character 'n' only when the minutes value should be skipped and not -sent to the UPS. The default is type-dependent and is given below. The braces +to the character 'n' only when the minutes value should be skipped and not +sent to the UPS. The default is type-dependent and is given below. The braces and commas are mandatory. Note that there should be no whitespace characters. *numOfBytesFromUPS*='value':: @@ -68,13 +65,13 @@ is type-dependent and is given below. *methodOfFlowControl*='name':: The method of serial communication flow control that is engaged by the UPS. -The default is type-dependent and is given below. Acceptable names are +The default is type-dependent and is given below. Acceptable names are 'dtr0rts1', 'dtr1' or 'no_flow_control'. *validationSequence*={{'index1','value1'},{'index2','value2'},{'index3','value3'}}:: (Only for types KP625AP, Trust, Egys.) 3 pairs to be used for validating the UPS by comparing bytes of the raw data -with constant values. The index selects the byte from the UPS (see +with constant values. The index selects the byte from the UPS (see numOfBytesFromUPS) and the value is for matching to the byte. The default is type-dependent and is given below. The braces and commas are mandatory, as the lack of white space characters. @@ -83,7 +80,7 @@ the lack of white space characters. (Only for types KP625AP, Trust, Egys.) A pair to convert the raw frequency data to a human-readable frequency reading using the function 1/(A*x+B). If the raw value x IS the frequency, -then set A=1/(x^2) and B=0. The default is type-dependent and is given below. +then set A=1/(x^2) and B=0. The default is type-dependent and is given below. Do note that the braces and commas are mandatory as well, as the lack of whitespace characters. @@ -97,11 +94,11 @@ characters. *batteryPercentage*={'Battery1','Battery2','Battery3','Line4','Line5'}:: (Only for KP625AP, Trust, Egys.) -A 5 tuple to convert the raw battery and line data to a human-readable +A 5 tuple to convert the raw battery and line data to a human-readable battery and line percentage reading using the functions (Battery) A*x+B*y+C and (Line) D*x+E. If the raw value x IS the Battery Percent, then -set A=1, B=0, C=0, D=1, E=0. The default is type-dependent and is given below. -Do note that the braces and commas are mandatory, as the lack of white space +set A=1, B=0, C=0, D=1, E=0. The default is type-dependent and is given below. +Do note that the braces and commas are mandatory, as the lack of white space characters. *voltage*={'240A','240B','120A','120B'}:: @@ -112,14 +109,8 @@ then set A=2, B=0. The default is type-dependent and is given below. Do note that the braces and commas are mandatory, as well as the lack of whitespace characters. -*nobt*:: -If this flag is present, the battery check on startup is skipped. This is -useful for systems that tend to overload the UPS when testing the battery on -system startup -- just when the power consumption tends to be high. - DEFAULT VALUES FOR THE EXTRA ARGUMENTS -------------------------------------- - linevoltage = 230 manufacturer = PowerCom modelname = Unknown @@ -132,7 +123,6 @@ values for ALL models. Trust ~~~~~ - numOfBytesFromUPS = 11 methodOfFlowControl = dtr0rts1 validationSequence = {{5,0},{7,0},{8,0}} @@ -144,7 +134,6 @@ Trust KP625AP ~~~~~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = dtr0rts1 validationSequence = {{5,0x80},{7,0},{8,0}} @@ -156,7 +145,6 @@ KP625AP Egys ~~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{5,0x80},{7,0},{8,0}} @@ -168,7 +156,6 @@ Egys IMP ~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{5,0xFF},{7,0},{8,0}} @@ -176,7 +163,6 @@ IMP KIN ~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{11,0x4b},{8,0},{8,0}} @@ -184,7 +170,6 @@ KIN BNT ~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{11,0x42},{8,0},{8,0}} @@ -192,7 +177,6 @@ BNT BNT-other ~~~~~~~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{8,0},{8,0},{8,0}} @@ -204,29 +188,24 @@ BNT-other OPTI ~~~~ - numOfBytesFromUPS = 16 methodOfFlowControl = no_flow_control validationSequence = {{5,0xFF},{7,0},{8,0}} shutdownArguments = {{1,30},y} -AUTHORS -------- - -* Peter Bieringer -* Alexey Sidorov -* Keven L. Ates -* Rouben Tchakhmakhtchian +AUTHOR +------ +Peter Bieringer , +Alexey Sidorov , +Keven L. Ates SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/powerman-pdu.8 b/docs/man/powerman-pdu.8 index e0d59d5..6102f27 100644 --- a/docs/man/powerman-pdu.8 +++ b/docs/man/powerman-pdu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerman-pdu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "POWERMAN\-PDU" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "POWERMAN\-PDU" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -108,26 +108,6 @@ Arnaud Quette \fBnutupsdrv\fR(8) .SS "Internet resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The PowerMan home page: -https://github\&.com/chaos/powerman -.RE +The PowerMan home page: http://powerman\&.sourceforge\&.net/ diff --git a/docs/man/powerman-pdu.txt b/docs/man/powerman-pdu.txt index 0332ea6..a7b914d 100644 --- a/docs/man/powerman-pdu.txt +++ b/docs/man/powerman-pdu.txt @@ -1,4 +1,4 @@ -POWERMAN-PDU(8) +POWERMAN-PDU(8) =============== NAME @@ -38,7 +38,6 @@ This driver is not built by default. You can build it by using UPS COMMANDS ------------ - The following instant commands (see linkman:upscmd[8]) are available for each outlet of the PDU, with *X* standing for the outlet number: @@ -56,7 +55,6 @@ Cycle the outlet (power off then power on, possibly with a delay). IMPLEMENTATION -------------- - The hostname of the Powerman server is specified using the "port" value in *ups.conf*, i.e.: @@ -68,26 +66,22 @@ The port used to reach 'powermand' is optional if the default port is used. KNOWN ISSUES ------------ - In the current NUT version (2.4.1), ups.status is still exposed, with the value "WAIT". Some other values from the ups collection are also exposed. AUTHOR ------ - Arnaud Quette SEE ALSO -------- - The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The PowerMan home page: https://github.com/chaos/powerman +The PowerMan home page: http://powerman.sourceforge.net/ diff --git a/docs/man/powerpanel.8 b/docs/man/powerpanel.8 index b10dffa..baa7969 100644 --- a/docs/man/powerpanel.8 +++ b/docs/man/powerpanel.8 @@ -1,13 +1,13 @@ '\" t .\" Title: powerpanel .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "POWERPANEL" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "POWERPANEL" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,15 +28,13 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -powerpanel \- Driver for serial PowerPanel Plus compatible UPS equipment +powerpanel \- Driver for PowerPanel Plus compatible UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the powerpanel driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols\&. The driver will autodetect which protocol is used\&. -.sp -If your Cyber Power Systems UPS has a USB port, you may wish to use the \fBusbhid-ups\fR(8) driver\&. The \fBsnmp-ups\fR(8) driver supports several network cards via SNMP\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional settings in \fBups.conf\fR(5): @@ -169,9 +167,6 @@ Arjen de Korte , Doug Reynolds .SS "The core driver:" .sp \fBnutupsdrv\fR(8) -.SS "Other drivers:" -.sp -\fBusbhid-ups\fR(8), \fBsnmp-ups\fR(8) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/powerpanel.txt b/docs/man/powerpanel.txt index 4e8450d..6ba2b6e 100644 --- a/docs/man/powerpanel.txt +++ b/docs/man/powerpanel.txt @@ -4,29 +4,22 @@ POWERPANEL(8) NAME ---- -powerpanel - Driver for serial PowerPanel Plus compatible UPS equipment +powerpanel - Driver for PowerPanel Plus compatible UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the powerpanel driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports CyberPower BC1200, PR2200 and many other similar devices, both for the text and binary protocols. The driver will autodetect which protocol is used. -If your Cyber Power Systems UPS has a USB port, you may wish to use the -linkman:usbhid-ups[8] driver. The linkman:snmp-ups[8] driver supports several -network cards via SNMP. - EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in linkman:ups.conf[5]: *protocol=*['text,binary']:: @@ -54,7 +47,6 @@ seconds will be truncated to 6 seconds intervals, values above 60 seconds to VARIABLES --------- - Depending on the type of your UPS unit, some of the following variables may be changed with linkman:upsrw[8]. If the driver can't read a variable from the UPS, it will not be made available. @@ -76,7 +68,6 @@ writable: allow cold start from battery COMMANDS -------- - Depending on the type of your UPS unit, some of the following commands may be available. @@ -93,7 +84,6 @@ must verify that these work as expected (see <<_shutdown_issues,Shutdown Issues> SUPPORT STATUS -------------- - Vendor support is absent for this driver, so if you need some features that are currently not available, provide ample documentation on what the driver should sent to the UPS in order to make this work. If more information @@ -104,7 +94,6 @@ isn't willing to share this with us. SHUTDOWN ISSUES --------------- - If the *shutdown.return* command on your UPS doesn't seem to work, chances are that your UPS is an older model. Try a couple of different settings for 'offdelay'. If no value in the range 6..600 works, your @@ -121,7 +110,6 @@ supported through the text protocol are affected by this. KNOWN PROBLEMS -------------- - The CyberPower OP series don't offer direct voltage, charge, frequency and temperature readings. Instead, they will return a binary value that needs conversion to the actual value. @@ -136,7 +124,6 @@ instrument. AUTHORS ------- - Arjen de Korte , Doug Reynolds SEE ALSO @@ -144,16 +131,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] -Other drivers: -~~~~~~~~~~~~~~ - -linkman:usbhid-ups[8], -linkman:snmp-ups[8] - Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/rhino.8 b/docs/man/rhino.8 index fd9eeba..c1432dc 100644 --- a/docs/man/rhino.8 +++ b/docs/man/rhino.8 @@ -1,13 +1,13 @@ '\" t .\" Title: rhino .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "RHINO" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "RHINO" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ rhino \- Driver for Brazilian Microsol RHINO UPS equipment This man page only documents the hardware\-specific features of the rhino driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -This driver has been tested with: +This driver has been tested with : .sp .RS 4 .ie n \{\ diff --git a/docs/man/rhino.txt b/docs/man/rhino.txt index bdb30f8..e4638e2 100644 --- a/docs/man/rhino.txt +++ b/docs/man/rhino.txt @@ -3,21 +3,18 @@ RHINO(8) NAME ---- - rhino - Driver for Brazilian Microsol RHINO UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the rhino driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - -This driver has been tested with: - +This driver has been tested with : + * Rhino 6000 VA * Rhino 7500 VA * Rhino 10000 VA @@ -48,7 +45,6 @@ COMMANDS AUTHOR ------ - Silvino B. Magalhães SEE ALSO @@ -56,10 +52,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/richcomm_usb.8 b/docs/man/richcomm_usb.8 index 5605e1b..7d8e45c 100644 --- a/docs/man/richcomm_usb.8 +++ b/docs/man/richcomm_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: richcomm_usb .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "RICHCOMM_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "RICHCOMM_USB" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,32 +37,12 @@ This man page only documents the specific features of the richcomm_usb driver\&. The Richcomm dry\-contact to USB solution is a generic interface that is used to upgrade an existing (RS\-232) contact closure UPS interface to USB\&. As such, all the limitations of the underlying contact closure interface apply\&. This means that you will only get the essentials in ups\&.status: OL, OB, and LB\&. See also \fBgenericups\fR(8)\&. .SH "BUGS" .sp -Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using secondary \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. +Most contact\-closure UPSes will not power down the load if the line power is present\&. This can create a race when using slave \fBupsmon\fR(8) systems\&. See the \fBupsmon\fR(8) man page for more information\&. .sp The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Peter van Valderen -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Dirk Teurlings -.RE +Peter van Valderen , Dirk Teurlings .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/richcomm_usb.txt b/docs/man/richcomm_usb.txt index fe53b14..3f52861 100644 --- a/docs/man/richcomm_usb.txt +++ b/docs/man/richcomm_usb.txt @@ -3,19 +3,16 @@ RICHCOMM_USB(8) NAME ---- - richcomm_usb - Driver UPS equipment using Richcomm dry-contact to USB solution NOTE ---- - -This man page only documents the specific features of the richcomm_usb +This man page only documents the specific features of the richcomm_usb driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - The Richcomm dry-contact to USB solution is a generic interface that is used to upgrade an existing (RS-232) contact closure UPS interface to USB. As such, all the limitations of the underlying contact closure interface @@ -24,34 +21,30 @@ OB, and LB. See also linkman:genericups[8]. BUGS ---- - -Most contact-closure UPSes will not power down the load if the line power -is present. This can create a race when using secondary linkman:upsmon[8] +Most contact-closure UPSes will not power down the load if the line power +is present. This can create a race when using slave linkman:upsmon[8] systems. See the linkman:upsmon[8] man page for more information. -The solution to both of these problems is to upgrade to a smart protocol +The solution to both of these problems is to upgrade to a smart protocol UPS of some kind that allows detection and proper load cycling on command. AUTHORS ------- -* Peter van Valderen -* Dirk Teurlings +Peter van Valderen , +Dirk Teurlings SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] The generic serial driver: ~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:genericups[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/riello_ser.8 b/docs/man/riello_ser.8 index d82d2bf..a8dcedc 100644 --- a/docs/man/riello_ser.8 +++ b/docs/man/riello_ser.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_ser .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "RIELLO_SER" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "RIELLO_SER" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_ser.txt b/docs/man/riello_ser.txt index cbc326b..fddd5a5 100644 --- a/docs/man/riello_ser.txt +++ b/docs/man/riello_ser.txt @@ -1,5 +1,5 @@ -RIELLO_SER(8) -============= +RIELLO_SER(8) +=========== NAME ---- @@ -36,10 +36,8 @@ SEE ALSO The core driver ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/riello_usb.8 b/docs/man/riello_usb.8 index 4cbf52e..b3c64ed 100644 --- a/docs/man/riello_usb.8 +++ b/docs/man/riello_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: riello_usb .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "RIELLO_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "RIELLO_USB" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/riello_usb.txt b/docs/man/riello_usb.txt index 1c4ffd6..ced417a 100644 --- a/docs/man/riello_usb.txt +++ b/docs/man/riello_usb.txt @@ -1,5 +1,5 @@ -RIELLO_USB(8) -============= +RIELLO_USB(8) +=========== NAME ---- @@ -35,10 +35,8 @@ SEE ALSO The core driver ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/safenet.8 b/docs/man/safenet.8 index da11c78..1ef348b 100644 --- a/docs/man/safenet.8 +++ b/docs/man/safenet.8 @@ -1,13 +1,13 @@ '\" t .\" Title: safenet .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "SAFENET" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "SAFENET" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -66,7 +66,7 @@ Time to wait before switching on the UPS (minutes)\&. Defaults to 1 minute\&. .RS 4 Time to wait before shutting down the UPS (seconds)\&. Defaults to 30 seconds\&. .RE -.SH "INSTANT COMMANDS" +.SH "UPSCMD" .sp This driver supports some instant commands (see \fBupscmd\fR(8)): .PP diff --git a/docs/man/safenet.txt b/docs/man/safenet.txt index 00aa02f..f6f5a5a 100644 --- a/docs/man/safenet.txt +++ b/docs/man/safenet.txt @@ -3,25 +3,21 @@ SAFENET(8) NAME ---- - safenet - Driver for SafeNet compatible UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the safenet driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports UPS equipment which can be controlled via SafeNet v1.0 for Windows (serial interface only). EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in the linkman:ups.conf[5] file: @@ -42,9 +38,8 @@ Time to wait before switching on the UPS (minutes). Defaults to 1 minute. *offdelay=*'value':: Time to wait before shutting down the UPS (seconds). Defaults to 30 seconds. -INSTANT COMMANDS ----------------- - +UPSCMD +------ This driver supports some instant commands (see linkman:upscmd[8]): *test.battery.start*:: @@ -78,7 +73,6 @@ and *ondelay*. KNOWN PROBLEMS -------------- - If you run the *shutdown.return* command with mains present, the output may stay on or switch off and not back on again. The *shutdown.reboot* command will unconditionally switch on the load again (with or without mains @@ -93,7 +87,6 @@ return when the power comes back. AUTHOR ------ - Arjen de Korte SEE ALSO @@ -101,10 +94,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/skel.txt b/docs/man/skel.txt index 8e31094..8bf885f 100644 --- a/docs/man/skel.txt +++ b/docs/man/skel.txt @@ -3,12 +3,10 @@ SKEL(8) NAME ---- - skel - skeleton driver man page NOTE ---- - This man page only documents the hardware-specific features of the *skel* driver. For information about the core driver, see linkman:nutupsdrv[8]. @@ -17,7 +15,7 @@ linkman:nutupsdrv[8]. The following lines are comments. When copying this man page for your new driver, be sure to replace all -occurrences of "skel" and "SKEL" by your actual driver name. +occurrances of "skel" and "SKEL" by your actual driver name. If you have AsciiDoc installed, you can test the formatting of your man page by running: @@ -33,7 +31,6 @@ apropos(8) database is properly rebuilt. SUPPORTED HARDWARE ------------------ - *skel* supports ... ////////////////////////////////////////// @@ -47,12 +44,11 @@ CABLING EXTRA ARGUMENTS --------------- - This driver also supports the following optional settings: *option1*='num':: Set the value of ... to 'num'. Contrast with *option2*. - + *option2*='string':: Some other option. @@ -90,7 +86,6 @@ encountered when implementing the protocol for your UPS. KNOWN ISSUES AND BUGS --------------------- - *Got "EPERM: Operation not permitted" upon driver startup*:: You have forgotten to install the udev files, as explained @@ -105,7 +100,6 @@ some form of contact information so that users can report bugs. AUTHORS ------- - J Random User ////////////////////////////////////////// @@ -120,10 +114,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/snmp-ups.8 b/docs/man/snmp-ups.8 index b102ee4..ceda716 100644 --- a/docs/man/snmp-ups.8 +++ b/docs/man/snmp-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: snmp-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "SNMP\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "SNMP\-UPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ snmp-ups \- Multi\-MIB Driver for SNMP UPS equipment This man page only documents the hardware\-specific features of the snmp\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -The snmp\-ups driver automatically detects and supports a wide range of devices by loading various MIBS, such as: +The snmp\-ups driver automatically detects and supports a wide range of devices by loading various MIBS: .PP \fBietf\fR .RS 4 @@ -78,12 +78,7 @@ Eaton Powerware ePDU Managed .PP \fBraritan\fR .RS 4 -Various Raritan PDUs (Dominion PX, PM, RPC) -.RE -.PP -\fBraritan\-px2\fR -.RS 4 -Various Raritan PDUs (Dominion PX2) +Various Raritan PDUs .RE .PP \fBbaytech\fR @@ -105,51 +100,18 @@ Cyberpower RMCARD201\&. Should also support RMCARD100 (net version), RMCARD202 a .RS 4 Huawei UPS5000\-E, perhaps others .RE -.PP -\fBtripplite\fR -.RS 4 -TrippLite UPSes; at this time this is the IETF MIB mapping with just the Tripplite entry point OID to verify the device vendor, and a real hardware\-specific configuration will be added in the future development\&. -.RE -.sp -For a complete and up\-to\-date listing, you can query the driver by passing the \fBmibs=\-\-list\fR argument (see below)\&. .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional settings in the \fBups.conf\fR(5): .PP -\fBport\fR=\fIhostname[:port]\fR -.RS 4 -Set SNMP hostname, or IP address, and port number of the peer SNMP agent\&. There is no default for the hostname, but the default port is 161\&. -.RE -.PP -\fBmibs\fR=\fI\-\-list\fR -.RS 4 -A special option which allows to list the currently known MIB\-to\-NUT mappings and exit the driver binary, intended for command\-line usage like this: -.RE -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ snmp\-ups \-a snmp\-test \-x mibs=\-\-list -.fi -.if n \{\ -.RE -.\} -.PP \fBmibs\fR=\fIname\fR .RS 4 -Set MIB compliance (default=auto, allowed entries: refer to SUPPORTED HARDWARE above)\&. -.sp -With "auto", the driver will try a select set of SNMP objects until it finds one that the device responds to\&. -.sp -Note that since NUT 2\&.6\&.2, snmp\-ups has a new method that uses sysObjectID (which is a pointer to the preferred MIB of the device) to detect supported devices\&. This renders void the -\fBrequirement\fR -to use the "mibs" option\&. +Set MIB compliance (default=auto, allowed entries: refer to SUPPORTED HARDWARE above)\&. With "auto", the driver will try a select set of SNMP objects until it finds one that the device responds to\&. Note that since NUT 2\&.6\&.2, snmp\-ups has a new method that uses sysObjectID (which is a pointer to the prefered MIB of the device) to detect supported devices\&. This renders void the use of "mibs" option\&. .RE .PP \fBcommunity\fR=\fIname\fR .RS 4 -Set community name (default = public)\&. Note that a RW community name is required to change UPS settings and send commands (as for a powerdown)\&. +Set community name (default = public)\&. Note that a RW community name is required to change UPS settings (as for a powerdown)\&. .RE .PP \fBsnmp_version\fR=\fIversion\fR @@ -167,15 +129,9 @@ Specifies the number of Net\-SNMP retries to be used in the requests (default=5) Specifies the Net\-SNMP timeout in seconds between retries (default=1) .RE .PP -\fBsymmetrathreephase\fR +\fBpollfreq\fR=\fIvalue\fR .RS 4 -Enable APCC three phase Symmetra quirks (use on APCC three phase Symmetras): Convert from three phase line\-to\-line voltage to line\-to\-neutral voltage (default: not enabled) -.RE -.PP -\fBpollfreq\fR=\fInum\fR -.RS 4 -Set polling interval for full updates, in seconds, to reduce SNMP network traffic relative to the quick updates performed every "pollinterval" (the latter option is described in -\fBups.conf\fR(5))\&. The default value is 30 (in seconds)\&. +Set polling frequency in seconds, to reduce network flow (default=30) .RE .PP \fBnotransferoids\fR @@ -205,16 +161,12 @@ Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) .PP \fBauthProtocol\fR=\fIvalue\fR .RS 4 -Set the authentication protocol (MD5, SHA, SHA256, SHA384 or SHA512) used for authenticated SNMPv3 messages (default=MD5)\&. Note that the exact protocol list depends on Net\-SNMP library capabilities; check help of the -snmp\-ups -binary program for the run\-time supported list\&. +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 messages (default=MD5) .RE .PP \fBprivProtocol\fR=\fIvalue\fR .RS 4 -Set the privacy protocol (DES, AES, AES192 or AES256) used for encrypted SNMPv3 messages (default=DES)\&. Note that the exact protocol list depends on Net\-SNMP library capabilities; check help of the -snmp\-ups -binary program for the run\-time supported list\&. +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages (default=DES) .RE .SH "REQUIREMENTS" .sp @@ -230,74 +182,51 @@ The shutdown sequence should be tested before relying on NUT to send a shutdown This driver is only built if the Net\-SNMP development files are present at configuration time\&. You can also force it to be built by using configure \-\-with\-snmp=yes before calling make\&. .SH "EXAMPLES" .sp -The hostname of the UPS is specified with the "port" value in ups\&.conf, and may include a non\-standard (161) remote peer port: +The hostname of the UPS is specified with the "port" value in ups\&.conf: .sp .if n \{\ .RS 4 .\} .nf - [snmpv1] - driver = snmp\-ups - port = snmp\-ups\&.example\&.com - community = public - snmp_version = v1 - pollfreq = 15 - desc = "Example SNMP v1 device" - - [snmpv3] - driver = snmp\-ups - port = 166\&.99\&.224\&.132:170 - snmp_version = v3 - secLevel = authPriv - secName = mysecurityname - authPassword = myauthenticationpassphrase - privPassword = myprivatepassphrase - desc = "Example SNMP v3 device, with the highest security level" +[snmpv1] + driver = snmp\-ups + port = snmp\-ups\&.example\&.com + community = public + snmp_version = v1 + pollfreq = 15 + desc = "Example SNMP v1 device" +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +[snmpv3] + driver = snmp\-ups + port = 166\&.99\&.224\&.132 + snmp_version = v3 + secLevel = authPriv + secName = mysecurityname + authPassword = myauthenticationpassphrase + privPassword = myprivatepassphrase + desc = "Example SNMP v3 device, with the highest security level" .fi .if n \{\ .RE .\} .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arnaud Quette -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Dmitry Frolov -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Jim Klimov -.RE +Arnaud Quette, Dmitry Frolov .SH "SEE ALSO" .SS "The core driver:" .sp \fBnutupsdrv\fR(8) .SS "NUT SNMP Protocols Library" .sp -Available at: http://www\&.networkupstools\&.org/ups\-protocols\&.html#_snmp +Available at: http://www\&.networkupstools\&.org/protocols/snmp/ .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/snmp-ups.txt b/docs/man/snmp-ups.txt index f45462b..bdad553 100644 --- a/docs/man/snmp-ups.txt +++ b/docs/man/snmp-ups.txt @@ -8,7 +8,6 @@ snmp-ups - Multi-MIB Driver for SNMP UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the snmp-ups driver. For information about the core driver, see linkman:nutupsdrv[8]. @@ -16,20 +15,16 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ -The snmp-ups driver automatically detects and supports a wide range of -devices by loading various MIBS, such as: +The snmp-ups driver automatically detects and supports a wide range of devices by loading various MIBS: *ietf*:: -UPS that is RFC 1628 (UPS MIB) compliant, e.g. MGE UPS SYSTEMS, Liebert, -perhaps others (default) +UPS that is RFC 1628 (UPS MIB) compliant, e.g. MGE UPS SYSTEMS, Liebert, perhaps others (default) *mge*:: -MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards -(ref 66062, 66045, 66074 and 66244) +MGE UPS SYSTEMS and MGE Office Protection Systems devices with SNMP cards (ref 66062, 66045, 66074 and 66244) *apcc*:: -APC AP9605, AP9606, AP9617, and AP9618 APC network management cards, -as well as any others supporting the APC POWERNET MIB +APC AP9605, AP9606, AP9617, and AP9618 APC network management cards, as well as any others supporting the APC POWERNET MIB *netvision*:: Socomec Sicon UPS with Netvision Web/SNMP management card/external box @@ -40,6 +35,7 @@ Powerware devices with ConnectUPS SNMP cards *pxgx_ups*:: Eaton devices with Power Xpert Gateway UPS Card + *aphel_genesisII*:: Eaton Powerware ePDU Monitored @@ -47,10 +43,7 @@ Eaton Powerware ePDU Monitored Eaton Powerware ePDU Managed *raritan*:: -Various Raritan PDUs (Dominion PX, PM, RPC) - -*raritan-px2*:: -Various Raritan PDUs (Dominion PX2) +Various Raritan PDUs *baytech*:: Various BayTech PDUs @@ -59,52 +52,27 @@ Various BayTech PDUs HP/Compaq AF401A management card, perhaps others *cyberpower*:: -Cyberpower RMCARD201. Should also support RMCARD100 (net version), -RMCARD202 and RMCARD301 +Cyberpower RMCARD201. Should also support RMCARD100 (net version), RMCARD202 and RMCARD301 *huawei*:: Huawei UPS5000-E, perhaps others -*tripplite*:: -TrippLite UPSes; at this time this is the IETF MIB mapping with just -the Tripplite entry point OID to verify the device vendor, and a real -hardware-specific configuration will be added in the future development. - -For a complete and up-to-date listing, you can query the driver by passing -the *mibs=--list* argument (see below). - EXTRA ARGUMENTS --------------- This driver supports the following optional settings in the linkman:ups.conf[5]: -*port*='hostname[:port]':: -Set SNMP hostname, or IP address, and port number of the peer SNMP agent. -There is no default for the hostname, but the default port is 161. - -*mibs*='--list':: -A special option which allows to list the currently known MIB-to-NUT mappings -and exit the driver binary, intended for command-line usage like this: ----- -$ snmp-ups -a snmp-test -x mibs=--list ----- - *mibs*='name':: -Set MIB compliance (default=auto, allowed entries: refer to SUPPORTED -HARDWARE above). -+ +Set MIB compliance (default=auto, allowed entries: refer to SUPPORTED HARDWARE above). With "auto", the driver will try a select set of SNMP objects until it finds -one that the device responds to. -+ -Note that since NUT 2.6.2, snmp-ups has a new method that uses sysObjectID -(which is a pointer to the preferred MIB of the device) to detect supported -devices. This renders void the *requirement* to use the "mibs" option. - +one that the device responds to. Note that since NUT 2.6.2, snmp-ups has a new +method that uses sysObjectID (which is a pointer to the prefered MIB of the +device) to detect supported devices. This renders void the use of "mibs" option. + *community*='name':: Set community name (default = public). -Note that a RW community name is required to change UPS settings and -send commands (as for a powerdown). +Note that a RW community name is required to change UPS settings (as for a powerdown). *snmp_version*='version':: Set SNMP version (default = v1, allowed: v2c, v3) @@ -115,16 +83,8 @@ Specifies the number of Net-SNMP retries to be used in the requests (default=5) *snmp_timeout*='timeout':: Specifies the Net-SNMP timeout in seconds between retries (default=1) -*symmetrathreephase*:: -Enable APCC three phase Symmetra quirks (use on APCC three phase Symmetras): -Convert from three phase line-to-line voltage to line-to-neutral voltage -(default: not enabled) - -*pollfreq*='num':: -Set polling interval for full updates, in seconds, to reduce SNMP network -traffic relative to the quick updates performed every "pollinterval" (the -latter option is described in linkman:ups.conf[5]). -The default value is 30 (in seconds). +*pollfreq*='value':: +Set polling frequency in seconds, to reduce network flow (default=30) *notransferoids*:: Disable the monitoring of the low and high voltage transfer OIDs in @@ -147,20 +107,15 @@ Set the authentication pass phrase used for authenticated SNMPv3 messages Set the privacy pass phrase used for encrypted SNMPv3 messages (no default) *authProtocol*='value':: -Set the authentication protocol (MD5, SHA, SHA256, SHA384 or SHA512) used for -authenticated SNMPv3 messages (default=MD5). Note that the exact protocol list -depends on Net-SNMP library capabilities; check help of the `snmp-ups` binary -program for the run-time supported list. +Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3 +messages (default=MD5) *privProtocol*='value':: -Set the privacy protocol (DES, AES, AES192 or AES256) used for encrypted SNMPv3 -messages (default=DES). Note that the exact protocol list depends on Net-SNMP -library capabilities; check help of the `snmp-ups` binary program for the -run-time supported list. +Set the privacy protocol (DES or AES) used for encrypted SNMPv3 messages +(default=DES) REQUIREMENTS ------------ - You will need to install the Net-SNMP package from http://www.net-snmp.org/ before building this driver. @@ -168,7 +123,6 @@ SNMP v3 also requires OpenSSL support from http://www.openssl.org. LIMITATIONS ----------- - Shutdown ~~~~~~~~ @@ -181,18 +135,15 @@ supported command. INSTALLATION ------------ - This driver is only built if the Net-SNMP development files are present at configuration time. You can also force it to be built by using +configure --with-snmp=yes+ before calling make. EXAMPLES -------- - The hostname of the UPS is specified with the "port" value in -`ups.conf`, and may include a non-standard (161) remote peer port: +`ups.conf`: ------- [snmpv1] driver = snmp-ups port = snmp-ups.example.com @@ -203,36 +154,30 @@ The hostname of the UPS is specified with the "port" value in [snmpv3] driver = snmp-ups - port = 166.99.224.132:170 + port = 166.99.224.132 snmp_version = v3 secLevel = authPriv secName = mysecurityname authPassword = myauthenticationpassphrase privPassword = myprivatepassphrase desc = "Example SNMP v3 device, with the highest security level" ------- AUTHORS ------- +Arnaud Quette, Dmitry Frolov -* Arnaud Quette -* Dmitry Frolov -* Jim Klimov SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] NUT SNMP Protocols Library ~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Available at: http://www.networkupstools.org/ups-protocols.html#_snmp +Available at: http://www.networkupstools.org/protocols/snmp/ Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/socomec_jbus.8 b/docs/man/socomec_jbus.8 deleted file mode 100644 index 624d94f..0000000 --- a/docs/man/socomec_jbus.8 +++ /dev/null @@ -1,196 +0,0 @@ -'\" t -.\" Title: socomec_jbus -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "SOCOMEC_JBUS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -socomec_jbus \- Driver for Socomec JBUS UPS with RS\-232 serial Modbus connection\&. -.SH "SYNOPSIS" -.sp -\fBsocomec_jbus\fR \-h -.sp -\fBsocomec_jbus\fR \-a \fIDEVICE_NAME\fR [\fIOPTIONS\fR] -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -This man page only documents the hardware\-specific features of the socomec_jbus driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. -.sp .5v -.RE -.SH "SUPPORTED HARDWARE" -.sp -This driver supports Socomec JBUS series, online (double conversion) UPS with the following characteristics\&. -.sp -.RS 4 -.ie n \{\ -\h'-04' 1.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 1." 4.2 -.\} -Single phase and 3\-phase UPS -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04' 2.\h'+01'\c -.\} -.el \{\ -.sp -1 -.IP " 2." 4.2 -.\} -Connection: RS\-232 -.RE -.sp -These are typically provided with a Netvision WEB/SNMP management card / external box that would be better served by the \fBsnmp-ups\fR(8) driver\&. In case netvision isn\(cqt available, you can hook up the UPS directly via the serial port and use this driver\&. -.sp -Currently, it has only been tested on the following model\&. -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -DIGYS 3/3 15kVA -.RE -.sp -In theory, any Socomec JBUS model should work\&. It should be discovered as \(lqUnknown Socomec JBUS\(rq with a numeric id that I\(cqll need to add it to the list of supported UPSs\&. -.sp -Sadly, Socomec document only mentions DELPHYS MX and DELPHYS MX elite and I have the id of my own DIGYS, so chances are, your model will not be recognized but will probably mostly work\&. Please report successful or unsuccessful results to the bug tracker or the mailing list\&. Make sure to include the full model number of your UPS manually in your report\&. -.sp -socomec_jbus uses the libmodbus project, for Modbus implementation\&. -.SH "CABLING" -.sp -The UPS has an RS\-232 port which should be connected with a NULL\-modem cable to a PC serial port\&. The UPS tested has a female DB9 connector, so if you construct the cable yourself, make note of the connector type to avoid using gender changers\&. -.sp -RS\-232 is supported on all operating systems, either via a built\-in serial port on your computer, or by using an external USB\-to\-RS\-232 converter\&. If you plan to use an USB\-to\-RS\-232 converter, make sure it\(cqs supported by your operating system\&. -.SH "INSTALLATION" -.sp -This driver should be built by default if libmodbus and development headers are available\&. You can force the configure script to build it with the following arguments: -.sp -.if n \{\ -.RS 4 -.\} -.nf -configure \-\-with\-serial=yes \-\-with\-modbus=yes -.fi -.if n \{\ -.RE -.\} -.sp -You also need to give proper (R/W) permissions on the local serial device file to allow the NUT driver run\-time user to access it\&. This may need additional setup for start\-up scripting, udev or upower rules, to apply the rights on every boot \(em especially if your device nodes are tracked by a virtual filesystem\&. -.sp -For example, a USB\-to\-serial converter can be identified as /dev/ttyACM0 or /dev/ttyUSB0 on Linux, or /dev/ttyU0 on FreeBSD (note the capital "U")\&. A built\-in serial port can be identified as /dev/ttyS0 on Linux or one of /dev/cua* names on FreeBSD\&. -.SH "INSTANT COMMANDS" -.sp -This driver does not (yet?) support sending commands to the UPS\&. -.SH "VARIABLES" -.sp -This driver does not support writable runtime variables (see \fBupsrw\fR(8)): for the same reasons\&. Both should be trivial to implement, but since I\(cqve already found one or two inconsistencies in the documentation, I\(cqm withholding from trying them\&. -.SH "KNOWN ISSUES AND BUGS" -.sp -Well, it is an alpha release at best, but so far appears to report the UPS status reliably\&. Mostly based on the work of Yifeng Li on the huawei\-ups2000 in that very same source tree\&. -.SS "Read failure on some JBUS addresses" -.sp -The driver polls all documented JBUS addresses and it is quite possible that your UPS model does not support one of them (e\&.g\&. the Digys does not support address 0x1020 which should provide the current UPS status)\&. This should be logged with LOG_ERR from modbus_read_input_registers() along with the address that produced the error\&. -.SS "Data stale" -.sp -Under certain circumstances, some registers can return invalid values and trigger a "data stale" error\&. Once a data stale error has occurred, you should see error messages similar to the example below in the system log\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -socomec_jbus: modbus_read_input_registers(addr:XXXX, count:Z): - Illegal data address -upsd: Data for UPS [socomec] is stale \- check driver -upsd: UPS [socomec] data is no longer stale -.fi -.if n \{\ -.RE -.\} -.sp -So far all known problems have been fixed by the author, but an unknown one cannot be ruled out\&. If you have encountered "data stale" problems during normal uses, please file a bug report with full logs attached\&. -.sp -Before troubleshooting or reporting a problem, it\(cqs important to check your \fBdmesg\fR log for USB connect and disconnect events to avoid wasting time on the NUT driver when the actual problem is USB\&. For example, if someone yanks the cable out of the USB port, or if a new USB device is plugged into a USB host/hub that is struggling to power its ports (common on single\-board computers like Raspberry Pi), or if you have flaky cabling or EMI noise, the serial converter can get disconnected from USB, at least briefly\&. This creates a permanent data stale, the driver must be restarted (plugging the USB back won\(cqt fix it, since the driver is still using the nonexistent serial device)\&. These USB problems usually have nothing to do with NUT\&. If it\(cqs the case, you should solve the underlying USB problem \- check the cable, check the converter, try a powered USB hub, try a full\-speed USB isolator, etc\&. -.SH "AUTHOR" -.sp -Thanos Chatziathanassiou -.SH "SEE ALSO" -.SS "The core driver:" -.sp -\fBnutupsdrv\fR(8) -.SS "Internet resources:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Socomec JBUS/Modbus Reference Guide: -https://www\&.socomec\&.com/files/live/sites/systemsite/files/GB\-JBUS\-MODBUS\-for\-Delphys\-MP\-and\-Delphys\-MX\-operating\-manual\&.pdf -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -libmodbus home page: -http://libmodbus\&.org -.RE diff --git a/docs/man/socomec_jbus.txt b/docs/man/socomec_jbus.txt deleted file mode 100644 index bc192d6..0000000 --- a/docs/man/socomec_jbus.txt +++ /dev/null @@ -1,166 +0,0 @@ -SOCOMEC_JBUS(8) -=============== - -NAME ----- - -socomec_jbus - Driver for Socomec JBUS UPS with -RS-232 serial Modbus connection. - -SYNOPSIS --------- - -*socomec_jbus* -h - -*socomec_jbus* -a 'DEVICE_NAME' ['OPTIONS'] - -NOTE: This man page only documents the hardware-specific features of the -socomec_jbus driver. For information about the core driver, see -linkman:nutupsdrv[8]. - -SUPPORTED HARDWARE ------------------- - -This driver supports Socomec JBUS series, online (double conversion) -UPS with the following characteristics. - -1. Single phase and 3-phase UPS - -2. Connection: RS-232 - -These are typically provided with a Netvision WEB/SNMP management -card / external box that would be better served by the linkman:snmp-ups[8] -driver. In case netvision isn't available, you can hook up the UPS directly -via the serial port and use this driver. - -Currently, it has only been tested on the following model. - -* DIGYS 3/3 15kVA - -In theory, any Socomec JBUS model should work. It should be discovered -as ``Unknown Socomec JBUS'' with a numeric id that I'll need to add it -to the list of supported UPSs. - -Sadly, Socomec document only mentions DELPHYS MX and DELPHYS MX elite and -I have the id of my own DIGYS, so chances are, your model will not be -recognized but will probably mostly work. Please report successful -or unsuccessful results to the bug tracker or the mailing list. -Make sure to include the full model number of your UPS manually -in your report. - -socomec_jbus uses the libmodbus project, for Modbus implementation. - -CABLING -------- - -The UPS has an RS-232 port which should be connected with a NULL-modem -cable to a PC serial port. The UPS tested has a female DB9 connector, -so if you construct the cable yourself, make note of the connector type to -avoid using gender changers. - -RS-232 is supported on all operating systems, either via a built-in serial -port on your computer, or by using an external USB-to-RS-232 converter. If -you plan to use an USB-to-RS-232 converter, make sure it's supported by your -operating system. - - -INSTALLATION ------------- - -This driver should be built by default if libmodbus and development headers -are available. You can force the `configure` script to build it with the -following arguments: - - configure --with-serial=yes --with-modbus=yes - -You also need to give proper (R/W) permissions on the local serial device -file to allow the NUT driver run-time user to access it. This may need -additional setup for start-up scripting, udev or upower rules, to apply -the rights on every boot -- especially if your device nodes are tracked -by a virtual filesystem. - -For example, a USB-to-serial converter can be identified as `/dev/ttyACM0` -or `/dev/ttyUSB0` on Linux, or `/dev/ttyU0` on FreeBSD (note the capital "U"). -A built-in serial port can be identified as `/dev/ttyS0` on Linux or one of -`/dev/cua*` names on FreeBSD. - -INSTANT COMMANDS ----------------- - -This driver does not (yet?) support sending commands to the UPS. - -VARIABLES ---------- - -This driver does not support writable runtime variables (see linkman:upsrw[8]): -for the same reasons. -Both should be trivial to implement, but since I've already found one or two -inconsistencies in the documentation, I'm withholding from trying them. - -KNOWN ISSUES AND BUGS ---------------------- - -Well, it is an alpha release at best, but so far appears to report the UPS -status reliably. Mostly based on the work of Yifeng Li on -the huawei-ups2000 in that very same source tree. - -Read failure on some JBUS addresses -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The driver polls all documented JBUS addresses and it is quite possible -that your UPS model does not support one of them (e.g. the Digys does not -support address 0x1020 which should provide the current UPS status). -This should be logged with LOG_ERR from modbus_read_input_registers() -along with the address that produced the error. - -Data stale -~~~~~~~~~~~ - -Under certain circumstances, some registers can return invalid values -and trigger a "data stale" error. Once a data stale error has occurred, -you should see error messages similar to the example below in the system -log. - - socomec_jbus: modbus_read_input_registers(addr:XXXX, count:Z): - Illegal data address - upsd: Data for UPS [socomec] is stale - check driver - upsd: UPS [socomec] data is no longer stale - -So far all known problems have been fixed by the author, but an unknown one -cannot be ruled out. If you have encountered "data stale" problems during -normal uses, please file a bug report with full logs attached. - -Before troubleshooting or reporting a problem, it's important to check -your *dmesg* log for USB connect and disconnect events to avoid wasting -time on the NUT driver when the actual problem is USB. For example, if -someone yanks the cable out of the USB port, or if a new USB device is -plugged into a USB host/hub that is struggling to power its ports -(common on single-board computers like Raspberry Pi), or if you have -flaky cabling or EMI noise, the serial converter can get disconnected -from USB, at least briefly. This creates a permanent data stale, the driver -must be restarted (plugging the USB back won't fix it, since the driver -is still using the nonexistent serial device). These USB problems usually -have nothing to do with NUT. If it's the case, you should solve the -underlying USB problem - check the cable, check the converter, try a -powered USB hub, try a full-speed USB isolator, etc. - -AUTHOR ------- - -Thanos Chatziathanassiou - -SEE ALSO --------- - -The core driver: -~~~~~~~~~~~~~~~~ - -linkman:nutupsdrv[8] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* Socomec JBUS/Modbus Reference Guide: - https://www.socomec.com/files/live/sites/systemsite/files/GB-JBUS-MODBUS-for-Delphys-MP-and-Delphys-MX-operating-manual.pdf -* libmodbus home page: http://libmodbus.org diff --git a/docs/man/solis.8 b/docs/man/solis.8 index 887f55c..0893cd1 100644 --- a/docs/man/solis.8 +++ b/docs/man/solis.8 @@ -1,13 +1,13 @@ '\" t .\" Title: solis .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "SOLIS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "SOLIS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,7 +34,7 @@ solis \- Driver for Brazilian Microsol SOLIS UPS equipment This man page only documents the hardware\-specific features of the solis driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. .SH "SUPPORTED HARDWARE" .sp -This driver has been tested with: +This driver has been tested with : .sp .RS 4 .ie n \{\ @@ -111,7 +111,7 @@ This driver support the following extra optional settings in the \fBups.conf\fR( .sp \fBbattext = n\fR \- (default = 0, no extra battery, where n = Ampere*hour ) .sp -\fBprgshut = 1\fR \- (default = 0, no programmable shutdown ) +\fBprgshut = 1\fR \- (default = 0, no programable shutdown ) .SH "COMMANDS" .sp .RS 4 diff --git a/docs/man/solis.txt b/docs/man/solis.txt index 532112b..d009b60 100644 --- a/docs/man/solis.txt +++ b/docs/man/solis.txt @@ -15,9 +15,8 @@ linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - -This driver has been tested with: - +This driver has been tested with : + * Solis 1000 VA * Solis 1500 VA * Solis 2000 VA @@ -38,7 +37,7 @@ linkman:ups.conf[5]. *battext = n* - (default = 0, no extra battery, where n = Ampere*hour ) -*prgshut = 1* - (default = 0, no programmable shutdown ) +*prgshut = 1* - (default = 0, no programable shutdown ) COMMANDS -------- @@ -56,7 +55,6 @@ connect to the UPS, but some values are read incorrectly. AUTHOR ------ - Silvino B. Magalhães SEE ALSO @@ -64,10 +62,8 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite.8 b/docs/man/tripplite.8 index 4a802dd..65338cf 100644 --- a/docs/man/tripplite.8 +++ b/docs/man/tripplite.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "TRIPPLITE" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "TRIPPLITE" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -58,27 +58,7 @@ Set the time that the UPS waits before it turns itself back on after a reboot co Battery charge information may not be correct for all UPSes\&. It is tuned to be correct for a SMART700SER\&. Other models may not provide correct information\&. Information from the manufacturer would be helpful\&. .SH "AUTHORS" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Rickard E\&. (Rik) Faith -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Nicholas Kain -.RE +Rickard E\&. (Rik) Faith, Nicholas Kain .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/tripplite.txt b/docs/man/tripplite.txt index 9ec37f2..dc6f1c8 100644 --- a/docs/man/tripplite.txt +++ b/docs/man/tripplite.txt @@ -3,27 +3,23 @@ TRIPPLITE(8) NAME ---- - tripplite - Driver for Tripp-Lite SmartPro UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the tripplite driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver should work on the SmartPro line, including the SMART700 and SMART700SER. It only supports SmartPro models that communicate using the serial port. EXTRA ARGUMENTS --------------- - -This driver supports the following optional settings in the +This driver supports the following optional settings in the linkman:ups.conf[5]: *offdelay*='num':: @@ -40,31 +36,25 @@ reboot command. The default value is 60 (in seconds). KNOWN ISSUES AND BUGS --------------------- - Battery charge information may not be correct for all UPSes. It is tuned to be correct for a SMART700SER. Other models may not provide correct information. Information from the manufacturer would be helpful. AUTHORS ------- - -* Rickard E. (Rik) Faith -* Nicholas Kain +Rickard E. (Rik) Faith, Nicholas Kain SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Other drivers for Tripp-Lite hardware: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:tripplitesu[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/tripplite_usb.8 b/docs/man/tripplite_usb.8 index 68efb1d..86714da 100644 --- a/docs/man/tripplite_usb.8 +++ b/docs/man/tripplite_usb.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplite_usb -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "TRIPPLITE_USB" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "TRIPPLITE_USB" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,11 +36,7 @@ tripplite_usb \- Driver for older Tripp Lite USB UPSes (not PDC HID) \fBtripplite_usb\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR] .SH "SUPPORTED HARDWARE" .sp -This driver should work with older Tripp Lite UPSes which are detected as USB HID\-class devices, but are not true HID Power\-Device Class devices\&. So far, the devices supported by tripplite_usb have product ID 0001, and the newer units (such as those with "LCD" in the model name) with product ID 2001 require the \fBusbhid-ups\fR(8) driver instead\&. -.sp -Please report success or failure to the nut\-upsuser mailing list\&. A key piece of information is the protocol number, returned in ups\&.firmware\&.aux\&. Also, be sure to turn on debugging (\fI\-DDD\fR) for more informative log messages\&. -.sp -If your Tripp Lite UPS uses a serial port, you may wish to investigate the \fBtripplite\fR(8) or \fBtripplitesu\fR(8) drivers\&. +This driver should work with older Tripp Lite UPSes which are detected as USB HID\-class devices, but are not true HID Power\-Device Class devices\&. So far, the devices supported by tripplite_usb have product ID 0001, and the newer units (such as those with "LCD" in the model name) with product ID 2001 require the \fBusbhid-ups\fR(8) driver instead\&. Please report success or failure to the nut\-upsuser mailing list\&. A key piece of information is the protocol number, returned in ups\&.debug\&.0\&. Also, be sure to turn on debugging (\fI\-DDD\fR) for more informative log messages\&. If your Tripp Lite UPS uses a serial port, you may wish to investigate the \fBtripplite\fR(8) or \fBtripplite_su\fR(8) driver\&. .sp This driver has been tested with the following models: .sp @@ -167,17 +163,6 @@ Protocol 2001 Protocol 3003 .RE .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Protocol 3005 -.RE -.sp On the other hand, if the web page for your UPS on the Tripp\-Lite website says "HID\-compliant USB port also enables direct integration with built\-in power management and auto\-shutdown features of Windows and MAC OS X", then you should use the \fBusbhid-ups\fR(8) driver instead\&. .SH "EXTRA ARGUMENTS" .sp @@ -201,13 +186,6 @@ This regular expression is used to match the USB bus (as seen in or lsusb(8); including leading zeroes)\&. .RE .PP -\fBdevice\fR -.RS 4 -This regular expression is used to match the USB device (as seen in -/proc/bus/usb/devices -or lsusb(8); including leading zeroes)\&. Note that device numbers are not guaranteed by the OS to be stable across re\-boots or device re\-plugging\&. -.RE -.PP \fBproduct\fR .RS 4 A regular expression to match the product string for the UPS\&. This would be useful if you have two different Tripp Lite UPS models connected to the system, and you want to be sure that you shut them down in the correct order\&. @@ -275,16 +253,14 @@ in the variable name\&. Be sure to test this first \- there is no other way to b .sp The driver was not developed with any official documentation from Tripp Lite, so certain events may confuse the driver\&. If you observe any strange behavior, please re\-run the driver with \-DDD to increase the verbosity\&. .sp -So far, the Tripp Lite UPSes do not seem to have a serial number or other globally unique identifier accessible through USB\&. Thus, when monitoring several Tripp Lite USB UPSes, you should use either the \fIbus\fR, \fIdevice\fR or \fIproduct\fR configuration options to uniquely specify which UPS a given driver instance should control\&. +So far, the Tripp Lite UPSes do not seem to have a serial number or other globally unique identifier accessible through USB\&. Thus, when monitoring several Tripp Lite USB UPSes, you should use either the \fIbus\fR or \fIproduct\fR configuration options to uniquely specify which UPS a given driver instance should control\&. .sp -For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the same time, since they have different USB Product ID strings\&. If you have two SMART1500RM2U units, you would have to find which USB bus and device number each unit is on (via lsusb(8))\&. +For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the same time, since they have different USB Product ID strings\&. If you have two SMART1500RM2U units, you would have to find which USB bus number each unit is on (via lsusb(8)), which may result in ambiguities if the available USB ports are on the same bus\&. .sp Some of the SMART*2U models have an ID number, but because this ID is not exposed as a USB string descriptor, there is no easy way to use this ID to distinguish between multiple UPS units on a single machine\&. The UPS would need to be claimed by the driver in order to read this ID\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -Written by Charles Lepple, based on the \fBtripplite\fR(8) driver by Rickard E\&. (Rik) Faith and Nicholas Kain\&. -.sp -Please do not email the authors directly \- use the nut\-upsdev mailing list\&. +Written by Charles Lepple, based on the \fBtripplite\fR(8) driver by Rickard E\&. (Rik) Faith and Nicholas Kain\&. Please do not email the authors directly \- use the nut\-upsdev mailing list\&. .sp A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley Feldman (http://www\&.bradleyloritheo\&.com) .SH "SEE ALSO" @@ -297,6 +273,6 @@ A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley Fel .SS "Other tools:" .sp regex(7), lsusb(8) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/tripplite_usb.txt b/docs/man/tripplite_usb.txt index cad5a80..1d67caa 100644 --- a/docs/man/tripplite_usb.txt +++ b/docs/man/tripplite_usb.txt @@ -1,34 +1,29 @@ TRIPPLITE_USB(8) ================ + NAME ---- - tripplite_usb - Driver for older Tripp Lite USB UPSes (not PDC HID) SYNOPSIS -------- - *tripplite_usb* -h *tripplite_usb* -a 'UPS_NAME' ['OPTIONS'] SUPPORTED HARDWARE ------------------ - -This driver should work with older Tripp Lite UPSes which are detected -as USB HID-class devices, but are not true HID Power-Device Class devices. -So far, the devices supported by `tripplite_usb` have product ID 0001, -and the newer units (such as those with "LCD" in the model name) with -product ID 2001 require the linkman:usbhid-ups[8] driver instead. - -Please report success or failure to the nut-upsuser mailing list. -A key piece of information is the protocol number, returned in -`ups.firmware.aux`. Also, be sure to turn on debugging ('-DDD') -for more informative log messages. - -If your Tripp Lite UPS uses a serial port, you may wish to investigate -the linkman:tripplite[8] or linkman:tripplitesu[8] drivers. +This driver should work with older Tripp Lite UPSes which are detected as USB +HID-class devices, but are not true HID Power-Device Class devices. So far, +the devices supported by tripplite_usb have product ID 0001, and the newer +units (such as those with "LCD" in the model name) with product ID 2001 require +the linkman:usbhid-ups[8] driver instead. Please report success or failure to +the nut-upsuser mailing list. A key piece of information is the protocol +number, returned in `ups.debug.0`. Also, be sure to turn on debugging ('-DDD') +for more informative log messages. If your Tripp Lite UPS uses a serial port, +you may wish to investigate the linkman:tripplite[8] or linkman:tripplite_su[8] +driver. This driver has been tested with the following models: @@ -48,7 +43,6 @@ following protocols: * Protocol 1001 * Protocol 2001 * Protocol 3003 - * Protocol 3005 On the other hand, if the web page for your UPS on the Tripp-Lite website says "HID-compliant USB port also enables direct integration with built-in power @@ -80,13 +74,6 @@ problems. This regular expression is used to match the USB bus (as seen in `/proc/bus/usb/devices` or lsusb(8); including leading zeroes). -*device*:: - -This regular expression is used to match the USB device (as seen in -`/proc/bus/usb/devices` or lsusb(8); including leading zeroes). -Note that device numbers are not guaranteed by the OS to be stable across -re-boots or device re-plugging. - *product*:: A regular expression to match the product string for the UPS. This would be @@ -143,27 +130,26 @@ please re-run the driver with `-DDD` to increase the verbosity. So far, the Tripp Lite UPSes do not seem to have a serial number or other globally unique identifier accessible through USB. Thus, when monitoring -several Tripp Lite USB UPSes, you should use either the 'bus', 'device' or -'product' configuration options to uniquely specify which UPS a given driver -instance should control. +several Tripp Lite USB UPSes, you should use either the 'bus' or 'product' +configuration options to uniquely specify which UPS a given driver instance +should control. For instance, you can easily monitor an OMNIVS1000 and a SMART1500RM2U at the same time, since they have different USB Product ID strings. If you have two -SMART1500RM2U units, you would have to find which USB bus and device number -each unit is on (via lsusb(8)). +SMART1500RM2U units, you would have to find which USB bus number each unit is +on (via lsusb(8)), which may result in ambiguities if the available USB ports +are on the same bus. Some of the SMART*2U models have an ID number, but because this ID is not exposed as a USB string descriptor, there is no easy way to use this ID to distinguish between multiple UPS units on a single machine. The UPS would need to be claimed by the driver in order to read this ID. -AUTHORS -------- - -Written by Charles Lepple, based on the linkman:tripplite[8] driver -by Rickard E. (Rik) Faith and Nicholas Kain. - -Please do not email the authors directly - use the nut-upsdev mailing list. +AUTHOR +------ +Written by Charles Lepple, based on the linkman:tripplite[8] driver by Rickard E. (Rik) +Faith and Nicholas Kain. Please do not email the authors directly - use the +nut-upsdev mailing list. A Tripp Lite OMNIVS1000 was graciously donated to the NUT project by Bradley Feldman (http://www.bradleyloritheo.com) @@ -173,20 +159,19 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Other drivers for Tripp-Lite hardware: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:tripplite[8], linkman:tripplitesu[8], linkman:usbhid-ups[8] Other tools: ~~~~~~~~~~~~ - regex(7), lsusb(8) -Internet resources: -~~~~~~~~~~~~~~~~~~~ + +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ + diff --git a/docs/man/tripplitesu.8 b/docs/man/tripplitesu.8 index 7e93983..da3f79e 100644 --- a/docs/man/tripplitesu.8 +++ b/docs/man/tripplitesu.8 @@ -1,13 +1,13 @@ '\" t .\" Title: tripplitesu .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "TRIPPLITESU" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "TRIPPLITESU" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/tripplitesu.txt b/docs/man/tripplitesu.txt index 9194a12..6416699 100644 --- a/docs/man/tripplitesu.txt +++ b/docs/man/tripplitesu.txt @@ -3,24 +3,20 @@ TRIPPLITESU(8) NAME ---- - tripplitesu - Driver for Tripp-Lite SmartOnline (SU) UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the tripplitesu driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports the Tripp Lite SmartOnline family (via the serial port). EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in the linkman:ups.conf[5]: @@ -31,7 +27,6 @@ until there are only a few seconds left. Common values are around 25--30. AUTHOR ------ - Allan N. Hessenflow SEE ALSO @@ -39,15 +34,12 @@ SEE ALSO The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Other drivers for Tripp-Lite hardware: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - linkman:tripplite[8], linkman:tripplite_usb[8], linkman:usbhid-ups[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/ups.conf.5 b/docs/man/ups.conf.5 index e75338b..f76c73a 100644 --- a/docs/man/ups.conf.5 +++ b/docs/man/ups.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: ups.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPS\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPS\&.CONF" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -94,13 +94,6 @@ is inserted between each attempt\&. Caution should be taken when using this opti The default is 1 attempt\&. .RE .PP -\fBnowait\fR -.RS 4 -Optional\&. Specify to upsdrvctl to not wait at all for the driver(s) to execute the request command\&. -.sp -The default (omission) is to wait\&. -.RE -.PP \fBretrydelay\fR .RS 4 Optional\&. Specify the delay between each restart attempt of the driver(s), as specified by @@ -112,20 +105,12 @@ The default is 5 seconds\&. \fBpollinterval\fR .RS 4 Optional\&. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting\&. This is normally 2 seconds\&. This may be useful if the driver is creating too much of a load on your system or network\&. -.sp -Note that some drivers (such as -\fBusbhid-ups\fR(8), -\fBsnmp-ups\fR(8) -and -\fBnutdrv_qx\fR(8)) also have an option called -\fBpollfreq\fR -which controls how frequently some of the less critical parameters are polled\&. Details are provided in the respective driver man pages\&. .RE .PP \fBsynchronous\fR .RS 4 -Optional\&. The drivers work by default in asynchronous mode initially but can fall back to synchronous mode if writes to server socket failed (i\&.e -\fBsynchronous=auto\fR)\&. This means that all data are pushed by the driver on the communication socket to upsd (Unix socket on Unix, Named pipe on Windows) without waiting for these data to be actually consumed\&. With some HW, such as ePDUs, that can produce a lot of data, asynchronous mode may cause some congestion, resulting in the socket to be full, and the driver to appear as not connected\&. In such case, the driver will provide the following debug message: +Optional\&. The driver work by default in asynchronous mode (i\&.e +\fBsynchronous=no\fR)\&. This means that all data are pushed by the driver on the communication socket to upsd (Unix socket on Unix, Named pipe on Windows) without waiting for these data to be actually consumed\&. With some HW, such as ePDUs, that can produce a lot of data, asynchronous mode may cause some congestion, resulting in the socket to be full, and the driver to appear as not connected\&. In such case, the driver will provide the following debug message: .sp .if n \{\ .RS 4 @@ -142,36 +127,15 @@ By enabling the flag (value = \fIyes\fR), the driver will wait for data to be consumed by upsd, prior to publishing more\&. This can be enabled either globally or per driver\&. .sp -The default of -\fIauto\fR -acts like +The default is \fIno\fR -(i\&.e\&. asynchronous mode) for backward compatibility of the driver behavior, until communications fail with a "Resource temporarily unavailable" condition, which happens when the driver has many data points to send in a burst, and the server can not handle that quickly enough so the buffer fills up\&. +(i\&.e\&. asynchronous mode) for backward compatibility of the driver behavior\&. .RE .PP \fBuser\fR .RS 4 -Optional\&. Overrides the compiled\-in default unprivileged username for all NUT device drivers\&. See the discussion of the -\-u -option in -\fBnutupsdrv\fR(8) -for details\&. -.RE -.PP -\fBgroup\fR -.RS 4 -Optional\&. Overrides the compiled\-in (and/or global\-section) default unprivileged group name for all NUT device drivers, used for the socket file access\&. See the discussion of the -\-g -option in -\fBnutupsdrv\fR(8) -for details\&. This may be specifically useful for ensuring access to dynamic device filesystem nodes, such as USB (or serial\-over\-USB) hot\-plug support, or with device filesystems re\-generated by an OS for every reboot\&. -.RE -.PP -\fBdebug_min\fR \fIINTEGER\fR -.RS 4 -Optional\&. Specify a minimum debug level for all driver daemons, e\&.g\&. for troubleshooting a deployment, without impacting foreground or background running mode directly\&. Command\-line option -\-D -can only increase this verbosity level\&. +Optional\&. If started as root, the driver will setuid(2) to the user id associated with +\fIusername\fR\&. .RE .SH "UPS FIELDS" .PP @@ -189,24 +153,6 @@ Required\&. This is the serial port where the UPS is connected\&. On a Linux sys \fI/dev/cuaa0\fR\&. .RE .PP -\fBuser\fR -.RS 4 -Optional\&. Overrides the compiled\-in (and/or global\-section) default unprivileged username for a particular NUT device driver\&. See the discussion of the -\-u -option in -\fBnutupsdrv\fR(8) -for details\&. This may be specifically useful for ensuring access to dynamic device filesystem nodes, such as USB (or serial\-over\-USB) hot\-plug support, or with device filesystems re\-generated by an OS for every reboot\&. -.RE -.PP -\fBgroup\fR -.RS 4 -Optional\&. Overrides the compiled\-in (and/or global\-section) default unprivileged group name for a particular NUT device driver, used for the socket file access\&. See the discussion of the -\-g -option in -\fBnutupsdrv\fR(8) -for details\&. This may be specifically useful for ensuring access to dynamic device filesystem nodes, such as USB (or serial\-over\-USB) hot\-plug support, or with device filesystems re\-generated by an OS for every reboot\&. -.RE -.PP \fBsdorder\fR .RS 4 Optional\&. When you have multiple UPSes on your system, you usually need to turn them off in a certain order\&. upsdrvctl shuts down all the 0s, then the 1s, 2s, and so on\&. To exclude a UPS from the shutdown sequence, set this to \-1\&. @@ -230,7 +176,7 @@ This may be needed on Mac OS X systems\&. .PP \fBignorelb\fR .RS 4 -Optional\&. When you specify this, the driver ignores a low battery condition flag that is reported by the UPS (some devices will switch off almost immediately after setting this flag, or will report this as soon as the mains fails)\&. Instead it will use either of the following conditions to determine when the battery is low: +Optional\&. When you specify this, the driver ignores a low battery condition flag that is reported by the UPS (some devices will switch off almost immediately after setting this flag, or will report this as soons as the mains fails)\&. Instead it will use either of the following conditions to determine when the battery is low: .sp .if n \{\ .RS 4 @@ -318,15 +264,6 @@ Use with caution! This will only change the appearance of the variable to the ou .RE .sp All other fields are passed through to the hardware\-specific part of the driver\&. See those manuals for the list of what is allowed\&. -.PP -\fBdebug_min\fR \fIINTEGER\fR -.RS 4 -Optional\&. Specify a minimum debug level for this driver daemon, e\&.g\&. for troubleshooting a deployment, without impacting foreground or background running mode directly\&. If the global -debug_min -is also set, this driver\-level setting overrides it\&. Command\-line option -\-D -can only increase this verbosity level\&. -.RE .SH "INTEGRATION" .sp \fBupsdrvctl\fR(8) uses this file to start and stop the drivers\&. @@ -336,7 +273,7 @@ The drivers themselves also obtain configuration data from this file\&. Each dri \fBupsd\fR(8) learns about which UPSes are installed on this system by reading this file\&. If this system is called "doghouse" and you have defined a UPS in your \fBups\&.conf\fR called "snoopy", then you can monitor it from \fBupsc\fR(8) or similar as "snoopy@doghouse"\&. .SH "SEE ALSO" .sp -\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsdrvctl\fR(8), \fBupsdrvsvcctl\fR(8) +\fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsdrvctl\fR(8) .SS "Internet resources" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/ups.conf.txt b/docs/man/ups.conf.txt index 10c0607..235f015 100644 --- a/docs/man/ups.conf.txt +++ b/docs/man/ups.conf.txt @@ -3,7 +3,6 @@ UPS.CONF(5) NAME ---- - ups.conf - UPS definitions for Network UPS Tools DESCRIPTION @@ -67,12 +66,6 @@ impact the time taken by your system to start. + The default is 1 attempt. -*nowait*:: -Optional. Specify to upsdrvctl to not wait at all for the driver(s) to -execute the request command. -+ -The default (omission) is to wait. - *retrydelay*:: Optional. Specify the delay between each restart attempt of the driver(s), as specified by 'maxretry'. Caution should be taken when using this option, @@ -86,17 +79,11 @@ Optional. The status of the UPS will be refreshed after a maximum delay which is controlled by this setting. This is normally 2 seconds. This may be useful if the driver is creating too much of a load on your system or network. -+ -Note that some drivers (such as linkman:usbhid-ups[8], linkman:snmp-ups[8] and -linkman:nutdrv_qx[8]) also have an option called *pollfreq* which controls how -frequently some of the less critical parameters are polled. Details are -provided in the respective driver man pages. *synchronous*:: -Optional. The drivers work by default in asynchronous mode initially -but can fall back to synchronous mode if writes to server socket failed -(i.e *synchronous=auto*). This means that all data are pushed by the driver +Optional. The driver work by default in asynchronous mode (i.e +*synchronous=no*). This means that all data are pushed by the driver on the communication socket to upsd (Unix socket on Unix, Named pipe on Windows) without waiting for these data to be actually consumed. With some HW, such as ePDUs, that can produce a lot of data, @@ -110,38 +97,16 @@ By enabling the 'synchronous' flag (value = 'yes'), the driver will wait for data to be consumed by upsd, prior to publishing more. This can be enabled either globally or per driver. + -The default of 'auto' acts like 'no' (i.e. asynchronous mode) for backward -compatibility of the driver behavior, until communications fail with a -"Resource temporarily unavailable" condition, which happens when the -driver has many data points to send in a burst, and the server can not -handle that quickly enough so the buffer fills up. +The default is 'no' (i.e. asynchronous mode) for backward compatibility +of the driver behavior. *user*:: -Optional. Overrides the compiled-in default unprivileged username for -all NUT device drivers. See the discussion of the `-u` option in -linkman:nutupsdrv[8] for details. - -*group*:: - -Optional. Overrides the compiled-in (and/or global-section) default -unprivileged group name for all NUT device drivers, used for the -socket file access. See the discussion of the `-g` option in -linkman:nutupsdrv[8] for details. -This may be specifically useful for ensuring access to dynamic device -filesystem nodes, such as USB (or serial-over-USB) hot-plug support, -or with device filesystems re-generated by an OS for every reboot. - -*debug_min* 'INTEGER':: - -Optional. Specify a minimum debug level for all driver daemons, e.g. for -troubleshooting a deployment, without impacting foreground or background -running mode directly. Command-line option `-D` can only increase this -verbosity level. +Optional. If started as root, the driver will setuid(2) to the user id +associated with 'username'. UPS FIELDS ---------- - *driver*:: Required. This specifies which program will be monitoring this UPS. You @@ -155,25 +120,6 @@ Required. This is the serial port where the UPS is connected. On a Linux system, the first serial port usually is '/dev/ttyS0'. On FreeBSD and similar systems, it probably will be '/dev/cuaa0'. -*user*:: - -Optional. Overrides the compiled-in (and/or global-section) default -unprivileged username for a particular NUT device driver. See the -discussion of the `-u` option in linkman:nutupsdrv[8] for details. -This may be specifically useful for ensuring access to dynamic device -filesystem nodes, such as USB (or serial-over-USB) hot-plug support, -or with device filesystems re-generated by an OS for every reboot. - -*group*:: - -Optional. Overrides the compiled-in (and/or global-section) default -unprivileged group name for a particular NUT device driver, used for -the socket file access. See the discussion of the `-g` option in -linkman:nutupsdrv[8] for details. -This may be specifically useful for ensuring access to dynamic device -filesystem nodes, such as USB (or serial-over-USB) hot-plug support, -or with device filesystems re-generated by an OS for every reboot. - *sdorder*:: Optional. When you have multiple UPSes on your system, you usually need to @@ -193,16 +139,16 @@ to clients that ask for a list of connected equipment. Optional. When you specify this, the driver skips the port locking routines every time it starts. This may allow other processes to seize the port if you start more than one accidentally. -+ ++ You should only use this if your system won't work without it. -+ ++ This may be needed on Mac OS X systems. *ignorelb*:: Optional. When you specify this, the driver ignores a low battery condition flag that is reported by the UPS (some devices will switch off almost -immediately after setting this flag, or will report this as soon as the +immediately after setting this flag, or will report this as soons as the mains fails). Instead it will use either of the following conditions to determine when the battery is low: @@ -268,14 +214,6 @@ the outside world, internally in the UPS the original value is used. All other fields are passed through to the hardware-specific part of the driver. See those manuals for the list of what is allowed. -*debug_min* 'INTEGER':: - -Optional. Specify a minimum debug level for this driver daemon, e.g. for -troubleshooting a deployment, without impacting foreground or background -running mode directly. If the global `debug_min` is also set, this -driver-level setting overrides it. Command-line option `-D` can only -increase this verbosity level. - INTEGRATION ----------- @@ -291,11 +229,8 @@ from linkman:upsc[8] or similar as "snoopy@doghouse". SEE ALSO -------- - -linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsdrvctl[8], -linkman:upsdrvsvcctl[8] +linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsdrvctl[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsc.8 b/docs/man/upsc.8 index 521794b..49984ab 100644 --- a/docs/man/upsc.8 +++ b/docs/man/upsc.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsc -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSC" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSC" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -141,6 +141,6 @@ Earlier versions of this program used the \fIupsfetch\fR library and UDP sockets .SH "SEE ALSO" .sp \fBupsd\fR(8) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsc.txt b/docs/man/upsc.txt index 2e89c50..1162886 100644 --- a/docs/man/upsc.txt +++ b/docs/man/upsc.txt @@ -1,14 +1,13 @@ UPSC(8) ======= + NAME ---- - upsc - example lightweight UPS client SYNOPSIS -------- - *upsc* -l | -L ['host'] *upsc* 'ups' ['variable'] @@ -24,7 +23,6 @@ want to include the full interface. OPTIONS ------- - *-l* 'host':: List all UPS names configured at 'host', one name per line. The hostname @@ -115,7 +113,7 @@ SEE ALSO linkman:upsd[8] -Internet resources: -~~~~~~~~~~~~~~~~~~~ +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscli_add_host_cert.3 b/docs/man/upscli_add_host_cert.3 index b3d08b2..127473b 100644 --- a/docs/man/upscli_add_host_cert.3 +++ b/docs/man/upscli_add_host_cert.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_add_host_cert -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_ADD_HOST_CERT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_ADD_HOST_CERT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -44,8 +44,6 @@ void upscli_add_host_cert(const char* hostname, const char* certname, The \fBupscli_add_host_cert()\fR function register a security rule associated to the \fIhostname\fR\&. All connections to this host use this rule\&. .sp The rule is composed of the certificate name \fIcertname \*(Aqexpected for the host, \*(Aqcertverify\fR if the certificate must be validated for the host and \fIforcessl\fR if a secured connection must be used to connect to the host\&. -.sp -Note: This call only functions if upsclient has been compiled with NSS support\&. If instead it was compiled with OpenSSL support, this function contains an empty definition and will take no action when called\&. .SH "RETURN VALUE" .sp \fBupscli_add_host_cert()\fR returns no value\&. diff --git a/docs/man/upscli_add_host_cert.txt b/docs/man/upscli_add_host_cert.txt index 6d9050d..96070e8 100644 --- a/docs/man/upscli_add_host_cert.txt +++ b/docs/man/upscli_add_host_cert.txt @@ -16,17 +16,13 @@ SYNOPSIS DESCRIPTION ----------- - -The *upscli_add_host_cert()* function register a security rule associated +The *upscli_add_host_cert()* function register a security rule associated to the 'hostname'. All connections to this host use this rule. The rule is composed of the certificate name 'certname 'expected for the host, 'certverify' if the certificate must be validated for the host and 'forcessl' if a secured connection must be used to connect to the host. -Note: This call only functions if upsclient has been compiled with NSS -support. If instead it was compiled with OpenSSL support, this function -contains an empty definition and will take no action when called. RETURN VALUE ------------ @@ -35,6 +31,5 @@ RETURN VALUE SEE ALSO -------- - -linkman:upscli_init[3], linkman:upscli_connect[3], linkman:upscli_ssl[3], +linkman:upscli_init[3], linkman:upscli_connect[3], linkman:upscli_ssl[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_cleanup.3 b/docs/man/upscli_cleanup.3 index 5edde88..22d6626 100644 --- a/docs/man/upscli_cleanup.3 +++ b/docs/man/upscli_cleanup.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_cleanup -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_CLEANUP" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_CLEANUP" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ upscli_cleanup \- Clean\-up upsclient module after usage\&. .fi .sp .nf -int upscli_cleanup(void); +int upscli_cleanup(); .fi .SH "DESCRIPTION" .sp diff --git a/docs/man/upscli_cleanup.txt b/docs/man/upscli_cleanup.txt index 60431ec..cd88a51 100644 --- a/docs/man/upscli_cleanup.txt +++ b/docs/man/upscli_cleanup.txt @@ -11,22 +11,19 @@ SYNOPSIS #include - int upscli_cleanup(void); + int upscli_cleanup(); DESCRIPTION ----------- - The *upscli_cleanup()* function flushes SSL caches and frees memory used internally in upsclient module. RETURN VALUE ------------ -The *upscli_cleanup()* function returns 1 on success, or -1 if an error -occurs. +The *upscli_cleanup()* function returns 1 on success, or -1 if an error occurs. SEE ALSO -------- - linkman:upscli_init[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_connect.3 b/docs/man/upscli_connect.3 index ed94a7e..560f7a5 100644 --- a/docs/man/upscli_connect.3 +++ b/docs/man/upscli_connect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_connect -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_CONNECT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_CONNECT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ upscli_connect \- Open a connection to a NUT upsd .fi .sp .nf -int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags); +int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); .fi .SH "DESCRIPTION" .sp @@ -44,8 +44,6 @@ The \fBupscli_connect()\fR function takes the pointer \fIups\fR to a UPSCONN_t s .sp \fIflags\fR may be either UPSCLI_CONN_TRYSSL to try a SSL connection, or UPSCLI_CONN_REQSSL to require a SSL connection\&. .sp -Introduced in version 2\&.7, an additional flag UPSCLI_CONN_CERTVERIF now exists to verify the signature offered during the SSL handshake\&. This flag should be used in conjunction with \fBupscli_init\fR(3) and/or \fBupscli_add_host_cert\fR(3) calls before connecting in order to define a CA certificate with which to verify\&. -.sp If SSL mode is required, this function will only return successfully if it is able to establish a SSL connection with the server\&. Possible reasons for failure include no SSL support on the server, and if \fBupsclient\fR itself hasn\(cqt been compiled with SSL support\&. .sp You must call \fBupscli_disconnect\fR(3) when finished with a connection, or your program will slowly leak memory and file descriptors\&. diff --git a/docs/man/upscli_connect.txt b/docs/man/upscli_connect.txt index c2e3dde..d493dd0 100644 --- a/docs/man/upscli_connect.txt +++ b/docs/man/upscli_connect.txt @@ -11,23 +11,16 @@ SYNOPSIS #include - int upscli_connect(UPSCONN_t *ups, const char *host, uint16_t port, int flags); + int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags); DESCRIPTION ----------- - The *upscli_connect()* function takes the pointer 'ups' to a `UPSCONN_t` state structure and opens a TCP connection to the 'host' on the given 'port'. 'flags' may be either `UPSCLI_CONN_TRYSSL` to try a SSL -connection, or `UPSCLI_CONN_REQSSL` to require a SSL connection. - -Introduced in version 2.7, an additional flag `UPSCLI_CONN_CERTVERIF` -now exists to verify the signature offered during the SSL handshake. -This flag should be used in conjunction with linkman:upscli_init[3] -and/or linkman:upscli_add_host_cert[3] calls before connecting in -order to define a CA certificate with which to verify. +connection, or `UPSCLI_CONN_REQSSL` to require a SSL connection. If SSL mode is required, this function will only return successfully if it is able to establish a SSL connection with the server. Possible @@ -46,8 +39,7 @@ returns 0 on success, or -1 if an error occurs. SEE ALSO -------- - -linkman:upscli_disconnect[3], linkman:upscli_fd[3], -linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], -linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_disconnect.3 b/docs/man/upscli_disconnect.3 index 5857fa4..7e28869 100644 --- a/docs/man/upscli_disconnect.3 +++ b/docs/man/upscli_disconnect.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_disconnect -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_DISCONNECT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_DISCONNECT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -40,9 +40,7 @@ int upscli_disconnect(UPSCONN_t *ups); .fi .SH "DESCRIPTION" .sp -The \fBupscli_disconnect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, shuts down the connection to the server, and frees dynamic memory used by the state structure\&. -.sp -The UPSCONN_t structure is no longer valid after this function is called\&. +The \fBupscli_disconnect()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, shuts down the connection to the server, and frees dynamic memory used by the state structure\&. The UPSCONN_t structure is no longer valid after this function is called\&. .sp This function must be called, or your program will leak memory and file descriptors\&. .SH "RETURN VALUE" diff --git a/docs/man/upscli_disconnect.txt b/docs/man/upscli_disconnect.txt index 76a8e61..8c7d5ca 100644 --- a/docs/man/upscli_disconnect.txt +++ b/docs/man/upscli_disconnect.txt @@ -15,12 +15,10 @@ SYNOPSIS DESCRIPTION ----------- - The *upscli_disconnect()* function takes the pointer 'ups' to a -`UPSCONN_t` state structure, shuts down the connection to the server, -and frees dynamic memory used by the state structure. - -The `UPSCONN_t` structure is no longer valid after this function is called. +`UPSCONN_t` state structure, shuts down the connection to the server, and +frees dynamic memory used by the state structure. The `UPSCONN_t` structure +is no longer valid after this function is called. This function must be called, or your program will leak memory and file descriptors. @@ -33,6 +31,5 @@ error occurs. SEE ALSO -------- - -linkman:upscli_connect[3], linkman:upscli_fd[3], +linkman:upscli_connect[3], linkman:upscli_fd[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_fd.3 b/docs/man/upscli_fd.3 index 5bd0063..27844c0 100644 --- a/docs/man/upscli_fd.3 +++ b/docs/man/upscli_fd.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_fd -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_FD" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_FD" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -45,9 +45,7 @@ The \fBupscli_fd()\fR function takes the pointer \fIups\fR to a UPSCONN_t state This may be useful for determining if the connection to \fBupsd\fR(8) has been lost\&. .SH "RETURN VALUE" .sp -The \fBupscli_fd()\fR function returns the file descriptor, which may be any non\-negative number\&. -.sp -It returns \-1 if an error occurs\&. +The \fBupscli_fd()\fR function returns the file descriptor, which may be any non\-negative number\&. It returns \-1 if an error occurs\&. .SH "SEE ALSO" .sp \fBupscli_connect\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_fd.txt b/docs/man/upscli_fd.txt index 1fd2971..c42b098 100644 --- a/docs/man/upscli_fd.txt +++ b/docs/man/upscli_fd.txt @@ -16,9 +16,9 @@ SYNOPSIS DESCRIPTION ----------- -The *upscli_fd()* function takes the pointer 'ups' to a `UPSCONN_t` -state structure and returns the value of the file descriptor for -that connection, if any. +The *upscli_fd()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and returns the value of the file descriptor +for that connection, if any. This may be useful for determining if the connection to linkman:upsd[8] has been lost. @@ -27,9 +27,7 @@ RETURN VALUE ------------ The *upscli_fd()* function returns the file descriptor, which -may be any non-negative number. - -It returns -1 if an error occurs. +may be any non-negative number. It returns -1 if an error occurs. SEE ALSO -------- diff --git a/docs/man/upscli_get.3 b/docs/man/upscli_get.3 index c020a09..fd8615f 100644 --- a/docs/man/upscli_get.3 +++ b/docs/man/upscli_get.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_get -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_GET" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_GET" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,7 +28,7 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -upscli_get \- retrieve data from an UPS +upscli_get \- retrieve data from a UPS .SH "SYNOPSIS" .sp .nf @@ -36,8 +36,8 @@ upscli_get \- retrieve data from an UPS .fi .sp .nf -int upscli_get(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) +int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp @@ -46,9 +46,7 @@ The \fBupscli_get()\fR function takes the pointer \fIups\fR to a UPSCONN_t state Upon success, the response will be split into separate components\&. A pointer to those components will be returned in \fIanswer\fR\&. The number of usable answer components will be returned in \fInuma\fR\&. .SH "USES" .sp -This function implements the "GET" command in the protocol\&. As a result, you can use it to request many different things from the server\&. -.sp -Some examples are: +This function implements the "GET" command in the protocol\&. As a result, you can use it to request many different things from the server\&. Some examples are: .sp .RS 4 .ie n \{\ @@ -123,12 +121,20 @@ To generate a request for GET NUMLOGINS su700, you would populate query and numq .RS 4 .\} .nf - size_t numq; - const char *query[2]; - - query[0] = "NUMLOGINS"; - query[1] = "su700"; - numq = 2; +unsigned int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "NUMLOGINS"; +query[1] = "su700"; +numq = 2; .fi .if n \{\ .RE @@ -137,20 +143,26 @@ To generate a request for GET NUMLOGINS su700, you would populate query and numq All escaping of special characters and quoting of elements with spaces is handled for you inside this function\&. .SH "ANSWER FORMATTING" .sp -The raw response from upsd to the above query would be NUMLOGINS su700 1\&. -.sp -Since this is split up for you, the values work out like this: +The raw response from upsd to the above query would be NUMLOGINS su700 1\&. Since this is split up for you, the values work out like this: .sp .if n \{\ .RS 4 .\} .nf - size_t numa; - - numa = 3; - answer[0] = "NUMLOGINS" - answer[1] = "su700" - answer[2] = "1" +unsigned int numa; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +numa = 3; +answer[0] = "NUMLOGINS" +answer[1] = "su700" +answer[2] = "1" .fi .if n \{\ .RE @@ -173,9 +185,7 @@ The array will be deleted after calling \fBupscli_disconnect\fR(3)\&. Any access .sp The \fBupscli_get()\fR function returns 0 on success, or \-1 if an error occurs\&. .sp -If \fBupsd\fR disconnects, you may need to handle or ignore SIGPIPE in order to prevent your program from terminating the next time that the library writes to the disconnected socket\&. -.sp -The following code in your initialization function will allow the \fBupscli_get()\fR call to return an error in that case: +If \fBupsd\fR disconnects, you may need to handle or ignore SIGPIPE in order to prevent your program from terminating the next time that the library writes to the disconnected socket\&. The following code in your initialization function will allow the \fBupscli_get()\fR call to return an error in that case: .sp .if n \{\ .RS 4 diff --git a/docs/man/upscli_get.txt b/docs/man/upscli_get.txt index 0d524fe..71cdf1a 100644 --- a/docs/man/upscli_get.txt +++ b/docs/man/upscli_get.txt @@ -3,36 +3,32 @@ UPSCLI_GET(3) NAME ---- - -upscli_get - retrieve data from an UPS +upscli_get - retrieve data from a UPS SYNOPSIS -------- #include - int upscli_get(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) + int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- - The *upscli_get()* function takes the pointer 'ups' to a `UPSCONN_t` state structure, and the pointer 'query' to an array of 'numq' query elements. It builds a properly-formatted request from those elements and transmits it to linkman:upsd[8]. -Upon success, the response will be split into separate components. -A pointer to those components will be returned in 'answer'. -The number of usable answer components will be returned in 'numa'. +Upon success, the response will be split into separate components. A +pointer to those components will be returned in 'answer'. The +number of usable answer components will be returned in 'numa'. USES ---- -This function implements the "GET" command in the protocol. -As a result, you can use it to request many different things -from the server. - +This function implements the "GET" command in the protocol. As a +result, you can use it to request many different things from the server. Some examples are: * GET NUMLOGINS @@ -44,46 +40,38 @@ Some examples are: QUERY FORMATTING ---------------- - To generate a request for `GET NUMLOGINS su700`, you would populate query and numq as follows: ------- - size_t numq; + unsigned int numq; const char *query[2]; query[0] = "NUMLOGINS"; query[1] = "su700"; numq = 2; ------- All escaping of special characters and quoting of elements with spaces is handled for you inside this function. ANSWER FORMATTING ----------------- - -The raw response from `upsd` to the above query would be `NUMLOGINS su700 1`. - +The raw response from upsd to the above query would be `NUMLOGINS su700 1`. Since this is split up for you, the values work out like this: ------- - size_t numa; + unsigned int numa; numa = 3; answer[0] = "NUMLOGINS" answer[1] = "su700" answer[2] = "1" ------- -Notice that the value which you seek typically starts at `answer[numq]`. +Notice that the value which you seek typically starts at answer[numq]. ERROR CHECKING -------------- - This function will check your query against the response from -linkman:upsd[8]. For example, if you send "VAR" "su700" "ups.status", -it will expect to see those at the beginning of the response. +linkman:upsd[8]. For example, if you send "VAR" "su700" "ups.status", it +will expect to see those at the beginning of the response. If the results from *upsd* do not pass this case-insensitive test against your request, this function will return an error. When this @@ -91,7 +79,6 @@ happens, linkman:upscli_upserror[3] will return 'UPSCLI_ERR_PROTOCOL'. ANSWER ARRAY LIFETIME --------------------- - The pointers contained within the 'answer' array are only valid until the next call to a 'upsclient' function which references them. If you need to use data from multiple calls, you must copy it somewhere @@ -103,21 +90,18 @@ which were returned by the most recent call. You also must not attempt to use more than 'numa' elements in 'answer'. Such behavior is undefined, and may yield bogus data or a crash. -The array will be deleted after calling linkman:upscli_disconnect[3]. -Any access after that point is also undefined. +The array will be deleted after calling linkman:upscli_disconnect[3]. Any +access after that point is also undefined. RETURN VALUE ------------ - The *upscli_get()* function returns 0 on success, or -1 if an error occurs. -If *upsd* disconnects, you may need to handle or ignore `SIGPIPE` -in order to prevent your program from terminating the next time that -the library writes to the disconnected socket. - -The following code in your initialization function will allow the -*upscli_get()* call to return an error in that case: +If *upsd* disconnects, you may need to handle or ignore `SIGPIPE` in order to +prevent your program from terminating the next time that the library writes to +the disconnected socket. The following code in your initialization function +will allow the *upscli_get()* call to return an error in that case: #include ... @@ -126,6 +110,5 @@ The following code in your initialization function will allow the SEE ALSO -------- - linkman:upscli_list_start[3], linkman:upscli_list_next[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_init.3 b/docs/man/upscli_init.3 index 04fd0ce..9e8712d 100644 --- a/docs/man/upscli_init.3 +++ b/docs/man/upscli_init.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_init -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_INIT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_INIT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -43,21 +43,7 @@ int upscli_init(int certverify, const char *certpath, .sp The \fBupscli_init()\fR function initialize upsclient module and set many SSL\-related properties: \fIcertverify\fR to 1 makes certificate verification required for all SSL connections and \fIcertpath\fR is the location of certificate database\&. .sp -If compiled with OpenSSL, certpath refers to directory containing certificates where the certificates must be named according to their hash values ending in a "\&.0" extension\&. If two certificates result in the same hash value (thus file name), the "\&.0" can be incremented to "\&.1" and so on, as needed\&. The bash command for creating links in this manner would be: -.sp -.if n \{\ -.RS 4 -.\} -.nf -ln \-s ca\&.pem \&./$(openssl x509 \-hash \-noout \-in ca\&.pem)\&.0 -.fi -.if n \{\ -.RE -.\} -.sp -Alternatively, the c_rehash utility (provided by openssl\-perl) can take a directory and iterate it to link all certificates found in that directory, in the manner described above\&. -.sp -If compiled with NSS, certpath refers to a directory containing database files\&. +If compiled with OpenSSL, certpath refers to a \&.pem file containing certificates and if compiled with NSS, certpath refers to a directory containing database files\&. .sp If compiled with NSS and using SSL, you can specify \fIcertname\fR the name of the certificate to send to upsd and \fIcertpasswd\fR the password used to decrypt certificate private key\&. .sp diff --git a/docs/man/upscli_init.txt b/docs/man/upscli_init.txt index 16cd0e9..d07c7e7 100644 --- a/docs/man/upscli_init.txt +++ b/docs/man/upscli_init.txt @@ -16,27 +16,14 @@ SYNOPSIS DESCRIPTION ----------- - The *upscli_init()* function initialize upsclient module and set many SSL-related properties: 'certverify' to 1 makes certificate verification required for all SSL connections and 'certpath' is the location of certificate database. -If compiled with OpenSSL, certpath refers to directory containing -certificates where the certificates must be named according to their -hash values ending in a ".0" extension. If two certificates result in -the same hash value (thus file name), the ".0" can be incremented to ".1" -and so on, as needed. The bash command for creating links in this manner -would be: - - ln -s ca.pem ./$(openssl x509 -hash -noout -in ca.pem).0 - -Alternatively, the c_rehash utility (provided by openssl-perl) can take a -directory and iterate it to link all certificates found in that directory, -in the manner described above. - -If compiled with NSS, certpath refers to a directory containing database -files. +If compiled with OpenSSL, certpath refers to a .pem file containing +certificates and if compiled with NSS, certpath refers to a directory +containing database files. If compiled with NSS and using SSL, you can specify 'certname' the name of the certificate to send to upsd and 'certpasswd' the password used @@ -54,9 +41,8 @@ The *upscli_init()* function returns 1 on success, or -1 if an error occurs. SEE ALSO -------- - linkman:upscli_add_host_cert[3], linkman:upscli_cleanup[3], -linkman:upscli_disconnect[3], linkman:upscli_fd[3], -linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], -linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_disconnect[3], linkman:upscli_fd[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_next.3 b/docs/man/upscli_list_next.3 index f3a1ec4..af8a324 100644 --- a/docs/man/upscli_list_next.3 +++ b/docs/man/upscli_list_next.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_next -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_LIST_NEXT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_LIST_NEXT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,8 +36,8 @@ upscli_list_next \- retrieve list items from a UPS .fi .sp .nf -int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) +int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) .fi .SH "DESCRIPTION" .sp diff --git a/docs/man/upscli_list_next.txt b/docs/man/upscli_list_next.txt index 9612136..20c1174 100644 --- a/docs/man/upscli_list_next.txt +++ b/docs/man/upscli_list_next.txt @@ -11,8 +11,8 @@ SYNOPSIS #include - int upscli_list_next(UPSCONN_t *ups, size_t numq, const char **query, - size_t *numa, char ***answer) + int upscli_list_next(UPSCONN_t *ups, unsigned int numq, const char **query, + unsigned int *numa, char ***answer) DESCRIPTION ----------- @@ -42,8 +42,8 @@ ANSWER FORMATTING ----------------- The contents of 'numa' and 'answer' work just like a call to -linkman:upscli_get[3]. The values returned by linkman:upsd[8] are -identical to a single item request, so this is not surprising. +linkman:upscli_get[3]. The values returned by linkman:upsd[8] are identical to +a single item request, so this is not surprising. ERROR CHECKING -------------- @@ -66,6 +66,5 @@ its first call in that case. SEE ALSO -------- - linkman:upscli_list_start[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscli_list_start.3 b/docs/man/upscli_list_start.3 index da7a80d..e9022a1 100644 --- a/docs/man/upscli_list_start.3 +++ b/docs/man/upscli_list_start.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_list_start -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_LIST_START" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_LIST_START" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ upscli_list_start \- begin multi\-item retrieval from a UPS .fi .sp .nf -int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query) +int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) .fi .SH "DESCRIPTION" .sp @@ -120,12 +120,20 @@ To see the list of variables on a UPS called \fIsu700\fR, the protocol command w .RS 4 .\} .nf - size_t numq; - const char *query[2]; - - query[0] = "VAR"; - query[1] = "su700"; - numq = 2; +unsigned int numq; +const char *query[2]; +.fi +.if n \{\ +.RE +.\} +.sp +.if n \{\ +.RS 4 +.\} +.nf +query[0] = "VAR"; +query[1] = "su700"; +numq = 2; .fi .if n \{\ .RE diff --git a/docs/man/upscli_list_start.txt b/docs/man/upscli_list_start.txt index c564c36..e425f9e 100644 --- a/docs/man/upscli_list_start.txt +++ b/docs/man/upscli_list_start.txt @@ -11,7 +11,7 @@ SYNOPSIS #include - int upscli_list_start(UPSCONN_t *ups, size_t numq, const char **query) + int upscli_list_start(UPSCONN_t *ups, unsigned int numq, const char **query) DESCRIPTION ----------- @@ -47,14 +47,12 @@ To see the list of variables on a UPS called 'su700', the protocol command would be `LIST VAR su700`. To start that list with this function, you would populate query and numq as follows: ------- - size_t numq; + unsigned int numq; const char *query[2]; query[0] = "VAR"; query[1] = "su700"; numq = 2; ------- All escaping of special characters and quoting of elements with spaces are handled for you inside this function. @@ -71,7 +69,6 @@ When this happens, linkman:upscli_upserror[3] will return RETURN VALUE ------------ - The *upscli_list_start()* function returns 0 on success, or -1 if an error occurs. @@ -82,3 +79,4 @@ linkman:upscli_fd[3], linkman:upscli_get[3], linkman:upscli_readline[3], linkman:upscli_sendline[3], linkman:upscli_ssl[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] + diff --git a/docs/man/upscli_readline.3 b/docs/man/upscli_readline.3 index 6d2962a..0846adf 100644 --- a/docs/man/upscli_readline.3 +++ b/docs/man/upscli_readline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_readline -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_READLINE" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_READLINE" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,32 +28,24 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -upscli_readline, upscli_readline_timeout \- read a single response from a UPS +upscli_readline \- read a single response from a UPS .SH "SYNOPSIS" .sp .nf #include -#include /* or on some platforms */ .fi .sp .nf int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); .fi -.sp -.nf -int upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, - const time_t timeout); -.fi .SH "DESCRIPTION" .sp -The \fBupscli_readline()\fR and \fBupscli_readline_timeout()\fR functions take the pointer \fIups\fR to a UPSCONN_t state structure, receive a single line from the server, and copy up to \fIbuflen\fR bytes of the response into the buffer \fIbuf\fR\&. +The \fBupscli_readline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure, receives a single line from the server, and copies up to \fIbuflen\fR bytes of the response into the buffer \fIbuf\fR\&. .sp Some parsing of the string occurs during reception\&. In particular, ERR messages from \fBupsd\fR(8) are detected and will cause this function to return \-1\&. -.sp -The difference between the two functions is that \fBupscli_readline_timeout()\fR lets the caller decide the amount of time (\fItimeout\fR seconds) after which it should give up and return, whereas \fBupscli_readline()\fR does not offer this freedom, and uses NUT default network timeout (5 seconds)\&. .SH "RETURN VALUE" .sp -The \fBupscli_readline()\fR and \fBupscli_readline_timeout()\fR functions return 0 on success, or \-1 if an error occurs\&. +The \fBupscli_readline()\fR function returns 0 on success, or \-1 if an error occurs\&. .SH "SEE ALSO" .sp \fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_readline.txt b/docs/man/upscli_readline.txt index 120ad21..52106ad 100644 --- a/docs/man/upscli_readline.txt +++ b/docs/man/upscli_readline.txt @@ -4,41 +4,31 @@ UPSCLI_READLINE(3) NAME ---- -upscli_readline, upscli_readline_timeout - read a single response from a UPS +upscli_readline - read a single response from a UPS SYNOPSIS -------- #include - #include /* or on some platforms */ int upscli_readline(UPSCONN_t *ups, char *buf, size_t buflen); - int upscli_readline_timeout(UPSCONN_t *ups, char *buf, size_t buflen, - const time_t timeout); - DESCRIPTION ----------- - -The *upscli_readline()* and *upscli_readline_timeout()* functions take -the pointer 'ups' to a `UPSCONN_t` state structure, receive a single -line from the server, and copy up to 'buflen' bytes of the response -into the buffer 'buf'. +The *upscli_readline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure, receives a single line from the server, and +copies up to 'buflen' bytes of the response into the buffer +'buf'. Some parsing of the string occurs during reception. In particular, ERR messages from linkman:upsd[8] are detected and will cause this function to return -1. -The difference between the two functions is that *upscli_readline_timeout()* -lets the caller decide the amount of time ('timeout' seconds) after which it -should give up and return, whereas *upscli_readline()* does not offer this -freedom, and uses NUT default network timeout (5 seconds). - RETURN VALUE ------------ -The *upscli_readline()* and *upscli_readline_timeout()* functions -return 0 on success, or -1 if an error occurs. +The *upscli_readline()* function returns 0 on success, or -1 if an +error occurs. SEE ALSO -------- diff --git a/docs/man/upscli_readline_timeout.3 b/docs/man/upscli_readline_timeout.3 deleted file mode 100644 index 0e696de..0000000 --- a/docs/man/upscli_readline_timeout.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/upscli_readline.3 diff --git a/docs/man/upscli_sendline.3 b/docs/man/upscli_sendline.3 index b94d952..f9648a2 100644 --- a/docs/man/upscli_sendline.3 +++ b/docs/man/upscli_sendline.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_sendline -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_SENDLINE" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_SENDLINE" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -28,32 +28,24 @@ .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" -upscli_sendline, upscli_sendline_timeout \- send a single command to a UPS +upscli_sendline \- send a single command to a UPS .SH "SYNOPSIS" .sp .nf #include -#include /* or on some platforms */ .fi .sp .nf int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); .fi -.sp -.nf -int upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, - const time_t timeout); -.fi .SH "DESCRIPTION" .sp -The \fBupscli_sendline()\fR and \fBupscli_sendline_timeout()\fR functions take the pointer \fIups\fR to a UPSCONN_t state structure and transmit a buffer \fIbuf\fR of size \fIbuflen\fR to the server\&. +The \fBupscli_sendline()\fR function takes the pointer \fIups\fR to a UPSCONN_t state structure and transmits a buffer \fIbuf\fR of size \fIbuflen\fR to the server\&. .sp The data in \fIbuf\fR must be a fully formatted protocol command as no parsing of the buffer occurs within this function\&. -.sp -The difference between the two functions is that \fBupscli_sendline_timeout()\fR lets the caller decide the amount of time (\fItimeout\fR seconds) after which it should give up and return, whereas \fBupscli_sendline()\fR does not offer this freedom, and uses an immediate timeout (0 second)\&. .SH "RETURN VALUE" .sp -The \fBupscli_sendline()\fR and \fBupscli_sendline_timeout()\fR functions return 0 on success, or \-1 if an error occurs\&. +The \fBupscli_sendline()\fR function returns 0 on success, or \-1 if an error occurs\&. .SH "SEE ALSO" .sp \fBupscli_fd\fR(3), \fBupscli_get\fR(3), \fBupscli_readline\fR(3), \fBupscli_sendline\fR(3), \fBupscli_ssl\fR(3), \fBupscli_strerror\fR(3), \fBupscli_upserror\fR(3) diff --git a/docs/man/upscli_sendline.txt b/docs/man/upscli_sendline.txt index 895f0ba..c449c6d 100644 --- a/docs/man/upscli_sendline.txt +++ b/docs/man/upscli_sendline.txt @@ -4,39 +4,31 @@ UPSCLI_SENDLINE(3) NAME ---- -upscli_sendline, upscli_sendline_timeout - send a single command to a UPS +upscli_sendline - send a single command to a UPS SYNOPSIS -------- + #include - #include /* or on some platforms */ int upscli_sendline(UPSCONN_t *ups, const char *buf, size_t buflen); - int upscli_sendline_timeout(UPSCONN_t *ups, const char *buf, size_t buflen, - const time_t timeout); - DESCRIPTION ----------- -The *upscli_sendline()* and *upscli_sendline_timeout()* functions take the -pointer 'ups' to a `UPSCONN_t` state structure and transmit a buffer 'buf' -of size 'buflen' to the server. +The *upscli_sendline()* function takes the pointer 'ups' to a +`UPSCONN_t` state structure and transmits a buffer 'buf' of size +'buflen' to the server. The data in 'buf' must be a fully formatted protocol command as no parsing of the buffer occurs within this function. -The difference between the two functions is that *upscli_sendline_timeout()* -lets the caller decide the amount of time ('timeout' seconds) after which it -should give up and return, whereas *upscli_sendline()* does not offer this -freedom, and uses an immediate timeout (0 second). - RETURN VALUE ------------ -The *upscli_sendline()* and *upscli_sendline_timeout()* functions -return 0 on success, or -1 if an error occurs. +The *upscli_sendline()* function returns 0 on success, or -1 if an +error occurs. SEE ALSO -------- diff --git a/docs/man/upscli_sendline_timeout.3 b/docs/man/upscli_sendline_timeout.3 deleted file mode 100644 index ebd0d6c..0000000 --- a/docs/man/upscli_sendline_timeout.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/upscli_sendline.3 diff --git a/docs/man/upscli_splitaddr.3 b/docs/man/upscli_splitaddr.3 index 4fdc1c7..e04f0de 100644 --- a/docs/man/upscli_splitaddr.3 +++ b/docs/man/upscli_splitaddr.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitaddr -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_SPLITADDR" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_SPLITADDR" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitaddr.txt b/docs/man/upscli_splitaddr.txt index b705493..4633762 100644 --- a/docs/man/upscli_splitaddr.txt +++ b/docs/man/upscli_splitaddr.txt @@ -9,6 +9,7 @@ upscli_splitaddr - split a listening address into its components SYNOPSIS -------- + #include int upscli_splitaddr(const char *buf, char **hostname, @@ -17,7 +18,7 @@ SYNOPSIS DESCRIPTION ----------- -The *upscli_splitaddr()* function takes a pointer to the raw UPS +The *upscli_splitaddr()* function takes a pointer to the raw UPS definition 'buf' and returns pointers to dynamically allocated memory in 'upsname' and 'hostname'. It also copies the port number into 'port'. diff --git a/docs/man/upscli_splitname.3 b/docs/man/upscli_splitname.3 index cfa4e6b..f802e98 100644 --- a/docs/man/upscli_splitname.3 +++ b/docs/man/upscli_splitname.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_splitname -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_SPLITNAME" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_SPLITNAME" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_splitname.txt b/docs/man/upscli_splitname.txt index d40e642..1b714c6 100644 --- a/docs/man/upscli_splitname.txt +++ b/docs/man/upscli_splitname.txt @@ -11,13 +11,13 @@ SYNOPSIS #include - int upscli_splitname(const char *buf, char **upsname, + int upscli_splitname(const char *buf, char **upsname, char **hostname, int *port) DESCRIPTION ----------- -The *upscli_splitname()* function takes a pointer to the raw UPS +The *upscli_splitname()* function takes a pointer to the raw UPS definition 'buf' and returns pointers to dynamically allocated memory in 'upsname' and 'hostname'. It also copies the port number into 'port'. @@ -37,7 +37,6 @@ Definitions without an explicit port value receive the default value of MEMORY USAGE ------------ - You must *free*(3) the pointers to 'upsname' and 'hostname' when you are done with them to avoid memory leaks. diff --git a/docs/man/upscli_ssl.3 b/docs/man/upscli_ssl.3 index 6a7d151..c185e09 100644 --- a/docs/man/upscli_ssl.3 +++ b/docs/man/upscli_ssl.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_ssl -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_SSL" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_SSL" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_strerror.3 b/docs/man/upscli_strerror.3 index 9fb0805..8e18095 100644 --- a/docs/man/upscli_strerror.3 +++ b/docs/man/upscli_strerror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_strerror -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_STRERROR" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_STRERROR" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -36,7 +36,7 @@ upscli_strerror \- return string describing error condition .fi .sp .nf -const char *upscli_strerror(UPSCONN_t *ups); +char *upscli_strerror(UPSCONN_t *ups); .fi .SH "DESCRIPTION" .sp diff --git a/docs/man/upscli_strerror.txt b/docs/man/upscli_strerror.txt index b9b8462..fa6da66 100644 --- a/docs/man/upscli_strerror.txt +++ b/docs/man/upscli_strerror.txt @@ -11,7 +11,7 @@ SYNOPSIS #include - const char *upscli_strerror(UPSCONN_t *ups); + char *upscli_strerror(UPSCONN_t *ups); DESCRIPTION ----------- diff --git a/docs/man/upscli_upserror.3 b/docs/man/upscli_upserror.3 index 33f45b4..ab54701 100644 --- a/docs/man/upscli_upserror.3 +++ b/docs/man/upscli_upserror.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upscli_upserror -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLI_UPSERROR" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLI_UPSERROR" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upscli_upserror.txt b/docs/man/upscli_upserror.txt index c4b5ac3..b8ac616 100644 --- a/docs/man/upscli_upserror.txt +++ b/docs/man/upscli_upserror.txt @@ -18,7 +18,7 @@ DESCRIPTION The *upscli_upserror*() function takes the pointer 'ups' to a `UPSCONN_t` state structure and returns the value of the internal error -number, if any. +number, if any. This is typically used to check for certain error values like `UPSCLI_ERR_UNKCOMMAND`. That specific error can be used for detecting diff --git a/docs/man/upsclient.3 b/docs/man/upsclient.3 index 600a2e7..570b8ce 100644 --- a/docs/man/upsclient.3 +++ b/docs/man/upsclient.3 @@ -1,13 +1,13 @@ '\" t .\" Title: upsclient -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCLIENT" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCLIENT" "3" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsclient.txt b/docs/man/upsclient.txt index 0c2ac15..5bfda67 100644 --- a/docs/man/upsclient.txt +++ b/docs/man/upsclient.txt @@ -27,7 +27,7 @@ Before creating any connection, and in general using any upscli function, you must call linkman:upscli_init[3] with proper parameters to initialize upscli module. -To register specific host security policy, you must call +To register specific host security policy, you must call linkman:upscli_add_host_cert[3] before initialize connection to it. In the same way, just before exiting, and after all upscli usage, you must @@ -60,7 +60,6 @@ in memory and file descriptor leaks in your program. ERROR HANDLING -------------- - In the event of an error, linkman:upscli_strerror[3] will provide human-readable details on what happened. linkman:upscli_upserror[3] may also be used to retrieve the error number. These numbers are defined in @@ -68,13 +67,12 @@ also be used to retrieve the error number. These numbers are defined in SEE ALSO -------- - linkman:libupsclient-config[1], linkman:upscli_init[3], linkman:upscli_cleanup[3], linkman:upscli_add_host_cert[3], linkman:upscli_connect[3], linkman:upscli_disconnect[3], linkman:upscli_fd[3], -linkman:upscli_getvar[3], linkman:upscli_list_next[3], -linkman:upscli_list_start[3], linkman:upscli_readline[3], -linkman:upscli_sendline[3], -linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], -linkman:upscli_ssl[3], linkman:upscli_strerror[3], +linkman:upscli_getvar[3], linkman:upscli_list_next[3], +linkman:upscli_list_start[3], linkman:upscli_readline[3], +linkman:upscli_sendline[3], +linkman:upscli_splitaddr[3], linkman:upscli_splitname[3], +linkman:upscli_ssl[3], linkman:upscli_strerror[3], linkman:upscli_upserror[3] diff --git a/docs/man/upscmd.8 b/docs/man/upscmd.8 index a1122b3..d673c33 100644 --- a/docs/man/upscmd.8 +++ b/docs/man/upscmd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscmd -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCMD" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCMD" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -35,7 +35,7 @@ upscmd \- UPS administration program for instant commands .sp \fBupscmd\fR \-l \fIups\fR .sp -\fBupscmd\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] [\-w] [\-t ] \fIups\fR \fIcommand\fR +\fBupscmd\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR \fIcommand\fR .SH "DESCRIPTION" .sp \fBupscmd\fR allows you to invoke "instant commands" in your UPS hardware\&. Not all hardware supports this, so check the list with \-l to see if anything will work on your equipment\&. @@ -63,18 +63,6 @@ Set the username for the connection to the server\&. This is optional, and you w Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. .RE .PP -\fB\-w\fR -.RS 4 -Wait for the completion of command execution by the driver and return its actual result from the device\&. Note that this feature requires that both upsd and the driver support TRACKING (NUT version 2\&.8\&.0 or higher) or it will otherwise fail\&. The command will also block until an actual result is provided from the driver, or the timeout is reached (see -\fB\-t\fR)\&. -.RE -.PP -\fB\-t\fR \fIseconds\fR -.RS 4 -Set a timeout when using -\fB\-w\fR\&. Defaults to 10 seconds\&. -.RE -.PP \fIups\fR .RS 4 Connect to this UPS\&. The format is @@ -97,12 +85,12 @@ This paranoia is entirely defined within the driver\&. upsd and upscmd have no c upscmd won\(cqt work unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. .SH "BUGS" .sp -There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load\&.off\&. +There is currently no way to tell the user when the driver requires confirmation to invoke a command such as load\&.off\&. Similarly, there is not yet a way to tell the user if a command succeeds or fails\&. .sp This is on the list of things to fix in the future, so don\(cqt despair\&. It involves magic cookies\&. .SH "SEE ALSO" .sp \fBupsd\fR(8), \fBupsrw\fR(8) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upscmd.txt b/docs/man/upscmd.txt index b8c80d8..8083fec 100644 --- a/docs/man/upscmd.txt +++ b/docs/man/upscmd.txt @@ -3,17 +3,15 @@ UPSCMD(8) NAME ---- - upscmd - UPS administration program for instant commands SYNOPSIS -------- - *upscmd* -h *upscmd* -l 'ups' -*upscmd* [-u 'username'] [-p 'password'] [-w] [-t ] 'ups' 'command' +*upscmd* [-u 'username'] [-p 'password'] 'ups' 'command' DESCRIPTION ----------- @@ -41,20 +39,9 @@ Set the username for the connection to the server. This is optional, and you will be prompted for this when invoking a command if -u is not used. *-p* 'password':: -Set the password to authenticate to the server. This is also optional +Set the password to authenticate to the server. This is also optional like -u, and you will be prompted for it if necessary. -*-w*:: -Wait for the completion of command execution by the driver and return its -actual result from the device. Note that this feature requires that both upsd -and the driver support TRACKING (NUT version 2.8.0 or higher) or it will -otherwise fail. -The command will also block until an actual result is provided from the driver, -or the timeout is reached (see *-t*). - -*-t* 'seconds':: -Set a timeout when using *-w*. Defaults to 10 seconds. - 'ups':: Connect to this UPS. The format is `upsname[@hostname[:port]]`. The default hostname is "localhost". @@ -97,17 +84,16 @@ BUGS ---- There is currently no way to tell the user when the driver requires -confirmation to invoke a command such as `load.off`. +confirmation to invoke a command such as `load.off`. Similarly, there is +not yet a way to tell the user if a command succeeds or fails. This is on the list of things to fix in the future, so don't despair. It involves magic cookies. SEE ALSO -------- - linkman:upsd[8], linkman:upsrw[8] -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upscode2.8 b/docs/man/upscode2.8 index 43836a9..cadbfd4 100644 --- a/docs/man/upscode2.8 +++ b/docs/man/upscode2.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upscode2 -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSCODE2" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSCODE2" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -76,7 +76,7 @@ Flag to set if commands towards to UPS need to be introduced with an LF\&. A Com .RE .SH "COMMANDS" .sp -The driver supports the following commands for those UPSes that support them\&. The available commands are autodetected during initialization, so you should check availability with \fIupscmd \-l\fR\&. +The driver supports the following commands for those UPSen that support them\&. The available commands are autodetected during initialization, so you should check availability with \fIupscmd \-l\fR\&. .sp .RS 4 .ie n \{\ @@ -168,29 +168,9 @@ shutdown\&.reboot\&.graceful \- Shut down in 20 seconds and reboot after 1 minut .SH "NOTES" .sp The Powerware UPS models that this driver has been tested against until now have not returned a value for \fIbattery\&.charge\fR\&. Therefore, the driver will guestimate a value based on the nominal battery min/max and the current battery voltage\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Håvard Lygre -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Niels Baggesen -.RE +Håvard Lygre , Niels Baggesen .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/upscode2.txt b/docs/man/upscode2.txt index 21c7b02..5e9cfda 100644 --- a/docs/man/upscode2.txt +++ b/docs/man/upscode2.txt @@ -3,26 +3,22 @@ UPSCODE2(8) NAME ---- - upscode2 - Driver for UPScode II compatible UPS equipment NOTE ---- - This man page only documents the hardware-specific features of the upscode2 driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - This driver supports UPS equipment which can be controlled via the UPScode II protocol. This is mainly Fiskars, Powerware equipment, but also some (probably OEM'ed) products from Compaq. EXTRA ARGUMENTS --------------- - This driver supports the following optional settings in the linkman:ups.conf[5]: @@ -58,7 +54,7 @@ A Compaq T1500h is known to need this. COMMANDS -------- -The driver supports the following commands for those UPSes that support them. +The driver supports the following commands for those UPSen that support them. The available commands are autodetected during initialization, so you should check availability with 'upscmd -l'. @@ -86,21 +82,18 @@ have not returned a value for 'battery.charge'. Therefore, the driver will guestimate a value based on the nominal battery min/max and the current battery voltage. -AUTHORS -------- - -* Håvard Lygre -* Niels Baggesen +AUTHOR +------ +Håvard Lygre , +Niels Baggesen SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.8 b/docs/man/upsd.8 index 3044797..1c6281e 100644 --- a/docs/man/upsd.8 +++ b/docs/man/upsd.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSD" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSD" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,30 +64,9 @@ stop process and exit .RE .RE .PP -\fB\-P\fR \fIpid\fR -.RS 4 -Send the command signal above using specified PID number, rather than consulting the PID file\&. This can help define service units which start -upsd -as a foreground process so it does not create a PID file\&. See also -\-FF -option as an alternative\&. -.RE -.PP \fB\-D\fR .RS 4 -Raise the debugging level\&. upsd will run in the foreground by default, and will print information on stdout about the monitoring process\&. Use this option multiple times for more details\&. -.RE -.PP -\fB\-F\fR -.RS 4 -upsd will run in the foreground, regardless of debugging settings\&. Specify twice (\-FF -or -\-F \-F) to save the PID file even in this mode\&. -.RE -.PP -\fB\-B\fR -.RS 4 -upsd will run in the background, regardless of debugging settings\&. +Raise the debug level\&. Use this multiple times for additional details\&. .RE .PP \fB\-h\fR @@ -125,9 +104,9 @@ Display the version of the program\&. .sp upsd can reload its configuration files without shutting down the process if you send it a SIGHUP or start it again with \-c reload\&. This only works if the background process is able to read those files\&. .sp -If you think that upsd can\(cqt reload, check your syslog for error messages\&. If it\(cqs complaining about not being able to read the files, then you need to adjust your system to make it possible\&. Either change the permissions on the files, or run upsd as another user that will be able to read them\&. +If you think that upsd can\(cqt reload, check your syslogs for error messages\&. If it\(cqs complaining about not being able to read the files, then you need to adjust your system to make it possible\&. Either change the permissions on the files, or run upsd as another user that will be able to read them\&. .sp -DO NOT make your upsd\&.conf or upsd\&.users world\-readable, as those files hold important authentication information\&. In the wrong hands, it could be used by some evil person to spoof your primary\-mode upsmon and command your systems to shut down\&. +DO NOT make your upsd\&.conf or upsd\&.users world\-readable, as those files hold important authentication information\&. In the wrong hands, it could be used by some evil person to spoof your master upsmon and command your systems to shut down\&. .SH "DIAGNOSTICS" .sp upsd expects the drivers to either update their status regularly or at least answer periodic queries, called pings\&. If a driver doesn\(cqt answer, upsd will declare it "stale" and no more information will be provided to the clients\&. @@ -146,827 +125,16 @@ The general upsd configuration file is \fBupsd.conf\fR(5)\&. The administrative \fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /usr/local/ups/etc\&. .sp \fBNUT_STATEPATH\fR is the path name of the directory in which \fBupsd\fR keeps state information\&. If this variable is not set, \fBupsd\fR uses a built\-in default, which is often /var/state/ups\&. The \fBSTATEPATH\fR directive in \fBupsd.conf\fR(5) overrides this variable\&. -.sp -\fBNUT_ALTPIDPATH\fR is the path name of the directory in which \fBupsd\fR and drivers store \&.pid files\&. If this variable is not set, \fBupsd\fR and drivers use either \fBNUT_STATEPATH\fR if set, or ALTPIDPATH if set, or otherwise the built\-in default \fBSTATEPATH\fR\&. .SH "SEE ALSO" .SS "Clients:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsc\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupscmd\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsrw\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupslog\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsmon\fR(8) -.RE +\fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8), \fBupslog\fR(8), \fBupsmon\fR(8) .SS "CGI programs:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsset.cgi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsstats.cgi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsimage.cgi\fR(8) -.RE -.SS "Driver control:" -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnut-driver-enumerator\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsdrvctl\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupsdrvsvcctl\fR(8) -.RE +\fBupsset.cgi\fR(8), \fBupsstats.cgi\fR(8), \fBupsimage.cgi\fR(8) .SS "Drivers:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutupsdrv\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBadelsystem_cbi\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBal175\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcsmart-old\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcsmart\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBapcupsd-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBasem\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbcmxcp\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbcmxcp_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbelkin\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbelkinunv\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestfcom\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestfortress\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestuferrups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBbestups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer-common\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer_ser\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBblazer_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBclone\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBdummy-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBetapro\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBeverups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgamatronic\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgeneric_modbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBgenericups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBhuawei-ups2000\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBisbmex\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBivtscd\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBliebert-esp2\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBliebert\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmacosx-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmasterguard\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmetasys\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmge-shut\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmge-utalk\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmicrodowell\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBmicrosol-apc\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnetxml-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnut-ipmipsu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_atcl_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_qx\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBnutdrv_siemens_sitop\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBoneac\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBoptiups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBphoenixcontact_modbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpijuice\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowercom\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowerman-pdu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBpowerpanel\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBrhino\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBrichcomm_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBriello_ser\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBriello_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsafenet\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsnmp-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsocomec_jbus\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBsolis\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplite\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplite_usb\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBtripplitesu\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBupscode2\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBusbhid-ups\fR(8) -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -\fBvictronups\fR(8) -.RE +\fBnutupsdrv\fR(8), \fBapcsmart\fR(8), \fBbelkin\fR(8), \fBbelkinunv\fR(8), \fBbestuferrups\fR(8), \fBbestups\fR(8), \fBcyberpower\fR(8), \fBenergizerups\fR(8), \fBetapro\fR(8), \fBeverups\fR(8), \fBgenericups\fR(8), \fBisbmex\fR(8), \fBliebert\fR(8), \fBmasterguard\fR(8), \fBmge-shut\fR(8), \fBmge-utalk\fR(8), \fBoneac\fR(8), \fBpowercom\fR(8), \fBsafenet\fR(8), \fBsnmp-ups\fR(8), \fBtripplite\fR(8), \fBtripplitesu\fR(8), \fBvictronups\fR(8), .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsd.conf.5 b/docs/man/upsd.conf.5 index e5ef1ac..a27a048 100644 --- a/docs/man/upsd.conf.5 +++ b/docs/man/upsd.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSD\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSD\&.CONF" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,34 +41,6 @@ upsd usually allows a driver to stop responding for up to 15 seconds before decl Most users should leave this at the default value\&. .RE .PP -"TRACKINGDELAY \fIseconds\fR" -.RS 4 -When instant commands and variables setting status tracking is enabled, status execution information are kept during this amount of time, and then cleaned up\&. This defaults to 3600 (1 hour)\&. -.RE -.PP -"ALLOW_NO_DEVICE \fIBoolean\fR" -.RS 4 -Normally upsd requires that at least one device section is defined in ups\&.conf when the daemon starts, to serve its data\&. For automatically managed services it may be preferred to have upsd always running, and reload the configuration when power devices become defined\&. -.sp -Boolean values -\fItrue\fR, -\fIyes\fR, -\fIon\fR -and -\fI1\fR -mean that the server would not refuse to start with zero device sections found in ups\&.conf\&. -.sp -Boolean values -\fIfalse\fR, -\fIno\fR, -\fIoff\fR -and -\fI0\fR -mean that the server should refuse to start if zero device sections were found in ups\&.conf\&. This is the default, unless the calling environment sets a same\-named variable to enforce a value for the current run\&. One way this can happen is somebody un\-commenting it in the -\fInut\&.conf\fR -file used by init\-scripts and service unit method scripts\&. -.RE -.PP "STATEPATH \fIpath\fR" .RS 4 Tell upsd to look for the driver state sockets in @@ -78,28 +50,21 @@ rather than the default that was compiled into the program\&. .PP "LISTEN \fIinterface\fR \fIport\fR" .RS 4 -Bind a listening port to the interface specified by its Internet address or name\&. This may be useful on hosts with multiple interfaces\&. You should not rely exclusively on this for security, as it can be subverted on many systems\&. +Bind a listening port to the interface specified by its Internet address\&. This may be useful on hosts with multiple interfaces\&. You should not rely exclusively on this for security, as it can be subverted on many systems\&. .sp -Optionally listen on TCP port +Listen on TCP port \fIport\fR instead of the default value which was compiled into the code\&. This overrides any value you may have set with \fIconfigure \-\-with\-port\fR\&. If you don\(cqt change it with configure or this value, upsd will listen on port 3493 for this interface\&. .sp Multiple LISTEN addresses may be specified\&. The default is to bind to 127\&.0\&.0\&.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in)\&. .sp -To listen on all available interfaces, you may also use -\fI0\&.0\&.0\&.0\fR -for IPv4 and and -\fI::\fR -for IPv6\&. -.sp .if n \{\ .RS 4 .\} .nf LISTEN 127\&.0\&.0\&.1 LISTEN 192\&.168\&.50\&.1 -LISTEN myhostname\&.mydomain LISTEN ::1 LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 .fi @@ -124,7 +89,7 @@ or the Security chapter of NUT user manual for more information on the SSL suppo .PP "CERTPATH \fIcertificate database\fR" .RS 4 -When compiled with SSL support with NSS backend, you can enter the certificate path here\&. Certificates are stored in a dedicated database (data split in 3 files)\&. Specify the path of the database directory\&. +When compiled with SSL support with NSS backend, you can enter the certificate path here\&. Certificates are stored in a dedicated database (splitted in 3 files)\&. Specify the path of the database directory\&. .RE .PP "CERTIDENT \fIcertificate name\fR \fIdatabase password\fR" @@ -173,48 +138,9 @@ to require to all clients a certificate to require to all clients a valid certificate .RE .RE -.PP -"DISABLE_WEAK_SSL \fIBOOLEAN\fR" -.RS 4 -Tell upsd to disable older/weak SSL/TLS protocols and ciphers\&. With relatively recent versions of OpenSSL or NSS it will be restricted to TLSv1\&.2 or better\&. Unless you have really ancient clients, you probably want to enable this\&. Currently disabled by default to ensure compatibility with existing setups\&. -.RE -.PP -"DEBUG_MIN \fIINTEGER\fR" -.RS 4 -Optionally specify a minimum debug level for -upsd -data daemon, e\&.g\&. for troubleshooting a deployment, without impacting foreground or background running mode directly\&. Command\-line option -\-D -can only increase this verbosity level\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -if the running daemon receives a -reload -command, presence of the -DEBUG_MIN NUMBER -value in the configuration file can be used to tune debugging verbosity in the running service daemon (it is recommended to comment it away or set the minimum to explicit zero when done, to avoid huge journals and I/O system abuse)\&. Keep in mind that for this run\-time tuning, the -DEBUG_MIN -value -\fBpresent\fR -in -\fBreloaded\fR -configuration files is applied instantly and overrides any previously set value, from file or CLI options, regardless of older logging level being higher or lower than the newly found number; a missing (or commented away) value however does not change the previously active logging verbosity\&. -.sp .5v -.RE -.RE .SH "SEE ALSO" .sp \fBupsd\fR(8), \fBnutupsdrv\fR(8), \fBupsd.users\fR(5) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsd.conf.txt b/docs/man/upsd.conf.txt index 410910e..b1d5d24 100644 --- a/docs/man/upsd.conf.txt +++ b/docs/man/upsd.conf.txt @@ -26,28 +26,6 @@ to make upsd wait longer. + Most users should leave this at the default value. -"TRACKINGDELAY 'seconds'":: - -When instant commands and variables setting status tracking is enabled, status -execution information are kept during this amount of time, and then cleaned up. -This defaults to 3600 (1 hour). - -"ALLOW_NO_DEVICE 'Boolean'":: - -Normally upsd requires that at least one device section is defined in ups.conf -when the daemon starts, to serve its data. For automatically managed services -it may be preferred to have upsd always running, and reload the configuration -when power devices become defined. -+ -Boolean values 'true', 'yes', 'on' and '1' mean that the server would not -refuse to start with zero device sections found in ups.conf. -+ -Boolean values 'false', 'no', 'off' and '0' mean that the server should refuse -to start if zero device sections were found in ups.conf. This is the default, -unless the calling environment sets a same-named variable to enforce a value -for the current run. One way this can happen is somebody un-commenting it in -the 'nut.conf' file used by init-scripts and service unit method scripts. - "STATEPATH 'path'":: Tell upsd to look for the driver state sockets in 'path' rather @@ -55,26 +33,22 @@ than the default that was compiled into the program. "LISTEN 'interface' 'port'":: -Bind a listening port to the interface specified by its Internet address or -name. This may be useful on hosts with multiple interfaces. -You should not rely exclusively on this for security, as it can be subverted -on many systems. +Bind a listening port to the interface specified by its Internet +address. This may be useful on hosts with multiple interfaces. +You should not rely exclusively on this for security, as it can be +subverted on many systems. + -Optionally listen on TCP port 'port' instead of the default value which was -compiled into the code. This overrides any value you may have set with -'configure --with-port'. If you don't change it with configure or this value, -upsd will listen on port 3493 for this interface. +Listen on TCP port 'port' instead of the default value which was +compiled into the code. This overrides any value you may have set +with 'configure --with-port'. If you don't change it with configure +or this value, upsd will listen on port 3493 for this interface. + Multiple LISTEN addresses may be specified. The default is to bind to 127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6 support is compiled in). -+ -To listen on all available interfaces, you may also use '0.0.0.0' for IPv4 and -and '::' for IPv6. LISTEN 127.0.0.1 LISTEN 192.168.50.1 - LISTEN myhostname.mydomain LISTEN ::1 LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344 + @@ -102,9 +76,9 @@ NUT user manual for more information on the SSL support in NUT. When compiled with SSL support with NSS backend, you can enter the certificate path here. -Certificates are stored in a dedicated database (data split in 3 files). +Certificates are stored in a dedicated database (splitted in 3 files). Specify the path of the database directory. - + "CERTIDENT 'certificate name' 'database password'":: When compiled with SSL support with NSS backend, you can specify the @@ -121,38 +95,11 @@ Possible values are : - '1' to require to all clients a certificate - '2' to require to all clients a valid certificate -"DISABLE_WEAK_SSL 'BOOLEAN'":: - -Tell upsd to disable older/weak SSL/TLS protocols and ciphers. -With relatively recent versions of OpenSSL or NSS it will be restricted -to TLSv1.2 or better. -Unless you have really ancient clients, you probably want to enable this. -Currently disabled by default to ensure compatibility with existing setups. - -"DEBUG_MIN 'INTEGER'":: - -Optionally specify a minimum debug level for `upsd` data daemon, e.g. for -troubleshooting a deployment, without impacting foreground or background -running mode directly. Command-line option `-D` can only increase this -verbosity level. -+ -NOTE: if the running daemon receives a `reload` command, presence of the -`DEBUG_MIN NUMBER` value in the configuration file can be used to tune -debugging verbosity in the running service daemon (it is recommended to -comment it away or set the minimum to explicit zero when done, to avoid -huge journals and I/O system abuse). Keep in mind that for this run-time -tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files -is applied instantly and overrides any previously set value, from file -or CLI options, regardless of older logging level being higher or lower -than the newly found number; a missing (or commented away) value however -does not change the previously active logging verbosity. - SEE ALSO -------- linkman:upsd[8], linkman:nutupsdrv[8], linkman:upsd.users[5] -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.txt b/docs/man/upsd.txt index 25d92ca..64cff41 100644 --- a/docs/man/upsd.txt +++ b/docs/man/upsd.txt @@ -8,10 +8,9 @@ upsd - UPS information server SYNOPSIS -------- - *upsd* -h -*upsd* ['OPTIONS'] +*upsd* ['OPTIONS'] DESCRIPTION ----------- @@ -44,23 +43,8 @@ are: *reload*;; reread configuration files *stop*;; stop process and exit -*-P* 'pid':: -Send the command signal above using specified PID number, rather than -consulting the PID file. This can help define service units which -start `upsd` as a foreground process so it does not create a PID file. -See also `-FF` option as an alternative. - *-D*:: -Raise the debugging level. upsd will run in the foreground by default, -and will print information on stdout about the monitoring process. -Use this option multiple times for more details. - -*-F*:: -upsd will run in the foreground, regardless of debugging settings. -Specify twice (`-FF` or `-F -F`) to save the PID file even in this mode. - -*-B*:: -upsd will run in the background, regardless of debugging settings. +Raise the debug level. Use this multiple times for additional details. *-h*:: Display the help text. @@ -89,15 +73,15 @@ upsd can reload its configuration files without shutting down the process if you send it a SIGHUP or start it again with `-c reload`. This only works if the background process is able to read those files. -If you think that upsd can't reload, check your syslog for error messages. +If you think that upsd can't reload, check your syslogs for error messages. If it's complaining about not being able to read the files, then you need to adjust your system to make it possible. Either change the permissions on the files, or run upsd as another user that will be able to read them. DO NOT make your upsd.conf or upsd.users world-readable, as those files hold important authentication information. In the wrong hands, it could -be used by some evil person to spoof your primary-mode upsmon and command -your systems to shut down. +be used by some evil person to spoof your master upsmon and command your +systems to shut down. DIAGNOSTICS ----------- @@ -142,47 +126,35 @@ ENVIRONMENT VARIABLES `upsd.conf` and other configuration files. If this variable is not set, *upsd* uses a built-in default, which is often `/usr/local/ups/etc`. -*NUT_STATEPATH* is the path name of the directory in which +*NUT_STATEPATH* is the path name of the directory in which *upsd* keeps state information. If this variable is not set, *upsd* uses a built-in default, which is often `/var/state/ups`. The *STATEPATH* directive in linkman:upsd.conf[5] overrides this variable. -*NUT_ALTPIDPATH* is the path name of the directory in which -*upsd* and drivers store .pid files. If this variable is not set, -*upsd* and drivers use either *NUT_STATEPATH* if set, or ALTPIDPATH if set, -or otherwise the built-in default *STATEPATH*. - SEE ALSO -------- Clients: ~~~~~~~~ - -- linkman:upsc[8] -- linkman:upscmd[8] -- linkman:upsrw[8] -- linkman:upslog[8] -- linkman:upsmon[8] +linkman:upsc[8], linkman:upscmd[8], +linkman:upsrw[8], linkman:upslog[8], linkman:upsmon[8] CGI programs: ~~~~~~~~~~~~~ - -- linkman:upsset.cgi[8] -- linkman:upsstats.cgi[8] -- linkman:upsimage.cgi[8] - -Driver control: -~~~~~~~~~~~~~~~ - -include::{builddir}/linkman-drivertool-names.txt[] +linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] Drivers: ~~~~~~~~ - -- linkman:nutupsdrv[8] -include::{builddir}/linkman-driver-names.txt[] +linkman:nutupsdrv[8], +linkman:apcsmart[8], linkman:belkin[8], linkman:belkinunv[8], +linkman:bestuferrups[8], linkman:bestups[8], +linkman:cyberpower[8], linkman:energizerups[8], linkman:etapro[8], +linkman:everups[8], linkman:genericups[8], +linkman:isbmex[8], linkman:liebert[8], linkman:masterguard[8], +linkman:mge-shut[8], linkman:mge-utalk[8], linkman:oneac[8], +linkman:powercom[8], linkman:safenet[8], linkman:snmp-ups[8], +linkman:tripplite[8], linkman:tripplitesu[8], linkman:victronups[8], Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsd.users.5 b/docs/man/upsd.users.5 index 606a700..9373bb7 100644 --- a/docs/man/upsd.users.5 +++ b/docs/man/upsd.users.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsd.users -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSD\&.USERS" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSD\&.USERS" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -68,9 +68,9 @@ Here are some examples to get you started: .RS 4 .\} .nf -[upswired] +[monmaster] password = blah - upsmon primary + upsmon master .fi .if n \{\ .RE @@ -80,9 +80,9 @@ Here are some examples to get you started: .RS 4 .\} .nf -[observer] +[monslave] password = abcd - upsmon secondary + upsmon slave .fi .if n \{\ .RE @@ -126,13 +126,13 @@ file supplied with the distribution contains a list of most of the known command .PP \fBupsmon\fR .RS 4 -Add the necessary actions for a upsmon process to work\&. This is either set to "primary" or "secondary"\&. +Add the necessary actions for a upsmon process to work\&. This is either set to "master" or "slave"\&. .sp Do not attempt to assign actions to upsmon by hand, as you may miss something important\&. This method of designating a "upsmon user" was created so internal capabilities could be changed later on without breaking existing installations\&. .RE .SH "SEE ALSO" .sp \fBupsd\fR(8), \fBupsd.conf\fR(5) -.SS "Internet resources:" +.SH "INTERNET RESOURCES" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsd.users.txt b/docs/man/upsd.users.txt index 6b287d0..4f73ceb 100644 --- a/docs/man/upsd.users.txt +++ b/docs/man/upsd.users.txt @@ -3,7 +3,6 @@ UPSD.USERS(5) NAME ---- - upsd.users - Administrative user definitions for NUT upsd DESCRIPTION @@ -13,7 +12,7 @@ Administrative commands such as setting variables and the instant commands are powerful, and access to them needs to be restricted. This file defines who may access them, and what is available. -Each user gets its own section. The fields in that section set the +Each user gets its own section. The fields in that section set the parameters associated with that user's privileges. The section begins with the name of the user in brackets, and continues until the next user name in brackets or EOF. These users are independent of /etc/passwd. @@ -31,13 +30,13 @@ Here are some examples to get you started: instcmds = test.panel.start instcmds = test.panel.stop - [upswired] + [monmaster] password = blah - upsmon primary + upsmon master - [observer] + [monslave] password = abcd - upsmon secondary + upsmon slave FIELDS ------ @@ -54,7 +53,7 @@ actions are: SET;; change the value of certain variables in the UPS - FSD;; set the forced shutdown flag in the UPS. This is + FSD;; set the forced shutdown flag in the UPS. This is equivalent to an "on battery + low battery" situation for the purposes of monitoring. @@ -73,7 +72,7 @@ of most of the known command names. *upsmon*:: Add the necessary actions for a upsmon process to work. This is either -set to "primary" or "secondary". +set to "master" or "slave". + Do not attempt to assign actions to upsmon by hand, as you may miss something important. This method of designating a "upsmon user" was @@ -85,8 +84,7 @@ SEE ALSO linkman:upsd[8], linkman:upsd.conf[5] -Internet resources: -~~~~~~~~~~~~~~~~~~~ - +INTERNET RESOURCES +------------------ The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsdrvctl.8 b/docs/man/upsdrvctl.8 index a3a2ccc..1acb6d8 100644 --- a/docs/man/upsdrvctl.8 +++ b/docs/man/upsdrvctl.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsdrvctl -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSDRVCTL" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSDRVCTL" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -39,8 +39,6 @@ upsdrvctl \- UPS driver controller \fBupsdrvctl\fR provides a uniform interface for controlling your UPS drivers\&. You should use upsdrvctl instead of direct calls to the drivers whenever possible\&. .sp When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations\&. -.sp -Note: For operating systems with service management frameworks, such as Solaris SMF or Linux systemd, the \fBupsdrvsvcctl\fR may be a better choice\&. .SH "OPTIONS" .PP \fB\-h\fR @@ -80,13 +78,6 @@ This may be set in ups\&.conf with "user" in the global section\&. .RS 4 Raise the debug level\&. Use this multiple times for additional details\&. .RE -.PP -\fB\-d\fR -.RS 4 -Pass the selected debug level from -upsdrvctl -to launched drivers\&. -.RE .SH "COMMANDS" .sp upsdrvctl supports three commands \- start, stop and shutdown\&. They take an optional argument which is a UPS name from \fBups.conf\fR(5)\&. Without that argument, they operate on every UPS that is currently configured\&. @@ -127,22 +118,6 @@ Command the UPS driver(s) to run their shutdown sequence\&. Drivers are stopped this will probably power off your computers, so don\(cqt play around with this option\&. Only use it when your systems are prepared to lose power\&. .sp .5v .RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -refer to \fBups.conf\fR(5) for using the \fBnowait\fR parameter\&. -.sp .5v -.RE .SH "ENVIRONMENT VARIABLES" .sp \fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsdrvctl\fR the driver use a built\-in default, which is often /usr/local/ups/etc\&. @@ -151,7 +126,7 @@ refer to \fBups.conf\fR(5) for using the \fBnowait\fR parameter\&. upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation\&. This will also happen if a driver takes longer than the \fImaxstartdelay\fR period to enter the background\&. .SH "SEE ALSO" .sp -\fBupsdrvsvcctl\fR(8), \fBnutupsdrv\fR(8), \fBupsd\fR(8), \fBups.conf\fR(5) +\fBnutupsdrv\fR(8), \fBupsd\fR(8), \fBups.conf\fR(5) .SS "Internet resources:" .sp The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsdrvctl.txt b/docs/man/upsdrvctl.txt index 46ec658..52e5509 100644 --- a/docs/man/upsdrvctl.txt +++ b/docs/man/upsdrvctl.txt @@ -1,4 +1,4 @@ -UPSDRVCTL(8) +UPSDRVCTL(8) ============ NAME @@ -8,7 +8,6 @@ upsdrvctl - UPS driver controller SYNOPSIS -------- - *upsdrvctl* -h *upsdrvctl* ['OPTIONS'] {start | stop | shutdown} ['ups'] @@ -23,9 +22,6 @@ whenever possible. When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations. -Note: For operating systems with service management frameworks, such as -Solaris SMF or Linux systemd, the *upsdrvsvcctl* may be a better choice. - OPTIONS ------- @@ -58,9 +54,6 @@ This may be set in ups.conf with "user" in the global section. *-D*:: Raise the debug level. Use this multiple times for additional details. -*-d*:: -Pass the selected debug level from `upsdrvctl` to launched drivers. - COMMANDS -------- @@ -84,8 +77,6 @@ WARNING: this will probably power off your computers, so don't play around with this option. Only use it when your systems are prepared to lose power. -NOTE: refer to linkman:ups.conf[5] for using the *nowait* parameter. - ENVIRONMENT VARIABLES --------------------- @@ -104,10 +95,8 @@ background. SEE ALSO -------- - -linkman:upsdrvsvcctl[8], linkman:nutupsdrv[8], linkman:upsd[8], linkman:ups.conf[5] +linkman:nutupsdrv[8], linkman:upsd[8], linkman:ups.conf[5] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsdrvsvcctl.8 b/docs/man/upsdrvsvcctl.8 deleted file mode 100644 index c436e6c..0000000 --- a/docs/man/upsdrvsvcctl.8 +++ /dev/null @@ -1,206 +0,0 @@ -'\" t -.\" Title: upsdrvsvcctl -.\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 -.\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 -.\" Language: English -.\" -.TH "UPSDRVSVCCTL" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -upsdrvsvcctl \- UPS driver service instance controller -.SH "SYNOPSIS" -.sp -\fBupsdrvsvcctl\fR \-h -.sp -\fBupsdrvsvcctl\fR [\fIOPTIONS\fR] {start | stop } [\fIups\fR] -.SH "DESCRIPTION" -.sp -\fBupsdrvsvcctl\fR provides a uniform interface for controlling your UPS drivers wrapped into service instances on platforms which support that (currently this covers Linux distributions with systemd and systems derived from Solaris 10 codebase, including proprietary Sun/Oracle Solaris and numerous open\-source illumos distributions with SMF)\&. It may be not installed in packaging for other operating systems\&. -.sp -When used properly, upsdrvsvcctl lets you maintain identical startup scripts across multiple systems with different UPS configurations\&. -.sp -The goal of this solution is to allow the services of \fBupsd\fR data server to start up even if some of the power devices are currently not accessible, and for NUT drivers to be automatically restarted by the system in case of problems (driver bug, startup failure)\&. It also allows for faster startup of systems which monitor several devices, by letting each driver to start in parallel with others, and not with a sequential loop like was done previously\&. -.sp -Independent service instances for each NUT driver also allow one to configure further dependencies, such as that networking must be available for SNMP and similar drivers (but is not needed for local\-medium drivers such as serial or USB)\&. -.sp -The old monolithic "all or nothing" solution requiring that all drivers must be running, which sufficed for deployments with a few UPSes, did not really work well for monitoring larger deployments\&. It was also not easy to strike a pre\-packaged balance between early UPS protection for USB/serial home setups vs\&. waiting for network on larger ones\&. -.sp -\fBupsdrvsvcctl\fR is a script which mimics the operation of \fBupsdrvctl\fR program (where possible) to provide similar end\-user experience when manipulating drivers wrapped into service instances rather than as directly executed daemons\&. It relies on \fBnut\-driver\-enumerator\&.sh\fR for a large part of actual operations\&. -.sp -You should use upsdrvsvcctl instead of direct calls to the drivers and daemon\-based management with \fBupsdrvctl\fR whenever possible (that is, for "production" use on compatible OSes)\&. Otherwise (testing, other OSes) the \fBupsdrvctl\fR is a recommended option\&. -.SH "OPTIONS" -.PP -\fB\-h\fR -.RS 4 -Display the help text\&. -.RE -.PP -\fB\-t\fR -.RS 4 -Enable testing mode\&. Testing mode makes upsdrvsvcctl display the actions it would execute without actually doing them\&. -.RE -.SH "OPTIONS OF UPSDRVCTL NOT (CURRENTLY) APPLICABLE TO UPSDRVSVCCTL" -.sp -Options like \fI\-r\fR, \fI\-u\fR or \fI\-D\fR could be handled by properties of the service instances themselves, with this script helping to configure them (assuming proper privileges of the user who called it)\&. This is not a "production" use case, though, to change such options on a configured system \(em so for experiments and troubleshooting, it may be better to stop the service instance and play with \fBupsdrvctl\fR directly\&. -.PP -\fB\-r\fR \fIdirectory\fR -.RS 4 -If starting a driver, this value will direct it to -\fBchroot\fR(2) into -\fIdirectory\fR\&. This can be useful when securing systems\&. -.RE -.sp -This may be set in the ups\&.conf with "chroot" in the global section\&. -.PP -\fB\-u\fR \fIusername\fR -.RS 4 -If starting a driver, this value will direct it to -\fBsetuid\fR(2) to the user id associated with -\fIusername\fR\&. -.RE -.sp -If the driver is started as root without specifying this value, it will use the username that was compiled into the binary\&. This defaults to "nobody", and is far from ideal\&. -.sp -This may be set in ups\&.conf with "user" in the global section\&. -.PP -\fB\-D\fR -.RS 4 -Raise the driver debug level\&. Use this multiple times for additional details\&. -.RE -.SH "COMMANDS" -.sp -\fBupsdrvsvcctl\fR supports three of the commands processed by \fBupsdrvctl\fR \(em start, stop and shutdown\&. They take an optional argument which is a UPS name from \fBups.conf\fR(5)\&. Without that argument, they operate on every UPS that is currently configured\&. -.sp -Note: shutdown is currently supported by stopping the driver service instances to release the potentially held ports etc\&., calling the \fBupsdrvctl\fR directly for issuing the shutdown command, and restarting the driver service instances to reconnect when the device comes back online\&. -.PP -\fBstart\fR -.RS 4 -Start the UPS driver(s)\&. In case of failure, further attempts may be executed by using the -\fImaxretry\fR -and -\fIretrydelay\fR -options \- see -\fBups.conf\fR(5)\&. -.RE -.PP -\fBstop\fR -.RS 4 -Stop the UPS driver(s)\&. -.RE -.sp -\fBupsdrvsvcctl\fR also supports further operations for troubleshooting the mapping of NUT driver section names to the service instance names (which may differ due to limitations of various systems)\&. -.PP -\fBlist\fR -.RS 4 -list the currently active mapping of service instances to device sections -.RE -.PP -\fBresync\fR -.RS 4 -update the mapping of service instances for NUT drivers to device section names used in -\fIups\&.conf\fR -(register new instances, tear down obsoleted ones)\&. -.RE -.SH "COMMANDS OF UPSDRVCTL NOT (CURRENTLY) APPLICABLE TO UPSDRVSVCCTL" -.PP -\fBshutdown\fR -.RS 4 -Command the UPS driver(s) to run their shutdown sequence\&. Drivers are stopped according to their sdorder value \- see -\fBups.conf\fR(5)\&. -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBWarning\fR -.ps -1 -.br -.sp -this will probably power off your computers, so don\(cqt play around with this option\&. Only use it when your systems are prepared to lose power\&. -.sp .5v -.RE -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -.sp -refer to \fBups.conf\fR(5) for using the \fBnowait\fR parameter\&. -.sp .5v -.RE -.SH "ENVIRONMENT VARIABLES" -.sp -\fBNUT_CONFPATH\fR is the path name of the directory that contains upsd\&.conf and other configuration files\&. If this variable is not set, \fBupsdrvsvcctl\fR (or rather \fBnut\-driver\-enumerator\&.sh\fR) would use a built\-in default, which is often /usr/local/ups/etc\&. -.SH "DIAGNOSTICS" -.sp -upsdrvsvcctl will return a nonzero exit code if it encounters an error while performing the desired operation\&. This will also happen if a driver takes longer than the \fImaxstartdelay\fR period to enter the background\&. -.sp -Any messages issued by the \fBupsdrvctl\fR program used to start the NUT drivers as part of the service instances\*(Aq implementations, or by the drivers themselves, will be logged by the service management framework facilities and will not appear in your interactive terminal used to manage the driver\&. -.sp -Use upsdrvsvcctl list or upsdrvsvcctl list NUT\-device to find out the service instance name for the NUT driver (section name) you are interested in\&. Then look up the service logs (where the outputs of the service implementation program as well as the framework messages about this service are stored), as suggested below: -.PP -\fBLinux systemd\fR -.RS 4 -Messages will normally be kept in the service journal, so: -.sp -.if n \{\ -.RS 4 -.\} -.nf -journalctl \-lu nut\-driver@instance\-name -.fi -.if n \{\ -.RE -.\} -.RE -.sp -Note that your local system configuration may be impacted by such nuances as passing the journal data to a standard syslog server, and/or by having a small cache for locally stored journal messages (so older entries would disappear)\&. There may also be or not be a copy of the journals stored in the filesystem\&. -.PP -\fBSolaris SMF\fR -.RS 4 -Look for -/var/svc/log/system\-power\-nut\-driver:instance\-name\&.log -file\&. -.RE -.SH "AUTHOR" -.sp -Jim Klimov -.SH "SEE ALSO" -.sp -\fBupsdrvctl\fR(8), \fBnutupsdrv\fR(8), \fBupsd\fR(8), \fBnut-driver-enumerator\fR(8), \fBups.conf\fR(5) -.SS "Internet resources:" -.sp -The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsdrvsvcctl.txt b/docs/man/upsdrvsvcctl.txt deleted file mode 100644 index fdace1f..0000000 --- a/docs/man/upsdrvsvcctl.txt +++ /dev/null @@ -1,205 +0,0 @@ -UPSDRVSVCCTL(8) -=============== - -NAME ----- - -upsdrvsvcctl - UPS driver service instance controller - -SYNOPSIS --------- - -*upsdrvsvcctl* -h - -*upsdrvsvcctl* ['OPTIONS'] {start | stop } ['ups'] - -DESCRIPTION ------------ - -*upsdrvsvcctl* provides a uniform interface for controlling your UPS -drivers wrapped into service instances on platforms which support that -(currently this covers Linux distributions with systemd and systems -derived from Solaris 10 codebase, including proprietary Sun/Oracle -Solaris and numerous open-source illumos distributions with SMF). -It may be not installed in packaging for other operating systems. - -When used properly, upsdrvsvcctl lets you maintain identical startup -scripts across multiple systems with different UPS configurations. - -The goal of this solution is to allow the services of *upsd* data -server to start up even if some of the power devices are currently -not accessible, and for NUT drivers to be automatically restarted -by the system in case of problems (driver bug, startup failure). -It also allows for faster startup of systems which monitor several -devices, by letting each driver to start in parallel with others, -and not with a sequential loop like was done previously. - -Independent service instances for each NUT driver also allow one -to configure further dependencies, such as that networking must be -available for SNMP and similar drivers (but is not needed for -local-medium drivers such as serial or USB). - -The old monolithic "all or nothing" solution requiring that all -drivers must be running, which sufficed for deployments with a few -UPSes, did not really work well for monitoring larger deployments. -It was also not easy to strike a pre-packaged balance between early -UPS protection for USB/serial home setups vs. waiting for network -on larger ones. - -*upsdrvsvcctl* is a script which mimics the operation of *upsdrvctl* -program (where possible) to provide similar end-user experience when -manipulating drivers wrapped into service instances rather than as -directly executed daemons. It relies on *nut-driver-enumerator.sh* -for a large part of actual operations. - -You should use upsdrvsvcctl instead of direct calls to the drivers -and daemon-based management with *upsdrvctl* whenever possible (that -is, for "production" use on compatible OSes). Otherwise (testing, -other OSes) the *upsdrvctl* is a recommended option. - -OPTIONS -------- - -*-h*:: -Display the help text. - -*-t*:: -Enable testing mode. Testing mode makes upsdrvsvcctl display the actions -it would execute without actually doing them. - - - -OPTIONS OF UPSDRVCTL NOT (CURRENTLY) APPLICABLE TO UPSDRVSVCCTL ---------------------------------------------------------------- - -Options like '-r', '-u' or '-D' could be handled by properties of the -service instances themselves, with this script helping to configure -them (assuming proper privileges of the user who called it). This is -not a "production" use case, though, to change such options on a -configured system -- so for experiments and troubleshooting, it may -be better to stop the service instance and play with *upsdrvctl* -directly. - -*-r* 'directory':: -If starting a driver, this value will direct it to *chroot*(2) into -'directory'. This can be useful when securing systems. - -This may be set in the ups.conf with "chroot" in the global section. - -*-u* 'username':: -If starting a driver, this value will direct it to *setuid*(2) to -the user id associated with 'username'. - -If the driver is started as root without specifying this value, it will -use the username that was compiled into the binary. This defaults to -"nobody", and is far from ideal. - -This may be set in ups.conf with "user" in the global section. - -*-D*:: -Raise the driver debug level. Use this multiple times for additional -details. - -COMMANDS --------- - -*upsdrvsvcctl* supports three of the commands processed by *upsdrvctl* -- -start, stop and shutdown. They take an optional argument which is a UPS -name from linkman:ups.conf[5]. Without that argument, they operate on -every UPS that is currently configured. - -Note: shutdown is currently supported by stopping the driver service -instances to release the potentially held ports etc., calling the -*upsdrvctl* directly for issuing the shutdown command, and restarting -the driver service instances to reconnect when the device comes back -online. - -*start*:: -Start the UPS driver(s). In case of failure, further attempts may be executed -by using the 'maxretry' and 'retrydelay' options - see linkman:ups.conf[5]. - -*stop*:: -Stop the UPS driver(s). - -*upsdrvsvcctl* also supports further operations for troubleshooting the -mapping of NUT driver section names to the service instance names (which -may differ due to limitations of various systems). - -*list*:: -list the currently active mapping of service instances to device sections - -*resync*:: -update the mapping of service instances for NUT drivers to device section -names used in 'ups.conf' (register new instances, tear down obsoleted ones). - - -COMMANDS OF UPSDRVCTL NOT (CURRENTLY) APPLICABLE TO UPSDRVSVCCTL ----------------------------------------------------------------- - -*shutdown*:: -Command the UPS driver(s) to run their shutdown sequence. Drivers are -stopped according to their sdorder value - see linkman:ups.conf[5]. - -WARNING: this will probably power off your computers, so don't -play around with this option. Only use it when your systems are prepared -to lose power. - -NOTE: refer to linkman:ups.conf[5] for using the *nowait* parameter. - -ENVIRONMENT VARIABLES ---------------------- - -*NUT_CONFPATH* is the path name of the directory that contains -`upsd.conf` and other configuration files. If this variable is not set, -*upsdrvsvcctl* (or rather *nut-driver-enumerator.sh*) would use a built-in -default, which is often `/usr/local/ups/etc`. - -DIAGNOSTICS ------------ - -upsdrvsvcctl will return a nonzero exit code if it encounters an error -while performing the desired operation. This will also happen if a -driver takes longer than the 'maxstartdelay' period to enter the -background. - -Any messages issued by the *upsdrvctl* program used to start the NUT -drivers as part of the service instances' implementations, or by the -drivers themselves, will be logged by the service management framework -facilities and will not appear in your interactive terminal used to -manage the driver. - -Use `upsdrvsvcctl list` or `upsdrvsvcctl list NUT-device` to find out -the service instance name for the NUT driver (section name) you are -interested in. Then look up the service logs (where the outputs of the -service implementation program as well as the framework messages about -this service are stored), as suggested below: - -*Linux systemd*:: -Messages will normally be kept in the service journal, so: - - journalctl -lu nut-driver@instance-name - -Note that your local system configuration may be impacted by such -nuances as passing the journal data to a standard syslog server, -and/or by having a small cache for locally stored journal messages -(so older entries would disappear). There may also be or not be a -copy of the journals stored in the filesystem. - -*Solaris SMF*:: -Look for `/var/svc/log/system-power-nut-driver:instance-name.log` file. - -AUTHOR ------- - -Jim Klimov - -SEE ALSO --------- - -linkman:upsdrvctl[8], linkman:nutupsdrv[8], linkman:upsd[8], -linkman:nut-driver-enumerator[8], linkman:ups.conf[5] - -Internet resources: -~~~~~~~~~~~~~~~~~~~ - -The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsimage.cgi.8 b/docs/man/upsimage.cgi.8 index 629f573..601ebe5 100644 --- a/docs/man/upsimage.cgi.8 +++ b/docs/man/upsimage.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsimage.cgi -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSIMAGE\&.CGI" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSIMAGE\&.CGI" "8" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -64,26 +64,6 @@ upsstats will only talk to \fBupsd\fR(8) servers that have been defined in your \fBupsd\fR(8), \fBupsstats.cgi\fR(8) .SS "Internet resources:" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The NUT (Network UPS Tools) home page: -http://www\&.networkupstools\&.org/ -.RE +The gd home page: http://libgd\&.bitbucket\&.org .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -The gd home page: -http://libgd\&.bitbucket\&.org -.RE +The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ diff --git a/docs/man/upsimage.cgi.txt b/docs/man/upsimage.cgi.txt index bdf23b8..9ede74a 100644 --- a/docs/man/upsimage.cgi.txt +++ b/docs/man/upsimage.cgi.txt @@ -45,5 +45,6 @@ linkman:upsd[8], linkman:upsstats.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ -* The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ -* The gd home page: http://libgd.bitbucket.org +The gd home page: http://libgd.bitbucket.org + +The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upslog.8 b/docs/man/upslog.8 index 976741f..c0ecff4 100644 --- a/docs/man/upslog.8 +++ b/docs/man/upslog.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upslog -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSLOG" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSLOG" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -115,17 +115,7 @@ library\&. .RS 4 Store the results in this file\&. .sp -You can use "\-" for stdout, but upslog will remain in the foreground by default\&. -.RE -.PP -\fB\-F\fR -.RS 4 -upslog will run in the foreground, regardless of logging target\&. -.RE -.PP -\fB\-B\fR -.RS 4 -upslog will run in the background, regardless of logging target\&. +You can use "\-" for stdout, but upslog will remain in the foreground\&. .RE .PP \fB\-s\fR \fIups\fR @@ -136,7 +126,7 @@ upsname[@hostname[:port]]\&. The default hostname is "localhost"\&. .PP \fB\-u\fR \fIusername\fR .RS 4 -If started as root, upslog will +If started as root, upsmon will \fBsetuid\fR(2) to the user id associated with \fIusername\fR for security\&. @@ -148,7 +138,7 @@ is not defined, it will use the value that was compiled into the program\&. This .SH "SERVICE DELAYS" .sp The interval value is merely the number given to \fBsleep\fR(3) after running through the format string\&. Therefore, a query will actually take slightly longer than the interval, depending on the speed of your system\&. -.SH "ON\-DEMAND LOGGING" +.SH "ON-DEMAND LOGGING" .sp Sending a USR1 signal to a running \fBupslog\fR process makes it wake from the current sleep and log immediately\&. This is useful when triggered from a \fBupssched\fR event trigger (e\&.g\&. AT ONBATT or AT ONLINE) to ensure that an entry always exists, even if the power goes away for a period of time shorter than that specified by the \-i argument\&. .SH "LOG ROTATION" diff --git a/docs/man/upslog.txt b/docs/man/upslog.txt index f405104..4571cc3 100644 --- a/docs/man/upslog.txt +++ b/docs/man/upslog.txt @@ -37,7 +37,7 @@ within this string are: %TIME format%;; Insert the time with strftime formatting -%ETIME%;; Insert the number of seconds, ala time_t. This is now a +%ETIME%;; Insert the number of seconds, ala time_t. This is now a 10 digit number. %HOST%;; insert the local hostname @@ -50,8 +50,8 @@ within this string are: The default format string is: - %TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage% - %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% + %TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage% + %VAR ups.load% [%VAR ups.status%] %VAR ups.temperature% %VAR input.frequency% *-i* 'interval':: @@ -65,23 +65,16 @@ the linkman:upsclient[3] library. Store the results in this file. + -You can use "-" for stdout, but upslog will remain in the foreground -by default. - -*-F*:: -upslog will run in the foreground, regardless of logging target. - -*-B*:: -upslog will run in the background, regardless of logging target. +You can use "-" for stdout, but upslog will remain in the foreground. *-s* 'ups':: -Monitor this UPS. The format for this option is +Monitor this UPS. The format for this option is +upsname[@hostname[:port]]+. The default hostname is "localhost". *-u* 'username':: -If started as root, upslog will *setuid*(2) to the user id -associated with 'username' for security. +If started as root, upsmon will *setuid*(2) to the user id +associated with 'username' for security. + If 'username' is not defined, it will use the value that was compiled into the program. This defaults to "nobody", which is less than ideal. @@ -115,16 +108,13 @@ SEE ALSO Server: ~~~~~~~ - linkman:upsd[8] Clients: ~~~~~~~~ - linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8], linkman:upsmon[8], linkman:upssched[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsmon.8 b/docs/man/upsmon.8 index aa222bb..9f21c21 100644 --- a/docs/man/upsmon.8 +++ b/docs/man/upsmon.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSMON" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSMON" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -33,14 +33,14 @@ upsmon \- UPS monitor and shutdown controller .sp \fBupsmon\fR \-h .sp -\fBupsmon\fR \-c \fIcommand\fR [\-P \fIpid\fR] +\fBupsmon\fR \-c \fIcommand\fR .sp -\fBupsmon\fR [\-D] [\-F | \-B] [\-K] [\-p] [\-u \fIuser\fR] +\fBupsmon\fR [\-D] [\-K] [\-p] [\-u \fIuser\fR] .SH "DESCRIPTION" .sp \fBupsmon\fR is the client process that is responsible for the most important part of UPS monitoring\(emshutting down the system when the power goes out\&. It can call out to other helper programs for notification purposes during power events\&. .sp -upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (\fBprimary\fR or \fBsecondary\fR)\&. +upsmon can monitor multiple systems using a single process\&. Every UPS that is defined in the \fBupsmon.conf\fR(5) configuration file is assigned a power value and a type (\fBslave\fR or \fBmaster\fR)\&. .SH "OPTIONS" .PP \fB\-h\fR @@ -56,7 +56,7 @@ to the existing upsmon process\&. Valid commands are: .PP \fBfsd\fR .RS 4 -shutdown all primary\-mode UPSes (use with caution) +shutdown all master UPSes (use with caution) .RE .PP \fBstop\fR @@ -72,26 +72,9 @@ configuration file\&. See "reloading nuances" below if this doesn\(cqt work\&. .RE .RE .PP -\fB\-P\fR \fIpid\fR -.RS 4 -Send the command signal above using specified PID number, rather than consulting the PID file\&. This can help define service units which start main -upsmon -as a foreground process so it does not have to rely on a PID file\&. -.RE -.PP \fB\-D\fR .RS 4 -Raise the debugging level\&. upsmon will run in the foreground by default, and will print information on stdout about the monitoring process\&. Use this option multiple times for more details\&. -.RE -.PP -\fB\-F\fR -.RS 4 -upsmon will run in the foreground, regardless of debugging settings\&. -.RE -.PP -\fB\-B\fR -.RS 4 -upsmon will run in the background, regardless of debugging settings\&. +Raise the debugging level\&. upsmon will run in the foreground and prints information on stdout about the monitoring process\&. Use this multiple times for more details\&. .RE .PP \fB\-K\fR @@ -172,7 +155,7 @@ The \fIpowervalue\fR refers to how many power supplies on this system are being .sp The \fIusername\fR is a section in your \fBupsd.users\fR(5) file\&. Whatever password you set in that section must match the \fIpassword\fR set in this file\&. .sp -The type set in that section must also match the \fItype\fR here \(em \fBprimary\fR or \fBsecondary\fR\&. In general, a primary process is one running on the system with the UPS actually plugged into a serial port, and a secondary is drawing power from the UPS but can\(cqt talk to it directly\&. See the section on UPS types for more\&. +The type set in that section must also match the \fItype\fR here\-\- \fBmaster\fR or \fBslave\fR\&. In general, a master process is one running on the system with the UPS actually plugged into a serial port, and a slave is drawing power from the UPS but can\(cqt talk to it directly\&. See the section on UPS types for more\&. .SH "NOTIFY EVENTS" .sp \fBupsmon\fR senses several events as it monitors each UPS\&. They are called notify events as they can be used to tell the users and admins about the change in status\&. See the additional NOTIFY\-related sections below for information on customizing the delivery of these messages\&. @@ -231,9 +214,9 @@ NOTIFYCMD "/usr/local/bin/notifyme" .sp Remember to wrap the path in "quotes" if it contains any spaces\&. .sp -The program you run as your NOTIFYCMD can use the environment variables NOTIFYTYPE and UPSNAME to know what has happened and on which UPS\&. It also receives the notification message (see below) as the first (and only) argument, so you can deliver a pre\-formatted message too\&. +The program you run as your NOTIFYCMD can use the environment variables NOTIFYTYPE and UPSNAME to know what has happened and on which UPS\&. It also receives the notification message (see below) as the first (and only) argument, so you can deliver a preformatted message too\&. .sp -Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, as detailed below\&. +Note that the NOTIFYCMD will only be called for a given event when you set the EXEC flag by using the notify flags, below: .SH "NOTIFY FLAGS" .sp By default, all notify events (see above) generate a global message (wall) to all users, plus they are logged via the syslog\&. You can change this with the NOTIFYFLAG directive in the configuration file: @@ -340,17 +323,17 @@ MONITOR \fIupsname\fR \fIpowervalue\fR \fIusername\fR \fIpassword\fR \fItype\fR .sp Normally, you only have one power supply, so it will be set to 1\&. .sp -MONITOR myups@myhost 1 username mypassword primary +MONITOR myups@myhost 1 username mypassword master .sp On a large server with redundant power supplies, the power value for a UPS may be greater than 1\&. You may also have more than one of them defined\&. .sp -MONITOR ups\-alpha@myhost 2 username mypassword primary +MONITOR ups\-alpha@myhost 2 username mypassword master .sp -MONITOR ups\-beta@myhost 2 username mypassword primary +MONITOR ups\-beta@myhost 2 username mypassword master .sp -You can also set the power value for a UPS to 0 if it does not supply any power to that system\&. This is generally used when you want to use the upsmon notification features for a UPS even though it\(cqs not actually running the system that hosts upsmon\&. Don\(cqt set this to "primary" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons\&. +You can also set the power value for a UPS to 0 if it does not supply any power to that system\&. This is generally used when you want to use the upsmon notification features for a UPS even though it\(cqs not actually running the system that hosts upsmon\&. Don\(cqt set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons\&. .sp -MONITOR faraway@anotherbox 0 username mypassword secondary +MONITOR faraway@anotherbox 0 username mypassword slave .sp The "minimum power value" is the number of power supplies that must be receiving power in order to keep the computer running\&. .sp @@ -367,13 +350,13 @@ MINSUPPLIES 3 When the current overall power value drops below the minimum power value, upsmon starts the shutdown sequence\&. This design allows you to lose some of your power supplies in a redundant power environment without bringing down the entire system while still working properly for smaller systems\&. .SH "UPS TYPES" .sp -\fBupsmon\fR and \fBupsd\fR(8) don\(cqt always run on the same system\&. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "primary" mode\&. This makes upsmon take charge of that equipment, and it will wait for the "secondary" systems to disconnect before shutting down the local system\&. This allows the distant systems (monitoring over the network) to shut down cleanly before upsdrvctl shutdown runs and turns them all off\&. +\fBupsmon\fR and \fBupsd\fR(8) don\(cqt always run on the same system\&. When they do, any UPSes that are directly attached to the upsmon host should be monitored in "master" mode\&. This makes upsmon take charge of that equipment, and it will wait for slaves to disconnect before shutting down the local system\&. This allows the distant systems (monitoring over the network) to shut down cleanly before upsdrvctl shutdown runs and turns them all off\&. .sp -When upsmon runs as a secondary, it is relying on the distant system to tell it about the state of the UPS\&. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command\&. This needs to happen quickly\&. Once all secondaries disconnect from the distant \fBupsd\fR(8) server, its primary\-mode upsmon will start its own shutdown process\&. Your secondary systems must all quiesce and shut down before the primary turns off the shared power source, or filesystem damage may result\&. +When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS\&. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command\&. This needs to happen quickly\&. Once it disconnects from the distant \fBupsd\fR(8) server, the master upsmon will start its own shutdown process\&. Your slaves must all shut down before the master turns off the power or filesystem damage may result\&. .sp -upsmon deals with secondaries that get wedged, hang, or otherwise fail to disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC timer\&. During a shutdown situation, the primary upsmon will give up after this interval and it will shut down anyway\&. This keeps the primary from sitting there forever (which would endanger that host) if a secondary should break somehow\&. This defaults to 15 seconds\&. +upsmon deals with slaves that get wedged, hang, or otherwise fail to disconnect from \fBupsd\fR(8) in a timely manner with the HOSTSYNC timer\&. During a shutdown situation, the master upsmon will give up after this interval and it will shut down anyway\&. This keeps the master from sitting there forever (which would endanger that host) if a slave should break somehow\&. This defaults to 15 seconds\&. .sp -If your primary system is shutting down too quickly, set the FINALDELAY interval to something greater than the default 15 seconds\&. Don\(cqt set this too high, or your UPS battery may run out of power before the primary upsmon process shuts down that system\&. +If your master system is shutting down too quickly, set the FINALDELAY interval to something greater than the default 15 seconds\&. Don\(cqt set this too high, or your UPS battery may run out of power before the master upsmon process shuts down that system\&. .SH "TIMED SHUTDOWNS" .sp For those rare situations where the shutdown process can\(cqt be completed between the time that low battery is signalled and the UPS actually powers off the load, use the \fBupssched\fR(8) helper program\&. You can use it along with upsmon to schedule a shutdown based on the "on battery" event\&. upssched can then come back to upsmon to initiate the shutdown once it has run on battery too long\&. @@ -392,14 +375,14 @@ When alpha goes on battery, your current overall power value will stay at 3, as However, if beta goes critical, subtracting its contribution will take the current overall value from 3 to 2\&. This is just high enough to satisfy the minimum, so the system will continue running as before\&. If beta returns later, it will be re\-added and the current value will go back to 3\&. This allows you to swap out UPSes, change a power configuration, or whatever, as long as you maintain the minimum power value at all times\&. .SH "MIXED OPERATIONS" .sp -Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles\&. If you have a system with multiple power supplies serviced by separate UPS batteries, it\(cqs possible to be a primary on one UPS and a secondary on the other\&. This usually happens when you run out of serial or USB ports and need to do the monitoring through another system nearby\&. +Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles\&. If you have a system with multiple power supplies serviced by separate UPS batteries, it\(cqs possible to be a master on one and a slave on the other\&. This usually happens when you run out of serial ports and need to do the monitoring through another system nearby\&. .sp This is also complicated, especially when it comes time to power down a UPS that has gone critical but doesn\(cqt supply the local system\&. You can do this with some scripting magic in your notify command script, but it\(cqs beyond the scope of this manual\&. .SH "FORCED SHUTDOWNS" .sp -When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in primary mode\&. This is used to synchronize secondary systems in the event that a primary which is otherwise OK needs to be brought down due to some pressing event on the UPS manager system\&. +When upsmon is forced to bring down the local system, it sets the "FSD" (forced shutdown) flag on any UPSes that it is running in master mode\&. This is used to synchronize slaves in the event that a master UPS that is otherwise OK needs to be brought down due to some pressing event on the master\&. .sp -You can manually invoke this mode on the system with primary\-mode upsmon by starting another copy of the program with \-c fsd command line argument\&. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as \fBupssched\fR(8)\&. +You can manually invoke this mode on the master upsmon by starting another copy with \-c fsd\&. This is useful when you want to initiate a shutdown before the critical stage through some external means, such as \fBupssched\fR(8)\&. .SH "DEAD UPSES" .sp In the event that upsmon can\(cqt reach \fBupsd\fR(8), it declares that UPS "dead" after some interval controlled by DEADTIME in the \fBupsmon.conf\fR(5)\&. If this happens while that UPS was last known to be on battery, it is assumed to have gone critical and no longer contributes to the overall power value\&. @@ -420,9 +403,7 @@ To test a synchronized shutdown without pulling the plug on your UPS(es), you ne .sp upsmon \-c fsd .sp -After that, the primary and the secondary will do their usual shutdown sequence as if the battery had gone critical, while you can time how long it takes for them\&. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug\&. -.sp -Note you can also use a dummy SHUTDOWNCMD setting to just report that the systems would shut down at this point, without actually disrupting their work\&. +After that, the master and the slaves will do their usual shutdown sequence as if the battery had gone critical\&. This is much easier on your UPS equipment, and it beats crawling under a desk to find the plug\&. .SH "FILES" .sp \fBupsmon.conf\fR(5) diff --git a/docs/man/upsmon.conf.5 b/docs/man/upsmon.conf.5 index 7691751..2323abb 100644 --- a/docs/man/upsmon.conf.5 +++ b/docs/man/upsmon.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsmon.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSMON\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSMON\&.CONF" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -49,7 +49,7 @@ Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT\&. Otherwise, .PP \fBFINALDELAY\fR \fIseconds\fR .RS 4 -When running in primary mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users\&. After the timer elapses, it then runs your SHUTDOWNCMD\&. By default this is set to 5 seconds\&. +When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users\&. After the timer elapses, it then runs your SHUTDOWNCMD\&. By default this is set to 5 seconds\&. .sp If you need to let your users do something in between those events, increase this number\&. Remember, at this point your UPS battery is almost depleted, so don\(cqt make this too big\&. .sp @@ -66,20 +66,20 @@ Alternatively, you can set this very low so you don\(cqt wait around when it\(cq \fBNote\fR .ps -1 .br -If FINALDELAY on the secondary is greater than HOSTSYNC on the primary, the primary will give up waiting for that secondary upsmon to disconnect\&. +If FINALDELAY on the slave is greater than HOSTSYNC on the master, the master will give up waiting for the slave to disconnect\&. .sp .5v .RE .RE .PP \fBHOSTSYNC\fR \fIseconds\fR .RS 4 -upsmon will wait up to this many seconds in primary mode for the secondaries to disconnect during a shutdown situation\&. By default, this is 15 seconds\&. +upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation\&. By default, this is 15 seconds\&. .sp -When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the secondary systems are supposed to disconnect and shut down right away\&. The HOSTSYNC timer keeps the primary upsmon from sitting there forever if one of the secondaries gets stuck\&. +When a UPS goes critical (on battery + low battery, or "FSD": forced shutdown), the slaves are supposed to disconnect and shut down right away\&. The HOSTSYNC timer keeps the master upsmon from sitting there forever if one of the slaves gets stuck\&. .sp -This value is also used to keep secondary systems from getting stuck if the primary fails to respond in time\&. After a UPS becomes critical, the secondary will wait up to HOSTSYNC seconds for the primary to set the FSD flag\&. If that timer expires, the secondary upsmon will assume that the primary (or communications path to it) is broken and will shut down anyway\&. +This value is also used to keep slave systems from getting stuck if the master fails to respond in time\&. After a UPS becomes critical, the slave will wait up to HOSTSYNC seconds for the master to set the FSD flag\&. If that timer expires, the slave will assume that the master is broken and will shut down anyway\&. .sp -This keeps the secondaries from shutting down during a short\-lived status change to "OB LB" and back that the secondaries see but the primary misses\&. +This keeps the slaves from shutting down during a short\-lived status change to "OB LB" that the slaves see but the master misses\&. .RE .PP \fBMINSUPPLIES\fR \fInum\fR @@ -135,11 +135,9 @@ on port "5678"\&. .sp You can set the \fIpowervalue\fR to 0 if you want to monitor a UPS that doesn\(cqt actually supply power to this system\&. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical\&. .sp -The \fIusername\fR and \fIpassword\fR on this line must match an entry in the upsd server system\(cqs \fBupsd.users\fR(5) file\&. +The \fIusername\fR and \fIpassword\fR on this line must match an entry in that system\(cqs \fBupsd.users\fR(5)\&. If your username is "monmaster" and your password is "blah", the MONITOR line might look like this: .sp -If your username is "observer" and your password is "abcd", the MONITOR line might look like this (likely on a remote secondary system): -.sp -MONITOR myups@bigserver 1 observer abcd secondary +MONITOR myups@bigserver 1 monmaster blah master .sp Meanwhile, the upsd\&.users on bigserver would look like this: .sp @@ -147,31 +145,15 @@ Meanwhile, the upsd\&.users on bigserver would look like this: .RS 4 .\} .nf -[observer] - password = abcd - upsmon secondary +[monmaster] + password = blah + upsmon master # (or slave) .fi .if n \{\ .RE .\} .sp -.if n \{\ -.RS 4 -.\} -.nf -[upswired] - password = blah - upsmon primary -.fi -.if n \{\ -.RE -.\} -.sp -And the copy of upsmon on that bigserver would run with the primary configuration: -.sp -MONITOR myups@bigserver 1 upswired blah primary -.sp -The \fItype\fR refers to the relationship with \fBupsd\fR(8)\&. It can be either "primary" or "secondary"\&. See \fBupsmon\fR(8) for more information on the meaning of these modes\&. The mode you pick here also goes in the upsd\&.users file, as seen in the example above\&. +The \fItype\fR refers to the relationship with \fBupsd\fR(8)\&. It can be either "master" or "slave"\&. See \fBupsmon\fR(8) for more information on the meaning of these modes\&. The mode you pick here also goes in the upsd\&.users file, as seen in the example above\&. .PP \fBNOCOMMWARNTIME\fR \fIseconds\fR .RS 4 @@ -258,7 +240,7 @@ UPS is on battery and has a low battery (is critical) .PP FSD .RS 4 -UPS is being shutdown by the primary (FSD = "Forced Shutdown") +UPS is being shutdown by the master (FSD = "Forced Shutdown") .RE .PP COMMOK @@ -287,7 +269,7 @@ A UPS is unavailable (can\(cqt be contacted for monitoring) .RE .RE .PP -\fBNOTIFYFLAG\fR \fItype\fR \fIflag\fR[+\fIflag\fR]\&... +\fBNOTIFYFLAG\fR \fItype\fR \fIflag\fR[+\fIflag\fR][+\fIflag\fR]\&... .RS 4 By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen\&. You can change this\&. .sp @@ -351,11 +333,11 @@ The warnings from the POLLFREQ entry about too\-high and too\-low values also ap .PP \fBPOWERDOWNFLAG\fR \fIfilename\fR .RS 4 -upsmon creates this file when running in primary mode when the UPS needs to be powered off\&. You should check for this file in your shutdown scripts and call +upsmon creates this file when running in master mode when the UPS needs to be powered off\&. You should check for this file in your shutdown scripts and call upsdrvctl shutdown if it exists\&. .sp -This is done to forcibly reset the secondary systems, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. +This is done to forcibly reset the slaves, so they don\(cqt get stuck at the "halted" stage even if the power returns during the shutdown process\&. This usually does not work well on contact\-closure UPSes that use the genericups driver\&. .sp See the config\-notes\&.txt file in the docs subdirectory for more information\&. Refer to the section: @@ -386,9 +368,9 @@ This file should not be writable by the upsmon user, as it would be possible to .PP \fBSHUTDOWNCMD\fR \fIcommand\fR .RS 4 -upsmon runs this command when the system needs to be brought down\&. If it is a secondary, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above\&. +upsmon runs this command when the system needs to be brought down\&. If it is a slave, it will do that immediately whenever the current overall power value drops below the MINSUPPLIES value above\&. .sp -When upsmon is a primary, it will allow any secondaries to log out before starting the local shutdown procedure\&. +When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure\&. .sp Note that the command needs to be one element in the config file\&. If your shutdown command includes spaces, then put it in quotes to keep it together, i\&.e\&.: .sp @@ -409,7 +391,7 @@ When compiled with SSL support, you can enter the certificate path here\&. .PP With NSS: .RS 4 -Certificates are stored in a dedicated database (data split in 3 files)\&. Specify the path of the database directory\&. +Certificates are stored in a dedicated database (splitted in 3 files)\&. Specify the path of the database directory\&. .RE .PP With OpenSSL: @@ -436,7 +418,7 @@ When compiled with SSL support, make upsmon verify all connections with certific .sp Without this, there is no guarantee that the upsd is the right host\&. Enabling this greatly reduces the risk of man\-in\-the\-middle attacks\&. This effectively forces the use of SSL, so don\(cqt use this unless all of your upsd hosts are ready for SSL and have their certificates in order\&. .sp -When compiled with NSS support of SSL, can be overridden for host specified with a CERTHOST directive\&. +When compiled with NSS support of SSL, can be overriden for host specified with a CERTHOST directive\&. .RE .PP \fBFORCESSL\fR \fI0 | 1\fR @@ -446,41 +428,7 @@ When compiled with SSL, specify that a secured connection must be used to commun If you don\(cqt use \fICERTVERIFY 1\fR, then this will at least make sure that nobody can sniff your sessions without a large effort\&. Setting this will make upsmon drop connections if the remote upsd doesn\(cqt support SSL, so don\(cqt use it unless all of them have it running\&. .sp -When compiled with NSS support of SSL, can be overridden for host specified with a CERTHOST directive\&. -.RE -.PP -\fBDEBUG_MIN\fR \fIINTEGER\fR -.RS 4 -Optionally specify a minimum debug level for -upsmon -daemon, e\&.g\&. for troubleshooting a deployment, without impacting foreground or background running mode directly\&. Command\-line option -\-D -can only increase this verbosity level\&. -.if n \{\ -.sp -.\} -.RS 4 -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBNote\fR -.ps -1 -.br -if the running daemon receives a -reload -command, presence of the -DEBUG_MIN NUMBER -value in the configuration file can be used to tune debugging verbosity in the running service daemon (it is recommended to comment it away or set the minimum to explicit zero when done, to avoid huge journals and I/O system abuse)\&. Keep in mind that for this run\-time tuning, the -DEBUG_MIN -value -\fBpresent\fR -in -\fBreloaded\fR -configuration files is applied instantly and overrides any previously set value, from file or CLI options, regardless of older logging level being higher or lower than the newly found number; a missing (or commented away) value however does not change the previously active logging verbosity\&. -.sp .5v -.RE +When compiled with NSS support of SSL, can be overriden for host specified with a CERTHOST directive\&. .RE .SH "SEE ALSO" .sp diff --git a/docs/man/upsmon.conf.txt b/docs/man/upsmon.conf.txt index 1bd18ab..fccf495 100644 --- a/docs/man/upsmon.conf.txt +++ b/docs/man/upsmon.conf.txt @@ -25,25 +25,25 @@ CONFIGURATION DIRECTIVES upsmon allows a UPS to go missing for this many seconds before declaring it "dead". The default is 15 seconds. + -upsmon requires a UPS to provide status information every few seconds +upsmon requires a UPS to provide status information every few seconds (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status -fetch fails, the UPS is marked stale. If it stays stale for more than +fetch fails, the UPS is marked stale. If it stays stale for more than DEADTIME seconds, the UPS is marked dead. + A dead UPS that was last known to be on battery is assumed to have -changed to a low battery condition. This may force a shutdown if it is +changed to a low battery condition. This may force a shutdown if it is providing a critical amount of power to your system. This seems disruptive, but the alternative is barreling ahead into oblivion and crashing when you run out of power. + -Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT. +Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT. Otherwise, you'll have "dead" UPSes simply because upsmon isn't polling them quickly enough. Rule of thumb: take the larger of the two POLLFREQ values, and multiply by 3. *FINALDELAY* 'seconds':: -When running in primary mode, upsmon waits this long after sending the +When running in master mode, upsmon waits this long after sending the NOTIFY_SHUTDOWN to warn the users. After the timer elapses, it then runs your SHUTDOWNCMD. By default this is set to 5 seconds. + @@ -51,33 +51,32 @@ If you need to let your users do something in between those events, increase this number. Remember, at this point your UPS battery is almost depleted, so don't make this too big. + -Alternatively, you can set this very low so you don't wait around when -it's time to shut down. Some UPSes don't give much warning for low +Alternatively, you can set this very low so you don't wait around when +it's time to shut down. Some UPSes don't give much warning for low battery and will require a value of 0 here for a safe shutdown. + -NOTE: If FINALDELAY on the secondary is greater than HOSTSYNC on the -primary, the primary will give up waiting for that secondary upsmon -to disconnect. +NOTE: If FINALDELAY on the slave is greater than HOSTSYNC on the master, +the master will give up waiting for the slave to disconnect. *HOSTSYNC* 'seconds':: -upsmon will wait up to this many seconds in primary mode for the secondaries +upsmon will wait up to this many seconds in master mode for the slaves to disconnect during a shutdown situation. By default, this is 15 seconds. + When a UPS goes critical (on battery + low battery, or "FSD": forced -shutdown), the secondary systems are supposed to disconnect and shut -down right away. The HOSTSYNC timer keeps the primary upsmon from sitting -there forever if one of the secondaries gets stuck. +shutdown), the slaves are supposed to disconnect and shut down right +away. The HOSTSYNC timer keeps the master upsmon from sitting there +forever if one of the slaves gets stuck. + -This value is also used to keep secondary systems from getting stuck if -the primary fails to respond in time. After a UPS becomes critical, the -secondary will wait up to HOSTSYNC seconds for the primary to set the -FSD flag. If that timer expires, the secondary upsmon will assume that the -primary (or communications path to it) is broken and will shut down anyway. +This value is also used to keep slave systems from getting stuck if +the master fails to respond in time. After a UPS becomes critical, +the slave will wait up to HOSTSYNC seconds for the master to set the +FSD flag. If that timer expires, the slave will assume that the master +is broken and will shut down anyway. + -This keeps the secondaries from shutting down during a short-lived status -change to "OB LB" and back that the secondaries see but the primary misses. +This keeps the slaves from shutting down during a short-lived status +change to "OB LB" that the slaves see but the master misses. *MINSUPPLIES* 'num':: @@ -127,34 +126,22 @@ doesn't actually supply power to this system. This is useful when you want to have upsmon do notifications about status changes on a UPS without shutting down when it goes critical. -The 'username' and 'password' on this line must match an entry in -the `upsd` server system's linkman:upsd.users[5] file. +The 'username' and 'password' on this line must match an entry +in that system's linkman:upsd.users[5]. If your username is "monmaster" +and your password is "blah", the MONITOR line might look like this: -If your username is "observer" and your password is "abcd", the MONITOR -line might look like this (likely on a remote secondary system): - -+MONITOR myups@bigserver 1 observer abcd secondary+ ++MONITOR myups@bigserver 1 monmaster blah master+ Meanwhile, the `upsd.users` on `bigserver` would look like this: - [observer] - password = abcd - upsmon secondary - - [upswired] - password = blah - upsmon primary - -And the copy of upsmon on that bigserver would run with the primary -configuration: - -+MONITOR myups@bigserver 1 upswired blah primary+ - + [monmaster] + password = blah + upsmon master # (or slave) The 'type' refers to the relationship with linkman:upsd[8]. It can -be either "primary" or "secondary". See linkman:upsmon[8] for more -information on the meaning of these modes. The mode you pick here -also goes in the `upsd.users` file, as seen in the example above. +be either "master" or "slave". See linkman:upsmon[8] for more information +on the meaning of these modes. The mode you pick here also goes in +the `upsd.users` file, as seen in the example above. *NOCOMMWARNTIME* 'seconds':: @@ -167,7 +154,7 @@ seconds. upsmon calls this to send messages when things happen. + -This command is called with the full text of the message as one +This command is called with the full text of the message as one argument. The environment string NOTIFYTYPE will contain the type string of whatever caused this event to happen. + @@ -214,7 +201,7 @@ ONBATT;; UPS is on battery LOWBATT;; UPS is on battery and has a low battery (is critical) -FSD;; UPS is being shutdown by the primary (FSD = "Forced Shutdown") +FSD;; UPS is being shutdown by the master (FSD = "Forced Shutdown") COMMOK;; Communications established with the UPS @@ -224,13 +211,13 @@ SHUTDOWN;; The system is being shutdown REPLBATT;; The UPS battery is bad and needs to be replaced -NOCOMM;; A UPS is unavailable (can't be contacted for monitoring) +NOCOMM;; A UPS is unavailable (can't be contacted for monitoring) -*NOTIFYFLAG* 'type' 'flag'[+'flag']...:: +*NOTIFYFLAG* 'type' 'flag'[\+'flag'][+'flag']...:: By default, upsmon sends walls global messages to all logged in users) via /bin/wall and writes to the syslog when things happen. You can -change this. +change this. + Examples: + @@ -279,17 +266,17 @@ also apply here. *POWERDOWNFLAG* 'filename':: -upsmon creates this file when running in primary mode when the UPS needs +upsmon creates this file when running in master mode when the UPS needs to be powered off. You should check for this file in your shutdown scripts and call `upsdrvctl shutdown` if it exists. + -This is done to forcibly reset the secondary systems, so they don't get -stuck at the "halted" stage even if the power returns during the shutdown +This is done to forcibly reset the slaves, so they don't get stuck at +the "halted" stage even if the power returns during the shutdown process. This usually does not work well on contact-closure UPSes that use the genericups driver. + See the config-notes.txt file in the docs subdirectory for more information. -Refer to the section: +Refer to the section: [[UPS_shutdown]] "Configuring automatic shutdowns for low battery events", or refer to the online version. @@ -319,17 +306,17 @@ privileges and an impossible password. Then, tell upsmon to run as that user, and make `upsmon.conf` readable by it. Your reloads will work, and your config file will stay secure. + -This file should not be writable by the upsmon user, as it would be +This file should not be writable by the upsmon user, as it would be possible to exploit a hole, change the SHUTDOWNCMD to something malicious, then wait for upsmon to be restarted. *SHUTDOWNCMD* 'command':: upsmon runs this command when the system needs to be brought down. If -it is a secondary, it will do that immediately whenever the current -overall power value drops below the MINSUPPLIES value above. +it is a slave, it will do that immediately whenever the current overall +power value drops below the MINSUPPLIES value above. + -When upsmon is a primary, it will allow any secondaries to log out before +When upsmon is a master, it will allow any slaves to log out before starting the local shutdown procedure. + Note that the command needs to be one element in the config file. If @@ -343,7 +330,7 @@ together, i.e.: When compiled with SSL support, you can enter the certificate path here. + With NSS:;; - Certificates are stored in a dedicated database (data split in 3 files). + Certificates are stored in a dedicated database (splitted in 3 files). Specify the path of the database directory. With OpenSSL:;; Directory containing CA certificates in PEM format, used to verify @@ -368,7 +355,7 @@ must be secure. *CERTVERIFY* '0 | 1':: -When compiled with SSL support, make upsmon verify all connections with +When compiled with SSL support, make upsmon verify all connections with certificates. + Without this, there is no guarantee that the upsd is the right host. @@ -377,7 +364,7 @@ This effectively forces the use of SSL, so don't use this unless all of your upsd hosts are ready for SSL and have their certificates in order. + -When compiled with NSS support of SSL, can be overridden for host +When compiled with NSS support of SSL, can be overriden for host specified with a CERTHOST directive. *FORCESSL* '0 | 1':: @@ -390,33 +377,13 @@ that nobody can sniff your sessions without a large effort. Setting this will make upsmon drop connections if the remote upsd doesn't support SSL, so don't use it unless all of them have it running. + -When compiled with NSS support of SSL, can be overridden for host +When compiled with NSS support of SSL, can be overriden for host specified with a CERTHOST directive. -*DEBUG_MIN* 'INTEGER':: - -Optionally specify a minimum debug level for `upsmon` daemon, e.g. for -troubleshooting a deployment, without impacting foreground or background -running mode directly. Command-line option `-D` can only increase this -verbosity level. -+ -NOTE: if the running daemon receives a `reload` command, presence of the -`DEBUG_MIN NUMBER` value in the configuration file can be used to tune -debugging verbosity in the running service daemon (it is recommended to -comment it away or set the minimum to explicit zero when done, to avoid -huge journals and I/O system abuse). Keep in mind that for this run-time -tuning, the `DEBUG_MIN` value *present* in *reloaded* configuration files -is applied instantly and overrides any previously set value, from file -or CLI options, regardless of older logging level being higher or lower -than the newly found number; a missing (or commented away) value however -does not change the previously active logging verbosity. - SEE ALSO -------- - linkman:upsmon[8], linkman:upsd[8], linkman:nutupsdrv[8]. Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsmon.txt b/docs/man/upsmon.txt index cb202fc..077144d 100644 --- a/docs/man/upsmon.txt +++ b/docs/man/upsmon.txt @@ -11,9 +11,9 @@ SYNOPSIS *upsmon* -h -*upsmon* -c 'command' [-P 'pid'] +*upsmon* -c 'command' -*upsmon* [-D] [-F | -B] [-K] [-p] [-u 'user'] +*upsmon* [-D] [-K] [-p] [-u 'user'] DESCRIPTION ----------- @@ -25,7 +25,7 @@ power events. upsmon can monitor multiple systems using a single process. Every UPS that is defined in the linkman:upsmon.conf[5] configuration file is assigned -a power value and a type (*primary* or *secondary*). +a power value and a type (*slave* or *master*). OPTIONS ------- @@ -37,34 +37,22 @@ Display the help message. Send the command 'command' to the existing upsmon process. Valid commands are: -*fsd*;; shutdown all primary-mode UPSes (use with caution) +*fsd*;; shutdown all master UPSes (use with caution) *stop*;; stop monitoring and exit *reload*;; reread linkman:upsmon.conf[5] configuration file. See "reloading nuances" below if this doesn't work. -*-P* 'pid':: -Send the command signal above using specified PID number, rather than -consulting the PID file. This can help define service units which -start main `upsmon` as a foreground process so it does not have to -rely on a PID file. - *-D*:: -Raise the debugging level. upsmon will run in the foreground by default, -and will print information on stdout about the monitoring process. -Use this option multiple times for more details. - -*-F*:: -upsmon will run in the foreground, regardless of debugging settings. - -*-B*:: -upsmon will run in the background, regardless of debugging settings. +Raise the debugging level. upsmon will run in the foreground and prints +information on stdout about the monitoring process. Use this multiple +times for more details. *-K*:: Test for the shutdown flag. If it exists and contains the magic string from upsmon, then upsmon will exit with `EXIT_SUCCESS`. Any other condition -will make upsmon exit with `EXIT_FAILURE`. +will make upsmon exit with `EXIT_FAILURE`. + You can test for a successful exit from `upsmon -K` in your shutdown scripts to know when to call linkman:upsdrvctl[8] to shut down the UPS. @@ -105,7 +93,7 @@ examples follow: - "su700@mybox" means a UPS called "su700" on a system called "mybox". This is the normal form. - - "fenton@bigbox:5678" is a UPS called "fenton" on a system called + - "fenton@bigbox:5678" is a UPS called "fenton" on a system called "bigbox" which runs linkman:upsd[8] on port "5678". The 'powervalue' refers to how many power supplies on this system are @@ -114,13 +102,13 @@ on power values below. The 'username' is a section in your linkman:upsd.users[5] file. Whatever password you set in that section must match the 'password' -set in this file. +set in this file. -The type set in that section must also match the 'type' here -- -*primary* or *secondary*. In general, a primary process is one +The type set in that section must also match the 'type' here-- +*master* or *slave*. In general, a master process is one running on the system with the UPS actually plugged into a serial -port, and a secondary is drawing power from the UPS but can't -talk to it directly. See the section on UPS types for more. +port, and a slave is drawing power from the UPS but can't talk to it +directly. See the section on UPS types for more. NOTIFY EVENTS ------------- @@ -161,7 +149,7 @@ NOTIFY COMMAND -------------- In linkman:upsmon.conf[5], you can configure a program called the NOTIFYCMD -that will handle events that occur. +that will handle events that occur. +NOTIFYCMD+ "'path to program'" @@ -172,10 +160,10 @@ Remember to wrap the path in "quotes" if it contains any spaces. The program you run as your NOTIFYCMD can use the environment variables NOTIFYTYPE and UPSNAME to know what has happened and on which UPS. It also receives the notification message (see below) as the first (and -only) argument, so you can deliver a pre-formatted message too. +only) argument, so you can deliver a preformatted message too. Note that the NOTIFYCMD will only be called for a given event when you set -the EXEC flag by using the notify flags, as detailed below. +the EXEC flag by using the notify flags, below: NOTIFY FLAGS ------------ @@ -239,36 +227,36 @@ number. If a UPS is critical (on battery and low battery) or has been put into "forced shutdown" mode, it no longer contributes. A "power value" on a MONITOR line in the config file is the number of -power supplies that the UPS runs on the current system. +power supplies that the UPS runs on the current system. +MONITOR+ 'upsname' 'powervalue' 'username' 'password' 'type' -Normally, you only have one power supply, so it will be set to 1. +Normally, you only have one power supply, so it will be set to 1. -+MONITOR myups@myhost 1 username mypassword primary+ ++MONITOR myups@myhost 1 username mypassword master+ On a large server with redundant power supplies, the power value for a UPS may be greater than 1. You may also have more than one of them defined. -+MONITOR ups-alpha@myhost 2 username mypassword primary+ ++MONITOR ups-alpha@myhost 2 username mypassword master+ -+MONITOR ups-beta@myhost 2 username mypassword primary+ ++MONITOR ups-beta@myhost 2 username mypassword master+ You can also set the power value for a UPS to 0 if it does not supply any power to that system. This is generally used when you want to use the upsmon notification features for a UPS even though it's not actually -running the system that hosts upsmon. Don't set this to "primary" unless +running the system that hosts upsmon. Don't set this to "master" unless you really want to power this UPS off when this instance of upsmon needs to shut down for its own reasons. -+MONITOR faraway@anotherbox 0 username mypassword secondary+ ++MONITOR faraway@anotherbox 0 username mypassword slave+ The "minimum power value" is the number of power supplies that must be -receiving power in order to keep the computer running. +receiving power in order to keep the computer running. +MINSUPPLIES+ 'value' -Typical PCs only have 1, so most users will leave this at the default. +Typical PCs only have 1, so most users will leave this at the default. +MINSUPPLIES 1+ @@ -288,31 +276,31 @@ UPS TYPES *upsmon* and linkman:upsd[8] don't always run on the same system. When they do, any UPSes that are directly attached to the upsmon host should be -monitored in "primary" mode. This makes upsmon take charge of that equipment, -and it will wait for the "secondary" systems to disconnect before shutting +monitored in "master" mode. This makes upsmon take charge of that +equipment, and it will wait for slaves to disconnect before shutting down the local system. This allows the distant systems (monitoring over the network) to shut down cleanly before `upsdrvctl shutdown` runs and turns them all off. -When upsmon runs as a secondary, it is relying on the distant system to tell +When upsmon runs as a slave, it is relying on the distant system to tell it about the state of the UPS. When that UPS goes critical (on battery and low battery), it immediately invokes the local shutdown command. This -needs to happen quickly. Once all secondaries disconnect from the distant -linkman:upsd[8] server, its primary-mode upsmon will start its own shutdown -process. Your secondary systems must all quiesce and shut down before the -primary turns off the shared power source, or filesystem damage may result. +needs to happen quickly. Once it disconnects from the distant +linkman:upsd[8] server, the master upsmon will start its own shutdown +process. Your slaves must all shut down before the master turns off the +power or filesystem damage may result. -upsmon deals with secondaries that get wedged, hang, or otherwise fail to +upsmon deals with slaves that get wedged, hang, or otherwise fail to disconnect from linkman:upsd[8] in a timely manner with the HOSTSYNC -timer. During a shutdown situation, the primary upsmon will give up after -this interval and it will shut down anyway. This keeps the primary from -sitting there forever (which would endanger that host) if a secondary -should break somehow. This defaults to 15 seconds. +timer. During a shutdown situation, the master upsmon will give up after +this interval and it will shut down anyway. This keeps the master from +sitting there forever (which would endanger that host) if a slave should +break somehow. This defaults to 15 seconds. -If your primary system is shutting down too quickly, set the FINALDELAY +If your master system is shutting down too quickly, set the FINALDELAY interval to something greater than the default 15 seconds. Don't set this too high, or your UPS battery may run out of power before the -primary upsmon process shuts down that system. +master upsmon process shuts down that system. TIMED SHUTDOWNS --------------- @@ -365,10 +353,9 @@ MIXED OPERATIONS Besides being able to monitor multiple UPSes, upsmon can also monitor them as different roles. If you have a system with multiple power supplies -serviced by separate UPS batteries, it's possible to be a primary on one -UPS and a secondary on the other. This usually happens when you run -out of serial or USB ports and need to do the monitoring through another -system nearby. +serviced by separate UPS batteries, it's possible to be a master on one +and a slave on the other. This usually happens when you run out of serial +ports and need to do the monitoring through another system nearby. This is also complicated, especially when it comes time to power down a UPS that has gone critical but doesn't supply the local system. You can @@ -379,15 +366,15 @@ FORCED SHUTDOWNS ---------------- When upsmon is forced to bring down the local system, it sets the -"FSD" (forced shutdown) flag on any UPSes that it is running in primary -mode. This is used to synchronize secondary systems in the event that -a primary which is otherwise OK needs to be brought down due to some -pressing event on the UPS manager system. +"FSD" (forced shutdown) flag on any UPSes that it is running in master +mode. This is used to synchronize slaves in the event that a master UPS +that is otherwise OK needs to be brought down due to some pressing event +on the master. -You can manually invoke this mode on the system with primary-mode upsmon -by starting another copy of the program with `-c fsd` command line argument. -This is useful when you want to initiate a shutdown before the critical -stage through some external means, such as linkman:upssched[8]. +You can manually invoke this mode on the master upsmon by starting another +copy with `-c fsd`. This is useful when you want to initiate a shutdown +before the critical stage through some external means, such as +linkman:upssched[8]. DEAD UPSES ---------- @@ -432,13 +419,9 @@ by calling upsmon again to set the flag, i.e.: +upsmon -c fsd+ -After that, the primary and the secondary will do their usual shutdown -sequence as if the battery had gone critical, while you can time how long -it takes for them. This is much easier on your UPS equipment, and it beats -crawling under a desk to find the plug. - -Note you can also use a dummy SHUTDOWNCMD setting to just report that the -systems would shut down at this point, without actually disrupting their work. +After that, the master and the slaves will do their usual shutdown sequence +as if the battery had gone critical. This is much easier on your UPS +equipment, and it beats crawling under a desk to find the plug. FILES ----- @@ -450,21 +433,17 @@ SEE ALSO Server: ~~~~~~~ - linkman:upsd[8] Clients: ~~~~~~~~ - linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8], linkman:upsmon[8] CGI programs: ~~~~~~~~~~~~~ - linkman:upsset.cgi[8], linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsrw.8 b/docs/man/upsrw.8 index 15fdc8d..7c9343b 100644 --- a/docs/man/upsrw.8 +++ b/docs/man/upsrw.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsrw -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/09/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSRW" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSRW" "8" "03/09/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,11 +31,11 @@ upsrw \- UPS variable administration tool .SH "SYNOPSIS" .sp -\fBupsrw\fR [\-l] \fIups\fR +\fBupsrw\fR \fIups\fR .sp \fBupsrw\fR \-h .sp -\fBupsrw\fR \-s \fIvariable\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] [\-w] [\-t ] \fIups\fR +\fBupsrw\fR \-s \fIvariable\fR [\-u \fIusername\fR] [\-p \fIpassword\fR] \fIups\fR .SH "DESCRIPTION" .sp \fBupsrw\fR allows you to view and change the read/write variables inside your UPS\&. It sends commands via the server \fBupsd\fR(8) to your driver, which configures the hardware for you\&. @@ -67,15 +67,6 @@ Without this argument, upsrw will just display the list of the variables and the Some variables are strings, and can be set to any value within the length limit\&. Others are enumerated types and can only be set to one of those values\&. Others may be within an allowed range of values\&. Refer to the list to know what\(cqs available in your hardware\&. .RE .PP -\fB\-l\fR -.RS 4 -Just display the list of the variables and their possible values\&. -.sp -Same as default activity without -\fI\-s\fR -argument, provided for CLI similarity with other tools\&. -.RE -.PP \fB\-u\fR \fIusername\fR .RS 4 Set the NUT username for the connection to the server\&. This is optional, and you will be prompted for this when using the \-s option if you don\(cqt specify \-u on the command line\&. NUT usernames are defined in @@ -87,18 +78,6 @@ Set the NUT username for the connection to the server\&. This is optional, and y Set the password to authenticate to the server\&. This is also optional like \-u, and you will be prompted for it if necessary\&. .RE .PP -\fB\-w\fR -.RS 4 -Wait for the completion of setting execution by the driver and return its actual result from the device\&. Note that this feature requires that both upsd and the driver support TRACKING (NUT version 2\&.8\&.0 or higher) or it will otherwise fail\&. The command will also block until an actual result is provided from the driver, or the timeout is reached (see -\fB\-t\fR)\&. -.RE -.PP -\fB\-t\fR \fIseconds\fR -.RS 4 -Set a timeout when using -\fB\-w\fR\&. Defaults to 10 seconds\&. -.RE -.PP \fIups\fR .RS 4 View or change the settings on this UPS\&. The format for this option is @@ -116,7 +95,7 @@ Moreover, if you run this program inside a shell script or similar, you should o \fBupsrw\fR can\(cqt set variables on your UPS unless you provide a valid username and password\&. If you get "access denied" errors, make sure that your \fBupsd.users\fR(5) has an entry for you, and that the username you are using has permissions to SET variables\&. .SH "VALUE FORMAT" .sp -When using \fBupsrw\fR to modify a numeric float value, that values must be given using decimal (base 10) english\-based representation, so using a dot, in non\-scientific notation\&. So hexadecimal, exponents, and comma for thousands separator are forbidden\&. For example: "1200\&.20" is valid, while "1,200\&.20" and "1200,20" are invalid\&. +When using \fBupsrw\fR to modify a numeric float value, that values must be given using decimal (base 10) english\-based representation, so using a dot, in non\-scientific notation\&. So hexadecimal, exponents, and comma for thousands separator are forbiden\&. For example: "1200\&.20" is valid, while "1,200\&.20" and "1200,20" are invalid\&. .SH "HISTORY" .sp This program used to be called upsct2, which was ambiguous and confusing\&. diff --git a/docs/man/upsrw.txt b/docs/man/upsrw.txt index ebcd205..0e3bfcf 100644 --- a/docs/man/upsrw.txt +++ b/docs/man/upsrw.txt @@ -9,11 +9,11 @@ upsrw - UPS variable administration tool SYNOPSIS -------- -*upsrw* [-l] 'ups' +*upsrw* 'ups' *upsrw* -h -*upsrw* -s 'variable' [-u 'username'] [-p 'password'] [-w] [-t ] 'ups' +*upsrw* -s 'variable' [-u 'username'] [-p 'password'] 'ups' DESCRIPTION ----------- @@ -48,12 +48,6 @@ length limit. Others are enumerated types and can only be set to one of those values. Others may be within an allowed range of values. Refer to the list to know what's available in your hardware. -*-l*:: -Just display the list of the variables and their possible values. -+ -Same as default activity without '-s' argument, provided for CLI similarity -with other tools. - *-u* 'username':: Set the NUT username for the connection to the server. This is optional, and you will be prompted for this when using the -s option if you don't @@ -62,18 +56,7 @@ linkman:upsd.users[5], and are not linked to system usernames. *-p* 'password':: Set the password to authenticate to the server. This is also optional -like -u, and you will be prompted for it if necessary. - -*-w*:: -Wait for the completion of setting execution by the driver and return its -actual result from the device. Note that this feature requires that both upsd -and the driver support TRACKING (NUT version 2.8.0 or higher) or it will -otherwise fail. -The command will also block until an actual result is provided from the driver, -or the timeout is reached (see *-t*). - -*-t* 'seconds':: -Set a timeout when using *-w*. Defaults to 10 seconds. +like -u, and you will be prompted for it if necessary. 'ups':: View or change the settings on this UPS. The format for this option is @@ -107,7 +90,7 @@ VALUE FORMAT When using *upsrw* to modify a numeric float value, that values must be given using decimal (base 10) english-based representation, so using a dot, in non-scientific notation. So hexadecimal, exponents, and comma for thousands -separator are forbidden. +separator are forbiden. For example: "1200.20" is valid, while "1,200.20" and "1200,20" are invalid. HISTORY @@ -118,10 +101,8 @@ confusing. SEE ALSO -------- - linkman:upsd[8], linkman:upscmd[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upssched.8 b/docs/man/upssched.8 index 0adceff..5bc9c56 100644 --- a/docs/man/upssched.8 +++ b/docs/man/upssched.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSCHED" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSCHED" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upssched.conf.5 b/docs/man/upssched.conf.5 index 102902e..7f5363b 100644 --- a/docs/man/upssched.conf.5 +++ b/docs/man/upssched.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upssched.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSCHED\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSCHED\&.CONF" "5" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -116,7 +116,7 @@ as an argument to your CMDSCRIPT\&. .sp Example: .sp -Start a timer that will execute when any UPS (*) has been gone for 10 seconds +Start a timer that\(cqll execute when any UPS (*) has been gone for 10 seconds .sp .if n \{\ .RS 4 diff --git a/docs/man/upssched.conf.txt b/docs/man/upssched.conf.txt index 52a028c..96aea56 100644 --- a/docs/man/upssched.conf.txt +++ b/docs/man/upssched.conf.txt @@ -67,7 +67,7 @@ CMDSCRIPT. + Example: + -Start a timer that will execute when any UPS (*) has been +Start a timer that'll execute when any UPS (*) has been gone for 10 seconds AT COMMBAD * START-TIMER upsgone 10 @@ -107,5 +107,4 @@ linkman:upssched[8], linkman:upsmon[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upssched.txt b/docs/man/upssched.txt index 0fb033b..2e377be 100644 --- a/docs/man/upssched.txt +++ b/docs/man/upssched.txt @@ -8,7 +8,6 @@ upssched - Timer helper for scheduling events from upsmon SYNOPSIS -------- - *upssched* NOTE: *upssched* should be run from linkman:upsmon[8] via the NOTIFYCMD. @@ -67,7 +66,7 @@ If your UPS goes on and off battery frequently, you can use this program to reduce the number of pager messages that are sent out. Rather than sending pages directly from linkman:upsmon[8], use a short timer here. If the timer triggers with the UPS still on battery, then send the page. -If the power returns before then, the timer can be cancelled and no page +If the power returns before then, the timer can be cancelled and no page is necessary. BACKGROUND @@ -93,7 +92,7 @@ no timers are present in the queue, the background process exits. This means that you will only see upssched running when one of two things is happening: - - There's a timer of some sort currently running + - There's a timer of some sort currently running - upsmon just called it, and you managed to catch the brief instance The final optimization handles the possibility of trying to cancel a timer @@ -113,5 +112,4 @@ linkman:upsmon[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.cgi.8 b/docs/man/upsset.cgi.8 index 363ed14..c45c073 100644 --- a/docs/man/upsset.cgi.8 +++ b/docs/man/upsset.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.cgi -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSET\&.CGI" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSET\&.CGI" "8" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.cgi.txt b/docs/man/upsset.cgi.txt index 78912dd..3cb7410 100644 --- a/docs/man/upsset.cgi.txt +++ b/docs/man/upsset.cgi.txt @@ -34,10 +34,10 @@ You should see a list of items with the descriptions on the left side and the possible options or input spaces on the right. After changing something, be sure to "Save changes" to update the values in your UPS. -If your UPS doesn't support any read/write variables, there will be +If your UPS doesn't support any read/write variables, there will be nothing to do on this page. -Setting values in read/write variables can also be done from the command +Setting values in read/write variables can also be done from the command line with linkman:upsrw[8]. INSTANT COMMANDS @@ -94,5 +94,4 @@ SEE ALSO Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsset.conf.5 b/docs/man/upsset.conf.5 index dbf8982..a1abd5f 100644 --- a/docs/man/upsset.conf.5 +++ b/docs/man/upsset.conf.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsset.conf -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSET\&.CONF" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSET\&.CONF" "5" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsset.conf.txt b/docs/man/upsset.conf.txt index 02cd996..e04a927 100644 --- a/docs/man/upsset.conf.txt +++ b/docs/man/upsset.conf.txt @@ -26,8 +26,8 @@ your linkman:upsd.conf[5] file, tcp-wrappers (if available when NUT was built), and hopefully local firewall settings in your OS. *upsset* runs on your web server, so upsd will see it as a connection from -a host on an internal network. It doesn't know that the connection is -actually coming from someone on the outside. This is why you must +a host on an internal network. It doesn't know that the connection is +actually coming from someone on the outside. This is why you must secure it. On Apache, you can use the .htaccess file or put the directives in your @@ -39,10 +39,10 @@ method: allow from your.network.addresses -You will probably have to set "AllowOverride Limit" for this directory +You will probably have to set "AllowOverride Limit" for this directory in your server-level configuration file as well. -If this doesn't make sense, then stop reading and leave this program +If this doesn't make sense, then stop reading and leave this program alone. It's not something you absolutely need to have anyway. Assuming you have all this done, and it actually works (test it!), then @@ -55,10 +55,8 @@ web server, don't blame me. SEE ALSO -------- - linkman:upsset.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.cgi.8 b/docs/man/upsstats.cgi.8 index 762ae85..d627ee8 100644 --- a/docs/man/upsstats.cgi.8 +++ b/docs/man/upsstats.cgi.8 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.cgi -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSTATS\&.CGI" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSTATS\&.CGI" "8" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/docs/man/upsstats.cgi.txt b/docs/man/upsstats.cgi.txt index e79e539..141cfef 100644 --- a/docs/man/upsstats.cgi.txt +++ b/docs/man/upsstats.cgi.txt @@ -59,5 +59,4 @@ linkman:upsimage.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/upsstats.html.5 b/docs/man/upsstats.html.5 index 9ac3fbd..34747ae 100644 --- a/docs/man/upsstats.html.5 +++ b/docs/man/upsstats.html.5 @@ -1,13 +1,13 @@ '\" t .\" Title: upsstats.html -.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 03/02/2016 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "UPSSTATS\&.HTML" "5" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "UPSSTATS\&.HTML" "5" "03/02/2016" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -134,7 +134,7 @@ myups@localhost\&. .PP \fB@HOSTDESC@\fR .RS 4 -Insert the host\(cqs description from +Insert the hout\(cqs description from \fBhosts.conf\fR(5)\&. .RE .PP diff --git a/docs/man/upsstats.html.txt b/docs/man/upsstats.html.txt index ec869f4..d08c5d0 100644 --- a/docs/man/upsstats.html.txt +++ b/docs/man/upsstats.html.txt @@ -101,7 +101,7 @@ the current temperature scale. Insert the designation of the host being monitored, like `myups@localhost`. *@HOSTDESC@*:: -Insert the host's description from linkman:hosts.conf[5]. +Insert the hout's description from linkman:hosts.conf[5]. *@HOSTLINK@*:: Insert a link to upsstats.cgi with the "host" variable set to the @@ -143,7 +143,7 @@ status variables: ups.load;; UPS load - percentage - ups.temperature;; UPS temperature + ups.temperature;; UPS temperature 'extra' is where you can put additional definitions. Right now the valid definitions are colors for various parts of the bars drawn @@ -194,7 +194,7 @@ voltage trim/boost or "off" are yellow, and other events like being on battery or having a low battery are red. *@VAR* 'varname'*@*:: -Insert the current value of the status variable varname on the host being +Insert the current value of the status variable varname on the host being monitored, or "Not supported". *@RUNTIME@*:: @@ -232,5 +232,4 @@ linkman:upsstats.cgi[8], linkman:upsimage.cgi[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/usbhid-ups.8 b/docs/man/usbhid-ups.8 index 5efcc29..e74427a 100644 --- a/docs/man/usbhid-ups.8 +++ b/docs/man/usbhid-ups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: usbhid-ups .\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "USBHID\-UPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "USBHID\-UPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,9 +32,11 @@ usbhid-ups \- Driver for USB/HID UPS equipment .SH "NOTE" .sp This man page only documents the hardware\-specific features of the usbhid\-ups driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&. +.sp +This driver, formerly called \fInewhidups\fR, replaces the legacy \fIhidups\fR driver, which only supported Linux systems\&. .SH "SUPPORTED HARDWARE" .sp -\fBusbhid\-ups\fR brings USB/HID UPS monitoring to NUT on all platforms supporting USB through libusb\&. It should detect any UPS that uses the HID Power Device Class, but the amount of data will vary depending on the manufacturer and model\&. +\fBusbhid\-ups\fR brings USB/HID UPS monitoring to NUT on all platform supporting USB through libusb\&. It should detect any UPS that uses the HID power device class, but the amount of data will vary depending on the manufacturer and model\&. .sp At the present time, usbhid\-ups supports: .sp @@ -79,17 +81,6 @@ all Dell USB models, .sp -1 .IP \(bu 2.3 .\} -all AMETEK Powervar UPM models, -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} some APC models, .RE .sp @@ -134,21 +125,10 @@ some Powercom models, .sp -1 .IP \(bu 2.3 .\} -some PowerWalker models, -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} some TrippLite models\&. .RE .sp -For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/driver\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. +For a more complete list, refer to the NUT hardware compatibility list, available in the source distribution as data/drivers\&.list, or on the NUT website\&. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details\&. .sp This driver is known to work on: .sp @@ -211,50 +191,36 @@ than \fIondelay\fR, but the driver will \fBnot\fR warn you upon startup if it isn\(cqt\&. -.sp -Note that many Cyber Power Systems (CPS) models tend to divide this delay by 60 and round down, so the minimum advisable value is 60 to avoid powering off immediately after NUT sends the shutdown command to the UPS\&. .RE .PP \fBondelay\fR=\fInum\fR .RS 4 -Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent, but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. +Set the timer for the UPS to switch on in case the power returns after the kill power command had been sent but before the actual switch off\&. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure\&. .sp The default value is 30 (in seconds)\&. Usually this \fBmust be greater\fR than offdelay, but the driver will \fBnot\fR -warn you upon startup if it isn\(cqt\&. Some UPSes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could see whether setting -ondelay = \-1 +warn you upon startup if it isn\(cqt\&. Some UPS\(cqes will restart no matter what, even if the power is (still) out at the moment this timer elapses\&. In that case, you could try if setting +\fIondelay = \-1\fR in \fBups\&.conf\fR helps\&. -.sp -Note that many CPS models tend to divide this delay by 60 and round down, so the minimum advisable value is 120 to allow a short delay between when the UPS shuts down, and when the power returns\&. .RE .PP \fBpollfreq\fR=\fInum\fR .RS 4 -Set polling frequency for full updates, in seconds\&. Compared to the quick updates performed every "pollinterval" (the latter option is described in -\fBups.conf\fR(5)), the "pollfreq" interval is for polling the less\-critical variables\&. The default value is 30 (in seconds)\&. +Set polling frequency, in seconds, to reduce the USB data flow\&. Between two polling requests, the driver will wait for interrupts (aka UPS notifications), which are data changes returned by the UPS by itself\&. This mechanism allow to avoid or reduce staleness message, due to the UPS being temporarily overloaded with too much polling requests\&. The default value is 30 (in seconds)\&. .RE .PP \fBpollonly\fR .RS 4 -If this flag is set, the driver will not use Interrupt In transfers during the shorter "pollinterval" cycles (not recommended, but needed if these reports are broken on your UPS)\&. -.RE -.PP -\fBonlinedischarge\fR -.RS 4 -If this flag is set, the driver will treat -OL+DISCHRG -status as offline\&. For most devices this combination means calibration or similar maintenance; however some UPS models (e\&.g\&. CyberPower UT series) emit -OL+DISCHRG -when wall power is lost \(em and need this option to handle shutdowns\&. +If this flag is set, the driver will ignore interrupts it receives from the UPS (not recommended, but needed if these reports are broken on your UPS)\&. .RE .PP \fBvendor\fR=\fIregex\fR, \fBproduct\fR=\fIregex\fR, \fBserial\fR=\fIregex\fR, \fBvendorid\fR=\fIregex\fR, \fBproductid\fR=\fIregex\fR .RS 4 -Select a specific UPS, in case there is more than one connected via USB\&. Each option specifies an extended regular expression (see regex(7)) that must match the UPS\(cqs entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4\-digit hexadecimal code for vendorid and productid\&. Try +Select a specific UPS, in case there is more than one connected via USB Each option specifies an extended regular expression (see regex(7)) that must match the UPS\(cqs entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4\-digit hexadecimal code for vendorid and productid\&. Try \fB\-DD\fR for finding out the strings to match\&. .sp @@ -297,12 +263,7 @@ Examples: .PP \fBbus\fR=\fIregex\fR .RS 4 -Select a UPS on a specific USB bus or group of buses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. -.RE -.PP -\fBdevice =\fR \fIregex\fR -.RS 4 -Select a UPS on a specific USB device or group of devices\&. The argument is a regular expression that must match the device name where the UPS is connected (e\&.g\&. device="001", device="00[1\-2]")\&. Note that device numbers are not guaranteed by the OS to be stable across re\-boots or device re\-plugging\&. +Select a UPS on a specific USB bus or group of busses\&. The argument is a regular expression that must match the bus name where the UPS is connected (e\&.g\&. bus="002", bus="00[2\-3]")\&. .RE .PP \fBexplore\fR @@ -329,8 +290,9 @@ Limit the number of bytes to read from interrupt pipe\&. For some Powercom units This driver is not built by default\&. You can build it by using "configure \-\-with\-usb=yes"\&. Note that it will also install other USB drivers\&. .sp You also need to install manually the legacy hotplug files (libhidups and libhid\&.usermap, generally in /etc/hotplug/usb/), or the udev file (nut\-usbups\&.rules, generally in /etc/udev/rules\&.d/) to address the permission settings problem\&. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev\&. +.sp +On Linux with MGE equipment, you will need at least a 2\&.4\&.25 or 2\&.6\&.2 kernel as well as libusb\-0\&.1\&.8 or later to disable hiddev support and avoid conflict\&. .SH "IMPLEMENTATION" -.SS "Selecting a specific UPS" .sp The driver ignores the "port" value in \fBups\&.conf\fR\&. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished by setting some combination of the "vendor", "product", "serial", "vendorid", and "productid" options\&. For instance: .sp @@ -350,11 +312,6 @@ The driver ignores the "port" value in \fBups\&.conf\fR\&. Unlike previous versi .if n \{\ .RE .\} -.SS "USB Polling and Interrupt Transfers" -.sp -The \fBusbhid\-ups\fR driver has two polling intervals\&. The "pollinterval" configuration option controls what can be considered the "inner loop", where the driver polls and waits briefly for "interrupt" reports\&. The "pollfreq" option is for less frequent updates of a larger set of values, and as such, we recommend setting that interval to several times the value of "pollinterval"\&. -.sp -Many UPSes will respond to a USB Interrupt In transfer with HID reports corresponding to values which have changed\&. This saves the driver from having to poll each value individually with USB Control transfers\&. Since the OB and LB status flags are important for a clean shutdown, the driver also explicitly polls the HID paths corresponding to those status bits during the inner "pollinterval" time period\&. The "pollonly" option can be used to skip the Interrupt In transfers if they are known not to work\&. .SH "KNOWN ISSUES AND BUGS" .SS "Repetitive timeout and staleness" .sp @@ -372,9 +329,7 @@ ret \-110 .RE .\} .sp -In this case, simply modify the general parameter "pollinterval" to a higher value (such as 10 seconds)\&. This should solve the issue\&. -.sp -Note that if you increase "pollinterval" beyond 10 or 15 seconds, you might also want to increase "pollfreq" by the same factor\&. +In this case, simply modify the general parameter "pollinterval" to a higher value (like 10 for 10 seconds)\&. This should solve the issue\&. .SS "Got EPERM: Operation not permitted upon driver startup" .sp You have forgotten to install the hotplug files, as explained in the INSTALLATION section above\&. Don\(cqt forget to restart hotplug so that it applies these changes\&. @@ -383,70 +338,9 @@ You have forgotten to install the hotplug files, as explained in the INSTALLATIO The hardware which was used for development of this driver is almost certainly different from what you have, and not all manufacturers follow the USB HID Power Device Class specifications to the letter\&. You don\(cqt want to find out that yours has issues here when a power failure hits your server room and you\(cqre not around to manually restart your servers\&. .sp If you rely on the UPS to shutdown your systems in case of mains failure and to restart them when the power returns, you \fBmust\fR test this\&. You can do so by running \fIupsmon \-c fsd\fR\&. With the mains present, this should bring your systems down and then cycle the power to restart them again\&. If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again\&. -.SS "UPS cuts power too soon" -.sp -Note that many Cyber Power Systems (CPS) models tend to divide offdelay by 60 and round down, so the minimum advisable value is 60 (seconds) to avoid powering off immediately after NUT sends the shutdown command to the UPS\&. -.SS "UPS does not set battery\&.charge\&.low but says OK" -.sp -Note that many Cyber Power Systems (CPS) models tend to allow only certain values for battery\&.charge\&.low and anything outside of the set of allowed values are rounded or ignored\&. -.sp -A shell loop like this can help you map out the allowed values: -.sp -.if n \{\ -.RS 4 -.\} -.nf -for i in `seq 90 \-1 0`; do echo "set to $i"; \e - upsrw \-s battery\&.charge\&.low=$i \-u * \-p * cps\-big; \e - sleep 1; upsc cps\-big battery\&.charge\&.low; echo ""; \e -done -.fi -.if n \{\ -.RE -.\} -.sp -For example, for CPS PR1000LCDRTXL2U model, the only allowed values are [60,55,50,45,40,35,30,25,20] and in some cases, your UPS may effectively not support a value of 10 for the battery\&.charge\&.low setting\&. -.SH "HISTORY" -.sp -This driver, formerly called \fInewhidups\fR, replaces the legacy \fIhidups\fR driver, which only supported Linux systems\&. .SH "AUTHORS" .sp -Originally sponsored by MGE UPS SYSTEMS\&. -.sp -Now sponsored by Eaton http://opensource\&.eaton\&.com -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arnaud Quette -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Peter Selinger -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Arjen de Korte -.RE +Originally sponsored by MGE UPS SYSTEMS\&. Now sponsored by Eaton http://opensource\&.eaton\&.com Arnaud Quette, Peter Selinger, Arjen de Korte .SH "SEE ALSO" .SS "The core driver" .sp diff --git a/docs/man/usbhid-ups.txt b/docs/man/usbhid-ups.txt index bd5f7d1..a125837 100644 --- a/docs/man/usbhid-ups.txt +++ b/docs/man/usbhid-ups.txt @@ -1,4 +1,4 @@ -USBHID-UPS(8) +USBHID-UPS(8) ============= NAME @@ -13,12 +13,15 @@ This man page only documents the hardware-specific features of the usbhid-ups driver. For information about the core driver, see linkman:nutupsdrv[8]. +This driver, formerly called 'newhidups', replaces the legacy 'hidups' driver, +which only supported Linux systems. + SUPPORTED HARDWARE ------------------ -*usbhid-ups* brings USB/HID UPS monitoring to NUT on all platforms supporting -USB through libusb. It should detect any UPS that uses the HID Power Device -Class, but the amount of data will vary depending on the manufacturer and +*usbhid-ups* brings USB/HID UPS monitoring to NUT on all platform supporting +USB through libusb. It should detect any UPS that uses the HID power device +class, but the amount of data will vary depending on the manufacturer and model. At the present time, usbhid-ups supports: @@ -26,16 +29,14 @@ At the present time, usbhid-ups supports: - the newer Eaton USB models, - all MGE USB models, - all Dell USB models, - - all AMETEK Powervar UPM models, - some APC models, - some Belkin models, - some Cyber Power Systems models, - some Powercom models, - - some PowerWalker models, - some TrippLite models. For a more complete list, refer to the NUT hardware compatibility list, -available in the source distribution as data/driver.list, or on the +available in the source distribution as data/drivers.list, or on the NUT website. You may use the "explore" driver option to gather information from HID UPSes which are not yet supported; see below for details. @@ -58,43 +59,30 @@ sent (via the *-k* switch). + The default value is 20 (in seconds). Usually this *must be lower* than 'ondelay', but the driver will *not* warn you upon startup if it isn't. -+ -Note that many Cyber Power Systems (CPS) models tend to divide this delay by -60 and round down, so the minimum advisable value is 60 to avoid powering off -immediately after NUT sends the shutdown command to the UPS. - + *ondelay*='num':: Set the timer for the UPS to switch on in case the power returns after the -kill power command had been sent, but before the actual switch off. This +kill power command had been sent but before the actual switch off. This ensures the machines connected to the UPS are, in all cases, rebooted after a power failure. + The default value is 30 (in seconds). Usually this *must be greater* than offdelay, but the driver will *not* warn you upon startup if it -isn't. Some UPSes will restart no matter what, even if the power is -(still) out at the moment this timer elapses. In that case, you could see -whether setting `ondelay = -1` in *ups.conf* helps. -+ -Note that many CPS models tend to divide this delay by 60 and round down, so -the minimum advisable value is 120 to allow a short delay between when the UPS -shuts down, and when the power returns. +isn't. Some UPS'es will restart no matter what, even if the power is +(still) out at the moment this timer elapses. In that case, you could try +if setting 'ondelay = -1' in *ups.conf* helps. *pollfreq*='num':: -Set polling frequency for full updates, in seconds. Compared to the quick -updates performed every "pollinterval" (the latter option is described in -linkman:ups.conf[5]), the "pollfreq" interval is for polling the less-critical -variables. The default value is 30 (in seconds). +Set polling frequency, in seconds, to reduce the USB data flow. +Between two polling requests, the driver will wait for interrupts (aka UPS +notifications), which are data changes returned by the UPS by itself. +This mechanism allow to avoid or reduce staleness message, due to the UPS +being temporarily overloaded with too much polling requests. +The default value is 30 (in seconds). *pollonly*:: -If this flag is set, the driver will not use Interrupt In transfers during the -shorter "pollinterval" cycles (not recommended, but needed if these reports -are broken on your UPS). - -*onlinedischarge*:: -If this flag is set, the driver will treat `OL+DISCHRG` status as offline. -For most devices this combination means calibration or similar maintenance; -however some UPS models (e.g. CyberPower UT series) emit `OL+DISCHRG` when -wall power is lost -- and need this option to handle shutdowns. +If this flag is set, the driver will ignore interrupts it receives from the +UPS (not recommended, but needed if these reports are broken on your UPS). *vendor*='regex':: *product*='regex':: @@ -103,13 +91,13 @@ wall power is lost -- and need this option to handle shutdowns. *productid*='regex':: Select a specific UPS, in case there is more than one connected via -USB. Each option specifies an extended regular expression (see +USB Each option specifies an extended regular expression (see regex(7)) that must match the UPS's entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4-digit hexadecimal code for vendorid and productid. Try *-DD* for finding out the strings to match. + -Examples: +Examples: - `-x vendor="Foo.Corporation.*"` - `-x vendorid=051d*` (APC) @@ -117,17 +105,9 @@ Examples: *bus*='regex':: -Select a UPS on a specific USB bus or group of buses. The argument is +Select a UPS on a specific USB bus or group of busses. The argument is a regular expression that must match the bus name where the UPS is -connected (e.g. bus="002", bus="00[2-3]"). - -*device =* 'regex':: - -Select a UPS on a specific USB device or group of devices. The argument is -a regular expression that must match the device name where the UPS is -connected (e.g. device="001", device="00[1-2]"). -Note that device numbers are not guaranteed by the OS to be stable across -re-boots or device re-plugging. +connected (e.g. bus="002", bus="00[2-3]"). *explore*:: With this option, the driver will connect to any device, including @@ -162,12 +142,11 @@ and libhid.usermap, generally in /etc/hotplug/usb/), or the udev file permission settings problem. For more information, refer to the README file in nut/scripts/hotplug or nut/scripts/udev. +On Linux with MGE equipment, you will need at least a 2.4.25 or 2.6.2 kernel as +well as libusb-0.1.8 or later to disable hiddev support and avoid conflict. + IMPLEMENTATION -------------- - -Selecting a specific UPS -~~~~~~~~~~~~~~~~~~~~~~~~ - The driver ignores the "port" value in *ups.conf*. Unlike previous versions of this driver, it is now possible to control multiple UPS units simultaneously with this driver, provided they can be distinguished @@ -183,23 +162,6 @@ by setting some combination of the "vendor", "product", "serial", port = auto vendorid = 09ae -USB Polling and Interrupt Transfers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The *usbhid-ups* driver has two polling intervals. The "pollinterval" -configuration option controls what can be considered the "inner loop", where -the driver polls and waits briefly for "interrupt" reports. The "pollfreq" -option is for less frequent updates of a larger set of values, and as such, we -recommend setting that interval to several times the value of "pollinterval". - -Many UPSes will respond to a USB Interrupt In transfer with HID reports -corresponding to values which have changed. This saves the driver from having -to poll each value individually with USB Control transfers. Since the `OB` and -`LB` status flags are important for a clean shutdown, the driver also -explicitly polls the HID paths corresponding to those status bits during the -inner "pollinterval" time period. The "pollonly" option can be used to skip -the Interrupt In transfers if they are known not to work. - KNOWN ISSUES AND BUGS --------------------- @@ -214,10 +176,7 @@ The result is that your system log will have lots of messages like: ret -110 In this case, simply modify the general parameter "pollinterval" to a higher -value (such as 10 seconds). This should solve the issue. - -Note that if you increase "pollinterval" beyond 10 or 15 seconds, you might -also want to increase "pollfreq" by the same factor. +value (like 10 for 10 seconds). This should solve the issue. Got EPERM: Operation not permitted upon driver startup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -243,59 +202,20 @@ If you do the same without mains present, it should do the same, but in this case, the outputs shall remain off until mains power is applied again. -UPS cuts power too soon -~~~~~~~~~~~~~~~~~~~~~~~ - -Note that many Cyber Power Systems (CPS) models tend to divide `offdelay` -by 60 and round down, so the minimum advisable value is 60 (seconds) to avoid -powering off immediately after NUT sends the shutdown command to the UPS. - -UPS does not set battery.charge.low but says OK -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Note that many Cyber Power Systems (CPS) models tend to allow only certain -values for `battery.charge.low` and anything outside of the set of allowed -values are rounded or ignored. - -A shell loop like this can help you map out the allowed values: - -==== - for i in `seq 90 -1 0`; do echo "set to $i"; \ - upsrw -s battery.charge.low=$i -u * -p * cps-big; \ - sleep 1; upsc cps-big battery.charge.low; echo ""; \ - done -==== - -For example, for CPS PR1000LCDRTXL2U model, the only allowed values are -`[60,55,50,45,40,35,30,25,20]` and in some cases, your UPS may effectively -not support a value of 10 for the `battery.charge.low` setting. - -HISTORY -------- - -This driver, formerly called 'newhidups', replaces the legacy 'hidups' driver, -which only supported Linux systems. - AUTHORS ------- Originally sponsored by MGE UPS SYSTEMS. - Now sponsored by Eaton - -* Arnaud Quette -* Peter Selinger -* Arjen de Korte +Arnaud Quette, Peter Selinger, Arjen de Korte SEE ALSO -------- The core driver ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources ~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/man/victronups.8 b/docs/man/victronups.8 index 1be425a..5275d9c 100644 --- a/docs/man/victronups.8 +++ b/docs/man/victronups.8 @@ -1,13 +1,13 @@ '\" t .\" Title: victronups -.\" Author: [see the "AUTHORS" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 04/26/2022 +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 12/29/2015 .\" Manual: NUT Manual -.\" Source: Network UPS Tools 2.8.0 +.\" Source: Network UPS Tools 2.7.3.1 .\" Language: English .\" -.TH "VICTRONUPS" "8" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual" +.TH "VICTRONUPS" "8" "12/29/2015" "Network UPS Tools 2\&.7\&.3\&." "NUT Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,27 +41,7 @@ The Match Lite line may only report a handful of variables\&. This is usually no .sp If your Victron cable is broken or missing, use this diagram to build a clone: .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -https://github\&.com/networkupstools/nut/blob/master/docs/cables/ge\-imv\-victron\&.txt -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -docs/cables/ge\-imv\-victron\&.txt -.RE +docs/cables/victron\&.txt .SH "EXTRA ARGUMENTS" .sp This driver supports the following optional setting in the \fBups.conf\fR(5): @@ -78,29 +58,9 @@ Set delay before shutdown on UPS .SH "BUGS" .sp The protocol for this UPS is not officially documented\&. -.SH "AUTHORS" +.SH "AUTHOR" .sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Radek Benedikt -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} -Daniel Prynych -.RE +Radek Benedikt , Daniel Prynych .SH "SEE ALSO" .SS "The core driver:" .sp diff --git a/docs/man/victronups.txt b/docs/man/victronups.txt index 17be94d..7c8e98a 100644 --- a/docs/man/victronups.txt +++ b/docs/man/victronups.txt @@ -1,21 +1,18 @@ VICTRONUPS(8) ============= -NAME +NAME ---- - victronups - Driver for IMV/Victron UPS unit Match, Match Lite, NetUps NOTE ---- - This man page only documents the hardware-specific features of the the -victronups driver. For information about the core driver, see +victronups driver. For information about the core driver, see linkman:nutupsdrv[8]. SUPPORTED HARDWARE ------------------ - The victronups driver should recognize all Victron models that use a serial protocol at 1200 bps. These include Match Lite, Match and the NetUps line. @@ -28,12 +25,10 @@ CABLING If your Victron cable is broken or missing, use this diagram to build a clone: -* https://github.com/networkupstools/nut/blob/master/docs/cables/ge-imv-victron.txt -* link:docs/cables/ge-imv-victron.txt[] +docs/cables/victron.txt EXTRA ARGUMENTS --------------- - This driver supports the following optional setting in the linkman:ups.conf[5]: @@ -46,24 +41,20 @@ Set delay before shutdown on UPS BUGS ---- - The protocol for this UPS is not officially documented. -AUTHORS -------- - -* Radek Benedikt -* Daniel Prynych +AUTHOR +------ +Radek Benedikt , +Daniel Prynych SEE ALSO -------- The core driver: ~~~~~~~~~~~~~~~~ - linkman:nutupsdrv[8] Internet resources: ~~~~~~~~~~~~~~~~~~~ - The NUT (Network UPS Tools) home page: http://www.networkupstools.org/ diff --git a/docs/net-protocol.txt b/docs/net-protocol.txt index 0af9433..17ecf09 100644 --- a/docs/net-protocol.txt +++ b/docs/net-protocol.txt @@ -25,7 +25,7 @@ an older version of the software. Command reference ----------------- -Multi-word elements are contained within "quotes" for easier parsing. +Multi-word elements are contained within "quotes" for easier parsing. Embedded quotes are escaped with backslashes. Embedded backslashes are also escaped by representing them as \\. This protocol is intended to be interpreted with parseconf (NUT parser) or something similar. @@ -44,16 +44,10 @@ NUT network protocol, over the time: |1.1 |>= 1.5.0 |Original protocol (without old commands) .2+|1.2 .2+|>= 2.6.4 |Add "LIST CLIENTS" and "NETVER" commands |Add ranges of values for writable variables -.4+|1.3 .4+|>= 2.8.0 |Add "cmdparam" to "INSTCMD" - |Add "TRACKING" commands (GET, SET) - |Add "PRIMARY" as alias to older "MASTER" - (implementation tested to be backwards - compatible in `upsd` and `upsmon`) - |Add "PROTVER" as alias to older "NETVER" |=============================================================================== -NOTE: Any new version of the protocol implies an update of `NUT_NETVERSION` -in 'configure.ac' file. +NOTE: any new version of the protocol implies an update of NUT_NETVERSION +in *configure.in*. GET @@ -78,7 +72,7 @@ Response: NUMLOGINS su700 1 '' is the number of clients which have done LOGIN for this UPS. -This is used by the upsmon in primary mode to determine how many clients are +This is used by the master upsmon to determine how many clients are still connected when starting the shutdown process. This replaces the old "REQ NUMLOGINS" command. @@ -138,14 +132,12 @@ Response: - 'RW': this variable may be set to another value with SET - 'ENUM': an enumerated type, which supports a few specific values - 'STRING:n': this is a string of maximum length n -- 'RANGE': this is an numeric, either integer or float, comprised in the -range (see LIST RANGE) +- 'RANGE': this is an numeric, either integer or float, comprised in the range (see LIST RANGE) - 'NUMBER': this is a simple numeric value, either integer or float ENUM, STRING and RANGE are usually associated with RW, but not always. -The default , when omitted, is numeric, so either integer or float. -Each driver is then responsible for handling values as either integer or -float. +The default , when omitted, is numeric, so either integer or float. Each +driver is then responsible for handling values as either integer or float. Note that float values are expressed using decimal (base 10) english-based representation, so using a dot, in non-scientific notation. So hexadecimal, @@ -197,26 +189,6 @@ This is like DESC above, but it applies to the instant commands. This replaces the old "INSTCMDDESC" command. -TRACKING -~~~~~~~~ - -Form: - - GET TRACKING (activation status of TRACKING) - GET TRACKING (execution status of a command / setvar) - GET TRACKING 1bd31808-cb49-4aec-9d75-d056e6f018d2 - -Response: - - ON (TRACKING feature is enabled) - OFF (TRACKING feature is disabled) - PENDING (command execution is pending) - SUCCESS (command was successfully executed) - ERR UNKNOWN (command execution failed with unknown error) - ERR INVALID-ARGUMENT (command execution failed due to missing or invalid argument) - ERR FAILED (command execution failed) - - LIST ---- @@ -405,54 +377,19 @@ Response: SET --- -VAR -~~~ - Form: SET VAR "" SET VAR su700 ups.id "My UPS" -Response: - - OK (if TRACKING is not enabled) - OK TRACKING (if TRACKING is enabled) - ERR [...] (see Error responses) - - -TRACKING -~~~~~~~~ - -Form: - - SET TRACKING - SET TRACKING ON - SET TRACKING OFF - -Response: - - OK - ERR INVALID-ARGUMENT (if is not "ON" or "OFF") - ERR USERNAME-REQUIRED (if not yet authenticated) - ERR PASSWORD-REQUIRED (if not yet authenticated) - INSTCMD ------- Form: - INSTCMD [] + INSTCMD INSTCMD su700 test.panel.start - INSTCMD su700 load.off.delay 120 - -NOTE: is an additional and optional parameter for the command. - -Response: - - OK (if TRACKING is not enabled) - OK TRACKING (if TRACKING is enabled) - ERR [...] (see Error responses) LOGOUT @@ -483,21 +420,18 @@ Response: or <> -NOTE: This requires "upsmon secondary" or "upsmon primary" in upsd.users +NOTE: This requires "upsmon slave" or "upsmon master" in upsd.users Use this to log the fact that a system is drawing power from this UPS. -The upsmon primary will wait until the count of attached systems reaches -1 -- itself. This allows the secondaries to shut down first. +The upsmon master will wait until the count of attached systems reaches +1 - itself. This allows the slaves to shut down first. NOTE: You probably shouldn't send this command unless you are upsmon, or a upsmon replacement. -PRIMARY (since NUT 2.8.0) or MASTER (deprecated) ------------------------------------------------- - -NOTE: This command was renamed in NUT 2.8.0 to "PRIMARY" with the older -name "MASTER" kept as deprecated alias for compatibility. +MASTER +------ Form: @@ -505,25 +439,14 @@ Form: Response: - OK MASTER-GRANTED (upon success) - -Form: - - PRIMARY - -Response: - - OK PRIMARY-GRANTED (upon success) + OK (upon success) or <> -NOTE: This requires "upsmon primary" in upsd.users - -NOTE: Previously documented response was just `OK` -- clients checking -that server reply *starts with* that keyword would handle all cases. +NOTE: This requires "upsmon master" in upsd.users This function doesn't do much by itself. It is used by upsmon to make -sure that primary-mode functions like FSD are available if necessary. +sure that master-level functions like FSD are available if necessary. FSD @@ -539,36 +462,22 @@ Response: or <> -NOTE: This requires "upsmon primary" in upsd.users, or "FSD" action +NOTE: This requires "upsmon master" in upsd.users, or "FSD" action granted in upsd.users -upsmon in primary mode is the primary user of this function. It sets this +upsmon in master mode is the primary user of this function. It sets this "forced shutdown" flag on any UPS when it plans to power it off. This is -done so that secondary systems will know about it and shut down before the +done so that slave systems will know about it and shut down before the power disappears. Setting this flag makes "FSD" appear in a STATUS request for this UPS. Finding "FSD" in a status request should be treated just like a "OB LB". -It should be noted that FSD is currently a latch -- once set, there is +It should be noted that FSD is currently a latch - once set, there is no way to clear it short of restarting upsd or dropping then re-adding it in the ups.conf. This may cause issues when upsd is running on a system that is not shut down due to the UPS event. -Note also that certain drivers can propagate the "FSD" state declared by -the smarter UPSes themselves, e.g. when an UPS is charging after an outage -and its battery level is below the "safe for load" threshold configured on -the device itself. In this case the device usually does not power up its -outlets automatically, but it can be forced by the systems administrator. -The rationale behind such FSD during charging allows enough power to be -guaranteed for systems to both boot and shut down safely, if the wall -power disappears again, trading off prolonged unavailability of the shut -down servers for the safety of their data. In such cases, administrators -should be ready to disarm their upsmon clients until the batteries are -charged, to avoid quick shutdowns of quickly restored servers -- but only -if they are sure about the wall power being restored for good (e.g. outage -was due to maintenance). - PASSWORD -------- @@ -628,7 +537,6 @@ Other commands - HELP: lists the commands supported by this server - VER: shows the version of the server currently in use - NETVER: shows the version of the network protocol currently in use - (aliased as PROTVER since NUT v2.8.0, or formal protocol version 1.3) These three are not intended to be used directly by programs. Humans can make use of this program by using telnet or netcat. If you use @@ -679,13 +587,13 @@ sending a valid command like GET with an invalid subcommand. - 'INSTCMD-FAILED' + -upsd failed to deliver the instant command request to the driver. +upsd failed to deliver the instant command request to the driver. No further information is available to the client. This typically indicates a dead or broken driver. - 'SET-FAILED' + -upsd failed to deliver the set request to the driver. This is +upsd failed to deliver the set request to the driver. This is just like INSTCMD-FAILED above. - 'READONLY' @@ -714,7 +622,7 @@ start it again. - 'DRIVER-NOT-CONNECTED' + upsd can't perform the requested command, since the driver for that -UPS is not connected. This usually means that the driver is not +UPS is not connected. This usually means that the driver is not running, or if it is, the ups.conf is misconfigured. - 'DATA-STALE' @@ -735,7 +643,7 @@ There is presently a limit of one LOGIN record per connection. - 'INVALID-PASSWORD' + -The client sent an invalid PASSWORD -- perhaps an empty one. +The client sent an invalid PASSWORD - perhaps an empty one. - 'ALREADY-SET-PASSWORD' + @@ -771,7 +679,7 @@ receiving this response. - 'INVALID-VALUE' + -The value specified in the request is not valid. This usually +The value specified in the request is not valid. This usually applies to a SET of an ENUM type which is using a value which is not in the list of allowed values. @@ -788,6 +696,13 @@ For example, "LIST VARS +DESC" would return the current value like now, but it would also append the description of that variable. +Command status +~~~~~~~~~~~~~~ + +After sending an INSTCMD or SET, a client will eventually be able to +poll to see whether it was completed successfully by the driver. + + Get collection ~~~~~~~~~~~~~~ diff --git a/docs/new-clients.txt b/docs/new-clients.txt index 1b07900..7b41364 100644 --- a/docs/new-clients.txt +++ b/docs/new-clients.txt @@ -51,86 +51,28 @@ and commands with an object-oriented API in C++ and C. For more information, refer to the linkman:libnutclient[3] manual page. ------- #include - #include - #include - #include - using namespace nut; using namespace std; - - /* argv[1] is the mandatory NUT device name (@localhost), - * used to list variables from - * argv[2] is an optional command. When provided, it will be - * executed and possibly with status tracking enabled - */ - int main(int argc, char **argv) + + int main(int argc, char** argv) { - Client *client; try { // Connection - client = new TcpClient("localhost", 3493); - - if (argc >= 2) - { - // Reading data from device - Device mydev = client->getDevice(argv[1]); - cout << "Description: " << mydev.getDescription() << endl; - Variable var = mydev.getVariable("device.model"); - cout << "Model: " << var.getValue()[0] << endl; - - if (argc >= 3) - { - // Authenticate to NUT server - const char *user = getenv("NUT_USER"); - const char *password = getenv("NUT_PASSWD"); - client->authenticate(user ? user : "", password ? password : ""); - - // Enable command tracking, if available - if (client->hasFeature(Client::TRACKING)) - { - cout << "Server can do command tracking" << std::endl; - client->setFeature(Client::TRACKING, true); - } - else - { - std::cout << "Server can't do command tracking" << std::endl; - } - - // Perform an asynchronous command - TrackingID id = mydev.executeCommand(argv[2]); - TrackingResult result; - do - { - sleep(1); - result = client->getTrackingResult(id); - } - while (result == PENDING); - - // Display result of command - const char *output = ""; - switch (result) - { - case SUCCESS: output = "SUCCESS"; break; - case FAILURE: output = "FAILURE"; break; - case UNKNOWN: output = "UNKNOWN"; break; - } - cout << "Command sent, result=" << output << endl; - } - } + Client* client = new TcpClient("localhost", 3493); + Device mydev = client->getDevice("myups"); + cout << mydev.getDescription() << endl; + Variable var = mydev.getVariable("device.model"); + cout << var.getValue()[0] << endl; } - catch (NutException &ex) + catch(NutException& ex) { cerr << "Unexpected problem : " << ex.str() << endl; } - delete client; return 0; } ------- - Configuration helpers ~~~~~~~~~~~~~~~~~~~~~ @@ -146,8 +88,7 @@ Python The PyNUT module, contributed by David Goncalves, can be used for connecting a Python script to `upsd`. Note that this code (and the accompanying NUT-Monitor -application, later separated into NUT-Monitor-py2gtk2 and NUT-Monitor-py3qt5, -suitable for two generations of Python ecosystem) is licensed under the GPL v3. +application) is licensed under the GPL v3. The `PyNUTClient` class abstracts the connection to the server. In order to list the status variables for `ups1` on the local `upsd`, the following @@ -184,7 +125,6 @@ of the results. The Perl class instance encapsulates a single UPS, where the Python class instance represents a connection to the server (which may service multiple UPS units). ------- use UPS::Nut; $ups = new UPS::Nut( NAME => "myups", @@ -207,10 +147,10 @@ multiple UPS units). ; print $other_ups{MFR}, " ", $other_ups{MODEL}, "\n"; ------- Java ---- The NUT Java support has been externalized. It is available at https://github.com/networkupstools/jnut + diff --git a/docs/new-drivers.txt b/docs/new-drivers.txt index 7e17372..3949a0b 100644 --- a/docs/new-drivers.txt +++ b/docs/new-drivers.txt @@ -4,55 +4,38 @@ Creating a new driver to support another device This chapter will present the process of creating a new driver to support another device. -Since NUT already supports many major power device protocols through +Since NUT already supports many major power devices protocols through several generic drivers (genericups, usbhid-ups, snmp-ups, blazer_* and nutdrv_qx), creation of new drivers has become rare. -So most of the time, this process will be limited to completing one of these +So most of the time, it will be limited to completing one of these generic drivers. Smart vs. Contact-closure ------------------------- -If your UPS only does contact closure readings over an RS-232 serial port, then -go straight to the <> chapter for -information on adding support. It's a lot easier to add a few lines to a -header file than it is to create a whole new driver. +If your UPS only does contact closure readings, then go straight to the +<> chapter for information on +adding support. It's a lot easier to add a few lines to a header file +than it is to create a whole new driver. Serial vs. USB vs. SNMP and more -------------------------------- -If your UPS connects to your computer via a USB port, then it most likely -appears as a USB HID device (this is the simplest way for the vendor to write -a Windows control program for it). What comes next depends on whether the -vendor implemented the HID PDC (Power Device Class) specification, or simply -used the HID protocol to transport serial data to the UPS microcontroller. - -A rough heuristic is to check the length of the HID Descriptor length -(`wDescriptorLength` in `lsusb -v` output). If it is less than 200 bytes long, -the UPS probably has a glorified USB-to-serial converter built in. Since the -query strings often start with the letter `Q`, this family of protocols is -often referred to as `Q*` in the NUT documentation. See the -<> chapter for more details. - -Otherwise, if the HID Descriptor is longer, you can go to the -<> chapter. You can probably add support for -your device by writing a new subdriver to the existing usbhid-ups driver, -which is easier (and more maintainable) than writing an entire new driver. - -If your USB UPS does not appear to fall into either of these two categories, -feel free to contact the `nut-upsdev` mailing list with details of your -device. +If your UPS connects to your computer via a USB port, then go straight +to the <> chapter. You can probably add +support for your device by writing a new subdriver to the existing +usbhid-ups driver, which is easier than writing an entire new driver. Similarly, if your UPS connects to your computer via an SNMP network -card, you can probably add support for your device by adding a new +card, you can probably add support for your device by writing a new subdriver to the existing snmp-ups driver. Instructions are provided in the <> chapter. Overall concept --------------- -The basic design of drivers is simple. `main.c` handles most of the work +The basic design of drivers is simple. main.c handles most of the work for you. You don't have to worry about arguments, config files, or anything else like that. Your only concern is talking to the hardware and providing data to the outside world. @@ -60,8 +43,8 @@ and providing data to the outside world. Skeleton driver --------------- -Familiarize yourself with the design of `skel.c` in the drivers directory. -It shows a few examples of the functions that `main.c` will call to obtain +Familiarize yourself with the design of skel.c in the drivers directory. +It shows a few examples of the functions that main will call to obtain updated information from the hardware. Essential structure @@ -76,9 +59,8 @@ This structure tracks several description information about the driver: * *version*: the driver's own version. For sub driver information, refer below to sub_upsdrv_info. This value has the form "X.YZ", and is published by main as "driver.version.internal". - * *authors*: the driver's author(s) name. If multiple authors are listed, - separate them with a newline character so that it can be broken - up by author if needed. + * *authors*: the driver's author(s) name. If multiple authors are listed, separate + them with a newline character so that it can be broken up by author if needed. * *status*: the driver development status. The following values are allowed: - DRV_BROKEN: setting this value will cause main to print an error and exit. This is only used during conversions of the driver core @@ -90,10 +72,10 @@ This structure tracks several description information about the driver: doesn't take it for granted. - DRV_BETA: this value means that the driver is more stable and complete. But it is still not recommended for production systems. - - DRV_STABLE: the driver is suitable for production systems, but - not 100 % feature complete. - - DRV_COMPLETE: this is the gold level! It implies that 100 % of - the protocol is implemented, and a full QA pass. + - DRV_STABLE: the driver is suitable for production systems, but not + 100 % feature complete. + - DRV_COMPLETE: this is the gold level! It implies that 100 % of the + protocol is implemented, and a full QA pass. * *subdrv_info*: array of upsdrv_info_t for sub driver(s) information. For example, this is used by usbhid-ups. @@ -105,7 +87,7 @@ Essential functions upsdrv_initups ~~~~~~~~~~~~~~ -Open the port (`device_path`) and do any low-level things that it may need +Open the port (device_path) and do any low-level things that it may need to start using that port. If you have to set DTR or RTS on a serial port, do it here. @@ -120,14 +102,14 @@ possible for your hardware. If there is a way to detect that hardware and it doesn't appear to be connected, display an error and exit. This is the last time your driver is allowed to bail out. -This is usually a good place to create variables like `ups.mfr`, -`ups.model`, `ups.serial`, and other "one time only" items. +This is usually a good place to create variables like ups.mfr, +ups.model, ups.serial, and other "one time only" items. upsdrv_updateinfo ~~~~~~~~~~~~~~~~~ Poll the hardware, and update any variables that you care about -monitoring. Use `dstate_setinfo()` to store the new values. +monitoring. Use dstate_setinfo() to store the new values. Do at most one pass of the variables. You MUST return from this function or upsd will be unable to read data from your driver. main @@ -143,7 +125,7 @@ answer the next time it is called. You must never abort from upsdrv_updateinfo(), even when the UPS doesn't seem to be attached anymore. If the connection with the UPS is lost, the driver should retry to re-establish communication for as long as it is -running. Calling `exit()` or any of the `fatal*()` functions is specifically +running. Calling exit() or any of the fatal*() functions is specifically not allowed anymore. upsdrv_shutdown @@ -162,15 +144,15 @@ process. Data types ---------- -To be of any use, you must supply data in `ups.status`. That is the +To be of any use, you must supply data in ups.status. That is the minimum needed to let upsmon do its job. Whenever possible, you should also provide anything else that can be monitored by the driver. Some obvious things are the manufacturer name and model name, voltage data, and so on. -If you can't figure out some value automatically, use the `ups.conf` +If you can't figure out some value automatically, use the ups.conf options to let the user tell you. This can be useful when a driver -needs to support many similar hardware models, but can't probe to see +needs to support many similar hardware models but can't probe to see what is actually attached. Manipulating the data @@ -207,50 +189,50 @@ UPS status flags like on line (OL) and on battery (OB) live in ups.status. Don't manipulate this by hand. There are functions which will do this for you. - status_init() -- before doing anything else + status_init() - before doing anything else - status_set(val) -- add a status word (OB, OL, etc) + status_set(val) - add a status word (OB, OL, etc) - status_commit() -- push out the update + status_commit() - push out the update Possible values for status_set: - OL -- On line (mains is present) - OB -- On battery (mains is not present) - LB -- Low battery - HB -- High battery - RB -- The battery needs to be replaced - CHRG -- The battery is charging - DISCHRG -- The battery is discharging (inverter is providing load power) - BYPASS -- UPS bypass circuit is active -- no battery protection is available - CAL -- UPS is currently performing runtime calibration (on battery) - OFF -- UPS is offline and is not supplying power to the load - OVER -- UPS is overloaded - TRIM -- UPS is trimming incoming voltage (called "buck" in some hardware) - BOOST -- UPS is boosting incoming voltage - FSD -- Forced Shutdown (restricted use, see the note below) + OL - On line (mains is present) + OB - On battery (mains is not present) + LB - Low battery + HB - High battery + RB - The battery needs to be replaced + CHRG - The battery is charging + DISCHRG - The battery is discharging (inverter is providing load power) + BYPASS - UPS bypass circuit is active - no battery protection is available + CAL - UPS is currently performing runtime calibration (on battery) + OFF - UPS is offline and is not supplying power to the load + OVER - UPS is overloaded + TRIM - UPS is trimming incoming voltage (called "buck" in some hardware) + BOOST - UPS is boosting incoming voltage + FSD - Forced Shutdown (restricted use, see the note below) Anything else will not be recognized by the usual clients. Coordinate with the nut-upsdev list before creating something new, since there will be duplication and ugliness otherwise. [NOTE] -============================================================================== +================================================================================ -- upsd injects `FSD` by itself following that command by a primary upsmon +- upsd injects "FSD" by itself following that command by a master upsmon process. Drivers must not set that value, apart from specific cases (see below). -- As an exception, drivers may set `FSD` when an imminent shutdown has been +- As an exception, drivers may set "FSD" when an imminent shutdown has been detected. In this case, the "on battery + low battery" condition should not be -met. Otherwise, setting status to `OB LB` should be preferred. +met. Otherwise, setting status to "OB LB" should be preferred. -- the `OL` and `OB` flags are an indication of the input line status only. +- the OL and OB flags are an indication of the input line status only. -- the `CHRG` and `DISCHRG` flags are being replaced with -`battery.charger.status`. See the linkdoc:user-manual[NUT command and -variable naming scheme,nut-names] for more information. -============================================================================== +- the CHRG and DISCHRG flags are under replacement by battery.charger.status. +See the linkdoc:user-manual[NUT command and variable naming scheme,nut-names] +for more information. +================================================================================ UPS alarms ---------- @@ -258,11 +240,11 @@ UPS alarms These work like ups.status, and have three special functions which you must use to manage them. - alarm_init() -- before doing anything else + alarm_init() - before doing anything else - alarm_set() -- add an alarm word + alarm_set() - add an alarm word - alarm_commit() -- push the value into ups.alarm + alarm_commit() - push the value into ups.alarm NOTE: the ALARM flag in ups.status is automatically set whenever you use alarm_set. To remove that flag from ups.status, call alarm_init and @@ -277,10 +259,6 @@ flag in ups.status. There is no official list of alarm words as of this writing, so don't use these functions until you check with the upsdev list. -Also refer to the <> chapter -of the user manual and developer guide for information related to alarms -handling in daisychain mode. - Staleness control ----------------- @@ -291,7 +269,7 @@ else to ensure that it is really available. If the attempts to contact the UPS fail, you must call dstate_datastale() to inform the server and clients. -- dstate_dataok() +- dstate_dataok() + You must call this if polls are succeeding. A good place to call this is the bottom of upsdrv_updateinfo(). @@ -362,14 +340,13 @@ logic 1. This function unlocks the port if possible and closes the fd. You should call this in your upsdrv_cleanup handler. - - ssize_t ser_send_char(int fd, unsigned char ch) + - int ser_send_char(int fd, char ch) This attempts to write one character and returns the return value from write. You could call write directly, but using this function allows for future error handling in one place. - - ssize_t ser_send_pace(int fd, useconds_t d_usec, - const char *fmt, ...) + - int ser_send_pace(int fd, unsigned long d_usec, const char *fmt, ...) If you need to send a formatted buffer with an intercharacter delay, use this function. There are a number of UPS controllers which can't take @@ -380,22 +357,21 @@ one. The return value is the number of characters that was sent to the port, or -1 if something failed. - - ssize_t ser_send(int fd, const char *fmt, ...) + - int ser_send(int fd, const char *fmt, ...) Like ser_send_pace, but without a delay. Only use this if you're sure that your UPS can handle characters at the full line rate. - - ssize_t ser_send_buf(int fd, const void *buf, size_t buflen) + - int ser_send_buf(int fd, const char *buf, size_t buflen) This sends a raw buffer to the fd. It is typically used for binary transmissions. It returns the results of the call to write. - - ssize_t ser_send_buf_pace(int fd, useconds_t d_usec, - const void *buf, size_t buflen) + - int ser_send_buf_pace(int fd, unsigned long d_usec, const char *buf, size_t buflen) This is just ser_send_buf with an intercharacter delay. - - ssize_t ser_get_char(int fd, void *ch, time_t d_sec, useconds_t d_usec) + - int ser_get_char(int fd, char *ch, long d_sec, long d_usec) This will wait up to d_sec seconds + d_usec microseconds for one character to arrive, storing it at ch. It returns 1 on success, -1 @@ -406,8 +382,7 @@ back to the usual idle loop in main in time to answer the PINGs from upsd. That will cause an oscillation between staleness and normal behavior. - - ssize_t ser_get_buf(int fd, void *buf, size_t buflen, - time_t d_sec, useconds_t d_usec) + - int ser_get_buf(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_char, but this one reads up to buflen bytes storing all of them in buf. The buffer is zeroed regardless of success or failure. It @@ -415,8 +390,7 @@ returns the number of bytes read, -1 on failure and 0 on a timeout. This is essentially a single read() function with a timeout. - - ssize_t ser_get_buf_len(int fd, void *buf, size_t buflen, - time_t d_sec, useconds_t d_usec) + - int ser_get_buf_len(int fd, char *buf, size_t buflen, long d_sec, long d_usec) Like ser_get_buf, but this one waits for buflen bytes to arrive, storing all of them in buf. The buffer is zeroed regardless of success @@ -426,9 +400,8 @@ and 0 on a timeout. This should only be used for binary reads. See ser_get_line for protocols that are terminated by characters like CR or LF. - - ssize_t ser_get_line(int fd, void *buf, size_t buflen, - char endchar, const char *ignset, - time_t d_sec, useconds_t d_usec) + - int ser_get_line(int fd, char *buf, size_t buflen, char endchar, + const char *ignset, long d_sec, long d_usec) This is the reading function you should use if your UPS tends to send responses like "OK\r" or "1234\n". It reads up to buflen bytes and @@ -440,27 +413,26 @@ failure and 0 on a timeout. If the character matches the ignset with strchr(), it will not be added to the buffer. If you don't need to ignore any characters, just pass it -an empty string -- `""`. +an empty string - "". -The buffer is always cleared and is always `null`-terminated. It does -this by reading at most `(buflen - 1)` bytes. +The buffer is always cleared and is always null-terminated. It does +this by reading at most (buflen - 1) bytes. NOTE: any other data which is read after the endchar in the serial -buffer will be lost forever. As a result, you should not use this +buffer will be lost forever. As a result, you should not use this unless your UPS uses a polled protocol. -Let's say your endchar is `\n` and your UPS sends `"OK\n1234\nabcd\n"`. -This function will `read()` all of that, find the first `\n`, and stop -there. Your driver will get `"OK"`, and the rest is gone forever. +Let's say your endchar is \n and your UPS sends "OK\n1234\nabcd\n". +This function will read() all of that, find the first \n, and stop +there. Your driver will get "OK", and the rest is gone forever. This also means that you should not "pipeline" commands to the UPS. Send a query, then read the response, then send the next query. - - ssize_t ser_get_line_alert(int fd, void *buf, size_t buflen, - char endchar, const char *ignset, - const char *alertset, - void handler(char ch), - time_t d_sec, useconds_t d_usec) + + - int ser_get_line_alert(int fd, char *buf, size_t buflen, + char endchar, const char *ignset, const char *alertset, + void handler(char ch), long d_sec, long d_usec) This is just like ser_get_line, but it allows you to specify a set of alert characters which may be received at any time. They are not added @@ -471,7 +443,7 @@ Implementation note: this function actually does all of the work, and ser_get_line is just a wrapper that sets an empty alertset and a NULL handler. - - ssize_t ser_flush_in(int fd, const char *ignset, int verbose) + - int ser_flush_in(int fd, const char *ignset, int verbose) This function will drain the input buffer. If verbose is set to a positive number, then it will announce the characters which have been @@ -482,7 +454,7 @@ This function returns the number of characters which were read, so you can check for extra bytes by looking for a nonzero return value. Zero will also be returned if the read fails for some reason. - - int ser_flush_io(int fd) + - int set_flush_io(int fd) This function drains both the in- and output buffers. Return zero on success. @@ -523,15 +495,11 @@ Drivers which use USB functions should include usb-common.h and use these: Structure and macro ~~~~~~~~~~~~~~~~~~~ - -You should use the usb_device_id_t structure, and the USB_DEVICE macro to + +You should us the usb_device_id structure, and the USB_DEVICE macro to declare the supported devices. This allows the automatic extraction of USB information, to generate the Hotplug, udev and UPower support files. -The structure allows to convey `uint16_t` values of VendorID and ProductID, -and an optional matching-function callback to interrogate the device in -more detail (constrain known supported firmware versions, OEM brands, etc.) - For example: -------------------------------------------------------------------------------- @@ -539,36 +507,30 @@ For example: #define SOMEVENDOR_VENDORID 0xXXXX /* USB IDs device table */ -static usb_device_id_t sv_usb_device_table [] = { +static usb_device_id sv_usb_device_table [] = { /* some models 1 */ { USB_DEVICE(SOMEVENDOR_VENDORID, 0xYYYY), NULL }, - /* various models */ { USB_DEVICE(SOMEVENDOR_VENDORID, 0xZZZZ), NULL }, { USB_DEVICE(SOMEVENDOR_VENDORID, 0xAAAA), NULL }, - /* Terminating entry */ - { 0, 0, NULL } + { -1, -1, NULL } }; -------------------------------------------------------------------------------- Function ~~~~~~~~ - - is_usb_device_supported(usb_device_id_t *usb_device_id_list, - USBDevice_t *device) + - is_usb_device_supported(usb_device_id **usb_device_id_list, + int dev_VendorID, int dev_ProductID) -Call this in your device opening / matching function. Pass your usb_device_id_t -list structure, and a set of VendorID, DeviceID, as well as Vendor, Product and -Serial strings, possibly also Bus, bcdDevice (device release number) and Device -name on the bus strings, in the USBDevice_t fields describing the specific piece -of hardware you are inspecting. +Call this in your device opening / matching function. Pass your usb_device_id +structure, and a set of VendorID / DeviceID. -This function returns one of the following value: +This function returns one of the following value: - NOT_SUPPORTED (0), -- POSSIBLY_SUPPORTED (1, returned when the VendorID is matched, but the -DeviceID is unknown), +- POSSIBLY_SUPPORTED (1, returned when the VendorID is matched, but the DeviceID is unknown), - or SUPPORTED (2). For implementation examples, refer to the various USB drivers, and search for @@ -608,15 +570,15 @@ function. Right now, there are only two possibilities: SET ~~~ -If your driver's function for handling variable set events is called +If your driver's function for handling variable set events is called my_ups_set(), then you'd do this to add the pointer: upsh.setvar = my_ups_set; my_ups_set() will receive two parameters: - const char * -- the variable being changed - const char * -- the new value + const char * - the variable being changed + const char * - the new value You should return either STAT_SET_HANDLED if your driver recognizes the command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be @@ -632,8 +594,8 @@ arriving from the server. Your function will receive two args: - const char * -- the command name - const char * -- (reserved) + const char * - the command name + const char * - (reserved) You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN depending on whether your driver can handle the requested command. diff --git a/docs/nut-names.txt b/docs/nut-names.txt index efe1ae2..d2e46c7 100644 --- a/docs/nut-names.txt +++ b/docs/nut-names.txt @@ -1,68 +1,21 @@ ifndef::external_title[] -NUT variable names and instant commands -======================================= +NUT command and variable naming scheme +====================================== endif::external_title[] -[NOTE] -.RFC xxxx Recording Document -==== -This document is defined by (pending) RFC xxxx and is referenced as the -document of record for the variable names and the instant commands used -in the protocol described by the RFC. +This is a dump of the standard variables and command names used in NUT. +Don't use a name with any of the dstate functions unless it exists here. -On behalf of the RFC, this document records the names of variables -describing the abstracted state of an UPS or similar power distribution -device, and the instant commands sent to the UPS using command `INSTCMD`, -as used in commands and messages between the Attachment Daemon (the `upsd` -in case of NUT implementation of the standard) and the clients. -==== +If you need a new variable or command name, contact the Development Team +first. -This document defines the standard names of NUT commands and variables. -Developers should use the names recorded here, with dstate functions and -data mappings provided in NUT drivers for interactions with power devices. +Put another way: if you make up a name that's not in this list and it +gets into the tree, and then we come up with a better name later, clients +that use the undocumented variable will break when it is changed. -If you need to express a state which cannot be described by any existing -name, please make a request to the NUT developers' mailing list for -definition and assignment of a new name. Clients using unrecorded names -risk breaking at a future update. If you wish to experiment with new -concepts before obtaining your requested variable name, you should use -a name of the form `experimental.x.y` for those states. - -Put another way: if you make up a name that is not in this list and it -gets into the source code tree, and then the NUT community comes up with -a better name later, clients that already use the undocumented variable -will break when it is eventually changed. An explicitly "experimental" -data point is less surprising in this regard. - -NOTE: In the descriptions, "opaque" means programs should not attempt to -parse the value for that variable as it may vary greatly from one UPS -(or similar device) to the next. These strings are best handled directly -by the user. - - -Time and Date format --------------------- - -When possible, dates should be expressed in ISO 8601 and RFC 3339 compatible -Calendar format, that is to say "YYYY-MM-DD", or otherwise a Combined Date -and Time representation (`T