Add CVE management support

The CVEs listed by the official list that can be found at
http://cve.mitre.org/data/downloads/index.html are imported into a
sqlite DB in order to be queried later by kdist-cve sub-commands.

That allows to figure out if a commit fixes a CVE et to retrieve
specific information about a CVE.
Add kdist-cve--list-db that simply lists by name the content of the DB
fix usage: sub-command's name can include a '-'
Add CVE related information into the release changelog
cve-import: show duplicated CVE in verbose mode
cve-import: show ignored CVE in verbose mode

Ignored CVE are those without a link to the upstream corresponding
fix.

This can happen in 2 cases:

  - the fix has not been integrated in mainline
  - the CVE is not related to the kernel
cve-log: add a new pattern used by git-cherry-pick in order to find upstream rev from a stable commit
cve-log: add a pattern to match commit sha1
cve-log: fix exit value

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Remove cve_db__query_full_by_sha1() since it can not used and not accurate

url and desc field should be an array like ids.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve_log: introduce cve_log__pretty_print()

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-log: don't parse commit body for commit in mainline

I found a commit that use the "link" pattern to point out another
(boggus) commit. Also the "cherry-pick" pattern is probably used for
mainlined commit.

Therefore don't try to find mainline links in body of mainlined
commits.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-log: catch some git formatting options that would break the rev parsing

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-import: die early if the passed file is not found

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-show: introduce "--format=format:" option

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-log: add support for 'format:' format specification

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
cve-log: one 'stable' fix can point to several upstream commits

See 143d9963df6580491f9a5c38c9d4883786f78123
cve-log: fix -n<num> option

this was broken by commit 6b75f4f90ef4ac89598940eb53e0e880666dbee7

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
workaround a bug in bash 4.2: trap handlers are not called in 'subshell1 | subshell2' construct

For example in:

 { trap "echo EXIT handler called" EXIT; echo done; } | cat

the exit handler is not called. To fix it, I had to do instead:

 ( trap "echo EXIT handler called" EXIT; echo done; ) | cat
cve-log: use git-merge-base to find boundaries between master and positive sets

It avoids the boundary handling and any other special-cases I may have
missed..

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>