Summary: | stabilise net-analyzer/rrdtool-1.2.28-r1 (rrdtool-1.2.28 breaks graphics generation in net-analyzer/cacti (at least versions 0.8.7b-r2 and 0.8.7b-r3)) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Beutin <tb> |
Component: | Current packages | Assignee: | Gentoo Netmon project <netmon> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | david, fmccor, px, rainer |
Priority: | High | Keywords: | STABLEREQ |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
example of a broken image
example of a correct image rrdtool-1.2.28-revert-font-fix.patch |
Description
Thomas Beutin
2008-11-02 22:09:44 UTC
Created attachment 170576 [details]
example of a broken image
Created attachment 170578 [details]
example of a correct image
There is the following notice in the CHANGES for rrdtool-1.2.28: * src/rrd_graph.c, trunk/program/src/rrd_graph.c: fix for --font bug (font names wer not being picked up at all). Bug reported by Dmitry B. Bigunayk Apparently "rrdtool graph" does not adhere to its own default font setting in this version and cacti relies on rrdtool generating the pictures with the default-font when there are no specific fonts configured in cacti. (More precise: librrd.so.2 is the component controlling the font stuff...) The log of the compile for rrdtool shows -DRRD_DEFAULT_FONT=\"/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf\" and this fontfile is installed in the correct place after emerging rrdtool. Doing a "strace -e open" with one of the calls to "rrdtool graph" generated by cacti with the arguments "--font TITLE:8: --font AXIS:8: --font LEGEND:8: --font UNIT:8:" shows open(""), O_RDONLY) = -1 ENOENT (No such file or directory) in all places where the default, compiled-in fontfile should be opened. Running "rrdtool graph" with "--font TITLE:8 --font AXIS:8 --font LEGEND:8 --font UNIT:8" generates graphs with the default-font. (This should generate an error, see src/rrd_graph.c lines 3511 - 3519: ... if (strlen(optarg) > end){ if (optarg[end] == ':'){ sttrncpy(im->text_prop[propidx].font,optarg+end+1,255); im->text_prop[propidx].font[255] = '\0'; } else { rrd_set_error("expected : after font size in '%s'",optarg); return; } } ...) Also, if fonts are explicitly specified in the cacti-settings (Console->Configuration->Settings->(Tab)Visual) all is well and the graphs are generated with title and legend. (If you turn on the graph debug-mode in cacti you can see that the --font-arguments to "rrdtool graph" are now specify the path to the font, eg: --font TITLE:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \ --font AXIS:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \ --font LEGEND:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \ --font UNIT:8:/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf \ So this could be used as a workaround in cacti. But it looks like a bug in upstream. Created attachment 170717 [details, diff]
rrdtool-1.2.28-revert-font-fix.patch
Could you build rrdtool-1.2.28 with this patch applied and report if it works for you? This patch just reverts that font "fix" that was done in 1.2.28. thanks.
(In reply to comment #4) > Created an attachment (id=170717) [edit] > rrdtool-1.2.28-revert-font-fix.patch > > Could you build rrdtool-1.2.28 with this patch applied and report if it works > for you? This patch just reverts that font "fix" that was done in 1.2.28. > thanks. > AMD64 - compiles fine, works fine. Thank you guys, for good report, good analysis and tests. :) I've commited fix into rrdtool-1.2.28-r1. Please, install it and report any further issues you'll encounter (I hope there are none). I'm going to stabilize this version at the end of this week. (In reply to comment #6) > Thank you guys, for good report, good analysis and tests. :) > > I've commited fix into rrdtool-1.2.28-r1. Please, install it and report any > further issues you'll encounter (I hope there are none). There are no issues with rrdtool-1.2.28-r1, it works the same way rrdtool-1.2.27-r1 did (no need to enter fonts in cacti as recommended by Rainer in comment #3). Thanks a lot! Arch teams, this rather important regression in usability. Although it is fixed our stable package is still broken. Please, stabilize net-analyzer/rrdtool-1.2.28-r1 ASAP. Thanks. Sparc stable (bypassing 30 day rule because of the nature of the problem). amd64 stable Stable for HPPA. Thomas, Rainer, fleg: could I ask you for another test? Please check if rrdtool-1.2.28-r2 works for you too. This revision has patch from upstream to fix this issue for real rather then revert broken commit. arch teams, sorry for bugspam. Go with stabilization of 1.2.28-r1. Possibly I had to create separate bug report for stabilization but I was lazy... Also you could already stabilize and unCC yourself :P ppc stable alpha/ia64/x86 stable rrdtool-1.2.28-r2 works fine here, no problems with the generated graphs in cacti when using the default settings (that is: no font and fontsize configured in cacti, so the default-font from rrdtool is used) ppc64 done All done, this bug is fixed. Thank you Rainer for tests. It means rrdtool-1.2.29 will have this bug fixed :) |