Did some bugzilla cleanups

Michael Schwendt mschwendt at gmail.com
Mon Nov 10 21:47:00 CET 2008


So, everyone (but merely the infrastructure dudes), here's another
status update WITH source code.

Please don't run this without filling in your bugzilla credentials!
(and if you did, "rm -f pickle*" prior to next run)

Attached is the set of scripts to sync owners.list files to bugzilla
(remotely, i.e. via the normal web interface). Since the last status
updates, the script has been run twice a day as a cronjob.

1. extract the tarball in a working-directory

2. open "rpmfusion.conf"

3. enter your bugzilla account email and password in the [bugzilla]
section

    That account MUST have "editcomponents" permission (a special account
    with just that permission could be created).

4. execute "RUN.sh" once

    During the first run it will create the missing files ("pickle*") in
    current dir and take longer than normal for every owners.list entry
    that has people in "initialcclist". As why, see bottom paragraph in
    this mail.

    Notice the warning on stderr about duplicate entries in some of
    the owners.list files. ;)  This is stuff that must be fixed in
    those files.

5. execute "RUN.sh" again

    This time you should not see as many update status messages as
    previously (as it could use the pickle files).

(5.2  try once more with a modified owners.list in svn) 

6. enable option "-q" (quiet) in RUN.sh to kill normal stdout messages
as appropriate for cron jobs

[...]

Why more than one script? 

Python modules for reusability. Even the modules can be run as scripts
(use -h or --help) for testing, btw.

There's the old "CheckOwnersList" script that can compare repository
contents with an owners.list file and print missing entries (where only
the email addresses must be substituted!). E.g. for RPM Fusion Fedora free
devel:

  $ python CheckOwnersList -c rpmfusion.conf -p free-rawhide
  Reading repository metadata...
  free-rawhide - Packages in repos: 144
  Packages in owners.list: 155

Nothing missing, so no further output.

[...]

Compared with Livna, a couple of changes have been necessary to make
the scripts work with RPM Fusion:

 - the bugzilla version uses special tokens to combat fraud -- this
   required ugly enhancements in the scripts

 - the well-known "describecomponents.cgi" web page doesn't list
   the members of the Cc list but only name, description, owner -- due
   to that it's not possible to simply compare bz's list of "components"
   with owners.list since they don't cover the same details. The missing
   details are filled in from a local cache (Python pickle files maintained
   during each run).

 - the "default QA contact" field is not used and unavailable compared
   with Livna - that required a flag in the web page parser

[...]

And finally, although this [still] works, another solution would be to
look into modifying the bugzilla database tables directly and deal with
the different requirements (srv/db access and such). Fedora's scripts
probably would not be compatible because Red Hat's bugzilla is different
(just a guess).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzcomps-websync.tgz
Type: application/x-gzip
Size: 5963 bytes
Desc: not available
Url : http://lists.rpmfusion.org/pipermail/rpmfusion-developers/attachments/20081110/8bb89330/bzcomps-websync.tgz


More information about the rpmfusion-developers mailing list