Difference between revisions of "StarlingX/CentosToDebian"
(Created page with "== Overview == The purpose of this wiki is to provide some guidance for converting a CentOS package to a Debian package. == CentOS Package Files == There are two main files...") |
(No difference)
|
Revision as of 19:25, 8 November 2021
Overview
The purpose of this wiki is to provide some guidance for converting a CentOS package to a Debian package.
CentOS Package Files
There are two main files which specify the CentOS build of a package:
- build_srpm.data - Specifies the input sources for the build (both within and external to the package repository).
- <packageName>.spec - Specification file which defines the package(s), dependencies, build rules and install rules.
These files are found in the "centos" directory which is generally a top-level directory in the root package directory. For example:
- Repository: nfv
- Package directory: nfv/nova-api-proxy
- CentOS build directory: nfv/nova-api-proxy/centos
The "debian" build directory is a peer of the "centos" directory (i.e. nfv/nova-api-proxy/debian).
build_srpm.data
The build_srpm.data file defines the source inputs for the package build. The inputs may be files from the package repo itself, files from another repo or files from a download mirror.
The following variables are commonly used for these inputs:
- CGCS_BASE - An import mirror (/import/mirrors/starlingx).
- PKG_BASE - The root package directory.
- STX_BASE - The root directory for all StarlingX repositories.
Specification File
The specification file drives the CentOS package build. It contains two main sections:
- Preamble - Defines metadata for the build.
- Body - Contains the build instructions.
The following table describes the commonly used fields (SPEC directives) in the specification file.
Directive | Type | Description |
---|---|---|
Summary | Preamble | A brief description of the package |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |