-
Notifications
You must be signed in to change notification settings - Fork 161
fix: Pass GPG key ids as separate arguments when exporting. #328
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
Conversation
This makes sure all keys are exported to a keyring archive, as opposed to only the first key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the GPG export step to pass each key ID as a separate argument, ensuring all specified keys are included in the archive.
- Removed quotes around
$NGINX_GPGKEYSin thegpg1 --exportcommand to allow shell splitting of multiple key IDs. - Applied the change consistently in stable, mainline, and templated Dockerfiles.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| stable/debian/Dockerfile | Drop quotes around $NGINX_GPGKEYS so multiple keys are exported |
| mainline/debian/Dockerfile | Same change for the mainline Debian build |
| Dockerfile-debian.template | Same change in the shared template |
Comments suppressed due to low confidence (2)
stable/debian/Dockerfile:41
- Add a CI test or validation step to confirm that multiple GPG keys are correctly exported into the archive after this change.
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
Dockerfile-debian.template:36
- [nitpick] This export block is duplicated across stable, mainline, and template files. Consider extracting it into a shared script or build snippet to reduce repetition and ease future updates.
gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \
| test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \ | ||
| done; \ | ||
| gpg1 --export "$NGINX_GPGKEYS" > "$NGINX_GPGKEY_PATH" ; \ | ||
| gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \ |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unquoted variable expansions can trigger pathname expansion (globbing). Consider disabling globbing (e.g., set -o noglob) or iterating explicitly over each key to pass them safely.
| gpg1 --export $NGINX_GPGKEYS > "$NGINX_GPGKEY_PATH" ; \ | |
| gpg1 --export "$NGINX_GPGKEYS" > "$NGINX_GPGKEY_PATH" ; \ |
|
Tests are failing due to the way the build pipeline works. As long as the first build succeeds the remainder builds will work once the pipeline is merged into main. |
This makes sure all keys are exported to a keyring archive, as opposed to only the first key.
Same as in nginx/docker-nginx@0b49b8b