diff options
Diffstat (limited to 'docs/manual/patch-policy.txt')
-rw-r--r-- | docs/manual/patch-policy.txt | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/docs/manual/patch-policy.txt b/docs/manual/patch-policy.txt index 1fdb04ef7..9bc6537ca 100644 --- a/docs/manual/patch-policy.txt +++ b/docs/manual/patch-policy.txt @@ -2,37 +2,38 @@ [[patch-policy]] -Patch Policy ------------- +Patching a package +------------------ While integrating a new package or updating an existing one, it may be -necessary to patch the source of the software to get it built within +necessary to patch the source of the software to get it cross-built within Buildroot. Buildroot offers an infrastructure to automatically handle this during -the builds. It supports several ways of applying patch sets: +the builds. It supports two ways of applying patch sets: downloaded patches +and patches supplied within buildroot. Providing patches ~~~~~~~~~~~~~~~~~ -Additional tarball -^^^^^^^^^^^^^^^^^^ +Downloaded +^^^^^^^^^^ -If it is necessary to apply a patch set available as a downloadable -tarball, then add the patch tarball to the +<packagename>_PATCH+ -variable. +If it is necessary to apply a patch that is available for download, then it +to the +<packagename>_PATCH+ variable. It is downloaded from the same site +as the package itself. It can be a single patch, or a tarball containing a +patch series. -Note that the patch tarballs are downloaded from the same site as the -sources. +This method is typically used for packages from Debian. Within Buildroot ^^^^^^^^^^^^^^^^ Most patches are provided within Buildroot, in the package -directory; these typically aim to fix cross-compilation, +libc+ support, +directory; these typically aim to fix cross-compilation, libc support, or other such issues. -These patch files should have the extension +*.patch+. +These patch files should be named +<packagename>-*.patch+. A +series+ file, as used by +quilt+, may also be added in the package directory. In that case, the +series+ file defines the patch @@ -71,14 +72,15 @@ modified. A message explaining what the patch does, and why it is needed, should be added in the header commentary of the patch. -You should add a +signed-off-by+ statement in the header of the each -patch to help with keeping track of the changes. +You should add a +Signed-off-by+ statement in the header of the each +patch to help with keeping track of the changes and to certify that the +patch is released under the same license as the software that is modified. If the software is under version control, it is recommended to use the -SCM software to generate the patch set. +upstream SCM software to generate the patch set. Otherwise, concatenate the header with the output of the -+diff -purN source.c.orig source.c+ command. ++diff -purN package-version.orig/ package-version/+ command. At the end, the patch should look like: |