[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 <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |jsuchome@suse.com InfoProvider| |suse-beta@cboltz.de --- Comment #1 from Jiří Suchomel <jsuchome@suse.com> 2013-06-20 07:33:22 UTC --- There's not rpm comparision in your case, but YaST compares the file against some stored checksum, which should be saved in /var/lib/YaST2/file_checksums.ycp I do not know when the checksum was created, my guess is in some previous call of ntp-client module. Did you run it manually? Or during installation? -- 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#c2 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|suse-beta@cboltz.de | --- Comment #2 from Christian Boltz <suse-beta@cboltz.de> 2013-06-20 18:20:43 CEST --- #ls -l --time-style=full-iso /var/lib/YaST2/file_checksums.ycp -rw-r--r-- 1 root root 77 2012-03-25 17:28:15.000000000 +0200 /var/lib/YaST2/file_checksums.ycp # cat /var/lib/YaST2/file_checksums.ycp $[ "/etc/ntp.conf" : "ec8f3e031cae94967d4c2c1bb3d8db62 /etc/ntp.conf\n" ] I'm quite sure I started yast2 ntp-client manually, because I'm zypper dup'ing my system since years ;-) Hmm, wild guess: Could it be that - I started yast2 ntp-client long time ago, and it wrote file_checksums.ycp - I updated to a newer release with different ntp.conf in the rpm, and rpm replaced my /etc/ntp.conf with the newer version - and then yast2 ntp-client "surprisingly" noticed a new checksum ? If this is the cause of the issue, the solution would be to display the warning only if "rpm -V ntp" does list /etc/ntp.conf as 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#c3 Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |max@suse.com --- Comment #3 from Jiří Suchomel <jsuchome@suse.com> 2013-06-21 00:49:30 UTC --- Yes, I think your guess might be correct one. Reducing to the rpm -V check would mean that every time you run yast2 ntp-client, you'll get the message. I think the point of checking the checksum (written by ntp-client at write time) was to really check only manual changes, and do not warn about changes done by YaST. Maybe the correct solution would be to delete /var/lib/YaST2/file_checksums.ycp at update. Or maybe just delete "/etc/ntp.conf" entry from the file, when the package is updated... but I'm not sure if "ntp" package maintainer would like to add such script into rpm.... Reinhard? -- 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#c Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|openSUSE 12.1 |openSUSE 12.3 -- 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#c4 Reinhard Max <max@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW CC| |max@suse.com InfoProvider|max@suse.com | --- Comment #4 from Reinhard Max <max@suse.com> 2013-06-21 03:48:45 CEST --- How about this algorithm for the YaST module? If no checksum exists If rpm -V reports the file as unchanged Proceed in changing the file. Create the checksum,but only if the file was actually changed. If rpm -V reports the file as changed Report the file as manually edited. If a checksum exists If the checksum matches the file Proceed in changing the file and update the checksum. If the checksum does not match the file 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. -- 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#c5 Jiří Suchomel <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |max@suse.com --- Comment #5 from Jiří Suchomel <jsuchome@suse.com> 2013-06-21 02:39:10 UTC --- (In reply to comment #4)
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 <max@suse.com> 2013-06-21 04:45:19 CEST --- (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 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 <suse-beta@cboltz.de> 2013-06-21 07:52:25 CEST --- (In reply to comment #4)
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 <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|max@suse.com | --- Comment #8 from Jiří Suchomel <jsuchome@suse.com> 2013-06-21 06:42:09 UTC --- (In reply to comment #6)
(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 <jsuchome@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|YaST2 |YaST2 Product|openSUSE 12.1 |openSUSE 12.3 --- Comment #9 from Jiří Suchomel <jsuchome@suse.com> 2013-06-21 06:43:23 UTC --- Well, I'll leave this to package maintainer to decide (or investigate deeper). -- 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#c Alberto Planas Dominguez <aplanas@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status Whiteboard| | GOLD -- 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#c12 Peter Varkoly <varkoly@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |WORKSFORME --- Comment #12 from Peter Varkoly <varkoly@suse.com> 2014-06-09 06:14:17 UTC --- I could not reproduce this bug on 13.1 or SLE12 -- 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.
participants (1)
-
bugzilla_noreply@novell.com