Re: [yocto] How to customize a file coming from another recipe?

2013-10-10 Thread Paul Eggleton
On Thursday 12 September 2013 13:53:49 Nicolas Dechesne wrote:
 On Thu, Sep 12, 2013 at 12:16 PM, Paul Eggleton 
 paul.eggle...@linux.intel.com wrote:
   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}:
 
 how about if the lighttpd.conf file needs to be fetched (git or svn)
 instead added in the same repo as the recipe?

If fetching from git/svn then you'd just add an entry to SRC_URI, and the file 
would be fetched into a subdirectory; you'd then just have a do_install() / 
do_install_append() to install the version of the file from within that 
subdirectory.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How to customize a file coming from another recipe?

2013-09-12 Thread Paul Eggleton
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
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How to customize a file coming from another recipe?

2013-09-12 Thread Andrea Galbusera
Hi Brad,

On Wed, Sep 11, 2013 at 10:30 PM, Brad Litterell b...@evidence.com 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?

In my experience, the suggested approach for packaging and deploying a
custom configuration file in your target rootfs is to define an
override for the corresponding recipe.
The way you do this is slightly different depending upon the Arago
Project your using: from some details you provide, I guess you are
using meta-arago layer on top of Yocto build system and not the old
Arago Project based on OpenEmbedded Classic. If this is not the case
you might have better luck posting this to the arago mailing list.

If this is correct instead, the suggested approach for packaging and
deploying a custom configuration file is to define a .bbappend for
lighttpd recipe i.e. in your own layer. See [1] for more details and
examples on using bbappend files.

[1] 
http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#using-bbappend-files


 Or is it better to create a new separate  recipe that just ships my version
 of the configuration file?

This is not convenient, since it would generate metadata duplication
and a lot of unnecessary maintenance burden when the upstream recipe
gets updated.

 How are conflicts handled when two recipes
 attempt to install the same file?
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How to customize a file coming from another recipe?

2013-09-12 Thread Tomas Frydrych
Hi,

On 11/09/13 20:24, Brad Litterell wrote:
 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?

Yes.

 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?

Assuming you set up the FILESEXTRAPATHS in the bbappend correctly (as
per documentation), you can just provide the whole file, it just takes
the first instance of the file it locates in the files path.


 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?

No, do not do this, two packages can't install the same file (if the
file is being staged to the sysroot, bitbake will catch that, but I am
not sure if currently that throws and error or just a warning; in your
case with a file that is not staged in a sysroot the problem would only
become apparent at rootfs time, but I am not sure how the different
package managers handle this).

Tomas

 
 Thanks,
 Brad
 
 
 
 ___
 yocto mailing list
 yocto@yoctoproject.org
 https://lists.yoctoproject.org/listinfo/yocto
 


-- 
http://sleepfive.com
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] How to customize a file coming from another recipe?

2013-09-11 Thread Brad Litterell
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?

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?

Thanks,
Brad
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] How to customize a file coming from another recipe?

2013-09-11 Thread Brad Litterell
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?

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?

Thanks,
Brad

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto