Patchwork [RFC,-,WIP,v2,00/10] conf-files: New recipe to consolidate config file

login
register
mail settings
Submitter Saul Wold
Date June 12, 2014, 5:56 a.m.
Message ID <cover.1402552609.git.sgw@linux.intel.com>
Download mbox
Permalink /patch/73631/
State New
Headers show

Pull-request

git://git.yoctoproject.org/poky-contrib sgw/one-config

Comments

Saul Wold - June 12, 2014, 5:56 a.m.
This is a little further along, I would really like to get some
feedback on the direction I am taking this.

The idea is that a block of anonymous code will generate all the
metadata and do_install() function for the existing config files
such that a .bbappend can be created to override specific files
from a single recipe instead of from 10-12 different .bbappends.

[YOCTO #4011]


The following changes since commit b5a928af721026795be7b7f68b2dd577408afbe5:

  bitbake: toaster: add Project class models to orm (2014-06-11 10:35:47 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib sgw/one-config
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=sgw/one-config

Saul Wold (10):
  conf-files: New recipe to create single recipe for config files
  apmd: convert to use conf-files
  alsa-state: convert to use conf-files
  formfactor: convert to conf-files
  connman: convert to use conf-files
  init-ifupdown: convert to use conf-files
  pointer: convert to conf-files and remove
  xserver-xf86-config: convert to use conf-files and remove
  pointercal-xinput: convert to conf-files and remove
  xorg-config: move xorg.conf files into conf-files as bbappend

 .../conf-files/conf-files}/genericx86-64/xorg.conf |   0
 .../conf-files/conf-files}/genericx86/xorg.conf    |   0
 .../conf-files/conf-files_%.bbappend}              |   0
 meta/classes/conf-files.bbclass                    |   3 +
 meta/recipes-bsp/alsa-state/alsa-state.bb          |   9 +--
 meta/recipes-bsp/apmd/apmd_3.2.2-14.bb             |   5 +-
 .../conf-files}/apmd_proxy.conf                    |   0
 .../conf-files}/asound.conf                        |   0
 .../conf-files/conf-files}/interfaces              |   0
 .../files => conf-files/conf-files}/machconfig     |   0
 .../conf-files}/pointercal                         |   0
 .../conf-files/conf-files}/pointercal.xinput       |   0
 .../conf-files/conf-files}/qemuall/wired-setup     |   0
 .../conf-files/conf-files}/qemuall/wired.config    |   0
 .../conf-files/conf-files}/qemuarm/interfaces      |   0
 .../conf-files}/qemuarm/machconfig                 |   0
 .../conf-files}/qemuarm/pointercal                 |   0
 .../conf-files/conf-files}/qemuarm/xorg.conf       |   0
 .../conf-files/conf-files}/qemuarmv6/interfaces    |   0
 .../conf-files}/qemuarmv6/machconfig               |   0
 .../conf-files}/qemuarmv6/pointercal               |   0
 .../conf-files/conf-files}/qemuarmv7/interfaces    |   0
 .../conf-files}/qemuarmv7/machconfig               |   0
 .../conf-files}/qemuarmv7/pointercal               |   0
 .../conf-files/conf-files}/qemumips/interfaces     |   0
 .../conf-files}/qemumips/machconfig                |   0
 .../conf-files}/qemumips/pointercal                |   0
 .../conf-files/conf-files}/qemumips/xorg.conf      |   0
 .../conf-files/conf-files}/qemumips64/interfaces   |   0
 .../conf-files/conf-files}/qemumips64/xorg.conf    |   0
 .../conf-files/conf-files}/qemuppc/interfaces      |   0
 .../conf-files}/qemuppc/machconfig                 |   0
 .../conf-files}/qemuppc/pointercal                 | Bin
 .../conf-files/conf-files}/qemuppc/xorg.conf       |   0
 .../conf-files/conf-files}/qemush4/interfaces      |   0
 .../conf-files/conf-files}/qemush4/xorg.conf       |   0
 .../conf-files/conf-files}/qemux86-64/interfaces   |   0
 .../conf-files}/qemux86-64/machconfig              |   0
 .../conf-files}/qemux86-64/pointercal              |   0
 .../conf-files/conf-files}/qemux86-64/xorg.conf    |   0
 .../conf-files/conf-files}/qemux86/interfaces      |   0
 .../conf-files}/qemux86/machconfig                 |   0
 .../conf-files}/qemux86/pointercal                 |   0
 .../conf-files/conf-files}/qemux86/xorg.conf       |   0
 .../conf-files/conf-files}/xorg.conf               |   0
 meta/recipes-bsp/conf-files/conf-files_1.0.bb      |  84 +++++++++++++++++++++
 meta/recipes-bsp/formfactor/formfactor_0.0.bb      |   7 +-
 meta/recipes-bsp/pointercal/pointercal/COPYING     |   2 -
 meta/recipes-bsp/pointercal/pointercal_0.0.bb      |  22 ------
 meta/recipes-connectivity/connman/connman-conf.bb  |  24 ------
 meta/recipes-connectivity/connman/connman.inc      |   2 +-
 meta/recipes-connectivity/connman/connman_1.23.bb  |   2 +-
 .../init-ifupdown/init-ifupdown_1.0.bb             |   6 +-
 .../xinput-calibrator/pointercal-xinput_0.0.bb     |  20 -----
 .../xinput-calibrator/xinput-calibrator_git.bb     |   3 +-
 .../xorg-xserver/xserver-xf86-config_0.1.bb        |  20 -----
 56 files changed, 98 insertions(+), 111 deletions(-)
 rename meta-yocto-bsp/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/genericx86-64/xorg.conf (100%)
 rename meta-yocto-bsp/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/genericx86/xorg.conf (100%)
 rename meta-yocto-bsp/{recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend => recipes-bsp/conf-files/conf-files_%.bbappend} (100%)
 create mode 100644 meta/classes/conf-files.bbclass
 rename meta/recipes-bsp/{apmd/apmd-3.2.2-14 => conf-files/conf-files}/apmd_proxy.conf (100%)
 rename meta/recipes-bsp/{alsa-state/alsa-state => conf-files/conf-files}/asound.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/pointercal (100%)
 rename meta/{recipes-graphics/xinput-calibrator/pointercal-xinput => recipes-bsp/conf-files/conf-files}/pointercal.xinput (100%)
 rename meta/{recipes-connectivity/connman/connman-conf => recipes-bsp/conf-files/conf-files}/qemuall/wired-setup (100%)
 rename meta/{recipes-connectivity/connman/connman-conf => recipes-bsp/conf-files/conf-files}/qemuall/wired.config (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemuarm/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemuarm/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemuarm/pointercal (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemuarm/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemuarmv6/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemuarmv6/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemuarmv6/pointercal (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemuarmv7/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemuarmv7/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemuarmv7/pointercal (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemumips/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemumips/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemumips/pointercal (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemumips/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemumips64/interfaces (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemumips64/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemuppc/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemuppc/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemuppc/pointercal (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemuppc/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemush4/interfaces (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemush4/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemux86-64/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemux86-64/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemux86-64/pointercal (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemux86-64/xorg.conf (100%)
 rename meta/{recipes-core/init-ifupdown/init-ifupdown-1.0 => recipes-bsp/conf-files/conf-files}/qemux86/interfaces (100%)
 rename meta/recipes-bsp/{formfactor/files => conf-files/conf-files}/qemux86/machconfig (100%)
 rename meta/recipes-bsp/{pointercal/pointercal => conf-files/conf-files}/qemux86/pointercal (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/qemux86/xorg.conf (100%)
 rename meta/{recipes-graphics/xorg-xserver/xserver-xf86-config => recipes-bsp/conf-files/conf-files}/xorg.conf (100%)
 create mode 100644 meta/recipes-bsp/conf-files/conf-files_1.0.bb
 delete mode 100644 meta/recipes-bsp/pointercal/pointercal/COPYING
 delete mode 100644 meta/recipes-bsp/pointercal/pointercal_0.0.bb
 delete mode 100644 meta/recipes-connectivity/connman/connman-conf.bb
 delete mode 100644 meta/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb
 delete mode 100644 meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
Paul Eggleton - June 13, 2014, 1:30 p.m.
On Wednesday 11 June 2014 22:56:19 Saul Wold wrote:
> This is a little further along, I would really like to get some
> feedback on the direction I am taking this.
> 
> The idea is that a block of anonymous code will generate all the
> metadata and do_install() function for the existing config files
> such that a .bbappend can be created to override specific files
> from a single recipe instead of from 10-12 different .bbappends.

I have some reservations about this change as-is. I certainly accept that 
currently the placement of typical BSP config files is a bit of a mess, and new 
users definitely find it difficult to know where to go to change a particular file; 
however there will always be config files this recipe doesn't cover. Most 
significantly, it also requires everyone with existing BSP and distro layers to 
go and migrate their bbappends over to the new structure, for not that much 
gain. If we are going to go down this route, we absolutely must have a script 
which migrates existing bbappends to this new layout. We'll also need to 
ensure runtime upgrades work, i.e. PR values will have to increase from the 
old packages to the new ones provided by the single recipe.

As a more general improvement in this area, I'd really like to see us have 
some tooling around finding where a particular config file (or other file I want 
to replace) comes from and then creating the bbappend to substitute my 
version. We have the part that tracks down the recipe from a file - albeit in a 
not-very-easy-to-use form - in scripts/oe-pkgdata-util (with its "find-path" 
command); Toaster has the functionality to do this as well. This solution has 
the benefit of being able to work for any configuration file (or other file) that 
any recipe in any layer introduces. In fact this will be of benefit even if we 
decide to go ahead with the conf-files move, so I've entered an enhancement 
request to cover it separately:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=6447

Cheers,
Paul