From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Brad Litterell <brad@evidence.com>
Cc: yocto@yoctoproject.org
Subject: Re: How to customize a file coming from another recipe?
Date: Thu, 12 Sep 2013 11:16:11 +0100 [thread overview]
Message-ID: <3660370.oRDG4CenKT@helios> (raw)
In-Reply-To: <E51394554A503C4E852F9BEE46B03E8DEFCD7F@TI-ODIN.tasernet.com>
Hi Brad,
On Wednesday 11 September 2013 20:30:47 Brad Litterell wrote:
> I'm building w/the Arago distribution which contains lighttpd for a web
> server. I include this in my image as follows:
>
> IMAGE_INSTALL = "packagegroup-core-boot \
> ...
> lighttpd lighttpd-module-cgi lighttpd-module-compress lighttpd-module-expire
> \ ...
> "
>
> This installs a default configuration file for the service which I now want
> to customize. What is the recommended way to overwrite or customize files
> in another package?
>
> Is the best course to create a recipe bbappend for the lighttpd_1.4.31.bb
> file that is being used? And can I just include a new file with the same
> name in my append and will it overwrite the old one, or do I need to create
> an actual patch file?
So, since this config file is provided along with the original recipe, and is
already mentioned in SRC_URI and installed within do_install, you only need to
extend FILESEXTRAPATHS in your bbappend so that the system can pick up your
version of the file. Outright replacing the file is the easiest way here rather
than trying to patch it.
So in your bbappend you would have:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
and then next to the bbappend you would have a directory called "lighttpd" (to
match ${PN} in the above line) containing your replacement lighttpd.conf file.
If you prefer you could replace "${PN}" with "files" and name the directory the
same; it's up to you.
> Or is it better to create a new separate recipe that just ships my version
> of the configuration file? How are conflicts handled when two recipes
> attempt to install the same file?
This won't work because the package manager will refuse to install packages
that install the same file (unless it is forced). bbappending the existing
recipe is the way to go.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-09-12 10:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 20:30 How to customize a file coming from another recipe? Brad Litterell
2013-09-12 10:16 ` Paul Eggleton [this message]
2013-09-12 11:53 ` Nicolas Dechesne
2013-10-10 10:33 ` Paul Eggleton
2013-09-12 10:25 ` Andrea Galbusera
-- strict thread matches above, loose matches on Subject: below --
2013-09-11 19:24 Brad Litterell
2013-09-12 11:43 ` Tomas Frydrych
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3660370.oRDG4CenKT@helios \
--to=paul.eggleton@linux.intel.com \
--cc=brad@evidence.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.