Skip to content

Commit

Permalink
Fixup changelog and other small things
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Oct 27, 2023
1 parent f677ffe commit 6b677d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Breaking Changes

- Bumped MSRV to 1.67
- Removed `Package::get_file_checksums`, `Package::get_file_ima_signatures` and `Package::get_file_digest_algorithm` functions, the same information is now retrievable using `Package::get_file_entries`.

### Added

Expand All @@ -24,10 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add method `is_no_replace` to `FileOptionsBuilder`, used to set the
`%config(noreplace)` flag on a file.
- Added the `FileEntry.linkto` field that is a target of a symbolic link.
- Removed `get_file_checksums`, `get_file_ima_signatures` and `get_file_digest_algorithm`
function and the information is accessible via `FileEntry` struct
(`FileEntry::digest_string` and `FileEntry::ima_signature`).
- Function `get_file_entries` returned empty vector for an RPM file without any file.
- Function `Package::get_file_entries` returns an empty vector for an RPM package without any files.
- `FileEntry` structs returned by (`Package::get_file_entries`) now include IMA signature information as well as digests for file entries.

## 0.12.1

Expand Down
2 changes: 2 additions & 0 deletions src/rpm/headers/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ pub struct FileEntry {
pub flags: FileFlags,
// @todo SELinux context? how is that done?
pub digest: Option<FileDigest>,
/// A string representation of the digest
// @todo: we should be able to fetch this trivially from `digest` without needing to store a separate copy
pub digest_string: String,
/// Defines any capabilities on the file.
pub caps: Option<String>,
Expand Down
6 changes: 3 additions & 3 deletions tests/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ fn test_rpm_file_signatures() -> Result<(), Box<dyn std::error::Error>> {
assert_eq!(
signatures,
[
Some(String::from("0302041adfaa0e004630440220162785458f5d81d1393cc72afc642c86167c15891ea39213e28907b1c4e8dc6c02202fa86ad2f5e474d36c59300f736f52cb5ed24abb55759a71ec224184a7035a78")),
Some(String::from("0302041adfaa0e00483046022100bd940093777b75650980afb656507f2729a05c9b1bc9986993106de9f301a172022100b3384f6ba200a5a80647a0f0727c5b8f3ab01f74996a1550db605b44af3d10bf")),
Some(String::from("0302041adfaa0e00473045022068953626d7a5b65aa4b1f1e79a2223f2d3500ddcb3d75a7050477db0480a13e10221008637cefe8c570044e11ff95fa933c1454fd6aa8793bbf3e87edab2a2624df460")),
Some("0302041adfaa0e004630440220162785458f5d81d1393cc72afc642c86167c15891ea39213e28907b1c4e8dc6c02202fa86ad2f5e474d36c59300f736f52cb5ed24abb55759a71ec224184a7035a78".to_string()),
Some("0302041adfaa0e00483046022100bd940093777b75650980afb656507f2729a05c9b1bc9986993106de9f301a172022100b3384f6ba200a5a80647a0f0727c5b8f3ab01f74996a1550db605b44af3d10bf".to_string()),
Some("0302041adfaa0e00473045022068953626d7a5b65aa4b1f1e79a2223f2d3500ddcb3d75a7050477db0480a13e10221008637cefe8c570044e11ff95fa933c1454fd6aa8793bbf3e87edab2a2624df460".to_string()),
],
);

Expand Down

0 comments on commit 6b677d5

Please sign in to comment.