All of lore.kernel.org
 help / color / mirror / Atom feed
* A simpler way to apply custom config files to an image ?
@ 2015-04-16 12:48 Laurent Eschenauer
  2015-04-16 15:05 ` Erik Bolton
  2015-04-16 15:31 ` Smith, Virgil
  0 siblings, 2 replies; 6+ messages in thread
From: Laurent Eschenauer @ 2015-04-16 12:48 UTC (permalink / raw)
  To: yocto

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

Hello,

I'm stuck on something that I would have assumed trivial and can't
managed to do and hope someone can point me to a best practice.

I want to customize various config file of an image I'm building (e.g.
network interfaces, sshd banner, hostapd, etc..).

To make this simple, I wrote my own recipe called 'custom-config' and
bundled in there all my config files. Then copying them in the on_install.

do_install () {
   install -m 0755 -d ${D}${sysconfdir}
   install -b -m 0644 ${WORKDIR}/udhcpd.conf ${D}${sysconfdir}
   install -b -m 0644 ${WORKDIR}/hostapd.conf ${D}${sysconfdir}
   ....
}

It works great for files that are not provided by packages (e.g.
udhcpd.conf), however it does not work for files already provided by
another package (e.g. hostapd.conf). I've tried adding the backup flag
to install but this did not help.

It seems the recommended way to do this is by extending each individual
recipe with bbappend and provide an updated config file. This works
great, although quite heavy for just updating a single config file.

More over, this does not work when the config file is not in the recipe
but coming from sources archive. This is the case with hostapd.conf from
recipe hostapd.

Questions:

- Is my idea of a single 'config' recipe completely stupid ? is there
any way to make it work ? It seems the simpler approach.

- If not possible and I have to stick with bbappend to every recipe
concerned, then how could I do it in the case of a config file coming
from the source package instead of the recipe ?

Thanks for your help !

Best,

Laurent






[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

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

end of thread, other threads:[~2015-04-17 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 12:48 A simpler way to apply custom config files to an image ? Laurent Eschenauer
2015-04-16 15:05 ` Erik Bolton
2015-04-16 15:31 ` Smith, Virgil
2015-04-17  6:00   ` Anders Darander
2015-04-17  6:18     ` ld: cannot find crti.o: No such file or directory Neil.Wu
2015-04-17 12:45     ` A simpler way to apply custom config files to an image ? Bryan Evenson

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.