Skip to content

Commit

Permalink
Merge pull request #62 from malt3/rpm-rule-integrity
Browse files Browse the repository at this point in the history
RPM rule integrity and mnemonics
  • Loading branch information
rmohr authored Oct 4, 2023
2 parents 68f09e4 + 5a00277 commit 26b99c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/rpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ def _rpm_impl(ctx):
downloaded_file_path = "downloaded"
download_path = ctx.path("rpm/" + downloaded_file_path)
download_info = ctx.download(
ctx.attr.urls,
"rpm/" + downloaded_file_path,
ctx.attr.sha256,
url = ctx.attr.urls,
output = "rpm/" + downloaded_file_path,
sha256 = ctx.attr.sha256,
integrity = ctx.attr.integrity,
)
else:
fail("urls must be specified")
Expand All @@ -41,6 +42,7 @@ _rpm_attrs = {
"urls": attr.string_list(),
"strip_prefix": attr.string(),
"sha256": attr.string(),
"integrity": attr.string(),
}

rpm = repository_rule(
Expand Down
2 changes: 2 additions & 0 deletions internal/rpmtree.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def _rpm2tar_impl(ctx):
inputs = ctx.files.rpms,
outputs = [out],
arguments = args,
mnemonic = "Rpm2Tar",
progress_message = "Converting %s to tar" % ctx.label.name,
executable = ctx.executable._bazeldnf,
)
Expand All @@ -61,6 +62,7 @@ def _tar2files_impl(ctx):
inputs = ctx.files.tar,
outputs = ctx.outputs.out,
arguments = args,
mnemonic = "Tar2Files",
progress_message = "Extracting files",
executable = ctx.executable._bazeldnf,
)
Expand Down

0 comments on commit 26b99c1

Please sign in to comment.