Mailinglist Archive: opensuse-factory (257 mails)
| < Previous | Next > |
[opensuse-factory] Configuration files merge
- From: Michal Hrusecky <mhrusecky@xxxxxxx>
- Date: Thu, 7 May 2009 17:20:32 +0200
- Message-id: <20090507152032.GA7592@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi,
If we want to make our distribution friendly even to advanced users, I
think that we shouldn't touch users configuration files. Luckily this
isn't problem as in spec file Ican state that this file is configuration
and I don't want to replace it if user did some manual changes. Or I can
say that I want to replace it and keep backup of original one. But what
I'm missing is some tool to easily merge these files. In Gentoo there is
etc-update [1] or dispatch-conf [2]. I'll describe more precisely what
feature I'm missing and why I think it's needed.
Let's say that I've got some package and there was quite big change in
package default configuration file which will affect most of the users.
On the other hand users can have pretty complicated constructions in
their configuration files and if they did something like that, it's
quite possible that they don't need to update their configuration file.
So it is needed to tell users that if they are experiencing problems it
is most likely because they touched default configuration. I can take
care of it manually, mention it in various README and such, but more
easier way would be following.
User installs some packages. At the end of zypper or yast installation
there will be warning "You've got 42 configuration files to merge,
please run etc-update/dispatch-conf/whatever". Then user will run some
easy interactive tool which will state which configuration files can use
some manual merging, it will allow user to see difference between them
and let him choose which one he wants or let him merge them manually
somehow. Same warning about unmerged configuration files should appear
each time user installs something, no matter if this installation didn't
add any conflict, until all conflicts are fixed. User will be warned
about possible problems, hacker can play with it and keep his changes
against distribution defaults and ordinary user will just click on "use
distribution default for all" if he ever encounter such a problem
(shouldn't happen as ordinary user wouldn't touch configuration files).
I explained basic expected work flow, so now what I think should be
supported:
* detect configuration files, their conflicts and allow their merge
- this shouldn't be a big problem as rpm already stores conflicting
files as .rpmnew/.rpmold
* we probably want to keep even old versions to support three way merge
to achieve even better results
* if we are already storing these configuration files, maybe we should
let users to backup their own changes as well, add support for
versioning these configuration files
* warn user that he has conflicts in configuration files - will require
a little bit yast/zypper integration
* merging tool should support both console and graphical interface
(maybe use yast as possible frontend)
* support for various formats (expandable by plugins) - ordinary diff
may not be the best tool for merging XML files or ini files
* ordinary user who don't change anything shouldn't need to know about
this tool
I already filled feature request [3] - FATE#306411 . But I'm
interested in opinion of the others. What do you think about this
feature? Any feature that it should have and it isn't in fate yet?
[1]
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=4#doc_chap2
[2] http://en.gentoo-wiki.com/wiki/Dispatch-conf
[3] https://features.opensuse.org/306411
--
Michal Hrusecky
Package Maintainer
SUSE LINUX, s.r.o
e-mail: mhrusecky@xxxxxxx
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
If we want to make our distribution friendly even to advanced users, I
think that we shouldn't touch users configuration files. Luckily this
isn't problem as in spec file Ican state that this file is configuration
and I don't want to replace it if user did some manual changes. Or I can
say that I want to replace it and keep backup of original one. But what
I'm missing is some tool to easily merge these files. In Gentoo there is
etc-update [1] or dispatch-conf [2]. I'll describe more precisely what
feature I'm missing and why I think it's needed.
Let's say that I've got some package and there was quite big change in
package default configuration file which will affect most of the users.
On the other hand users can have pretty complicated constructions in
their configuration files and if they did something like that, it's
quite possible that they don't need to update their configuration file.
So it is needed to tell users that if they are experiencing problems it
is most likely because they touched default configuration. I can take
care of it manually, mention it in various README and such, but more
easier way would be following.
User installs some packages. At the end of zypper or yast installation
there will be warning "You've got 42 configuration files to merge,
please run etc-update/dispatch-conf/whatever". Then user will run some
easy interactive tool which will state which configuration files can use
some manual merging, it will allow user to see difference between them
and let him choose which one he wants or let him merge them manually
somehow. Same warning about unmerged configuration files should appear
each time user installs something, no matter if this installation didn't
add any conflict, until all conflicts are fixed. User will be warned
about possible problems, hacker can play with it and keep his changes
against distribution defaults and ordinary user will just click on "use
distribution default for all" if he ever encounter such a problem
(shouldn't happen as ordinary user wouldn't touch configuration files).
I explained basic expected work flow, so now what I think should be
supported:
* detect configuration files, their conflicts and allow their merge
- this shouldn't be a big problem as rpm already stores conflicting
files as .rpmnew/.rpmold
* we probably want to keep even old versions to support three way merge
to achieve even better results
* if we are already storing these configuration files, maybe we should
let users to backup their own changes as well, add support for
versioning these configuration files
* warn user that he has conflicts in configuration files - will require
a little bit yast/zypper integration
* merging tool should support both console and graphical interface
(maybe use yast as possible frontend)
* support for various formats (expandable by plugins) - ordinary diff
may not be the best tool for merging XML files or ini files
* ordinary user who don't change anything shouldn't need to know about
this tool
I already filled feature request [3] - FATE#306411 . But I'm
interested in opinion of the others. What do you think about this
feature? Any feature that it should have and it isn't in fate yet?
[1]
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=4#doc_chap2
[2] http://en.gentoo-wiki.com/wiki/Dispatch-conf
[3] https://features.opensuse.org/306411
--
Michal Hrusecky
Package Maintainer
SUSE LINUX, s.r.o
e-mail: mhrusecky@xxxxxxx
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
| < Previous | Next > |