build: Implement packaging in Python (#8109)

This commit is contained in:
Ayaz Salikhov
2026-08-25 19:32:03 +00:00
committed by GitHub
parent 5e3d20b3ed
commit fee4bfc22e
12 changed files with 640 additions and 491 deletions

View File

@@ -57,7 +57,9 @@ class LinuxConfig:
sanitizers: list[str] = dataclasses.field(default_factory=list)
suffix: str = ""
extra_cmake_args: str = ""
image: str = "" # only used by package_configs entries
# The two below are only used by package_configs entries.
image: str = ""
package_type: str = "" # "deb" or "rpm"; has to match what image provides
@dataclasses.dataclass
@@ -156,7 +158,7 @@ class PackagingEntry:
xrpld_artifact_name: str
validator_keys_artifact_name: str
image: str
distro: str # e.g. "debian" or "rhel"; drives package-format-specific steps
package_type: str # "deb" or "rpm"; drives the format-specific steps
# ---------------------------------------------------------------------------
@@ -243,7 +245,7 @@ def expand_linux_packaging(linux: LinuxFile) -> list[PackagingEntry]:
xrpld_artifact_name=f"xrpld-{config_name}",
validator_keys_artifact_name=f"validator-keys-{config_name}",
image=cfg.image,
distro=distro,
package_type=cfg.package_type,
)
)

View File

@@ -92,7 +92,8 @@
"build_type": ["Release"],
"arch": ["amd64"],
"minimal": false,
"image": "ghcr.io/xrplf/xrpld/packaging-debian:sha-a6983f8"
"image": "ghcr.io/xrplf/xrpld/packaging-debian:sha-45e4b88",
"package_type": "deb"
}
],
@@ -102,7 +103,8 @@
"build_type": ["Release"],
"arch": ["amd64"],
"minimal": false,
"image": "ghcr.io/xrplf/xrpld/packaging-rhel:sha-a6983f8"
"image": "ghcr.io/xrplf/xrpld/packaging-rhel:sha-45e4b88",
"package_type": "rpm"
}
]
}