  
Why a "report" library:

  * a sufficiently generic and useful client side library/API that can 
    be incorporated into any existing and future _upstream_ OSS projects

  * python-meh too integrated into 'bugzilla' workflow

  * ABRT's "Report" plugin integrated into the ABRT deamon

  * The "report" library would take the best of both python-meh and
    ABRT's "Report" plugin, and integrate them into one library that
    serves both purposes.

To do this we think it should:

   * abstract away all the details about what kind of ticketing
     system it is talking to, or even whether it's talking to a ticketing
     system or to some other reporting/storage mechanism

   * the choice of which ticketing/reporting/storage mechanism is
     configurable both by the user and the app, and the defaults
     can be set/changed at distro creation time

   * possible to add new ticketing/reporting/storage mechanisms

   * has a optional callback mechanism that allows the API to query
     the user through the application for information that the chosen
     mechanism needs (like username, password, whether it should
     create a ticket, etc).   The storage mechanism reports failure
     if it needs info from the user and no callback is provided

   * usable within anaconda, base/minimal installs, GUI desktops, and
        command line tools

   * there would be multiple language bindings for this API


Report concepts:

  Application presents user with something that could be reported
    (ie. a traceback, a setroubleshoot report, etc), and asks 
    if they want to report it?
      If yes, application calls "report";
      if no, exit.

  "report":  
    Query the user for where to send/save the report?  The list of
    possible choices is read from a configuration file.  The kinds
    of choices that can be in the configuration file are "report to
    bugzilla", "save using scp", "save locally".
    Further input depends on where the user chooses to save the report.

    save to bugzilla: 
      asks for username and password
    save using scp:
      asks for username, password, and remote location
    save locally:
      asks for location

    The report function takes as its first argument a signature of the
    situation (problem, bug, event, etc) to be reported.  A signature
    is a mapping from names to values.   The following names have 
    predefined meanings, other names can be defined to represent the
    data in other situations:

      "component"
        the OS component associated with this signature
        defaults to packageName

      "packageName" 
        the name (not version or revision) of the package 
        associated with this signature

      "hashmarkername" 
        the name to associate with the localhash
        defaults to component

      "localhash"
        a hash value for this signature

      "summary"
        a short (one line) description of the signature

      "description"
        a complete description of the signature

      "pythonTraceback"
        a Python Exception and traceback

      "nativeTraceback"
        a native architecture traceback

   A reporter/saver kind can require certian members to exist in 
   the signature, and uses the values in a signature to report or
   save the incedent in its own way.

   The Bugzilla reporter uses the following signature members:
      component or packageName (required)
         used to fill in the bug's component

      localhash and hashmarkername (required)
         used to create a search hash in the bug's whiteboard

      summary (required)
         used to fill in the bug's summary

      description (required)
         copied into the first comment in the bug

      pythonTraceback (optional)
         attached to the bug

Testing
   If for testing purposes you want to redirect all reports sent to 
   bugzilla.redhat.com to a component other than the component requrested
   in the report, edit the file /etc/report-redhat-bugzilla.config, 
   uncomment the "testing_component = report" line, and change it
   to be the component you want to redirect reports to.

 

