Skip to content

Shell spring cleaning #4670

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

Merged
merged 6 commits into from
Mar 15, 2025
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Mar 10, 2025

High level overview:

  • bump shfmt and shellcheck;
  • get rid of some "shellcheck disable" annotations;
  • bump bats to v0.11.0 so we use the same version everywhere.

Signed-off-by: Kir Kolyshkin <[email protected]>
Signed-off-by: Kir Kolyshkin <[email protected]>
Those are no longer needed with shellcheck v0.10.0 (possibly with an
earlier version, too, but I am too lazy to check that).

While at it, fix a typo in the comment.

Signed-off-by: Kir Kolyshkin <[email protected]>
1. There is no need to have -p option in mkdir here, since
   /home/rootless was already created by useradd above.

2. When there is no -p, there is no need to suppress the shellcheck
   warning (which looked like this):

> In script/setup_host_fedora.sh line 21:
> mkdir -m 0700 -p /home/rootless/.ssh
>       ^-- SC2174 (warning): When used with -p, -m only applies to the deepest directory.

Signed-off-by: Kir Kolyshkin <[email protected]>
This makes the code more robust and allows to remove the
"shellcheck disable=SC2086" annotation.

Signed-off-by: Kir Kolyshkin <[email protected]>
This is the version available from Fedora 41.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin force-pushed the shell-spring-cleaning branch from ccaa31e to d31e6b8 Compare March 13, 2025 17:26
Copy link
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kolyshkin kolyshkin merged commit fde0842 into opencontainers:main Mar 15, 2025
34 checks passed
@kolyshkin kolyshkin added the backport/1.3-done A PR in main branch which has been backported to release-1.3 label Apr 22, 2025
@kolyshkin
Copy link
Contributor Author

1.3 backport: #4737

@kolyshkin kolyshkin added the backport/1.2-done A PR in main branch which has been backported to release-1.2 label Apr 23, 2025
@kolyshkin
Copy link
Contributor Author

1.2 backport: #4742 (except for the last commit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci backport/1.2-done A PR in main branch which has been backported to release-1.2 backport/1.3-done A PR in main branch which has been backported to release-1.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants