All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Jaap de Jong <jaap.dejong@nedap.com>
Cc: yocto@yoctoproject.org
Subject: Re: Custom conf files
Date: Tue, 04 Apr 2017 11:21:57 +0200	[thread overview]
Message-ID: <1491297717.10884.30.camel@intel.com> (raw)
In-Reply-To: <2c388f10-f905-a412-ffa0-08965058b531@nedap.com>

On Tue, 2017-04-04 at 10:23 +0200, Jaap de Jong wrote:
> Hi,
> 
> I'm just wondering what the best practise is for configuration files 
> that I want to change for a specific image.
> 
> F.i. a simple one: /etc/issue

We just debated the exact same question over on the refkit mailing list,
without a conclusion (so far):
https://lists.yoctoproject.org/pipermail/intel-iot-refkit/2017-March/000007.html

There were two different opinions:
     1. Move config files into their own packages, create alternative
        packages with a different configuration, then in image recipes
        choose which package to install. Before Yocto 2.3,
        update-alternatives had to be used for this, starting with 2.3
        it is a bit simpler because recipe-specific sysroots allow
        different recipes to create packages with the same file (but one
        still cannot do it in the same recipe).
     2. Apply per-image configuration changes during rootfs
        construction. This could be done by dropping in entire files,
        sed expressions, or applying patches.

Personally, I prefer the second approach because it seems simpler,
ideally based on patches. That would have the advantage that there's no
need to keep a copied config file in sync with what upstream is changing
in that same file (i.e. the "I just want to change this one option" use
case becomes easier).

The downside is that it only works in combination with a system update
mechanism that updates the entire OS based on the final rootfs and some
care is needed when allowing local modifications of those same
configuration files (but that's problematic either way).

> I could create a bbappend for the responsible recipe.

That would be a third approach. However, that doesn't scale when
considering that the recipe might have to be used in different ways, and
layers which do that tend to be hard to reuse.

>  Or I could add a 
> ROOTFS_POSTPROCESS_COMMAND and patch in my changes

Yep.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





      reply	other threads:[~2017-04-04  9:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04  8:23 Custom conf files Jaap de Jong
2017-04-04  9:21 ` Patrick Ohly [this message]

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=1491297717.10884.30.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=jaap.dejong@nedap.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.