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

configs: Rawhide to accept GPG key from future Fedora Rawhide+1 #1342

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mock-core-configs/etc/mock/templates/fedora-rawhide.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ user_agent={{ user_agent }}

{%- macro rawhide_gpg_keys() -%}
file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary
{%- for version in [releasever|int, releasever|int - 1]
{%- for version in [releasever|int, releasever|int - 1, releasever|int + 1]
Copy link

Choose a reason for hiding this comment

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

Thanks! My only qualm is what happens if the key doesn't exist yet? We don't want any kind of warning or error in that case. Hmm, I think we get an error if they key doesn't exist:

cannot open file: (2) - No such file or directory [/usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-46-primary]

I think this should be wrapped in a check whether the key actually exists.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I installed this fatal error into the branching script:

File /usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-43-primary not found!

The new Fedora Rawhide (42) requires a GPG key for Fedora 43,
which must be generated by Fedora Infrastructure team and shipped in the
distribution-gpg-keys.rpm package.  This either has not happened yet, the
package is outdated, or it is not even installed on this box.

%} file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ version }}-primary
{%- endfor %}
{%- endmacro %}
Expand Down
14 changes: 14 additions & 0 deletions releng/rawhide-branching.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ for config in fedora-??-x86_64.cfg; do
next_version=$(( version + 1 ))
done

rawhide_plus_one_version=$(( next_version + 1 ))
next_gpg=/usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$rawhide_plus_one_version-primary
test -e "$next_gpg" || {
cat >&2 <<EOF
File $next_gpg not found!

The new Fedora Rawhide ($next_version) requires a GPG key for Fedora $rawhide_plus_one_version,
which must be generated by Fedora Infrastructure team and shipped in the
distribution-gpg-keys.rpm package. This either has not happened yet, the
package is outdated, or it is not even installed on this box.
EOF
exit 1
}

architectures=()
for config in fedora-"$version"-*.cfg; do
architecture=$(echo "$config" | sed -e "s/fedora-$version-//" -e "s/.cfg//")
Expand Down
4 changes: 4 additions & 0 deletions releng/release-notes-next/fedora-rawhide-key-plus-one.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fedora Rawhide configurations, such as releasever=41 now, accept GPG keys from
Fedora releasever+1 (for example, 42, not yet used for RPM signatures). This
change is implemented to address the typically short and unnecessary
inconvenience during [the Fedora branching process][issue#1338] in the future.
Loading