1
0
mirror of https://github.com/lxc/distrobuilder.git synced 2026-02-05 06:45:19 +01:00

sources/centos-http: Support CentOS Stream 10 checksum file

CentOS Stream 10, similar to Stream 9, uses a `SHA256SUM` file for checksums rather than the `sha256sum.txt.asc` pattern used by older releases.

This commit updates the logic to correctly identify and use `SHA256SUM` for CentOS Stream 10, resolving build failures where the downloader would incorrectly return a 404 for the non-existent `.asc` file.

Signed-off-by: Chaosoffire <81634128+chaosoffire@users.noreply.github.com>
This commit is contained in:
Chaosoffire
2026-01-10 22:34:13 +08:00
parent 1dd2cb9702
commit 1015a5ac06

View File

@@ -89,7 +89,7 @@ func (s *centOS) Run() error {
checksumFile = "sha256sum.txt"
} else {
checksumFile = "sha256sum.txt.asc"
if strings.HasPrefix(s.definition.Image.Release, "9") {
if strings.HasPrefix(s.definition.Image.Release, "9") || strings.HasPrefix(s.definition.Image.Release, "10") {
checksumFile = "SHA256SUM"
} else if strings.HasPrefix(s.definition.Image.Release, "8") {
checksumFile = "CHECKSUM"