Jump to: navigation, search

StarlingX/DebianBuildStructure

< StarlingX
Revision as of 00:11, 18 October 2021 by Zulcss (talk | contribs) (Created page with " === StarlingX Debian Folder Layout === This document is used to describe how to manage the Debian folder for a package in StarlingX upstream == Debian folder location == T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

StarlingX Debian Folder Layout

This document is used to describe how to manage the Debian folder for a package in StarlingX upstream

Debian folder location

The debian folder is in the same directory of the cantos folder. Fox example, the “dhcp” packages is at inter/base/dhcp. Its centos folder is integ/base/centos, the debian folder is Integ/base/dhcp/debian

Debian folder structure

This is a full Debian folder structure, which lists all of the files and directories needed by re-package a Debian source package. Some of them are necessary for all kinds of Debian package, and some of them are optional different types of packages.

  integ/base/xxx
  . 
  └── debian
       |── meta_data.yaml
      ├── deb_folder
      │   ├── changelog
      │   ├── compat
      │   ├── control
      │   ├── copyright
      │   ├── patches
      │   │   ├── 0001-xxx-yyy-zzz.patch
      │   │   ├── 0002-xxx-yyy-zzz.patch
      │   │   └── series
      │   ├── rules
      │   ├── source
      │   │   └── format
      │   ├── watch
      │   ├── ...
      │   └── ...
       |── deb_patches
      │   ├── 0001-xxx-yyy-zzz-deb.patch
      │   ├── 0002-xxx-yyy-zzz-deb.patch
      │   └── series
      ├── patches
      │   ├── 0001-xxx-yyy-zzz.patch
      │   ├── 0002-xxx-yyy-zzz.patch
      │   └── series
     

meta_data.yaml

The meta_data.yml consists of information that describes the package to the build system: It consists of several fields:

  * ‘’’debver’’ (mandatory) - contains the package version. For Debian packages, you can run “apt-cache madison package-name”  to get the package version.
      For example the systemd the package in Debian Bullseye is 247.3-3. For 3rd party and StaringX packages, you need to fill it manually.
  * “”””debname””” (optional) - contains the package name in Debian. Most packages have a uniform name for both Centos and Debian. Hence usually the file
    isnt required. The build system uses the last folder name if the deb name is absent. For example, “integ/base/dhcp”, in Debian “isc-dhcp”


deb_folder

The deb_folder consists of the Debian folder. For Debian packages, the build system inherits the Debian folder from the Debian upstream package. If you put full Debian folder here, the build system uses it to override the upstream Debian folder. For 3rd part and StarlingX packages, you need to pul a full Debian folder. The build system copies it to the build directory.

deb_patches

This folder contains the patches to apply to the debian folder of a Debian upstream package. For example, if you want to modify the debian/rules file of a Debian upstream package, put the patch here and add it to the series file. It is not needed for 3rd party and StarlingX packages.

patches

This folder contains the patches that are applied to the source code of a debian upstream package. Similarly, a developer can drop a patch into this directory with a series file to apply a patch to the source code of a Debian package. The series file will be appended to an existing debian/patches/series. For 3rd party and StarlingX packages it is not needed.