[opensuse-packaging] Migration of configuration files?
Hi, With sabayon 2.29.5, the location of configuration files have changed. The migration is quite simple: cp /etc/desktop-profiles/*.xml /etc/sabayon/ cp /etc/desktop-profiles/*.zip /etc/sabayon/profiles/ I'm wondering if this is something that should be done in the package scriptlets, or not. I know we usually don't want to touch configuration files, but here, it's really just moving them. Is this something we should do, or is this a bad idea? Also, is there any way to notify the user about this change? It will of course be in the rpm changelog, but something more visible might be better. Thanks, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Samstag, 16. Januar 2010 15:02:42 schrieb Vincent Untz:
Hi,
With sabayon 2.29.5, the location of configuration files have changed. The migration is quite simple:
cp /etc/desktop-profiles/*.xml /etc/sabayon/ cp /etc/desktop-profiles/*.zip /etc/sabayon/profiles/
I'm wondering if this is something that should be done in the package scriptlets, or not. I know we usually don't want to touch configuration files, but here, it's really just moving them. Is this something we should do, or is this a bad idea?
I think we should, but check before that the target does not exist to avoid overwriting data on package update of course.
Also, is there any way to notify the user about this change? It will of course be in the rpm changelog, but something more visible might be better.
Well, is the standard user modifing these files ? (I have no idea what sabayon is). The old popup notification service on package update has been dropped since a while. So I see no elegant way to notify the user atm. bye adrian -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le samedi 16 janvier 2010, à 15:55 +0100, Adrian Schröter a écrit :
Am Samstag, 16. Januar 2010 15:02:42 schrieb Vincent Untz:
Hi,
With sabayon 2.29.5, the location of configuration files have changed. The migration is quite simple:
cp /etc/desktop-profiles/*.xml /etc/sabayon/ cp /etc/desktop-profiles/*.zip /etc/sabayon/profiles/
I'm wondering if this is something that should be done in the package scriptlets, or not. I know we usually don't want to touch configuration files, but here, it's really just moving them. Is this something we should do, or is this a bad idea?
I think we should, but check before that the target does not exist to avoid overwriting data on package update of course.
Yeah. I ended up doing this: # Migrate old configuration (since 2.29.5, in 11.3) # Can be removed for openSUSE 12.2 for file in %{_sysconfdir}/desktop-profiles/*.xml %{_sysconfdir}/desktop-profiles/*.zip; do # do nothing if the file doesn't exist (no file in directory matching the *) test -f "$file" || continue # do nothing if the file was already migrated test ! -f "$file".migrated || continue # do nothing if the file is already present in new directory test ! -f "%{_sysconfdir}/%{name}/`basename \"$file\"`" || continue # migrate files based on extension if test "${file##*.}" == "xml"; then cp -a "$file" %{_sysconfdir}/%{name}/ touch "$file".migrated fi if test "${file##*.}" == "zip"; then cp -a "$file" %{_sysconfdir}/%{name}/profiles/ touch "$file".migrated fi done I chose to not move the files to be on the safe side, but if people think it's better to just move them, it can obviously be done.
Also, is there any way to notify the user about this change? It will of course be in the rpm changelog, but something more visible might be better.
Well, is the standard user modifing these files ? (I have no idea what sabayon is).
No, indeed, it's the admin that modifies the files. Sabayon is a tool to create desktop profiles and so only a sysadmin will modify the profiles (a standard user might have a profile applied, but he doesn't need to know about it). Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Adrian Schröter
-
Vincent Untz