-
Notifications
You must be signed in to change notification settings - Fork 16
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
ensure things are properly signed before uploading to stage #425
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
72ee6e0
ensure things are properly signed before uploading to stage
evgeni 272fba5
move ARCHES to settings
evgeni 076dc25
move stage local base to a setting
evgeni 5773a8f
check everything that has a key
evgeni 8f5db87
always run verify
evgeni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ | |
SIGNER="[email protected]" | ||
SIGNER_NAME="Foreman Automatic Signing Key" | ||
OSES="" | ||
ARCHES="x86_64 source" | ||
RPMDIR="$RELEASEDIR/rpms" | ||
KEYDIR="$RELEASEDIR/gnupg" | ||
GNUPGHOME="$KEYDIR" | ||
|
@@ -67,6 +68,7 @@ | |
RPM_PACKAGES=() | ||
PACKAGING_PR=${PACKAGING_PR:-true} | ||
GPG_EXPIRE="1y" | ||
STAGE_LOCAL_BASE="tmp/$PROJECT/$VERSION" | ||
|
||
load_settings | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
. settings | ||
|
||
if [[ -z "${FULLGPGKEY}" ]]; then | ||
echo "No signing configured." | ||
exit 0 | ||
fi | ||
|
||
EXIT_CODE=0 | ||
|
||
for os in $OSES; do | ||
for arch in $ARCHES; do | ||
UNSIGNED_RPMS=$(./list_unsigned_rpms "$STAGE_LOCAL_BASE/$os/$arch" "$HALFGPGKEY") | ||
evgeni marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if [[ -n "$UNSIGNED_RPMS" ]]; then | ||
echo "$UNSIGNED_RPMS" | ||
EXIT_CODE=1 | ||
fi | ||
done | ||
done | ||
|
||
if [[ "${EXIT_CODE}" != "0" ]]; then | ||
echo "RPMs not signed with ${HALFGPGKEY} found, aborting" | ||
fi | ||
|
||
exit ${EXIT_CODE} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / shellcheck
YUM_HOSTS appears unused. Verify use (or export if used externally). Warning
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.
we could also use
RPMDIR
(which is currently unused) here… questions and choices.@ehelms do you recall why
tmp/
was used vs the previously existing path?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.
I suspect it was previously used by the other script and @ehelms didn't want to conflict with it, but now that koji is cleaned up it's an unused variable. When I introduced it, it made sense to me to store it in the release itself.
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.
What previously existing path? I was the first to introduce the notion of generating staging repositories locally :)
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.
But not the first one who had to download rpms, sign them and upload the signatures, which we did in RPMDIR
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.
Fair. My motivation was that I wanted the generation of the repositories to be co-located, easy to clean up and to mimic the structure they would have on the staging repository server to allow easier testing and verification of them.
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.
Aye. It's probably fine being in
tmp
and thrown away later. Probably bit if cleanup we can perform later.