Correction to trivy.repo creation code snippet | #2099 bugfix #4545
Closed
02fa
started this conversation in
Documentation
Replies: 3 comments 10 replies
-
@afdesk Can you please take a look? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Wang-W-e-i thanks for the report! also, as wrote @knqyf263 we changed an approach after #4077 |
Beta Was this translation helpful? Give feedback.
10 replies
-
Moved to aquasecurity/trivy-repo#30 and #4547 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
With reference to #2099, the solution doesn't quite work.
1=
trivy/docs/getting-started/installation.md
Line 13 in 854b639
By fixing release version to the current target host readings we may hit an issue, when the host OS is dist-upgraded.
2=
trivy/docs/getting-started/installation.md
Line 17 in 854b639
heredoc is implicitly double quoted. This results in undefined
$basearch
expansion into an empty string. By escaping\$basearch
on .repo file we are getting error:Error: Failed to download metadata for repo 'trivy': Cannot download repomd.xml: Cannot download repodata/repomd.xml
. Correct way of escaping$basearch
is to escape "limit string"'EOF'
itself. Single and double quotes, along with \ will do (scroll down to Example 19-7. Parameter substitution turned off).Corrected here:
https://github.com/Wang-W-e-i/trivy/blob/0f2b2107ee0848c3f05b4becffdae5d3fe085ae8/docs/getting-started/installation.md?plain=1#L13-L21
3=
https://aquasecurity.github.io/trivy-repo/ may need to be updated in a similar way.
4=
It must be my mirror or something :o(. It doesn't install via RPM for some reason.
Is Trivy RPM repository maintained? Or is it a temporary glitch with my mirror? How much does it cost to extend repository to ARM64 architecture, please?
sudo dnf install trivy <snip> Error: Error downloading packages: trivy-0.42.0-1.x86_64: Download failed: Downloading successful, but checksum doesn't match. Calculated: 238cd36e7685e32eda85a6ef003a6064b39948a1c35a3d3fbf51e6b0af5e4dc7(sha256) Expected: f7c1f97538d02de4db29f51ac596d8cfe5f1a21a517825ef08a14f35d5224363(sha256)
Link
trivy/docs/getting-started/installation.md
Lines 12 to 24 in 854b639
Suggestions
Fix as per this proposal
https://github.com/Wang-W-e-i/trivy/blob/0f2b2107ee0848c3f05b4becffdae5d3fe085ae8/docs/getting-started/installation.md?plain=1#L13-L21
Beta Was this translation helpful? Give feedback.
All reactions