[Git][cip-project/cip-kernel/cip-kernel-sec][master] 5 commits: remotes: refer to configuration files
Agustin Benito Bethencourt
Ben Hutchings pushed to branch master at cip-project / cip-kernel / cip-kernel-sec
Commits:
-
3ed9dc6d
by Daniel Sangorrin at 2019-06-17T20:14:31Z
-
716ee107
by Daniel Sangorrin at 2019-06-17T20:16:36Z
-
b2aed3f3
by Daniel Sangorrin at 2019-06-18T14:43:19Z
-
6210caef
by Daniel Sangorrin at 2019-06-20T17:41:20Z
-
b257980d
by Daniel Sangorrin at 2019-06-20T17:41:20Z
5 changed files:
- README.md
- scripts/import_stable.py
- scripts/kernel_sec/branch.py
- scripts/report_affected.py
- scripts/webview.py
Changes:
... | ... | @@ -18,9 +18,10 @@ beneath that. They require PyYAML and html5lib (packaged in Debian as |
18 | 18 |
python3-yaml and python3-html5lib).
|
19 | 19 |
|
20 | 20 |
Many scripts require access to a kernel git repository. By default
|
21 |
-this is assumed to be in `../kernel`, with remotes named `torvalds`
|
|
22 |
-and `stable` for the mainline and stable repositories. These can
|
|
23 |
-be overridden by command-line options or by configuration.
|
|
21 |
+this is assumed to be in `../kernel`, with remotes configured in
|
|
22 |
+`conf/remotes.yml`, e.g. `torvalds`, `stable` and `cip` for the mainline,
|
|
23 |
+stable and cip repositories. These can be overridden by command-line options
|
|
24 |
+or configuration (`~/.config/kernel-sec/remotes.yml`).
|
|
24 | 25 |
|
25 | 26 |
* `scripts/import_debian.py` - import information from Debian's
|
26 | 27 |
`kernel_sec` project. It includes all issues that Debian considers
|
... | ... | @@ -137,8 +137,7 @@ def add_backports(branches, c_b_map, issue_commits, all_backports, |
137 | 137 |
|
138 | 138 |
def main(git_repo, remotes, debug=False):
|
139 | 139 |
branches = kernel_sec.branch.get_live_branches()
|
140 |
- remote_names = set(branch['git_remote'] for branch in branches
|
|
141 |
- if branch['short_name'] != 'mainline')
|
|
140 |
+ remote_names = set(branch['git_remote'] for branch in branches)
|
|
142 | 141 |
|
143 | 142 |
for remote_name in remote_names:
|
144 | 143 |
update(git_repo, remotes[remote_name]['git_name'])
|
... | ... | @@ -175,7 +174,7 @@ if __name__ == '__main__': |
175 | 174 |
parser.add_argument('--remote-name',
|
176 | 175 |
dest='remote_name', action='append', default=[],
|
177 | 176 |
help='git remote name mappings, e.g. stable:korg-stable',
|
178 |
- metavar='NAME=OTHER-NAME')
|
|
177 |
+ metavar='NAME:OTHER-NAME')
|
|
179 | 178 |
parser.add_argument('--mainline-remote',
|
180 | 179 |
dest='mainline_remote_name',
|
181 | 180 |
help="git remote name to use instead of 'torvalds'",
|
... | ... | @@ -209,10 +209,10 @@ def get_remotes(mappings, mainline=None, stable=None): |
209 | 209 |
remotes = RemoteMap()
|
210 | 210 |
remotes.update(_get_configured_remotes('conf/remotes.yml'))
|
211 | 211 |
remotes.update(
|
212 |
- _get_configured_branches(
|
|
212 |
+ _get_configured_remotes(
|
|
213 | 213 |
os.path.expanduser('~/.config/kernel-sec/remotes.yml')))
|
214 | 214 |
for mapping in mappings:
|
215 |
- left, right = arg.split(':', 1)
|
|
215 |
+ left, right = mapping.split(':', 1)
|
|
216 | 216 |
remotes[left]['git_name'] = right
|
217 | 217 |
if mainline:
|
218 | 218 |
remotes['torvalds']['git_name'] = mainline
|
... | ... | @@ -76,7 +76,7 @@ if __name__ == '__main__': |
76 | 76 |
parser.add_argument('--remote-name',
|
77 | 77 |
dest='remote_name', action='append', default=[],
|
78 | 78 |
help='git remote name mappings, e.g. stable:korg-stable',
|
79 |
- metavar='NAME=OTHER-NAME')
|
|
79 |
+ metavar='NAME:OTHER-NAME')
|
|
80 | 80 |
parser.add_argument('--mainline-remote',
|
81 | 81 |
dest='mainline_remote_name',
|
82 | 82 |
help="git remote name to use instead of 'torvalds'",
|
... | ... | @@ -206,7 +206,7 @@ if __name__ == '__main__': |
206 | 206 |
parser.add_argument('--remote-name',
|
207 | 207 |
dest='remote_name', action='append', default=[],
|
208 | 208 |
help='git remote name mappings, e.g. stable:korg-stable',
|
209 |
- metavar='NAME=OTHER-NAME')
|
|
209 |
+ metavar='NAME:OTHER-NAME')
|
|
210 | 210 |
parser.add_argument('--mainline-remote',
|
211 | 211 |
dest='mainline_remote_name',
|
212 | 212 |
help="git remote name to use instead of 'torvalds'",
|