]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/log
thirdparty/rrdtool-1.x.git
2 days agoMerge pull request #1311 from somethingwithproof/fix/json-escape-control-chars master
Tobias Oetiker [Wed, 8 Apr 2026 11:54:09 +0000 (13:54 +0200)] 
Merge pull request #1311 from somethingwithproof/fix/json-escape-control-chars

fix: escape control characters in JSON xport output (RFC 7159)

2 days agoMerge branch 'master' into fix/json-escape-control-chars 1311/head
Tobias Oetiker [Wed, 8 Apr 2026 11:53:57 +0000 (13:53 +0200)] 
Merge branch 'master' into fix/json-escape-control-chars

2 days agoMerge pull request #1310 from somethingwithproof/fix/xport-step-short-option
Tobias Oetiker [Wed, 8 Apr 2026 11:52:19 +0000 (13:52 +0200)] 
Merge pull request #1310 from somethingwithproof/fix/xport-step-short-option

fix: add -S short option for --step in rrdtool xport

2 days agoMerge branch 'master' into fix/xport-step-short-option 1310/head
Tobias Oetiker [Wed, 8 Apr 2026 11:52:09 +0000 (13:52 +0200)] 
Merge branch 'master' into fix/xport-step-short-option

2 days agoMerge pull request #1309 from somethingwithproof/fix/bindings-pkg-config
Tobias Oetiker [Wed, 8 Apr 2026 11:51:37 +0000 (13:51 +0200)] 
Merge pull request #1309 from somethingwithproof/fix/bindings-pkg-config

fix: add pkg-config fallback for Perl and Ruby bindings

7 days agotest: add xport3 covering escapeJSON control-char and truncation branches
Thomas Vincent [Fri, 3 Apr 2026 04:17:28 +0000 (21:17 -0700)] 
test: add xport3 covering escapeJSON control-char and truncation branches

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2 weeks agodocs: add CHANGES entries for bindings build fixes 1309/head
Thomas Vincent [Sat, 21 Mar 2026 16:10:27 +0000 (09:10 -0700)] 
docs: add CHANGES entries for bindings build fixes

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2 weeks agofix: export ABS_TOP_BUILDDIR to env for ruby extconf.rb
Thomas Vincent [Sat, 21 Mar 2026 16:06:31 +0000 (09:06 -0700)] 
fix: export ABS_TOP_BUILDDIR to env for ruby extconf.rb

extconf.rb checks ENV['ABS_TOP_BUILDDIR'] to decide between
in-tree and system-installed librrd paths. The ruby target
passed these as make variables to the subsequent $(MAKE) call
but not as environment variables to $(RUBY) extconf.rb, so
the in-tree build path was never taken.

Add env before the $(RUBY) call, matching the pattern used by
the python, perl-piped, and perl-shared targets.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2 weeks agodocs: update CHANGES for xport -S short option
Thomas Vincent [Sat, 21 Mar 2026 15:41:04 +0000 (08:41 -0700)] 
docs: update CHANGES for xport -S short option

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2 weeks agodocs: update CHANGES for JSON escape control chars fix
Thomas Vincent [Sat, 21 Mar 2026 15:39:44 +0000 (08:39 -0700)] 
docs: update CHANGES for JSON escape control chars fix

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
4 weeks agotest: add xport2 for JSON escape and multi-DS legend coverage
Thomas Vincent [Wed, 11 Mar 2026 11:29:42 +0000 (04:29 -0700)] 
test: add xport2 for JSON escape and multi-DS legend coverage

Verifies JSON output structure, no raw control chars in string
values (RFC 7159), and correct multi-DS legend array formatting.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
4 weeks agotest: add xport2 to verify -S short option for --step
Thomas Vincent [Wed, 11 Mar 2026 11:28:32 +0000 (04:28 -0700)] 
test: add xport2 to verify -S short option for --step

Tests that -S and --step produce identical xport output.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
4 weeks agofix: add pkg-config fallback for Perl and Ruby bindings
Thomas Vincent [Wed, 11 Mar 2026 03:48:20 +0000 (20:48 -0700)] 
fix: add pkg-config fallback for Perl and Ruby bindings

The Perl and Ruby bindings require ABS_TOP_BUILDDIR from autotools
for in-tree builds. When building standalone (CPAN, gem install),
these vars are absent and the build fails silently.

Add a three-way branch: Windows (unchanged), in-tree (autotools vars
present), standalone (pkg-config lookup). The standalone path uses
die/abort instead of exit 0 so missing librrd is a hard error.

Fixes: https://github.com/oetiker/rrdtool-1.x/issues/1295
Fixes: https://github.com/oetiker/rrdtool-1.x/issues/1124
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
4 weeks agofix: escape control characters in JSON xport output (RFC 7159)
Thomas Vincent [Wed, 11 Mar 2026 05:31:39 +0000 (22:31 -0700)] 
fix: escape control characters in JSON xport output (RFC 7159)

escapeJSON() only escaped '"' and '\'. RFC 7159 section 7 requires all
control characters U+0000 through U+001F to be escaped. Add the
mandatory two-character sequences (\b, \f, \n, \r, \t) and \uXXXX
for the remaining control codes.

Allocation changed from len+2 to l*6+1 (worst case: every byte
becomes \uXXXX). Truncation uses forward-tracked safe boundaries
instead of post-hoc backward scanning to avoid splitting escape
sequences mid-output.

Closes: https://github.com/oetiker/rrdtool-1.x/issues/409
4 weeks agofix: add -S short option for --step in rrdtool xport
Thomas Vincent [Wed, 11 Mar 2026 03:48:42 +0000 (20:48 -0700)] 
fix: add -S short option for --step in rrdtool xport

rrdtool xport accepts --step but lacks a short form that other
rrdtool subcommands provide. Add -S as a short alias, consistent
with rrdtool graph which uses -S/--step and -s/--start.

-s is already taken by --start in xport, so -S (uppercase) is
the correct short form, matching rrd_graph_options() in rrd_graph.c.

Fixes #1103

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
4 weeks agoMerge pull request #1306 from somethingwithproof/issue-1270-remove-librrd-th-docs
Tobias Oetiker [Tue, 10 Mar 2026 12:29:14 +0000 (13:29 +0100)] 
Merge pull request #1306 from somethingwithproof/issue-1270-remove-librrd-th-docs

docs: remove stale librrd_th references from rrdthreads

4 weeks agoMerge pull request #1307 from somethingwithproof/issue-1083-counter-example-docs
Tobias Oetiker [Tue, 10 Mar 2026 12:28:54 +0000 (13:28 +0100)] 
Merge pull request #1307 from somethingwithproof/issue-1083-counter-example-docs

docs: clarify COUNTER max-value examples in rrdcreate

4 weeks agoMerge pull request #1308 from somethingwithproof/issue-1304-lua55-detection
Tobias Oetiker [Tue, 10 Mar 2026 12:27:43 +0000 (13:27 +0100)] 
Merge pull request #1308 from somethingwithproof/issue-1304-lua55-detection

configure: support Lua 5.5 library detection

4 weeks agoconfigure: detect Lua 5.5 via openselectedlibs fallback 1308/head
Thomas Vincent [Sat, 7 Mar 2026 03:44:45 +0000 (19:44 -0800)] 
configure: detect Lua 5.5 via openselectedlibs fallback

Add a fallback library symbol check for luaL_openselectedlibs when luaL_openlibs is unavailable.

Fixes #1304

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 weeks agodocs: align COUNTER examples with expected data rate 1307/head
Thomas Vincent [Sat, 7 Mar 2026 03:30:11 +0000 (19:30 -0800)] 
docs: align COUNTER examples with expected data rate

Update rrdcreate examples to use a realistic COUNTER max value matching documented guidance.

Fixes #1083

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 weeks agodocs: remove librrd_th guidance from rrdthreads 1306/head
Thomas Vincent [Sat, 7 Mar 2026 02:56:05 +0000 (18:56 -0800)] 
docs: remove librrd_th guidance from rrdthreads

Update rrdthreads.pod to document current librrd usage and remove stale references to librrd_th.

Closes #1270

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 months agoMerge pull request #1303 from c72578/2026-01-07_Update_GitHub_Actions
Tobias Oetiker [Mon, 12 Jan 2026 16:01:12 +0000 (17:01 +0100)] 
Merge pull request #1303 from c72578/2026-01-07_Update_GitHub_Actions

Update GitHub Actions

2 months agoUpdate GitHub Actions 1303/head
Wolfgang Stöggl [Wed, 7 Jan 2026 21:33:45 +0000 (22:33 +0100)] 
Update GitHub Actions

- Switch from ubuntu-20.04, which is not available anymore,
  to ubuntu-latest (currently Ubuntu 24.04)
- Update GitHub Actions:
  * actions/checkout from v4 to v6
  * codecov/codecov-action from v4 to v5
  * github/codeql-action/init from v3 to v4
  * github/codeql-action/analyze from v3 to v4
- Add workflow_dispatch to allow manual triggering, which simplifies
  testing of the following GitHub Actions:
  build-test-linux.yml, code-coverage.yml and codeql-analysis.yml.
- Update tests/functions for Python3 to avoid failing tests using
  `make check TESTS_STYLE="rrdcached-tcp"`
  Python3 uses socketserver, all lowercase. Python2 uses SocketServer.
  https://stackoverflow.com/a/66913346/5067752
- Update list of tests using valgrind-logfile
  Exclude currently failing tests (Ubuntu 24.04):
  graph1, graph2, rpn1, create-with-source-4, vformatter1

3 months agoMerge pull request #1302 from c72578/2025-12-29_Update_vcpkg_GitHub_Action
Tobias Oetiker [Tue, 6 Jan 2026 08:28:24 +0000 (09:28 +0100)] 
Merge pull request #1302 from c72578/2025-12-29_Update_vcpkg_GitHub_Action

Update vcpkg GitHub Action

3 months agoUpdate vcpkg GitHub Action 1302/head
Wolfgang Stöggl [Mon, 29 Dec 2025 20:52:22 +0000 (21:52 +0100)] 
Update vcpkg GitHub Action

- Update vcpkg to current 2025.12.12 Release, commit 84bab45
- Current versions of libraries are e.g.:
  cairo 1.18.4, expat 2.7.3, fontconfig 2.17.1, freetype 2.13.3,
  gettext 0.22.5, glib 2.86.2, libpng 1.6.53, pango 1.56.4,
  pcre2 10.47, libxml2 2.15.1 and zlib 1.3.1
- Github actions:
  * Switch from `lukka/run-vcpkg` to `johnwason/vcpkg-action`
  * Update `actions/checkout` from v4 to v6
  * Update `actions/upload-artifact` from v4 to v6
- `win32/collect_rrdtool_vcpkg_files.bat`:
  Remove `liblzma.dll`, as deprecated feature lzma has been removed
  from libxml2 in vcpkg.
  See: https://github.com/microsoft/vcpkg/pull/47380

3 months agoMerge pull request #1301 from ensc/issues/1298-rrd_rwlock
Tobias Oetiker [Thu, 25 Dec 2025 16:52:15 +0000 (17:52 +0100)] 
Merge pull request #1301 from ensc/issues/1298-rrd_rwlock

fix: update rrd_rwlock() call in librados code

3 months agofix: update rrd_rwlock() call in librados code 1301/head
Enrico Scholz [Sun, 21 Dec 2025 10:51:18 +0000 (11:51 +0100)] 
fix: update rrd_rwlock() call in librados code

The locking API has been changed; update corresponding calls.

Warn when unsupported blocking locks are requested.

Fixes #1298

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
12 months agoMark ruby bindings as ractor safe (#1283)
Rein Fernhout [Fri, 4 Apr 2025 06:21:49 +0000 (08:21 +0200)] 
Mark ruby bindings as ractor safe (#1283)

Ruby has a new method for concurrency called Ractors.

For C bindings to be used inside a Ractor they need to be marked
Ractor-safe [1]:
  If an extension desires to be marked as Ractor-safe the extension
  should call rb_ext_ractor_safe(true) at the Init_ function for the
  extension, and all defined methods will be marked as Ractor-safe.

By marking them Ractor-safe ruby programs can generate graphs concurrently.

See also ruby/ruby#3824 for more information concerning this method.

[1] https://docs.ruby-lang.org/en/master/extension_rdoc.html#label-Appendix+F.+Ractor+support

12 months agoMerge pull request #1282 from c72578/2025-03-23_Update_vcpkg_GitHub_Action
Tobias Oetiker [Thu, 27 Mar 2025 14:38:45 +0000 (15:38 +0100)] 
Merge pull request #1282 from c72578/2025-03-23_Update_vcpkg_GitHub_Action

Update vcpkg GitHub Action

12 months agoMerge branch 'master' into 2025-03-23_Update_vcpkg_GitHub_Action 1282/head
Tobias Oetiker [Thu, 27 Mar 2025 14:37:45 +0000 (15:37 +0100)] 
Merge branch 'master' into 2025-03-23_Update_vcpkg_GitHub_Action

12 months agoMerge pull request #1281 from yselkowitz/master
Tobias Oetiker [Thu, 27 Mar 2025 14:37:30 +0000 (15:37 +0100)] 
Merge pull request #1281 from yselkowitz/master

Fix compatibility with Tcl 9.0

12 months agoMerge branch 'master' into master 1281/head
Tobias Oetiker [Thu, 27 Mar 2025 14:37:15 +0000 (15:37 +0100)] 
Merge branch 'master' into master

12 months agoMerge pull request #1280 from LevitatingBusinessMan/fixruby
Tobias Oetiker [Thu, 27 Mar 2025 14:36:38 +0000 (15:36 +0100)] 
Merge pull request #1280 from LevitatingBusinessMan/fixruby

correctly link ruby bindings

12 months agoUpdate vcpkg GitHub Action
Wolfgang Stöggl [Sun, 23 Mar 2025 07:38:23 +0000 (08:38 +0100)] 
Update vcpkg GitHub Action

- Update vcpkg to current 2025.03.19 Release, commit b02e341
- Current versions of libraries are e.g.:
  cairo 1.18.2, expat 2.6.4, fontconfig 2.15.0, freetype 2.13.3,
  gettext 0.22.5, glib 2.80.0, libpng 1.6.4, pango 1.56.1,
  pcre2 10.45, libxml2 2.13.5 and zlib 1.3.1

12 months agoUpdate CHANGES
Tobias Oetiker [Fri, 21 Mar 2025 10:05:21 +0000 (11:05 +0100)] 
Update CHANGES

12 months agoFix compatibility with Tcl 9.0
Yaakov Selkowitz [Thu, 20 Mar 2025 22:49:10 +0000 (18:49 -0400)] 
Fix compatibility with Tcl 9.0

The deprecated CONST84 was removed in 9.0.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
12 months agoMerge branch 'master' into fixruby 1280/head
Tobias Oetiker [Thu, 20 Mar 2025 07:59:01 +0000 (08:59 +0100)] 
Merge branch 'master' into fixruby

12 months agoMerge pull request #1276 from NorwayFun/master
Tobias Oetiker [Thu, 20 Mar 2025 07:58:48 +0000 (08:58 +0100)] 
Merge pull request #1276 from NorwayFun/master

po: Add Georgian translation

12 months agoUpdate CHANGES
Tobias Oetiker [Thu, 20 Mar 2025 07:57:36 +0000 (08:57 +0100)] 
Update CHANGES

12 months agocorrectly link ruby bindings
LevitatingBusinessMan (Rein Fernhout) [Tue, 18 Mar 2025 13:42:26 +0000 (14:42 +0100)] 
correctly link ruby bindings

fixes #1279

14 months agoUpdate CHANGES 1276/head
Tobias Oetiker [Wed, 5 Feb 2025 09:45:52 +0000 (10:45 +0100)] 
Update CHANGES

14 months agopo: Add Georgian translation
NorwayFun [Wed, 5 Feb 2025 06:03:19 +0000 (07:03 +0100)] 
po: Add Georgian translation

14 months agopo: Add Georgian translation
NorwayFun [Wed, 5 Feb 2025 06:02:49 +0000 (07:02 +0100)] 
po: Add Georgian translation

14 months agoMerge pull request #1274 from seven1240/fix-typo
Tobias Oetiker [Thu, 16 Jan 2025 09:39:50 +0000 (10:39 +0100)] 
Merge pull request #1274 from seven1240/fix-typo

fix function name typo

14 months agofix function name typo 1274/head
Seven Du [Thu, 16 Jan 2025 05:00:45 +0000 (13:00 +0800)] 
fix function name typo

16 months agoMerge pull request #1267 from pticon/master
Tobias Oetiker [Fri, 6 Dec 2024 08:25:14 +0000 (09:25 +0100)] 
Merge pull request #1267 from pticon/master

rrdtool-python: Prefer Python3 over Python2.3

16 months agoMerge branch 'master' into master 1267/head
Pticon [Thu, 28 Nov 2024 11:00:53 +0000 (12:00 +0100)] 
Merge branch 'master' into master

16 months agoMerge pull request #1269 from TheWitness/master
Tobias Oetiker [Sun, 17 Nov 2024 08:14:35 +0000 (09:14 +0100)] 
Merge pull request #1269 from TheWitness/master

Fix #1268 - Segmentation Fault with Constant Lines

16 months agoCorrect spelling errors 1269/head
TheWitness [Sat, 16 Nov 2024 13:44:42 +0000 (08:44 -0500)] 
Correct spelling errors

16 months agoUpdate CHANGES
TheWitness [Sat, 16 Nov 2024 13:43:13 +0000 (08:43 -0500)] 
Update CHANGES

16 months agoRevert to floor() function after review of diff
TheWitness [Fri, 15 Nov 2024 22:21:51 +0000 (17:21 -0500)] 
Revert to floor() function after review of diff

16 months agoUpdate CHANGES
TheWitness [Fri, 15 Nov 2024 22:20:45 +0000 (17:20 -0500)] 
Update CHANGES

16 months agoQA: Final fixup for the rrd_xport.c function for --add-jsontime
TheWitness [Fri, 15 Nov 2024 22:19:18 +0000 (17:19 -0500)] 
QA: Final fixup for the rrd_xport.c function for --add-jsontime

* The LINEX functions allow for a numeric value, but the export believe that these are exportable columns.

16 months agoFix #1268 - Segmentation Fault with Constant Lines
TheWitness [Fri, 15 Nov 2024 13:20:32 +0000 (08:20 -0500)] 
Fix #1268 - Segmentation Fault with Constant Lines

* This issue occurs with the --add-jsontime for lines that are a constant value.  In this case, the variable `im->gdes[vidx].step` is always 0, which results in a division by zero segmentation fault.

16 months agoUpdate CHANGES
Tobias Oetiker [Wed, 13 Nov 2024 14:55:38 +0000 (15:55 +0100)] 
Update CHANGES

16 months agoconfigure.ac: Prefer python3 over python2
Pierre Lebleu [Fri, 8 Nov 2024 14:23:43 +0000 (15:23 +0100)] 
configure.ac: Prefer python3 over python2

Signed-off-by: Pierre Lebleu <pierre.lebleu@pile-engineering.com>
16 months agobindings: Add python3.10 support
Pierre Lebleu [Tue, 12 Nov 2024 13:57:12 +0000 (14:57 +0100)] 
bindings: Add python3.10 support

Signed-off-by: Pierre Lebleu <pierre.lebleu@pile-engineering.com>
17 months agoMerge pull request #1266 from hadfl/illumos
Tobias Oetiker [Tue, 15 Oct 2024 08:51:32 +0000 (10:51 +0200)] 
Merge pull request #1266 from hadfl/illumos

illumos defines _MAX macros in limits.h

17 months agoUpdate CHANGES 1266/head
Tobias Oetiker [Tue, 15 Oct 2024 08:51:00 +0000 (10:51 +0200)] 
Update CHANGES

17 months agoillumos defines _MAX macros in limits.h
Dominik Hassler [Sun, 13 Oct 2024 11:23:48 +0000 (11:23 +0000)] 
illumos defines _MAX macros in limits.h

19 months agoMerge pull request #1265 from panlinux/upstream-time_t-64bits
Tobias Oetiker [Thu, 29 Aug 2024 06:37:57 +0000 (08:37 +0200)] 
Merge pull request #1265 from panlinux/upstream-time_t-64bits

Address the case when time_t is 64bits

19 months agoUpdate CHANGES 1265/head
Andreas Hasenack [Tue, 27 Aug 2024 14:34:29 +0000 (11:34 -0300)] 
Update CHANGES

Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
19 months agoAddress the case when time_t is 64bits
Andreas Hasenack [Mon, 26 Aug 2024 21:41:27 +0000 (18:41 -0300)] 
Address the case when time_t is 64bits

Fixes: #1264
Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
20 months agoMerge pull request #1263 from c72578/2024-08-03_Update_GitHub_Actions
Tobias Oetiker [Mon, 5 Aug 2024 15:05:26 +0000 (17:05 +0200)] 
Merge pull request #1263 from c72578/2024-08-03_Update_GitHub_Actions

Update GitHub Actions

20 months agoUpdate GitHub Actions 1263/head
Wolfgang Stöggl [Sat, 3 Aug 2024 14:54:02 +0000 (16:54 +0200)] 
Update GitHub Actions

- The following GitHub Actions are deprecated:
  actions/checkout@v2, actions/checkout@v3,
  actions/upload-artifact@v3,
  codecov/codecov-action@v3,
  github/codeql-action/init@v1, github/codeql-action/analyze@v1
- Update GitHub Actions to current versions:
  actions/checkout@v4
  actions/upload-artifact@v4,
  codecov/codecov-action@v4,
  github/codeql-action/init@v3, github/codeql-action/analyze@v3

20 months agoMerge pull request #1262 from ensc/bug/1261
Tobias Oetiker [Fri, 2 Aug 2024 13:11:13 +0000 (15:11 +0200)] 
Merge pull request #1262 from ensc/bug/1261

compat-cloexec: fix HAVE_DECL checks

20 months agoUpdate CHANGES 1262/head
Tobias Oetiker [Fri, 2 Aug 2024 06:00:57 +0000 (08:00 +0200)] 
Update CHANGES

20 months agocompat-cloexec: fix HAVE_DECL checks
Enrico Scholz [Wed, 31 Jul 2024 16:08:58 +0000 (18:08 +0200)] 
compat-cloexec: fix HAVE_DECL checks

AC_CHECK_DECLS() always defines the related HAVE_DECL_xxx symbol (either
as '1' or as '0').

Fix the related #if blocks to check additionally for value beside the
existence of this symbol.  Checking for existence is required for
e.g. Windows builds.

https://github.com/oetiker/rrdtool-1.x/issues/1261

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
20 months agoMerge pull request #1260 from c72578/2024-07-29_Update_version_to_1.9.0_for_further_files
Tobias Oetiker [Tue, 30 Jul 2024 06:48:00 +0000 (08:48 +0200)] 
Merge pull request #1260 from c72578/2024-07-29_Update_version_to_1.9.0_for_further_files

Update further files to version 1.9.0

20 months agoUpdate further files to version 1.9.0 1260/head
Wolfgang Stöggl [Mon, 29 Jul 2024 17:35:26 +0000 (19:35 +0200)] 
Update further files to version 1.9.0

Includes version and copyright year updates to files after running the
rrdtool-release script.

20 months ago1.9 (#1258) v1.9.0
Tobias Oetiker [Mon, 29 Jul 2024 07:08:58 +0000 (09:08 +0200)] 
1.9 (#1258)

* updated version

20 months agorelease 1.9.0 (#1257)
Tobias Oetiker [Mon, 29 Jul 2024 07:04:57 +0000 (09:04 +0200)] 
release 1.9.0 (#1257)

20 months agoFix extra reference of parameters of rrd_fetch_dbi_{long,double} (#1255)
Martin Jambor [Mon, 29 Jul 2024 06:59:04 +0000 (08:59 +0200)] 
Fix extra reference of parameters of rrd_fetch_dbi_{long,double} (#1255)

Functions rrd_fetch_dbi_long and rrd_fetch_dbi_double currently take
the first parameter of type "bi_result result *" even though that is
already a pointer and the use of that parameter suggests the extra
indirection is not wanted.  What is more, the caller passes just
"bi_result result" to the corresponding actual arguments which results
in compile errors with GCC 14 because it now does not accept
incompatible pointer types by default.

2 years agoDrop win32-specific asprintf implementation (#1246)
Michal Suchánek [Fri, 19 Jan 2024 13:02:05 +0000 (14:02 +0100)] 
Drop win32-specific asprintf implementation (#1246)

asprintf is implemented by rrd_snprintf anyway, the win32-specific
implementation is redundant.

Same with the non-vasprintf conditional in rrd_info.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2 years agoFix string truncation warnings related to PATH_MAX (#1244)
Michal Suchánek [Mon, 8 Jan 2024 12:59:56 +0000 (13:59 +0100)] 
Fix string truncation warnings related to PATH_MAX (#1244)

There are a number of places where rrdtool combines multiple PATH_MAX
sized strings into one.

PATH_MAX is a constant that tends to work in practice a lot of the time
but may not reflect the real capabilities of the system in real time.

In place of on-stack buffers of PATH_MAX size allocate memory
dynamically. Initialize the pointers to NULL so they can be all freed
unconditionally on exit.

Fixes: #1223
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2 years agoFix failing test pdp-calc1
Wolfgang Stöggl [Sat, 6 Jan 2024 17:00:45 +0000 (18:00 +0100)] 
Fix failing test pdp-calc1

The number of decimal places or the format can be different in the
output depending on the platform.

- The failing test has appeared under msys2 (MINGW32 and MINGW64),
  where the exponential notation has changed:
  E.g. e+000 instead of e+00
- Use DIFF9 also in test pdp-calc1, which reduces the number of
  decimal places to 7 using "%0.7e". See DIFF9 in tests/functions.
- Update the pdp-calc1 output files accordingly
- Fixes failing test pdp-calc1 under msys2

2 years agorrd_rpncalc: Quiet gcc warning by copying one extra character. (#1243)
Michal Suchánek [Sun, 7 Jan 2024 07:50:28 +0000 (08:50 +0100)] 
rrd_rpncalc: Quiet gcc warning by copying one extra character. (#1243)

gcc warns that strncpy truncates the copied string. Above the size
allocated includes space for terminating zero. Include it in the copy.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2 years agoConstify argv, fix warnings. (#1242)
Michal Suchánek [Fri, 5 Jan 2024 14:31:48 +0000 (15:31 +0100)] 
Constify argv, fix warnings. (#1242)

* Fix perl warnings

 - cast POPs to void to avoid unused value warning
 - declare functions that don't set RETVAL as returning void

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
* Constify argv

rrd has no business modifying the string pointed to by passed agrv, and
as far as gcc can see it does indeed not modify them because it compiles
with const argv.

This fixes warnings when passing const strings into rrd, and avoids the
need to duplicate all strings in the tcl bindings.

This fixes warnings like these:
[    3s] prog/sensord/rrd.c: In function 'rrdInit':
[    3s] prog/sensord/rrd.c:302:40: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
[    3s]   302 |                 ret = rrd_create(argc, (char**) argv);
[    3s]       |                                        ^
[    3s] prog/sensord/rrd.c: In function 'rrdUpdate':
[    3s] prog/sensord/rrd.c:458:42: warning: cast discards 'const' qualifier from pointer target type [-Wcast-qual]
[    3s]   458 |                 if ((ret = rrd_update(3, (char **) /* WEAK */ argv))) {
[    3s]       |                                          ^

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
* tcl: Do not duplicate const strings

---------

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
2 years agoUse new vcpkg libffi dll name ffi-8.dll (#1237)
Wolfgang Stöggl [Sun, 22 Oct 2023 11:52:56 +0000 (13:52 +0200)] 
Use new vcpkg libffi dll name ffi-8.dll (#1237)

vcpkg has been updated to 2023.10.19 Release, commit 8eb5735 in #1235.
The name of libffi.dll has changed to ffi-8.dll.

- Update `collect_rrdtool_vcpkg_files.bat`, which is used by the
  `release-windows.yml` GitHub Action:
  libffi.dll -> ffi-8.dll

2 years agorrdcached dump support (#1235)
Tobias Hintze [Fri, 20 Oct 2023 21:03:19 +0000 (23:03 +0200)] 
rrdcached dump support (#1235)

* add missing newlines (\n) for TUNE

Help strings for TUNE command were lacking the trailing newline
character. This causes the FLUSH syntax printed in the same line as
TUNE's.

* fix sendall edge cases

The `sendall` func is implemented as a loop over multiple send() calls until all bytes are sent. Previously on subsequent calls the incorrect buffer was used for sending.
This change also forbids `allow_retry` when at least one byte was successfully sent already. This would otherwise mess up the protocol, when retrying from the start.

* rrcached: implement DUMP

* update tests for remote dump support

Previously, tests replaced the daemon-based dump use with a local use.
This is changed in this commit as dump is now supported via daemon.

* update doc/rrddump

* fix format argument type

* update to latest windows vcpkg tag

2 years agoFix for overlapping areas in transparent mode (#1226)
thurban [Mon, 1 May 2023 09:09:12 +0000 (11:09 +0200)] 
Fix for overlapping areas in transparent mode (#1226)

* Fix for overlapping areas in transparent mode

2 years agoDocument wall clock time for server mode (#1227)
Johannes Christ [Fri, 28 Apr 2023 07:26:42 +0000 (09:26 +0200)] 
Document wall clock time for server mode (#1227)

2 years agodoc/rrdbuild: Add 'dc' to Debian build dependencies (#1224)
Diederik de Haas [Wed, 19 Apr 2023 06:24:26 +0000 (08:24 +0200)] 
doc/rrdbuild: Add 'dc' to Debian build dependencies (#1224)

Without `dc` the `create-with-source-4` test fails.

Co-authored-by: Tobias Oetiker <tobi@oetiker.ch>
2 years agoUpdate vcpkg GitHub Action (#1225)
Wolfgang Stöggl [Wed, 19 Apr 2023 06:23:27 +0000 (08:23 +0200)] 
Update vcpkg GitHub Action (#1225)

- Update vcpkg to current release 2023.04.15, commit 501db0f
- Current versions of libraries are e.g.:
  cairo 1.17.8, expat 2.5.0, fontconfig 2.14.2, freetype 2.12.1,
  gettext 0.21.1, glib 2.76.1, libpng 1.6.39, pango 1.50.12,
  pcre2 10.40, libxml2 2.10.3 and zlib 1.2.13
- Switch from windows-2019 to windows-2022, which includes
  Visual Studio Enterprise 2022

3 years agoSuppress more implicit fall through warnings. (#1222)
Diederik de Haas [Tue, 4 Apr 2023 12:38:33 +0000 (14:38 +0200)] 
Suppress more implicit fall through warnings. (#1222)

3 years agodoc/rrdbuild: Expand Debian build dependencies (#1220)
Diederik de Haas [Tue, 4 Apr 2023 11:54:38 +0000 (13:54 +0200)] 
doc/rrdbuild: Expand Debian build dependencies (#1220)

To build the project on a (lean) Debian Bookworm system, there are
several more build dependencies which need to be installed in order for
the `make` command to succeed.

Also add the build dependencies for python bindings.

3 years agoUpdate msys2 GitHub Action (#1214)
Wolfgang Stöggl [Tue, 7 Mar 2023 09:40:50 +0000 (10:40 +0100)] 
Update msys2 GitHub Action (#1214)

- Add groff to required msys2 packages. It has been removed from group
  base-devel: msys2/MSYS2-packages@66a18d1
- Fixes configure error:
  I need a copy of *nroff to format the documentation
- `ci-build_MSYS2.sh`:
  Add `set -e` to the bash script.
  Otherwise CI seems OK despite a build error.

3 years agoAllow to select locking mechanism (#1207)
Enrico Scholz [Thu, 2 Mar 2023 16:00:25 +0000 (17:00 +0100)] 
Allow to select locking mechanism (#1207)

* rrd: add _rrd_lock_xxx() helper functions and constants

This adds two sets of constants: these used in 'extra_flags' in various
parts of the extended api (e.g. rrd_updatex_r()), and these used within
rrd_open().

There are implemented some helper functions which help to parse command
line strings and environment variables, and to convert these two sets
of constants.

* rrd_update: pass custom RRD_LOCK_xxx flags to rrd_open()

* rrd_update: add '--locking' cli option

* rrd_open: handle RRD_LOCK_DEFAULT

When rrd_open() was called with RRD_LOCK_DEFAULT, read the locking
setup from $RRD_LOCKING environment.

* rrd_open: implement other locking methods

Allow locking to wait and make it possible to bypass locking
completely.

With this patch it is e.g. expected:

| $ RRD_LOCKING=none strace -e fcntl rrdupdate --locking block x N:1
| fcntl(3, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0

Other values for RRD_LOCKING and --locking give

 | RRD_LOCKING=... | --locking ... | fcntl()  |
 |-----------------|---------------|----------|
 | *               |               | F_SETLK  |
 | *               | block         | F_SETLKW |
 | *               | try           | F_SETLK  |
 | *               | none          |          |
 | block           |               | F_SETLKW |
 | try             |               | F_SETLK  |
 | none            |               |          |

* doc: document --locking + $RRD_LOCKING

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
3 years agoUpdate vcpkg GitHub Action (#1212)
Wolfgang Stöggl [Thu, 2 Mar 2023 07:31:55 +0000 (08:31 +0100)] 
Update vcpkg GitHub Action (#1212)

- Update vcpkg to current release 2023.02.24, commit a7b6122
- Use actions/checkout@v3 and actions/upload-artifact@v3 in order to
  avoid the following warning:
  Node.js 12 actions are deprecated.
- win32/collect_rrdtool_vcpkg_files.bat:
  Add required pcre2-8.dll and pixman-1-0.dll
  Remove pcre.dll, which is not required anymore

3 years agoSet CLOEXEC flag when opening files and sockets (#1206)
Enrico Scholz [Fri, 6 Jan 2023 11:02:12 +0000 (12:02 +0100)] 
Set CLOEXEC flag when opening files and sockets (#1206)

* configure: check for O_CLOEXEC
* configure: check for SOCK_CLOEXEC
* configure: check whether fopen() supports the "e" flag

Although the "e" fopen() flag (atomic FD_CLOEXEC support) is scheduled
for being added to the next POSIX version, it is not supported by all
platforms.

Check whether it is accepted and working.

Because this flag can be tested at runtime only, configure.ac uses
AC_RUN_IFELSE.  Cross compiling fallback assumes that "e" is supported.

* compat-cloexec: initial checkin
* compat-cloexec: implement missing HAVE_DECL_O_CLOEXEC case

Just define 'O_CLOEXEC' as 0;  it is used always like in

| f = open(..., flags | O_CLOEXEC);

* compat-cloexec: implement missing HAVE_DECL_SOCK_CLOEXEC case

* compat-cloexec: implement missing RD_HAVE_WORKING_FOPEN_E case

When fopen() does not support the "e" flag, parse the mode string and
run an 'open(..., O_CLOEXEC) + fdopen()' sequence when it is set.

* rrd_open: open file with O_CLOEXEC

Avoid leaking file descriptors by set the O_CLOEXEC flag.  This flag is
part of POSIX.1-2008 and there is implemented a fallback for systems
without it.

* open sockets with SOCK_CLOEXEC
* set "e" flag with fopen()
* tests: add test for _rrd_fopen()

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
3 years agoMerge pull request #1208 from oetiker/fix-tcp
Tobias Oetiker [Wed, 4 Jan 2023 09:44:31 +0000 (10:44 +0100)] 
Merge pull request #1208 from oetiker/fix-tcp

remove dead code

3 years agouse ubuntu 20.04 for testing fix-tcp 1208/head
Tobias Oetiker [Wed, 4 Jan 2023 08:37:24 +0000 (09:37 +0100)] 
use ubuntu 20.04 for testing

3 years agoremove dead code
Tobias Oetiker [Wed, 4 Jan 2023 08:23:56 +0000 (09:23 +0100)] 
remove dead code

3 years agoMerge pull request #1198 from ferdnyc/patch-1
Tobias Oetiker [Mon, 12 Dec 2022 10:16:30 +0000 (11:16 +0100)] 
Merge pull request #1198 from ferdnyc/patch-1

Ensure Perl manpages install to mandir

3 years agoEnsure Perl manpages install to mandir 1198/head
Frank Dana [Thu, 24 Nov 2022 23:32:50 +0000 (18:32 -0500)] 
Ensure Perl manpages install to mandir

3 years agodoc/rrdgraph: wording (#1197)
Thomas Gelf [Wed, 23 Nov 2022 08:28:03 +0000 (09:28 +0100)] 
doc/rrdgraph: wording (#1197)

thanks

3 years agoadd link. (#1194)
youpong [Tue, 1 Nov 2022 07:55:37 +0000 (16:55 +0900)] 
add link. (#1194)

3 years agoUpdate README.md
Tobias Oetiker [Mon, 31 Oct 2022 16:55:28 +0000 (17:55 +0100)] 
Update README.md

fit badges :)

3 years agoIntroduce an alternative code coverage testing (#1192)
youpong [Mon, 31 Oct 2022 13:27:06 +0000 (22:27 +0900)] 
Introduce an alternative code coverage testing  (#1192)

* add a workflow for code coverage test.
* add gcov task

3 years agoMerge pull request #1189 from klaernie/patch-1
Tobias Oetiker [Mon, 31 Oct 2022 12:51:12 +0000 (13:51 +0100)] 
Merge pull request #1189 from klaernie/patch-1

rewrite valstrfduration introduction