[Bug 781601] New: /etc/samba/smb.conf contains the package build time

https://bugzilla.novell.com/show_bug.cgi?id=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c0 Summary: /etc/samba/smb.conf contains the package build time Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: All OS/Version: openSUSE 12.2 Status: NEW Severity: Normal Priority: P5 - None Component: Samba AssignedTo: samba-maintainers@SuSE.de ReportedBy: cobexer@gmail.com QAContact: samba-maintainers@SuSE.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0 /etc/samba/smb.conf unnecessarily contains the package build time which causes a new .rpmnew on every update of the samba-client(?) package i tried to fix this in https://build.opensuse.org/request/show/128478 but that got declined, i think that lmuelle misunderstood me there. Reproducible: Always Steps to Reproduce: 1. modify /etc/samba/smb.conf 2. update samba-client Actual Results: /etc/samba/smb.conf.rpmnew Expected Results: no /etc/samba/smb.conf.rpmnew since there were no changes in the actual default config -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c1 Lars Müller <lmuelle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |samba-maintainers@SuSE.de InfoProvider| |cobexer@gmail.com AssignedTo|samba-maintainers@SuSE.de |lmuelle@suse.com --- Comment #1 from Lars Müller <lmuelle@suse.com> 2012-09-22 00:30:56 CEST --- Please be this nice and do a simple test. Install openSUSE 12.2 from DVD and apply not updates. Install the samba-client package. Then call rpm -V samba-client Now apply the updates via YaST or zypper patch on the command line. Again call rpm -V samba-client and check foe all files named /stc/samba/smb.conf* How many files did you had at the end? -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c2 --- Comment #2 from Lars Müller <lmuelle@suse.com> 2012-09-22 00:49:03 CEST --- To give a bit more background information: The included '# Date: ' line at the top of the smb.conf file is created while the package gets build. And not at install time. Due to this approach this information is taken into account when the checksum gets calculated at build time too. You get a /etc/samba/smb.conf.rpmnew each time as soon as you have a modified configuration file. Here it's already enough if you for example remove the header with the date and time included. Or more practical if you modify the workgroup parameter, the role or if you add a customized share. -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c3 Christian Boltz <suse-beta@cboltz.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |suse-beta@cboltz.de --- Comment #3 from Christian Boltz <suse-beta@cboltz.de> 2012-09-22 23:47:01 CEST --- @Lars: (In reply to comment #2)
The included '# Date: ' line at the top of the smb.conf file is created while the package gets build.
Simple, but (as usual) evil question: Why? ;-) Having the build timestamp in the package means; OBS will detect a "changed" package on every rebuild, which causes superfluous rebuilds of packages that build-require samba. It will also cause additional downloads at least for factory users. If there isn't a good reason to have the timestamp in smb.conf, please remove it. @Christoph: please include the output of "diff -u smb.conf smb.conf.rpmnew" in your reply. -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c4 --- Comment #4 from Lars Müller <lmuelle@suse.com> 2012-09-23 00:27:14 CEST --- The reason is to have a hint when the configuration got modified the first time. Cause if the file got modified we'll see the smb.conf.rpmnew. And only in that case. This is an issue reported against openSUSE 12.2. The reporter believes the Date line in question causes extra smb.conf.rpmnew files which is not the case. I tried to provide an easy way to test and understand how files packaged with the %config(noreplace) attribute work. The potential additional rebuilds are a different topic than the here described one and apply only to openSUSE Factory and not to a release version. -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c5 Lars Müller <lmuelle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rolf.schmidt@suse.com InfoProvider|cobexer@gmail.com |rolf.schmidt@suse.com --- Comment #5 from Lars Müller <lmuelle@suse.com> 2012-09-26 20:25:06 CEST --- Starting with build source time stamp 2843 the build date isn't longer written to the included smb.conf file. @Rolf: Please check back with your support folks if it ever had been of any value to you. If that would be the case we have to consider to make this # Date: 2009-01-10 line conditional only if we don't build openSUSE Factory. That's where it causes trouble as Christian described with comment #3. Rolf, please pass the needinfo flag back to Christoph as soon as you provided the requested information. -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c6 --- Comment #6 from Christoph Obexer <cobexer@gmail.com> 2012-09-27 10:08:08 UTC --- (In reply to comment #4)
The reason is to have a hint when the configuration got modified the first time.
if that was indeed a very useful information I'm sure more packages would have such timestamps in their configuration files, or the package management stack would record such information somewhere, or /etc would be put under version control (which would make a _lot_ of sense and is what i do every time, Ubuntu thinks so too http://summit.ubuntu.com/uds-q/meeting/20293/foundations-q-dpkg-pristine-con... )
Cause if the file got modified we'll see the smb.conf.rpmnew. And only in that case.
and every time i did updates i check in the changes in /etc, after i checked all .rpmnew files for new changes to make sure there are no security fixes that i would miss otherwise when done i remove all *.rpmnew files that way i can easily check for them. Debian forces me to merge the changes after it detected such a situation, Gentoo does that too why RPM based distros err on the side "uh you changed the config, hmm lets just break the system(or not apply changes that fix security holes) and not make necessary changes to your config and just put the new config in a file that you'll not notice for too long" is a miracle to me (the above is a reference to a update that broke ssh login because the config was obviously changed and a change was necessary to be able to login, and for a security related thing there was a php update i remember that needed a change to the php.ini file which was also changed and i would have missed if i wasn't that careful)
This is an issue reported against openSUSE 12.2. The reporter believes the Date line in question causes extra smb.conf.rpmnew files which is not the case.
see above
I tried to provide an easy way to test and understand how files packaged with the %config(noreplace) attribute work.
The potential additional rebuilds are a different topic than the here described one and apply only to openSUSE Factory and not to a release version.
-- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c7 --- Comment #7 from Lars Müller <lmuelle@suse.com> 2012-09-27 15:17:35 CEST --- @Christoph: Please be this nice and provide the feedback requested with comment #1 or comment #3. This is not the room for meta discussions. The intention is to spot an issue and nothing else. If the requested information is not provided in the next seven days from now the report will get closed with the reason resolved no response. -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c Lars Müller <lmuelle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |cobexer@gmail.com -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c9 Christoph Obexer <cobexer@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|cobexer@gmail.com | --- Comment #9 from Christoph Obexer <cobexer@gmail.com> 2012-10-04 20:23:51 UTC --- installed openSUSE 12.2 from DVD, without applying any updates # # try 1 without modifying the /etc/samba/smb.conf # linux-bdx6:~ # l /etc/samba/ total 16 drwxr-xr-x 1 root root 60 Oct 2 22:37 ./ drwxr-xr-x 1 root root 5090 Oct 2 23:02 ../ -rw------- 1 root root 457 Aug 8 12:06 cifstab -rw-r--r-- 1 root root 249 Aug 8 12:06 lmhosts -rw-r--r-- 1 root root 1257 Aug 8 12:06 smb.conf -rw-r--r-- 1 root root 379 Aug 8 12:06 smbusers linux-bdx6:~ # rpm -V samba-client linux-bdx6:~ # echo $? 0 #update samba-client with YaST after the update the output is similar, and there is no /etc/samba/smb.conf.rpmnew (which is logical since the smb.conf was not modified) # # try 2 with modified /etc/samba/smb.conf: # linux-bdx6:~ # rpm -V samba-client linux-bdx6:~ # vim /etc/samba/smb.conf # changed workgroup to TEST linux-bdx6:~ # rpm -V samba-client 5S.T..... c /etc/samba/smb.conf #update samba-client with YaST linux-bdx6:~ # l /etc/samba/ total 20 drwxr-xr-x 1 root root 90 Oct 4 22:09 ./ drwxr-xr-x 1 root root 5126 Oct 4 22:09 ../ -rw------- 1 root root 457 Oct 3 22:07 cifstab -rw-r--r-- 1 root root 249 Oct 3 22:07 lmhosts -rw-r--r-- 1 root root 1252 Oct 4 21:32 smb.conf -rw-r--r-- 1 root root 1257 Oct 3 22:07 smb.conf.rpmnew -rw-r--r-- 1 root root 379 Oct 3 22:07 smbusers linux-bdx6:~ # diff -u /etc/samba/smb.conf /etc/samba/smb.conf.rpmnew --- /etc/samba/smb.conf 2012-10-04 21:32:14.550498379 +0200 +++ /etc/samba/smb.conf.rpmnew 2012-10-03 22:07:52.000000000 +0200 @@ -1,9 +1,9 @@ # smb.conf is the main Samba configuration file. You find a full commented # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the # samba-doc package is installed. -# Date: 2012-08-08 +# Date: 2012-10-03 [global] - workgroup = TEST + workgroup = WORKGROUP passdb backend = tdbsam printing = cups printcap name = cups now when you check the diff of the smb.conf files and merge them, then delete the /etc/samba/smb.conf.rpmnew file (to make it easier for you to notice when you need to manually merge config changes...) every subsequent update you will get a new /etc/samba/smb.conf.rpmnew since the date inside that config file is most likely different every time -- 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c10 Lars Müller <lmuelle@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |INVALID --- Comment #10 from Lars Müller <lmuelle@suse.com> 2012-10-04 22:28:43 CEST --- Thanks for the testing and the results fit to the described expectations. Only if a manual modification happened we later see in the update case an additional smb.conf.rpmnew 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=781601 https://bugzilla.novell.com/show_bug.cgi?id=781601#c11 --- Comment #11 from Lars Müller <lmuelle@suse.com> 2012-10-04 22:31:41 CEST --- I must stress that the modified workgroup setting causes the creation of the smb.conf.rpmnew file and not the date line in question. Please reopen if this happens with openSUSE 12.3 and more recent versions. -- 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