{"id":905,"date":"2010-07-16T13:35:00","date_gmt":"2010-07-16T11:35:00","guid":{"rendered":"http:\/\/raftaman.net\/?p=905"},"modified":"2021-05-15T11:46:40","modified_gmt":"2021-05-15T09:46:40","slug":"visualizing-rpm-dependencies-with-graphviz","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=905","title":{"rendered":"Visualizing rpm dependencies with Graphviz"},"content":{"rendered":"<p>Sometimes, rpm dependencies get rather complex. It&#8217;s not always easy for an rpm maintainer to keep track of the runtime requirements of his package and therefore, huge rpm dependency trees develop. And it&#8217;s even more difficult so see which packages get pulled by yum, because only a tiny part of those are actually listed as requirements in the spec file. <strong>The tree gets huge with recursion!<\/strong><\/p>\n<p>With <code>rpmdep<\/code>, there&#8217;s a small tool that will help you visualize those dependency trees. It&#8217;s part of Fedora&#8217;s <a href=\"http:\/\/rpmorphan.sourceforge.net\/\"><code>rpmorphan<\/code><\/a>-package, so you can easily pull it with yum:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# yum install rpmorphan\r\n<\/pre>\n<p><code>rpmdep<\/code> itself is just a perl script, that walks down the rpm tree recursively. It can produce a <a href=\"http:\/\/www.graphviz.org\/\">Graphviz<\/a> dot-file, which in turn can be used to make rather since pictures. For example,<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ rpmdep -dot firefox.dot firefox\r\n$ dot -Tpng firefox.dot -o firefox.png\r\n<\/pre>\n<p>produces a complete rpm dependency tree for <code>firefox<\/code>. An exemplary picture (firefox&#8217;s dependencies in Fedora 13):<\/p>\n<div id=\"attachment_906\" style=\"width: 580px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2010\/07\/firefox.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-906\" src=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2010\/07\/firefox-e1279109645755.png\" alt=\"\" title=\"firefox&#039;s dependency tree in Fedora 13\" width=\"570\" height=\"104\" class=\"size-full wp-image-906\" \/><\/a><p id=\"caption-attachment-906\" class=\"wp-caption-text\">Click image for full size (1.6MB)<\/p><\/div>\n<p>Graphvic can produce quite a few output formats. For an overview about all available commands, have a look at <a href=\"http:\/\/www.graphviz.org\/doc\/info\/command.html\">http:\/\/www.graphviz.org\/doc\/info\/command.html<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes, rpm dependencies get rather complex. It&#8217;s not always easy for an rpm maintainer to keep track of the runtime requirements of his package and therefore, huge rpm dependency trees develop. And it&#8217;s even more difficult so see which packages get pulled by yum, because only a tiny part of those are actually listed as requirements in the spec file&#8230;. <a href=\"https:\/\/possiblelossofprecision.net\/?p=905\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[48,35],"class_list":["post-905","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-rpm","tag-yum"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=905"}],"version-history":[{"count":19,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/905\/revisions"}],"predecessor-version":[{"id":1821,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/905\/revisions\/1821"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}