Skip to content

CI: Optimize use of autoconf caching#3428

Merged
jimklimov merged 50 commits into
networkupstools:masterfrom
jimklimov:issue-3108
May 8, 2026
Merged

CI: Optimize use of autoconf caching#3428
jimklimov merged 50 commits into
networkupstools:masterfrom
jimklimov:issue-3108

Conversation

@jimklimov

@jimklimov jimklimov commented May 4, 2026

Copy link
Copy Markdown
Member

Follow-up to PR #3109 for issue #3108, which added ways to cache autoconf discovery/configuration results (among other achievements).

While that PR did address the subject area in broad strokes, cached rebuilds on some systems did complain about effective loss of some configuration nuances, because thise values were set when running cacheable logic - and so never tickled in cached runs. This is effectively due to an old mis-use of those autotools methods (which are documented to require that nothing consequential happens in their optionally-called code).

This PR aims to make rebuilds with same config reproducible (in terms of populating same definitions in config.log, config.h, etc.) by more diligently coding the population vs. use of cached data. As a significant starting point seen as a bottleneck in eyeball profiling, probably related to numerous calls to pre-processor, compiler or linker, various m4/nut_check_lib*.m4 files were revised for this PR.

Further improvements may be possible around:

  • boolean support (probably to be done as part of Refactor code from custom bool_t to stdbool.h (where available) #1176 / Consolidate bool_t definitions into a common header file #31 which may remove much of this code),
  • documentation generation ability testing (e.g. a2x calls for man pages),
  • systemd unit file syntax support checks,
  • compiler tests seem to pause in the beginning (pragmas are cached and go fast on re-runs),
  • cppunit support,
  • investigate the long pause between "egrep support" and "CONFIG_FLAGS" report (first 3 or so lines of output) - likely this is where configure loads and parses the cache, but maybe there is something we do that can save some time (e.g. several calls to gitlog2version.sh may happen there and maybe can be revised into one run and then populating the data points from cache?
  • simple profiling is doable with bash 5+ loops: ./configure ... 2>&1 | while read LINE ; do echo "[$EPOCHREALTIME] $LINE" ; done -- but should not be done with date calls (expensive, skews the result). Maybe adapting the https://github.com/marcomorain/tcat/blob/master/tcat.c project to print higher-precision timestamps (like NUT upsdebugx does) is a decent option too.

Also some typos and bugs were noted and addressed.

@jimklimov jimklimov added this to the 2.8.6 milestone May 4, 2026
@jimklimov jimklimov added CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) portability We want NUT to build and run everywhere possible documentation labels May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 3841ce2 is temporarily available: NUT-tarballs-PR-3428.zip.

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4661-master completed (commit 2d1da9e83b by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4662-master completed (commit 1971357864 by @jimklimov)

jimklimov added 4 commits May 5, 2026 08:33
…h mode [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ith changed *.m4/*.am/*.ac sources and enabled autoconf cache: handle precious CCACHE_* args/vars [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…request is known to be not too portable)

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4663-master completed (commit 55dfd0b1bd by @jimklimov)

jimklimov added 16 commits May 5, 2026 10:19
…o be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…s#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…s#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…re [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ore [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@jimklimov jimklimov force-pushed the issue-3108 branch 2 times, most recently from 1c7240e to 2606641 Compare May 6, 2026 08:21
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4668-master completed (commit d13bfc1c9c by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4669-master completed (commit ed2a7d8043 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4671-master completed (commit 79bbf82aae by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

jimklimov added 11 commits May 7, 2026 14:07
…ise with AC_CACHE_VAL() for each option to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d section, use nut_cv_have_libltdl right away [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…o be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… each option to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…on to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…HDIR_CFG_OPT(): consider also MAKE and (CONFIG_)SHELL as circumstances that impact the configuration hash [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…n to be remembered [networkupstools#3108]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4672-master completed (commit 98b11c3a70 by @jimklimov)

@jimklimov jimklimov merged commit 85235ee into networkupstools:master May 8, 2026
143 checks passed
@jimklimov jimklimov deleted the issue-3108 branch May 8, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Entries related to continuous integration infrastructure (here CI = tools + scripts + recipes) documentation portability We want NUT to build and run everywhere possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants