Build helper module¶
-
exception
rebasehelper.build_helper.BinaryPackageBuildError(*args, **kwargs)[source]¶ Error indicating failure to build Binary Package
-
class
rebasehelper.build_helper.BuildTemporaryEnvironment(sources, patches, spec, results_dir)[source]¶ Class representing temporary environment.
-
TEMPDIR_RESULTS= 'TEMPDIR_RESULTS'¶
-
TEMPDIR_SOURCES= 'TEMPDIR_SOURCES'¶
-
TEMPDIR_SPEC= 'TEMPDIR_SPEC'¶
-
TEMPDIR_SPECS= 'TEMPDIR_SPECS'¶
-
-
class
rebasehelper.build_helper.BuildToolBase[source]¶ Base class for various build tools
-
DEFAULT= False¶
-
classmethod
build(*args, **kwargs)[source]¶ Build binaries from the sources.
Keyword arguments: spec – path to a SPEC file sources – list with absolute paths to SOURCES patches – list with absolute paths to PATCHES results_dir – path to DIR where results should be stored
Returns: dict with: ‘srpm’ -> absolute path to SRPM ‘rpm’ -> list of absolute paths to RPMs ‘logs’ -> list of absolute paths to logs
-
classmethod
get_detached_task(task_id, results_dir)[source]¶ Gets packages and logs for specified task
Parameters: - task_id – detached task id
- results_dir – path to DIR where results should be stored
Returns: tuple with: list of absolute paths to RPMs list of absolute paths to logs
-
classmethod
get_logs()[source]¶ Get logs from previously failed build Returns: dict with ‘logs’ -> list of absolute paths to logs
-
-
class
rebasehelper.build_helper.Builder(tool=None)[source]¶ Class representing a process of building binaries from sources.
-
build_tools= {'copr': <class 'rebasehelper.build_tools.copr_tool.CoprBuildTool'>, 'rpmbuild': <class 'rebasehelper.build_tools.rpmbuild_tool.RpmbuildBuildTool'>, 'mock': <class 'rebasehelper.build_tools.mock_tool.MockBuildTool'>}¶
-
-
class
rebasehelper.build_helper.RpmbuildTemporaryEnvironment(sources, patches, spec, results_dir)[source]¶ Class representing temporary environment for RpmbuildBuildTool.
-
TEMPDIR_BUILD= 'TEMPDIR_BUILD'¶
-
TEMPDIR_BUILDROOT= 'TEMPDIR_BUILDROOT'¶
-
TEMPDIR_RPMBUILD= 'TEMPDIR_RPMBUILD'¶
-
TEMPDIR_RPMS= 'TEMPDIR_RPMS'¶
-
TEMPDIR_SRPMS= 'TEMPDIR_SRPMS'¶
-
-
class
rebasehelper.build_helper.SRPMBuildToolBase[source]¶ Base class for SRPM builder tools
-
DEFAULT= False¶
-
classmethod
build_srpm(spec, workdir, results_dir, srpm_builder_options)[source]¶ Build SRPM with chosen SRPM Build Tool
Parameters: - spec – abs path to SPEC file inside the rpmbuild/SPECS in workdir.
- workdir – abs path to working directory with rpmbuild directory structure, which will be used as HOME dir.
- results_dir – abs path to dir where the log should be placed.
- srpm_builder_options – list of additional options to rpmbuild.
Returns: If build process ends successfully returns abs path to built SRPM, otherwise ‘None’.
-