[yocto] How to patch a file in mysql recipe
Martin Hundebøll
mnhu at prevas.dk
Thu Apr 19 22:39:15 PDT 2018
Hi Greg,
On 2018-04-19 00:06, Greg Wilson-Lindberg wrote:
> I need to patch the my.cnf file that is part of the mysql/mariadb
> recipe. It lives in
> meta-openembedded/meta-oe/recipes-support/mysql/mariadb/my.cnf with the
> mariadb_5.5.52.bb file one level down.
>
> I've set up a mariadb_5.5.52.bbappend file as:
>
> FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/${PN}:"
>
> SRC_URI += "file://my.cnf.patch"
>
> # need to enable auto startup
> SYSTEMD_AUTO_ENABLE_${PN}-server = "enable"
>
> bitbake finds the my.cnf.patch file but reports that it can't find the
> my.cnf file to patch. I've set up patching of files that are downloaded
> as part of a source tree, but never tried to patch a file that is part
> of a recipe, and apparently I'm missing something. Is it possible to do
> this, and if so, can someone point out what I need to do to do it
> correctly?
External sources usually lives in ${S}, while recipe local sources are
placed in ${WORKDIR}. To make OE apply the patch in ${WORDIR} instead of
${S}, add the "patchdir"[1] option to the SRC_URI:
SRC_URI += "file://my.cnf.patch;patchdir=${WORKDIR}"
I haven't used this myself, though, so I might be wrong...
// Martin
[1]
https://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#new-recipe-patching-code
More information about the yocto
mailing list