automation: python scripts sync'ing linux repos/db
1. Synchronize linux-upstream, linux-stable, linux-chromeos repositories
2. Updates SQL tables with most recently pulled repo data
BUG=None
TEST=None
Change-Id: I8909dfd9c38124abb66daf0498f4c24b6ae70e6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2050096
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Tested-by: Hirthanan Subenderan <hirthanan@google.com>
Commit-Queue: Hirthanan Subenderan <hirthanan@google.com>
diff --git a/contrib/findmissing/common.py b/contrib/findmissing/common.py
index dfa93b1..dc17dff 100755
--- a/contrib/findmissing/common.py
+++ b/contrib/findmissing/common.py
@@ -8,11 +8,25 @@
"""Module containing shared helper methods."""
from __future__ import print_function
-
import os
import sqlite3
import re
+
+KERNEL_SITE = 'https://git.kernel.org/'
+UPSTREAM_REPO = KERNEL_SITE + 'pub/scm/linux/kernel/git/torvalds/linux'
+STABLE_REPO = KERNEL_SITE + 'pub/scm/linux/kernel/git/stable/linux-stable'
+
+CHROMIUM_SITE = 'https://chromium.googlesource.com/'
+CHROMEOS_REPO = CHROMIUM_SITE + 'chromiumos/third_party/kernel'
+CHROMIUM_REVIEW_BASEURL = 'https://chromium-review.googlesource.com/'
+
+SUPPORTED_KERNELS = ('4.4', '4.14', '4.19', '5.4')
+
+CHROMEOS_PATH = 'linux-chrome'
+STABLE_PATH = 'linux-stable'
+UPSTREAM_PATH = 'linux-upstream'
+
WORKDIR = os.getcwd()
DBDIR = os.path.join(WORKDIR, 'database')
UPSTREAMDB = os.path.join(DBDIR, 'upstream.db')
@@ -37,10 +51,12 @@
"""Path of patchdb for stable versions."""
return os.path.join(DBDIR, 'patch-stable-%s.db' % version)
+
def patchdb_chromeos(version):
"""Path of patchdb for chromeos versions."""
return os.path.join(DBDIR, 'patch-chromeos-%s.db' % version)
+
def stable_branch(version):
"""Stable branch name"""
return 'linux-%s.y' % version