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

Fix the updpkgsums GitHub workflow #83

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Fix the updpkgsums GitHub workflow #83

merged 2 commits into from
Jun 11, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Jun 10, 2024

I never had verified that the /updpkgsums slash command works, up until last week, when I tried to run it in git-for-windows/build-extra#558. Turns out that it needed a couple of fixes. git-for-windows/gfw-helper-github-app#83 was needed on the GitHub App side, and this here PR is needed to actually let the operation succeed.

dscho added 2 commits June 7, 2024 13:25
The custom `init-g4w-for-pacman` Action initializes a subset of Git for
Windows' SDK via a specific sparse checkout. To make things a bit more
efficient, this sparse checkout is cached using the `actions/cache`
Action.

To that end, a cache key is defined. It is actually defined twice, once
in the `restore` step and once in the `save` step. This leaves room to
forget updating the cache key in one of the two places when it is
changed.

Let's just define it in a single location instead.

Signed-off-by: Johannes Schindelin <[email protected]>
When the `updpkgsums` workflow runs, it initializes a subset of Git for
Windows SDK's repository via a sparse checkout. This subset is defined
in the custom `init-g4w-sdk-for-pacman` Action, and it works well for
`pacman`/`updpkgsums` invocations.

For `makepkg`, however, we need to include the Pacman configuration,
and `gpg.exe`,otherwise the workflow will fail with an error message
like this:

  ==> Checking runtime dependencies...
   error: config file /etc/pacman.conf could not be read: No such file or directory

This happened in this failed workflow run:
https://github.com/git-for-windows/git-for-windows-automation/actions/runs/9415088089/job/25935346092#step:9:87

Fix this by including the Pacman configuration and `gpg.exe in the
sparse checkout.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Jun 10, 2024
@dscho
Copy link
Member Author

dscho commented Jun 10, 2024

Here is a successful run that verifies that no messages like these are shown:

==> Making package: mingw-w64-git-extra 1.1.636.2db97b993-1 (Fri Jun  7 12:41:16 2024)
==> Checking runtime dependencies...
error: GPGME error: Invalid crypto engine
error: clangarm64: missing required signature
[...]

These would be shown unless a working gpg.exe is part of the SDK subset, triggered via makepkg running pacman -T diffutils, among other, similar pacman invocations.

Took a while to figure out how best to include the missing bits, but finally I managed that trick.

@dscho dscho merged commit 292b89b into main Jun 11, 2024
1 check passed
@dscho dscho deleted the fix-updpkgsums branch June 11, 2024 14:39
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.

1 participant