Hi, On Wed, Sep 11, Eric Schirra wrote:
I have read the wiki and have a question. You write a administrator must change the config under /etc
But you write in example:
%posttrans # Migration to /usr/etc. for i in securetty pam.d/other pam.d/common-account pam.d/common-auth pam.d/common-password pam.d/common-session ; do test -f /etc/${i}.rpmsave && mv -v /etc/${i}.rpmsave /etc/${i} ||: done
When i'm not stupid this would override the changes from administrator in /etc.
Error or my mistake?
What happens if I migrate to the new layout is: First update: 1. In %pre we make sure there are no obsolete *.rpmsave files 2. We update the RPM. This will delete the files in /etc/pam.d, if they are modified rpm will create *.rpmsave files. After this step, the new config is in /usr/etc/pam.d and /etc/pam.d contains an *.rpmsave file, but no /etc/pam.d/config file! 3. If there is a /etc/pam.d/config.rpmsave file, we rename that to /etc/pam.d/config, to get the same behavior as before the update Now we make the second update: 1. %pre cannot find an /etc/pam.d/*.rpmsave file 2. We update the RPM content. No /etc/pam.d/*.rpmsave can be created, as there was no file of this RPM marked as %config anymore. 3. Since there cannot be a *.rpmsave file, the %posttrans cannot rename/overwrite anything. I hope this explains why this should work. Modulo any other hacks packages have in %pre/%post, in this case, the suggestion how to handle this needs adjustements for this package. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Felix Imendoerffer (HRB 247165, AG München) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org