Bug#473223: smokeping: configuration merging is a nightmare
On Mon, Mar 31, 2008 at 01:20:55AM +0300, Niko Tyni wrote: The three way merge needs the old configurations around, so the source package now includes all default configuration files since Etch (divided into section-specific files.) There are some identical files that could be eliminated by making the postinst a bit smarter, but the files are so small that I'm not sure the savings are worth it. This looked so ugly in the morning that I did make the postinst smarter after all :) It seems to work great, apart from #473473 in ucf, so I think I'll upload that tomorrow after more testing. Just uploaded to experimental and tagged in the git repository. I'm announcing it on smokeping-users in the hope I get a test report or two. José, comments welcome :) Cheers, -- Niko
Bug#470295: Bug#473223: smokeping: configuration merging is a nightmare
On Sun, Mar 30, 2008 at 01:45:29AM +0100, Jose Carlos Garcia Sogo wrote: The only thing I am not sure is if conversion should be made in preinst or postinst, before restarting daemon. What have done other packages in such situation? Also, don't forget to keep old config file and print a big warning. I'm doing it in the preinst so that dpkg can prompt for changed files when unpacking. That should take care of the backup and the warnings too. BTW, I think that git repo should go live right now. If I someday go to get a new server and can recover SVN hist, we can later complete it in git, I just took all the packages archive.debian.org and snapshot.debian.net had and imported them into collab-maint at Alioth. $ git clone ssh://git.debian.org/git/collab-maint/smokeping.git (s/ssh/git/ for anonymous read-only access, of course). The git workflow needs some work/thought here: the 'clean' target wants to remove generated files under doc/ and git shouldn't track those in the Debian branch. I pushed the unreleased 2.3.5-1 there too. Cc'ing #470295, in case somebody anxious for a working master/slave setup wants to try it out. I'm going to experiment a bit with using 'ucf --three-way' instead of letting dpkg do the prompting, so this is not quite finished yet. It should work as is, though. Cheers, -- Niko -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#473223: smokeping: configuration merging is a nightmare
On Sun, Mar 30, 2008 at 1:26 PM, Niko Tyni [EMAIL PROTECTED] wrote: On Sun, Mar 30, 2008 at 01:45:29AM +0100, Jose Carlos Garcia Sogo wrote: The only thing I am not sure is if conversion should be made in preinst or postinst, before restarting daemon. What have done other packages in such situation? Also, don't forget to keep old config file and print a big warning. I'm doing it in the preinst so that dpkg can prompt for changed files when unpacking. That should take care of the backup and the warnings too. BTW, I think that git repo should go live right now. If I someday go to get a new server and can recover SVN hist, we can later complete it in git, I just took all the packages archive.debian.org and snapshot.debian.net had and imported them into collab-maint at Alioth. $ git clone ssh://git.debian.org/git/collab-maint/smokeping.git (s/ssh/git/ for anonymous read-only access, of course). The git workflow needs some work/thought here: the 'clean' target wants to remove generated files under doc/ and git shouldn't track those in the Debian branch. Ummm, that is a problem I have in other package, and I am not very sure about how this can be handled. Perhaps the main problem is not git itself, but git-buildpackage. Anything should be calle in the repo itself, but exported before (or at least there should be an option to do that) I pushed the unreleased 2.3.5-1 there too. Cc'ing #470295, in case somebody anxious for a working master/slave setup wants to try it out. What is the pristine-tar branch intended for? I have seen that you have commited there 2.3.5, but I cannot see any difference with upstream branch I'm going to experiment a bit with using 'ucf --three-way' instead of letting dpkg do the prompting, so this is not quite finished yet. It should work as is, though. I have another not-yet-resolved point here. For example, for this, a topic branch would be the obvious thing to use. This is going to work here as that branch is going to be merged at a later point with master. But this approach does not work when you are implementing an upstream patch. Well, it will work, while you are woring with the source, but I don't like later to have patches in a hughe diff.gz, as it was common in early days in Debian. That makes things harder to check for NMUs and security. Perhaps dpatch is not the best patch system, but it is quite clear where are patches. -- José Carlos García Sogo [EMAIL PROTECTED]
Bug#473223: smokeping: configuration merging is a nightmare
On Sun, Mar 30, 2008 at 02:12:52PM +0200, Jose Carlos Garcia Sogo wrote: I'm going to experiment a bit with using 'ucf --three-way' instead of letting dpkg do the prompting, so this is not quite finished yet. It should work as is, though. There's now a 'ucf' branch on git.debian.org doing this. The three way merge needs the old configurations around, so the source package now includes all default configuration files since Etch (divided into section-specific files.) There are some identical files that could be eliminated by making the postinst a bit smarter, but the files are so small that I'm not sure the savings are worth it. It seems to work great, apart from #473473 in ucf, so I think I'll upload that tomorrow after more testing. Cheers, -- Niko -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#473223: smokeping: configuration merging is a nightmare
When I saw the title for this bug, I thinked just the same, that the config file should be splitted in some different files. I think you have explained the solution right. The only thing I am not sure is if conversion should be made in preinst or postinst, before restarting daemon. What have done other packages in such situation? Also, don't forget to keep old config file and print a big warning. BTW, I think that git repo should go live right now. If I someday go to get a new server and can recover SVN hist, we can later complete it in git, -- José Carlos García Sogo [EMAIL PROTECTED]
Bug#473223: smokeping: configuration merging is a nightmare
Package: smokeping Version: 2.3.2-1 Severity: normal I'm adding two new variables to the don't touch section of the configuration file for the next version, and they really need to get into everybody's configs for things to continue working. I'm sure that just about everybody is by now used to keeping their own local changes when dpkg prompts for a config change, because they have to edit the same file to define their targets. I think it's high time to split the config file. My current plan goes like this: - we ship a new version of /etc/smokeping/config that @include's one file per each section in /etc/smokeping/config.d - etc/smokeping/config.d/General has a further @include /usr/share/smokeping/config.pathnames or somesuch, and the don't touch section is placed there - the preinst of the new version handles upgrades by splitting the current configuration into separate files and creating them in config.d/. This way, users upgrading will get a prompt for the new /etc/smokeping/config, and another one for each section they have modified. It's possible that the config.d/ files must be handled with ucf, as dpkg may consider them new even if the preinst already created identical versions of them. Jose, please comment if you see a flaw here. Cheers, -- Niko -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]