[augeas-devel] Re: New example at creating a lens

Raphaël Pinson raphink at gmail.com
Wed Jul 15 13:23:13 UTC 2009


On Wed, Jul 15, 2009 at 2:54 PM, Free Ekanayaka<free at 64studio.com> wrote:
> Hi Raphaël,
>
> |--==> On Wed, 15 Jul 2009 13:53:32 +0200, Raphaël Pinson <raphink at gmail.com> said:
>
>  > As we are in this subject, Augeas support was implemented in rpm some
>  > time ago.
>
> Out of curiosity, how does rpm support it exactly? Pointers are
> welcome (sorry I'm pretty new to the subject)

>From what I understood, this is using rpm scriptlets (an equivalent of
Debian's maintainer scripts) with an Augeas syntax to modify
configuration files. I don't know if Jeff could give more info on
this.
http://rpm5.org/community/rpm-devel/3678.html


>
>  > Packages are not supposed to modify existing configuration files unless :
>  >    - they provide this file, or
>  >    - they use a program provided by the package providing the
>  > configuration file in order to modify it (e.g. useradd).
>
> That's correct AFAICT.
>
>  >    - they use an augeas lens provided by the package providing the
>  > configuration file.
>
> This sounds like a nice idea. The main problem I see is the work
> overhead for the maintainer.

Yes, although I see that as a temporary step before these files go
upstream, which should be imho the ideal situation : making Augeas a
standard to manage config files in Unix systems, and having each
project file their own lenses.


>
> The whole point of the policy is to support smooth upgrades of
> configuration files which haven't been touched directly by the system
> administrators. So letting other packages modify a configuration file
> via augeas would probably imply that in case of changes in the format
> of that configuration file, the maintainer of the package providing
> the file should ensure a smooth migration from the previous one to the
> new, including possible modifications performed by other packages (and
> that's why there very few packages providing scripts to modify their
> configuration files).


A few simple examples of packages already proposing to modify
configuration files :
  * packages adding a service to /etc/services
  * packages adding a rule to inetd (unless they use xinetd, which is
much easier)

The use of foo.d directories has greatly improved this situation
(xinetd, php, apache, etc.), but there are still a lot of situations
where editing a single file is mandatory.


> However this a general problem, non strictly augeas-related, and
> actually augeas would provide a good base to tackle it. So all in all
> I'm for pushing the idea to debian-devel.


OK. I see the use of Augeas in packaging as a parallel to the use of
debconf. Something not mandatory, but recommended for a specific need
where nothing else really fits the need.



Raphaël



>
>  > Currently, the lenses shipped with Augeas do not take in
>  > consideration the version of the program, and the specific
>  > fields/values of the configuration files linked to this
>  > version. Shipping the lenses with the programs would allow the
>  > lenses to be versionned together with the programs.
>
> This is another bad situation this idea would contribute to alleviate.
>
> Ciao!
>
> Free
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>




More information about the augeas-devel mailing list