Item15299: graphviz GV_FILE_PATH is going away
Priority: Enhancement
Current State: Waiting for Feedback
Released In: n/a
Target Release: n/a
In fact it did go away ingraphviz 6.0.1
See
https://forum.graphviz.org/t/removal-of-gv-file-path-environment-variable/2031
A possible replacement could be the -Gimapegepath command line option.
Any suggestions?
--
BramVanOosterhout - 19 Feb 2024
Meanwhile, this
workaround works, although it's not very pretty (changes the directory before starting dot).
--
MarcSCHAEFER - 19 Feb 2024
The following observations are based on
%GRAPHVIZ{ "digraph G { Workstation [image="Sun_Workstation.jpg"]; }"
type="png"
}%
GV_FILE_PATH
support was removed form graphviz-dot August 16, 2022 [1]
The packaged graphviz version varies by distributor.
My installation (Xubuntu 22.04) shows:
-
dot - graphviz version 2.43.0 (0)
The rendered result is as expected. An oval with an image displayed.
I tried graphviz in Tim Legge's docker (OS: Alpine:edge) [2] with:
-
dot - graphviz version 7.0.0 (20221023.0053)
The result is
$GV_FILE_PATH environment variable set; exiting:
This sandboxing mechanism is no longer supported
00001: digraph G { Workstation [image="Sun_Workstation.jpg"];
removing
$ENV{GV_FILE_PATH}
and setting
-Gimagepath
in
Core.pm
gives
Warning: file loading is disabled because the environment contains SERVER_NAME="_"
Warning: Filename "Sun_Workstation.jpg" is unsafe
Warning: No or improper image="Sun_Workstation.jpg" for node "Workstation"
00001: digraph G { Workstation [image="Sun_Workstation.jpg"]; }
I have addreseds this by unsetting
SERVER_ENV
while invoking
dot
And now the oval shows, but the Workstation image is absent
- because
dot
executes in bin
- and the images are in
pub/WEB/TOPIC
Set
-Gimagepath=$libraryPath works, because
- it is set to the topic where the images are
- or defaults to the current topic
I have issued a Pull request at GitHub foswiki/GraphvizPlugin for this item
[1] https://gitlab.com/graphviz/graphviz/-/commit/1e45fd838a7308f0a8e9712d8dbc2e486c265455
[2] https://github.com/timlegge/docker-foswiki/blob/master/Dockerfile
-- BramVanOosterhout - 23 Feb 2024