I want to change the semantics of the CONFFILES variable and improve its handling during the packaging process. Please see detailed reasons and design bekow. ============================================================================== For now, the CONFFILES variable is a list of config files to be packaged. However, as these files may come directly from upstream instead of from our WORKDIR, it's a common mistake that we forget to set this variable in our recipes. This will lead to unexpected behavior when doing an on-target upgrade. For example, we modify the /etc/login.defs on target and then do an upgrade. The file will be replaced, which is obviously not correct. We should change the handling and semantics of CONFFILES. The CONFFILES should be able to take the same form as FILES. That means, we don't have to list a bunch of files for CONFFILES in each recipe. It will just be expanded like the FILES variable. As almost all files under /etc are basically configuration files, we should provide a default value for CONFFILES. CONNFFILES_DEFAULT = "${sysconfdir}" In this way, we don't need to modify every recipe to set the CONFFILES variable. Of course, setting CONFFILES in recipes take precedence over the CONFFILES_DEFAULT. For example, if the recipe author decides that package A should only treat files under ${sysconfdir}/default/ as config files, he/she can write like this. CONFFILES_A = "${sysconfdir}/default" The above situation should not be common. As according to FHS, the /etc directory is a place for all system related configuration files. //Chen Qi
The following patchset shows the basic idea. git://git.pokylinux.org/poky-contrib ChenQi/CONFFILES http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/CONFFILES Any comment or suggestion would be really appreciated. //Chen Qi
Hi Saul & Richard, What do you think of this problem? If it's decided that the proposal is not reasonable, I'd like to close this bug as 'WON'T FIX'. Best Regards, Chen Qi
Sadly that branch no longer exists. I agree that CONFFILES should behave like FILES with respect to globs, but I don't think we need a CONFFILES_DEFAULT, just set CONFFILES = ${sysconfdir} in bitbake.conf.
(In reply to comment #3) > Sadly that branch no longer exists. I agree that CONFFILES should behave > like FILES with respect to globs, but I don't think we need a > CONFFILES_DEFAULT, just set CONFFILES = ${sysconfdir} in bitbake.conf. Got it. I'll send out a new patchset. Thanks, Chen Qi
The consensus on mailing list was that changing the CONFFILES default is a bad idea, can you rebase the branch to master and drop the change to bitbake.conf.
(In reply to comment #5) > The consensus on mailing list was that changing the CONFFILES default is a > bad idea, can you rebase the branch to master and drop the change to > bitbake.conf. OK. I'll finish it before Chinese New Year. //Chen Qi
Merged in oe-core 0d446ef0e5bbca7058eec7259e34f2a1637dfab1.