Skip to content

Commit

Permalink
s390x: remove 'sdboot' before generating new one
Browse files Browse the repository at this point in the history
Since s390-tools commit f4cf4ae6ebb1 ("rust: Add a new tool called 'pvimg'") the
C 'genprotimg' tool no longer exists and was replaced by symlink to Rust 'pvimg create',
which by default doens't overwrite the output image.
For backward compatibility let's silently remove the 'sdboot'.
  • Loading branch information
nikita-dubrovskii committed Feb 5, 2025
1 parent c025da0 commit 1bdec2b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Minor changes:


Internal changes:

- s390x: Use options and logic compatible with both C-based `genprotimg` and Rust-based `pvimg`

Packaging changes:

Expand Down
7 changes: 7 additions & 0 deletions src/s390x/zipl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ fn generate_sdboot(

// finally, Secure Execution sd-boot image
let sdboot = mountpoint.join("sdboot");

// C 'genprotimg' tool no longer exists and was replaced by symlink to Rust 'pvimg create',
// which by default doesn't overwrite the output image.
// For backward compatibility let's silently remove the 'sdboot'.
let _ = std::fs::remove_file(&sdboot);

// FIXME: in F42/el10 switch to 'pvimg create' with '--overwrite' flag.
let mut cmd = Command::new("genprotimg");
cmd.arg("--verbose")
.arg("--image")
Expand Down

0 comments on commit 1bdec2b

Please sign in to comment.