Skip to content

Latest commit

 

History

History
81 lines (43 loc) · 2.87 KB

update_portingdb.rst

File metadata and controls

81 lines (43 loc) · 2.87 KB

Update portingdb data

Setup (to be run just once and if needed)

To use the portingdb update scripts, you will need to install and configure the following:

  1. Ensure that you run Fedora 28 or higher.

  2. Install system-wide dependencies and rawhide repo definitions:

    $ sudo dnf install python3-bugzilla python3-libarchive-c fedora-repos-rawhide
    

    Note that you cannot use Python virtual environments for this.

  3. Install portingdb into your virtualenv:

    (venv) $ pip install --editable .  # Mind the dot at the end!
    

Update the data

The following steps are needed to update pordingdb data:

  1. Checkout a feature branch if that's your way of doing git changes:

    $ git checkout -b update-fedora-data-...
    
  2. Get the Python 3 porting status using py3query dnf plugin. Use -o option to write the output directly to fedora.json:

    $ dnf-3 --setopt=pluginpath=dnf-plugins/ --repo=rawhide --repo=rawhide-source py3query --refresh --installroot=/tmp/empty-install-root -o data/fedora.json
    
  3. Compare statuses of packages in the new JSON file:

    (venv) $ python scripts/jsondiff.py <(git show HEAD:data/fedora.json) data/fedora.json
    
  4. If you're satisfied, commit the above. You can use the commit message from jsondiff:

    (venv) $ git commit -a -m"$(python scripts/jsondiff.py <(git show HEAD:data/fedora.json) data/fedora.json)"

  5. Get historical status and naming policy data and update history.csv and history-naming.csv:

    (venv) $ python -u scripts/get-history.py --update data/history.csv | tee history.csv && mv history.csv data/history.csv
    
  6. Update the maintainer lists:

    $ wget https://src.fedoraproject.org/extras/pagure_owner_alias.json -O data/pagure_owner_alias.json
    
  7. You can check how portingdb looks with the new data:

    (venv) $ python -m portingdb -v --datadir=data/ serve --debug

  8. At this point, take a closer look at the jsondiff (the last commit message):

    (venv) $ git show

    For changes marked ♥, award badges: add new entries to data/badges.txt.

    Find responsible people at https://src.fedoraproject.org/rpms/python-FOO/commits/rawhide

  9. Commit changes:

    (venv) $ git commit -am 'Update history, badges, maintainers'
    
  10. Push to a fork and create a PR. Put the jsondiff in the PR message; this command will put it in your clipboard (at least on X11):

    (venv) $ git log --format=%B -n 1 HEAD~ | xsel -b
    

    Add (username X→Y) to the commit message for changed people in badges.txt Award badges to people who reached 1, 5 or 10 greened packages.

    If you lack the permissions to award badges, note it in the PR and somebody will do it for you.

  11. You made it!