Skip to content

Commit 556ea3a

Browse files
s390x: remove 'sdboot' before generating new one
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'.
1 parent c025da0 commit 556ea3a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Minor changes:
1313

1414

1515
Internal changes:
16-
16+
- s390x: remove 'sdboot' before generating new one
1717

1818
Packaging changes:
1919

src/s390x/zipl.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ fn generate_sdboot(
281281

282282
// finally, Secure Execution sd-boot image
283283
let sdboot = mountpoint.join("sdboot");
284+
285+
// C 'genprotimg' tool no longer exists and was replaced by symlink to Rust 'pvimg create',
286+
// which by default doens't overwrite the output image.
287+
// For backward compatibility let's silently remove the 'sdboot'.
288+
let _ = std::fs::remove_file(&sdboot);
289+
290+
// FIXME: in F42/el10 switch to 'pvimg create' with '--overwrite' flag.
284291
let mut cmd = Command::new("genprotimg");
285292
cmd.arg("--verbose")
286293
.arg("--image")

0 commit comments

Comments
 (0)