Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scripts following repo submodule removal and rename #160

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

chewi
Copy link
Contributor

@chewi chewi commented Jul 19, 2024

Update scripts following repo submodule removal and rename

portage-stable and coreos-overlay used to be submodules of scripts, but this is no longer true in any release channel, so we can drop any code that handles the migration.

These package repositories will also be moved and renamed to gentoo-subset and flatcar-overlay respectively, so these scripts need adjusting accordingly. The changes are backwards-compatible, so we don't need to wait for the move/rename to actually happen first.

A couple of other scripts are obsolete and can simply be removed.

How to use

Use the scripts as usual!

Testing done

I have tested coreos-overlay-diff.py (which has another issue, see #159) and show-changes. The other changes are either trivial or hard to test, like tag-release.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
A newer version of this script lives in the reports repository.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
CROS_WORKON_COMMIT has been replaced by EGIT_COMMIT in ebuilds.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
portage-stable and coreos-overlay used to be submodules of scripts, but
this is no longer true in any release channel, so we can drop any code
that handles the migration.

Submodule-related arguments are still passed to git where they make
sense just in case we do start using submodules that don't need special
handling.

Some of these scripts seem a little overly complex now that they only
handle the scripts repo, but let's not rewrite them now.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Compatibility symlinks have been added to the scripts repo, but they are
not needed by these scripts. `git show` cannot follow them, so we need
to explicit check both the new and old locations.

coreos-overlay-diff.py has been renamed to flatcar-overlay-diff.py and
now accepts --flatcar-overlay, but --coreos-overlay has been kept as an
alias.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi requested a review from a team July 19, 2024 17:17
@chewi chewi changed the title Chewi/repo mv Update scripts following repo submodule removal and rename Jul 19, 2024
@jepio
Copy link
Member

jepio commented Jul 22, 2024

I have tested coreos-overlay-diff.py (which has another issue, see #159) and show-changes. The other changes are either trivial or hard to test, like tag-release.

I was about to ask about testing - you should be able to test this your own fork. After that you can paste the commands you executed and the output confirming things work as expected.

@chewi
Copy link
Contributor Author

chewi commented Jul 22, 2024

Looking good.

$ VERSION=9123.9.9 SDK_VERSION=4012.0.0 CHANNEL=alpha ./tag-release 
Running with CHANNEL=alpha VERSION=9123.9.9 MAJOR=9123
SCRIPTS_REF=origin/flatcar-9123
Preparing scripts
Deleting tag alpha-9123.9.9 if it exists in scripts
Deleted tag 'alpha-9123.9.9' (was ba48bb99fa)
To /tmp/scripts
 - [deleted]               alpha-9123.9.9
Checking out scripts branch flatcar-9123 to create version file
branch 'flatcar-9123' set up to track 'origin/flatcar-9123'.
Reset branch 'flatcar-9123'
Your branch is up to date with 'origin/flatcar-9123'.
Already up to date.

###### Writing versionfile 'sdk_container/.repo/manifests/version.txt' to SDK '4012.0.0', OS '9123.9.9'. ######
[flatcar-9123 3b30a1f603] New version: alpha-9123.9.9
fatal: ambiguous argument 'alpha-9123.9.9': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 865 bytes | 865.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To /tmp/scripts
   1fd1608412..3b30a1f603  HEAD -> flatcar-9123
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 808 bytes | 808.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To /tmp/scripts
 * [new tag]               alpha-9123.9.9 -> alpha-9123.9.9
Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants