scripts: add script to sync kernel changes (#13)

This script automates the process of applying libbpf-relevant changes
from kernel repository on top of current state of libbpf repository.

It uses CHECKPOINT-COMMIT file to keep track of last commit in kernel
repo up to which libbpf is in sync with. If there are any new libbpf
changes in kernel repository, script extracts them, preserving original
commit metadata. It also creates a "sync commit" using cover letter as
a template, which nicely summarizes changes since last sync with kernel.

Usage: ./scripts/sync-kernel.sh <linux-repo> <libbpf-repo>

If it succeeds, script will create a bunch of local commits in
<libbpf-repo> in separate branch, which can be easily pushed into github
to create a pull request.

Script tries to clean up after itself, except in case of failure. But it
doesn't clean up timestamped branches it creates in both kernel and
libbpf repositories for now. We can add that later.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
Andrii Nakryiko authored and yonghong-song committed 2019-02-16 22:22:30 -08:00
1 parent 8008be5657
commit 8e42f42533
2 files changed
+102

No files matched your search

+1
View File
@@ -0,0 +1 @@
789f6bab849e04ea029c09b81dc8401dc0268cf9