INNER CODE UNIT · Python

stage_units

XRPLF/rippled · package/build_pkg.py:208

def stage_units(dest: Path, *, prefix: str = "") -> None:
    """Copy the systemd, sysusers, tmpfiles and logrotate files into dest.

    Each format wants them somewhere else: rpmbuild reads them from SOURCES by
    path, debhelper from debian/ by package name -- hence 'prefix', which makes
    the copies 'xrpld-assert.xrpld.service' and so on.
    """
    for name in STAGED_UNITS:
        shutil.copy2(SRC_DIR / "package" / "shared" / name, dest / f"{prefix}{name}")


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"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…