<div dir="auto"><div>new recipe version (most likely) will have new release and expect any change</div><div dir="auto"><br></div><div dir="auto">If you are concerned about recipe version in your layer then manage that rather than copying original recipe file *as it is* in your layer</div><div dir="auto"><br></div><div dir="auto">When upgrading recipe, anyway have to test it to make sure your image doesn&#39;t break. So no way you will miss any breaking change introduced. And at that point you could have (if needed) your custom version in &quot;file/&quot; rather than always copying the working sample which is already maintained by someone else</div><div dir="auto"><br></div><div dir="auto">I wouldn&#39;t recommend to have copy of unchanged upstream files in a custom layer</div><div dir="auto"><br></div><div dir="auto">Cheers</div><div dir="auto">Ankur<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Mar 21, 2020, 12:32 AM Robert P. J. Day &lt;<a href="mailto:rpjday@crashcourse.ca">rpjday@crashcourse.ca</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 21 Mar 2020, Ankur Tyagi wrote:<br>
<br>
&gt; what if sample file is updated in new version? Now you have to<br>
&gt; maintain the copy in your &quot;file/&quot; as well.<br>
&gt;<br>
&gt; If you are using sample file as it is, then keeping a copy is<br>
&gt; probably not a good idea<br>
&gt;<br>
&gt; Cheers<br>
&gt; Ankur<br>
<br>
  i actually think that&#39;s an argument in my favour ... i would be very<br>
nervous about how upgrading a recipe version would quietly upgrade my<br>
configuration file. i would far prefer to have to manually upgrade my<br>
configuration to keep in step.<br>
<br>
rday<br>
<br>
&gt;         got into a discussion yesterday about the &quot;cleanest&quot; way to design a<br>
&gt;       .bbappend file to install a package&#39;s configuration file, so i&#39;m<br>
&gt;       curious about best practices, and here&#39;s an example. (and i&#39;m asking<br>
&gt;       as it looks like this will be an issue for a number of recipes i&#39;m<br>
&gt;       looking at.)<br>
&gt;<br>
&gt;         current recipe for conntrack-tools:<br>
&gt;<br>
&gt;       <a href="http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.5.bb" rel="noreferrer noreferrer" target="_blank">http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.5.bb</a><br>
&gt;<br>
&gt;       note how the recipe install step installs a conntrack.conf.sample<br>
&gt;       file:<br>
&gt;<br>
&gt;       do_install_append() {<br>
&gt;         install -d ${D}/${sysconfdir}/conntrackd<br>
&gt;         install -d ${D}/${sysconfdir}/init.d<br>
&gt;         install -m 0644 ${S}/doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample<br>
&gt;         ...<br>
&gt;<br>
&gt;       so far, so good. now, in cases where a sample conf file is provided,<br>
&gt;       there is, of course, no guarantee that it will be applicable out of<br>
&gt;       the box -- one *expects* that it might be necessary to tweak such a<br>
&gt;       file and install it as part of a .bbappend file. and here&#39;s the point<br>
&gt;       of contention.<br>
&gt;<br>
&gt;         in this current situation, it turns out that that sample conf file<br>
&gt;       just happens to be appropriate, so the entire .bbappend file for this<br>
&gt;       recipe consists of:<br>
&gt;<br>
&gt;       do_install_append () {<br>
&gt;           install -m 0644  \<br>
&gt;           ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample \<br>
&gt;           ${D}/${sysconfdir}/conntrackd/conntrackd.conf<br>
&gt;       }<br>
&gt;<br>
&gt;         yes, that will work, but i suggested that, even though it&#39;s<br>
&gt;       convenient, the problem with that approach is that looking at the<br>
&gt;       .bbappend file doesn&#39;t show you the contents of the file that will be<br>
&gt;       installed. to see the actual conf file, you&#39;d have to peruse the<br>
&gt;       source, or check the final result ... you get the idea.<br>
&gt;<br>
&gt;         i suggested that, even though the sample file in *this* case was<br>
&gt;       perfectly appropriate, i would choose to make a copy of it under<br>
&gt;       files/, and install the conf file from *there*, the advantage being<br>
&gt;       that the actual file being installed is immediately readable.<br>
&gt;<br>
&gt;         does anyone have any strong opinions on this? it seems mundane, but<br>
&gt;       i think the latter approach is still superior, especially since i<br>
&gt;       suspect most sample configuration files would have to be adjusted,<br>
&gt;       anyway.<br>
&gt;<br>
&gt;         thoughts? just trying to collect some best practices to apply to<br>
&gt;       this project.<br>
&gt;<br>
&gt;       rday<br>
&gt;       --<br>
&gt;       _______________________________________________<br>
&gt;       Openembedded-core mailing list<br>
&gt;       <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank" rel="noreferrer">Openembedded-core@lists.openembedded.org</a><br>
&gt;       <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
-- <br>
<br>
========================================================================<br>
Robert P. J. Day                                 Ottawa, Ontario, CANADA<br>
                         <a href="http://crashcourse.ca" rel="noreferrer noreferrer" target="_blank">http://crashcourse.ca</a><br>
<br>
Twitter:                                       <a href="http://twitter.com/rpjday" rel="noreferrer noreferrer" target="_blank">http://twitter.com/rpjday</a><br>
LinkedIn:                               <a href="http://ca.linkedin.com/in/rpjday" rel="noreferrer noreferrer" target="_blank">http://ca.linkedin.com/in/rpjday</a><br>
========================================================================</blockquote></div></div></div>