Generate source code URI
Firstly, create an empty file which will store source code information:
touch recipes-debian/sources/<source_name>.inc
Enable debian-source
in <your buildir>/conf/local.conf
:
DEBIAN_SOURCE_ENABLED = "1"
DEBIAN_SRC_FORCE_REGEN = "1"
When bitbake run, class debian-source
will generate information
about version, source URI and checksum to .inc
file.
NOTE: By default, debian-source
will not rerun if
file Sources.xz
does not change. Force it regenerate by adding
DEBIAN_SRC_FORCE_REGEN = "1"
into conf/local.conf
in the build directory.
Write recipe
Recipe in meta-debian
is almost similar with recipe in meta
,
but there are some rules need to be concerned.
Recipe name
-
Recipe name
PN
should be same with recipe name in layermeta
and has version suffix_debian
:meta-debian/recipes-debian/*/<PN>_debian.bb
Required resources
-
Always inherit
debian-package
and includesources/<source_name>.inc
in recipe.inherit debian-package require recipes-debian/sources/<source_name>.inc
Reuse codes from meta
-
Recipe should include available
.inc
frommeta
if possible. File.inc
should be included beforeinherit debian-package
, soSRC_URI
can be overridden. Ex:require recipes-devtools/binutils/binutils.inc ... inherit debian-package
-
Recipe also can reuse patches/local-files from
meta
if appendFILESPATH
. Ex:FILESPATH_append = ":${COREBASE}/meta/recipes-devtools/sample/sample" SRC_URI += "file://sample.patch"
Note: Security fixes should be managed by Debian in source package, so don't reuse patches, which relate to CVE or security bugs, in meta-debian. It is better to wait for Debian maintainers apply patch into source code.
Configuration and packages split
- This version of meta-debian aims to be compatible with Poky more than Debian, so recipe should configure and split packages same as Poky recipe to avoid conflict.