All of lore.kernel.org
 help / color / mirror / Atom feed
* How to patch a file in mysql recipe
@ 2018-04-18 22:06 Greg Wilson-Lindberg
  2018-04-20  5:39 ` Martin Hundebøll
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Wilson-Lindberg @ 2018-04-18 22:06 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1345 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to patch a file in mysql recipe
  2018-04-18 22:06 How to patch a file in mysql recipe Greg Wilson-Lindberg
@ 2018-04-20  5:39 ` Martin Hundebøll
  2018-04-20 20:48   ` Greg Wilson-Lindberg
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Hundebøll @ 2018-04-20  5:39 UTC (permalink / raw)
  To: Greg Wilson-Lindberg, yocto

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to patch a file in mysql recipe
  2018-04-20  5:39 ` Martin Hundebøll
@ 2018-04-20 20:48   ` Greg Wilson-Lindberg
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Wilson-Lindberg @ 2018-04-20 20:48 UTC (permalink / raw)
  To: Martin Hundebøll, yocto

Hi Martin,

Your suggestion worked just fine, Thanks for the suggestion.
Regards,
Greg
 
> -----Original Message-----
> From: Martin Hundebøll [mailto:mnhu@prevas.dk]
> Sent: Thursday, April 19, 2018 10:39 PM
> To: Greg Wilson-Lindberg <GWilson@sakuraus.com>; yocto@yoctoproject.org
> Subject: Re: [yocto] How to patch a file in mysql recipe
> 
> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-20 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 22:06 How to patch a file in mysql recipe Greg Wilson-Lindberg
2018-04-20  5:39 ` Martin Hundebøll
2018-04-20 20:48   ` Greg Wilson-Lindberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.