#12 Add graphviz install trigger
Merged 3 months ago by yselkowitz. Opened 4 months ago by yselkowitz.
rpms/ yselkowitz/flatpak-runtime-config f39  into  f39

file modified
+8 -1
@@ -4,7 +4,7 @@ 


  Name:           flatpak-runtime-config

  Version:        39

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        Configuration files that live inside the flatpak runtime

  Source1:        50-flatpak.conf

  Source2:        sitecustomize.py
@@ -90,6 +90,10 @@ 

  %transfiletriggerin -- /app/share/fonts

  HOME=/root /usr/bin/fc-cache -s


+ # drop for F40

+ %transfiletriggerin -- /app/lib/graphviz /app/lib64/graphviz

+ /app/bin/dot -c 2>/dev/null || :



  %dir %{_prefix}/cache

  %dir %{_prefix}/cache/fontconfig
@@ -100,6 +104,9 @@ 




+ * Fri Dec 15 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 39-5

+ - Add graphviz install trigger


  * Thu Oct 05 2023 Kalev Lember <klember@redhat.com> - 39-4

  - appdata: Add F39 versions


graphviz utilitizes a plugin cache which needs to be created once installed. While graphviz does have its own %post to do so, when built in /app it does not work because it first requires ldconfig to be run (so that the plugins can resolve graphviz's own libraries). This has necessitated adding cleanup-commands to run this in graphviz-dependent flatpaks, but it has now caused failures in packages which use graphviz at build-time (usually for documentation). Perhaps graphviz's %post can be converted to a trigger, but in the meantime, this avoids the issue.

I'd like to figure this one out better - it seems like a class of things we need to make work. I don't think I fully understand the issue - how is ldconfig different for /usr vs. /app?

IIUC, %post are run right after (un)installing, but %trigger are run at the end of the entire transaction, meaning that dot -c would be run before the ldconfig which covers /app/lib64. Since dot -c loads the plugins to get information therefrom, and those plugins requires graphviz's libraries, AFAICS the command is failing due to the order in which they are being run.

The "correct" answer to this might be to migrate graphviz from %post to %trigger, but that could take time to be accepted etc. In the meantime, not only have some flatpaks required a cleanup-commands for this, but now I've encountered a build failure in libdvbpsi as a result (I'd post a link but koji is down atm).

I believe a careful reading of:


might provide clarity - it talks about /etc/ld.so.conf.d , post-scripts using libraries in extra directories, and so forth. I haven't done so yet.

Converting graphviz to triggers does fix this (based on local build testing), so I filed:


But rawhide is a major version ahead of f39, so I'd propose this change here for f39 and (provided that is merged) it can be dropped for f40.

rebased onto 8454d0d

3 months ago

This is fixed in graphviz itself for rawhide/F40, so this would just be for F39. Adjusted the commit message accordingly.

Nice, thanks for sorting it out properly in https://src.fedoraproject.org/rpms/graphviz/pull-request/19 !

Looks like the above is for rawhide only though, and I agree that it makes sense like this - less chance to break something in stable F39. +1 from me to merge the workaround here for F39 and drop it for F40.

Pull-Request has been merged by yselkowitz

3 months ago