[OE-core] [PATCH 1/4] packaging: allow globs in CONFFILES

Anders Darander anders at chargestorm.se
Tue Dec 23 06:25:42 UTC 2014


* ChenQi <Qi.Chen at windriver.com> [141223 02:58]:

> On 12/19/2014 02:42 PM, Mike Looijmans wrote:
> >On 12/19/2014 07:21 AM, Chen Qi wrote:
> >> ...
> >>As almost all files under /etc are basically configuration files, we
> >>provide a default value for CONFFILES.

> >>     CONNFFILES = "${sysconfdir}"

> >This is going to hurt a lot of recipes. Please do not set this.

Definitely true!

> >The default has always been that CONFFILES is empty. I see no reason
> >whatsoever to suddenly change this.

> >>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. 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.

No, similar lines will be required for quite a few recipes...

> >FHS may have written that somewhere, but if you just take a quick
> >look at what is in /etc/, you'll find that actual configuration files
> >are quite rare, but there are tons of scripts and distro related
> >files there.  Whether or not a file there is supposed to be edited by
> >the end-user is something of a distro decision.

> >Also, "configuration file" does not necessarily mean that the USER is
> >in control. A configuration file may also simply distinguish machine
> >capabilities or software features.

> >We'll end up having to patch hundreds of recipes with a CONFFILES=""
> >or similar line.

> Most files under /etc are configuration files. If we don't default
> CONFFILES to ${sysconfdir}, then we have to patch a lot of recipes
> with CONFFILES_xxx = "xxxx" lines.

Well, there are a lot of those configuration files, that only the
distribution will care about. Especially if we're talking embedded
devices.

> The fact is that when people write recipes, they often forget about
> CONFFILES.  The typical example is the shadow recipe. And I can easily
> give you more examples.

This patch won't help this, it just shifts everything 180 degrees
around. Now we have to explicitly remove a number of files from
CONFFILES in a number of packages; which obviously is something that
people will forget...

> And it's not uncommon that people forget to check CONFFILES when they
> update the recipe.  When the recipe is updated to a new version, it's
> possible that the CONFFILES should change.  The typical example is the
> systemd recipe.

> *The bad effect of the above? On-target package upgrades override user
> changes. That's a really annoying problem, isn't it?* Users of OE
> based projects have complained about this. There were patches on OE
> which fixed several recipes. But the solution doesn't scale.

I tend to agree with Mike here. It's better to explicitly add files (or
directories) in each recipe, as that will make it more obvious which
files won't get overwritten during a package upgrade. Sure, short-term
this might mean more patches (I'm nt really sure of the status regarding
this). 

But more importantly, it will keep the determinism and explicit marking
of CONFFILES. Again, remember that we're primarily talking about
embedded devices here, where the distibution/distributor quite likely
need some more control, compared to a regular desktop distribution.

> The patchset is an effort to change this situation.

I don't think we'll gain that much from this patch; rather we'll
loose...

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB



More information about the Openembedded-core mailing list