-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
release: correctly handle binary signing for "make releaseall" #3309
Conversation
My GPG keys are not available inside the container, so it makes little sense to try to sign the binaries inside the container's release.sh. The solution is to split things into separate build and sign stages, with signing ocurring after the in-Docker build. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
|
||
# Print usage information. | ||
function usage() { | ||
echo "usage: release_sign.sh [-S <gpg-key-id>] [-r <release-dir>]" >&2 |
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.
This lacks some options (-H, -v)
Hmm, can't we just do something like this instead (not tested)? diff --git a/Makefile b/Makefile
index aeb62f8c..c4aff886 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,7 @@ releaseall: release
release: runcimage
$(CONTAINER_ENGINE) run $(CONTAINER_ENGINE_RUN_FLAGS) \
--rm -v $(CURDIR):/go/src/$(PROJECT) \
+ -v ~/.gnupg:/root/.gnupg:ro \
-e RELEASE_ARGS=$(RELEASE_ARGS) \
$(RUNC_IMAGE) make localrelease |
Theoretically speaking, some malicious image can stole private keys. OTOH if we trust this image in building runc binary which we are releasing, it is to be trusted. |
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.
LGTM (in case you want to merge this as is, which is fine by me)
I use a hardware token for my GPG keys, so passing the keydir won't work. |
Two LGTMs, is this ready to merge? |
Yup. The help thing is a minor issue, I can fix it some other time. |
My GPG keys are not available inside the container, so it makes little
sense to try to sign the binaries inside the container's release.sh. The
solution is to split things into separate build and sign stages, with
signing ocurring after the in-Docker build.
Fixes #3038
Signed-off-by: Aleksa Sarai cyphar@cyphar.com