Index of /rpmDirectoryCheck

Icon  Name                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [DIR] files/ 2005-07-02 15:31 - [DIR] sample/ 2005-07-02 15:30 - [TXT] NEWS 2005-03-25 16:40 1.6K [TXT] INFO 2005-03-25 16:40 3.9K
			RPM directory checker


Introduction

  This program was designed to find RPM-packages which are putting
  files into directories without owning this directories. This practice
  creates warnings while upgrading packages in the best case. In the
  worst case you will have a lot of orphaned directories and wasted
  inodes after deleting a package.
  
  As a side-effect the directory-checker can create a graphical
  representation of a package and its requirements.



Requirements:

  * python2 (python 1.5 _may_ be possible also)
  * an XSL processor like xltproc to produce human-readable output
    (probably a HTML browser like w3m is needed also)
  * optional graphviz[1] to create graphical representation


Installation

  Program is only one python-module which can be placed everywhere.


Invoking

  The directory-checker knows the following options
  
  $ ./rpmDirectoryCheck --help
  
  ./rpmDirectoryCheck.py [-h|--help] [-o|--output report|graph] [-v|--verbose]
          -f <filename>|<packages>+
  
  -h|--help      ...   help
  -o|--output    ...   output format
                       report - reports unowned directors [default]
                       graph  - outputs dot-file
  -v|--verbose   ...   increase verbosity; multiple -v options are
                       supported
  -f             ...   fetch package-list from file <filename>
  
  <packages>+    ...   packages to visit
  
  
  The generated output will be placed on stdout. An example run is:
  
  $ ./rpmDirectoryCheck.py -vv basesystem filesystem python2
  basesystem                      [   1/3   (33%)]
  filesystem                      [   2/3   (66%)]
  python2                         [   3/3  (100%)]
  
  Warning: recursion at compat-glibc-6.2-2.1.3.2
  Warning: recursion at compat-glibc-6.2-2.1.3.2
  Warning: recursion at tcl-8.3.3-60
  Warning: recursion at sh-utils-2.0.11-5
  Warning: recursion at pam-0.75-7
  Warning: recursion at Mesa-3.4.2-3
  <?xml version="1.0"?>
  <packagereport>
    <package>
      <fullname>chkconfig-1.2.23-1</fullname>
  ...
    </package>
  </packagereport>
  
  
  The XML output can by transformed with the rpmDirectoryCheck.xsl
  stylesheet into HTML:
  
  $ xsltproc rpmDirectoryCheck.xsl <output>.xml
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  <html>
  <head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  ...
  </body>
  </html>
  
  
  The graphviz-output (.dot-file) can be transformed into png:
  
  $ dot -Tpng <output>.dot ><output>.png


Bugs

  * the program-name is ugly
  * it is slow; perhaps it can be speed up a little bit by accessing the
    rpm database directly without calling 'rpm -q...'
  * errors are not handled properly; they are just throwing exceptions
  * xml/dot-output may be enhanced
  * directory-checker should be placed into a RPM-package
  
  Please report other bugs to mailto:enrico.scholz@informatik.tu-chemnitz.de!


License

   This file is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 2, or (at your
   option) any later version.
                                                                                                      
   This file is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
                                                                                                      
   You should have received a copy of the GNU General Public License
   version 2 along with this package; see the file GPL.


Changelog
  2001-08-09, version 0.0.2
     - removed debug-print

  2001-08-09, version 0.0.1
     - initial release


Footnotes: 

[1] http://www.research.att.com/sw/tools/graphviz/; look at
    http://rhcontrib.bero.org for rpms