Replace get_cos_specific_kernel_commits with get_non_upstreamed_commits

The get_cos_specific_kernel_commits.py script has some useful functions
for comparing local and upstream branches, but the interface for using
it resulted in it only being useful for the kernel upgrade. This revises
the interface to essentially match `git cherry` to make it more
generally useful. In particular, it now allows arbitrary revisions to be
specified instead of requiring kernel branch versions.

As an example, this command for getting the cos-specific kernel commits:

python3 ~/cos/src/scripts/cos/get_cos_specific_kernel_commits.py \
  --new-kernel-version 6.12 --previous-kernel-version 6.6 \
  --origin cos

Becomes:

python3 ~/cos/src/scripts/cos/get_non_upstreamed_commits.py \
  --upstream cos/upstream-6.12 --limit cos/upstream-6.6 \
  --head cos/cos-6.6

An immediate use case for this change is comparing upstream to a local
branch with patches on top of cos-6.6:

python3 ~/cos/src/scripts/cos/get_non_upstreamed_commits.py \
  --upstream cos/upstream-6.12 --limit cos/cos-6.6 \
  --head cos-6.6-patched

which would not have been possible with the previous script.

BUG=b/402287494,b/372323398
TEST=ran the command and verified that the output is identical to the
get_cos_specific_kernel_commits.py output when given equivalent
arguments, ran the cos-6.6-patched command above and checked the output
RELEASE_NOTE=None

Change-Id: Id398e6446ad21d26af230c256abcb7d3174203f9
Reviewed-on: https://cos-review.googlesource.com/c/cos/scripts/+/98841
Tested-by: Kevin Berry <kpberry@google.com>
Reviewed-by: Anil Altinay <aaltinay@google.com>
1 file changed
tree: 7ad90a5b305baf564f2408348cbe42959fea6c2a
  1. convert_image.sh
  2. cos.json
  3. get_non_upstreamed_commits.py
  4. make_ova.sh
  5. README.md
  6. resync_kernel_configs.sh
  7. run_vmtests.sh
  8. template.ovf
  9. upgrade-osconfig-script.sh
README.md

This folder contains image utilities from Container-Optimized OS(COS) team to fullfill the functionalities to support image formwat convertion between different platfroms:

  • COS on vSphere
  • COS on AWS
  • COS on AZure
  • COS on Borg