Skip to content

Commit

Permalink
Insert bundled provides in stratisd spec file
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Nov 9, 2023
1 parent e45f9e9 commit a74a7e6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions release_management/create_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
ReleaseVersion,
calc_pre_release_suffix,
edit_specfile,
get_bundled_provides,
get_package_info,
get_python_package_info,
make_source_tarball,
Expand Down Expand Up @@ -142,13 +143,25 @@ def _stratisd_artifacts(namespace):

os.rename(vendor_tarfile_name, vendor_tarfile_path)

def insert_bundled_provides(spec):
"""
Insert bundled provides in the spec file.
"""
with spec.sections() as sections:
preamble = sections.package
preamble.append("%if 0%{?rhel}")
preamble.extend(get_bundled_provides(vendor_tarfile_path))
preamble.append("%endif")
preamble.append("")

edit_specfile(
specfile_path,
release_version=release_version,
sources=[
os.path.basename(path)
for path in [source_tarfile_path, vendor_tarfile_path, crate_path]
],
arbitrary=insert_bundled_provides,
)


Expand Down

0 comments on commit a74a7e6

Please sign in to comment.