-
-
Notifications
You must be signed in to change notification settings - Fork 412
Fix uses of banner_is_disabled() to not preclude -V printouts; common formation of the banner string; better detection of time.h methods
#2583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…programs to print_banner_once() [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ayout there [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… "-V" handling [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…g program versions [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…programs to describe_NUT_VERSION_once() [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ON_once() rather than directly UPS_VERSION [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…with its copy of describe_NUT_VERSION_once() instead of large code chunk in the program [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…pass it to print_banner_once() and show_usage() [networkupstools#2573] Also update tools/nut-scanner/Makefile.am to have the symbols in libnutscan Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… follow common NUT pattern [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…use of print_banner_once() [networkupstools#2375] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…etworkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…help and new standalone option) [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… CLI option Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…T_VERSION_once() copy of the code [networkupstools#2573] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…(include) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…IX_THREAD_SAFE_FUNCTIONS It seems C++ builds using NUT config.h => timehead.h on WIN32 struggle uniquely (as C ones did not) with alleged redefinition of localtime_r() and gmtime_r() which is in fact optionally present in headers but not found by linking tests in AC_CHECK_FUNCS(). Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…time methods Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… localtime_r() etc. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
banner_is_disabled() to not preclude -V printouts, common formation of the banner string, detection of time.h methodsbanner_is_disabled() to not preclude -V printouts; common formation of the banner string; better detection of time.h methods
…ion.h" [networkupstools#2573, networkupstools#2097] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
… builds [networkupstools#2583, networkupstools#1611] Partially inspired by /mingw64/include/time.h NOTE: Unlike linux+mingw cross-builds, the semi-native ones on Windows with MSYS2 do not enforce _POSIX_THREAD_SAFE_FUNCTIONS and so can lack the optional declarations in the file above. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…WIN32 fallbacks [networkupstools#1611, networkupstools#2583] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added a commit
to jimklimov/nut
that referenced
this pull request
Aug 5, 2024
networkupstools#1611, networkupstools#2583] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
networkupstools#1611, networkupstools#2583] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
✅ Build nut 2.8.2.2041-master completed (commit f733ce9614 by @jimklimov) |
jimklimov
added a commit
that referenced
this pull request
Sep 13, 2024
…me, only mention "driver" if needed (once) [#2583] Example change: * Network UPS Tools driver 2.8.2.1064-1064-g501bbdc62 (development iteration after 2.8.2) - network XML UPS 0.46 * Network UPS Tools 2.8.2.1064-1064-g501bbdc62 (development iteration after 2.8.2) - network XML UPS driver 0.46 Compare to older versions' markup where NUT version tailed in the end (generally fixed by PR #2583 due to possible nested parentheses in dev builds): * Network UPS Tools - Generic HID driver 0.53 (2.8.2) ...and to other non-driver programs now, which generally do print their program name/type after NUT before version: * Network UPS Tools upsmon 2.8.2.1064-1064-g501bbdc62 (development iteration after 2.8.2) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
cross-builds
nut-scanner
nutconf
NUT configuration library and tool
portability
We want NUT to build and run everywhere possible
refactor/fightwarn
PR or issue proposal to improve code maintainability without functional changes, or to fix warnings
service/daemon start/stop
General subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug
Windows
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #2573
Follows up from #2568 and #2554 recent efforts.
Adding the banner to C++ tool
nutconfhad some impact on detection of time headers and methods, which failed on Linux+mingw builds of NUT for Windows. Apparently its visibility was different from plain C builds, and never tried for C++ before.Notable changes include patterns printed by the driver startup - now it would be NUT version info description first, then driver name and info. Previously it was driver name+version and short NUT version in parentheses afterwards (so could have double parentheses with development builds). Also the
-Vrequest for version would not reportupsnotify(mis-)configuration concerns.Also
nut-scannernow shows its name in the banner, andupsdrvctlremains a bit special to clarify that it is the driver controller program, not a driver itself.Like with earlier work, a forced semver can be injected (e.g. for embedded builds with policies that use one firmware version for everything, to have a way to reflect real NUT version),
1.1.1in the test below:NOTE: I wonder if these changes can facilitate work on #2097, e.g. to separate a
common-version.cwith all code referencing NUT version macros to produce a.lafile of its own, and linked almost everywherelibcommon.lais now - in places that those version methods are actually used. This would make a version string change a problem of a smaller object file recompilation and then just relinking of its real consumers (compared to severallibcommon*.lavariants used now, see #2584, with a change incommon.o- whether through its sources ornut_version.h- requiring at least a relink of almost every NUT binary).