INNER CODE UNIT · Python

build_rpm

XRPLF/rippled · package/build_pkg.py:219

def build_rpm(build_dir: Path, *, version: str, pkg_release: str, variant: str) -> None:
    """Stage the spec and its sources, then build the binary RPMs."""
    topdir = build_dir / "rpmbuild"
    for name in ("BUILD", "BUILDROOT", "RPMS", "SOURCES", "SPECS", "SRPMS"):
        (topdir / name).mkdir(parents=True, exist_ok=True)

    spec = topdir / "SPECS" / "xrpld.spec"
    shutil.copy2(SRC_DIR / "package" / "rpm" / "xrpld.spec", spec)
    stage_common(build_dir, topdir / "SOURCES")
    stage_units(topdir / "SOURCES")

    # The spec defaults it to nothing, so a plain build is unchanged.
    variant_defines = ["--define", f"pkg_variant {variant}"] if variant else []

    run(
        "rpmbuild",
        "-bb",
        "--define",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…