[Bug 753935] New: yast2 ntp-client calls unchanged ntp.conf "changed manually"
https://bugzilla.novell.com/show_bug.cgi?id=753935 https://bugzilla.novell.com/show_bug.cgi?id=753935#c0 Summary: yast2 ntp-client calls unchanged ntp.conf "changed manually" Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: Other OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: YaST2 AssignedTo: varkoly@suse.com ReportedBy: suse-beta@cboltz.de QAContact: jsrain@suse.com Found By: Beta-Customer Blocker: --- Created an attachment (id=483072) --> (http://bugzilla.novell.com/attachment.cgi?id=483072) y2log When starting yast2 ntp-client, I get a warning message: File /etc/ntp.conf has been changed manually. YaST might loose some of the changes. [ ] Do not show this message anymore [Continue] [Cancel] However I did not modify /etc/ntp.conf - it's exactly the file that comes with the ntp package (also confirmed by "rpm -V ntp") The y2log is attached (emptied before starting yast2 ntp-client), other logs in /var/log/YaST2 were not modified. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c1
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c2
Christian Boltz
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c3
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c4
Reinhard Max
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c5
Jiří Suchomel
This way a checksum will only exist if YaST really touched the file, and at that point due to the file being packaged as %config(noreplace) it will never get replaced by the new version on update.
Hm, but in reported case, checksum did exist and that was the reason for YaST to show a warning. Wasn't it really possible that ntp itself replaced the file during the update (see comment 2)? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c6
--- Comment #6 from Reinhard Max
(In reply to comment #4) Hm, but in reported case, checksum did exist and that was the reason for YaST to show a warning.
Yes, but it probably got created from an untouched config file, which then got replaced by an update. This wouldn't happen in my algorithm, because the checksum would only get created when YaST really changes the file.
Wasn't it really possible that ntp itself replaced the file during the update (see comment 2)?
Due to %config(noreplace) the package only replaces the config file if it wasn't changed. If it was changed, the old one stays in place and the new one gets installed as ntp.conf.rpmnew. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c7
--- Comment #7 from Christian Boltz
How about this algorithm for the YaST module?
Looks good, but I'd propose a small change.
If a checksum exists
If the checksum matches the file
_or rpm -V reports the file as unchanged_
Proceed in changing the file and update the checksum.
If the checksum does not match the file
_and rpm -V reports the file as changed_
Report the file as manually edited.
This way a checksum will only exist if YaST really touched the file, and at that point due to the file being packaged as %config(noreplace) it will never get replaced by the new version on update.
Please also include rpm -V in the check because - the checksum might have been created by older YaST versions - a user might have moved the .rpmnew to ntp.conf -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c8
Jiří Suchomel
(In reply to comment #5)
(In reply to comment #4) Hm, but in reported case, checksum did exist and that was the reason for YaST to show a warning.
Yes, but it probably got created from an untouched config file, which then got replaced by an update.
This is unlikely, according to the code in NtpClient.ycp - the checksum gets created right after YaST writes the file. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c9
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c
Alberto Planas Dominguez
https://bugzilla.novell.com/show_bug.cgi?id=753935
https://bugzilla.novell.com/show_bug.cgi?id=753935#c12
Peter Varkoly
participants (1)
-
bugzilla_noreply@novell.com