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

Add file to skip verification for a single version #863

Merged
merged 1 commit into from
Jan 21, 2025
Merged
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
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ ${custom}_provides_ban
Controlling the build process
------------------------------

invalid_release_sig
This file contains the current version that will **not** have its package
file be processed for signature verification (overriding the config_opt).
This file will be automatically deleted after a new release and is intended
to override a single bad signed release.

extra_sources
This file contains a list of extra files to be added to the ``.spec`` and
optionally installed as well. Each non-blank and non-comment line should start
Expand Down
12 changes: 12 additions & 0 deletions autospec/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,18 @@ def parse_config_files(self, bump, filemanager, version, requirements):
except Exception as e:
print_warning(f"Unable to remove buildreq_cache file: {e}")

invalid_release_sig_file = os.path.join(self.download_path, "invalid_release_sig")
content = self.read_conf_file(invalid_release_sig_file)
if content and content[0] == version:
self.config_opts['verify_required'] = False
else:
try:
os.unlink(invalid_release_sig_file)
except FileNotFoundError:
pass
except Exception as e:
print_warning(f"Unable to remove invalid_release_sig file: {e}")

content = self.read_conf_file(os.path.join(self.download_path, "pkgconfig_add"))
for extra in content:
extra = pkgconfig_re.sub(r'\1', extra)
Expand Down
Loading