[libvirt] Publishing libvirt 'patches' JSON database?

Kashyap Chamarthy kchamart at redhat.com
Wed Mar 23 15:34:26 UTC 2016


I'd imagine most developers on this list have their own workflows to
track/apply/test patches from the mailing list.  I normally just save
patches in Mutt's Maildir and apply them manually to a Git branch.  I
recently began using the 'patches'[1] tool, that some of you on this
list must be familiar with, to test arbitrary QEMU patches from the
mailing list, and found it relatively easy large patch series from
mailing list.

I'm writing this to check if the libvirt upstream community finds it
desirable to setup such a patches database.


What is 'patches'?
------------------

Quoting the README[2]:

    "patches is a patch tracking system.  It consists of two parts: a set
    of commands that build a database of patches from a mailing list and
    then a set of commands that can search that database.  It supports
    the following features:
    
    - Tracking patch status by determining which patches are already
      committed, have newer versions posted, are RFC, etc.
    
    - Applying patches or pull requests with a single command.
    
    - Searching for patches using a rich query language."


A quick workflow to test patches from mailing list
---------------------------------------------------

FWIW, this is my rudimentary use-case.

Clone the repo, and fetch the patches database (may take a few minutes):

    $ git clone https://github.com/stefanha/patches.git
    $ cd patches
    $ ./patches fetch http://wiki.qemu.org/patches/patches.json

And, suppose, I want to test Dan's LUKS encryption support (26) patch series, I
go find the message ID:

    $ ./patches list | grep -B5 "Support LUKS encryption"
    
    Message-id: 1456747261-22032-1-git-send-email-berrange at redhat.com
    From: Daniel P. Berrange <berrange at redhat.com>
    Date: 2016-02-29
    Tags: v4
       [0/26] Support LUKS encryption in block  devices
 
Trivially apply it (assuming you have a test branch):

    $ ./patches apply --git-dir ~/src/qemu/ \
        id:1456747261-22032-1-git-send-email-berrange at redhat.com
    Applying: crypto: add cryptographic random byte source
    Applying: crypto: add support for PBKDF2 algorithm
    Applying: crypto: add support for generating initialization vectors
    Applying: crypto: add support for anti-forensic split algorithm
    Applying: crypto: skip testing of unsupported cipher algorithms
    [...]

Test away!

Rinse, repeat:

   "The `fetch` command should be run whenever you want to refresh the
   patch database; it will download any new patches that have arrived
   since the last time you did a fetch."


Here's[3] the documentation to setup the patches database.


[1] https://github.com/stefanha/patches/tree/stefanha-tweaks
[2] https://github.com/stefanha/patches/blob/stefanha-tweaks/README.md
[3] https://github.com/stefanha/patches/blob/stefanha-tweaks/README-server.md
-- 
/kashyap




More information about the libvir-list mailing list