Bug 280493

Summary: logfiles not owned by any package
Product: [openSUSE] openSUSE 10.3 Reporter: Lars Vogdt <lars.vogdt>
Component: OtherAssignee: Lars Vogdt <lars.vogdt>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Minor    
Priority: P5 - None CC: dmueller, mls, ro
Version: Alpha 4plus   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 10.3   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 280462, 280463, 280464, 280465, 280466, 280467, 280469, 280470, 280474, 280475, 280502, 280503, 280506, 280507    
Bug Blocks:    

Description Lars Vogdt 2007-06-04 12:37:25 UTC
We've currently many packages which produce logfiles but didn't own them.
Some results:
- security scanners inform users about file not owned by a package
- some Logfiles differ from the name of the package, so the user has no chance to "guess" which package produces the logfile
- possible of unknown file conflicts when a logfile is used by different packages
- ...

If no one insists, we should use the %ghost directive for this. To avoid deletion of the logfile if the RPM is deinstalled, it must be enhanced with the %config(noreplace,missingok) option. 

Example for the specfile:
%install
[...]
%{__install} -d -m755 %buildroot%_var/log
touch %buildroot%_var/log/<logfilename>
[...]
%files
%ghost %config(noreplace,missingok) %_var/log/<logfilename>
Comment 1 Klaus Singvogel 2007-06-04 16:12:41 UTC
"rpm -qc <<package>>" will report files as config files then.

As a result, backup scripts (and scripts collecting config files for distribution upgrade) will then save the large logfiles too.

Can we enhance rpm and introduce new filetype "%logfile(...)" please?
Comment 2 Lars Vogdt 2007-06-04 16:22:59 UTC
(In reply to comment #1)
> "rpm -qc <<package>>" will report files as config files then.
> 
> As a result, backup scripts (and scripts collecting config files for
> distribution upgrade) will then save the large logfiles too.
> 
> Can we enhance rpm and introduce new filetype "%logfile(...)" please?

Adding Michael as RPM Maintainer. Michael, what do you think about this enhancement?

 

Comment 3 Michael Schröder 2007-06-05 13:34:45 UTC
Do *not* mark logfiles as config files! It's perfectly fine when the logfile is deleted when the package gets removed.
Comment 4 Klaus Singvogel 2007-06-05 14:35:22 UTC
Package cups contains logfile /var/log/cups/page_log. This file contains the accounting information.

I disagree that it is a good idea to remove this file in case of an package upgrade (installation/de-installation).

What should be done here?
Comment 5 Dr. Werner Fink 2007-07-05 10:39:13 UTC
The bug is invalid: log files do not belong to a package but to the
system on which the package is installed.
Comment 6 Lars Vogdt 2007-08-12 12:19:01 UTC
(In reply to comment #5 from Werner Fink)
> The bug is invalid: log files do not belong to a package but to the
> system on which the package is installed.

I think, this is a philosophic question. For me the logfile belongs to the package as applications from this package create the logfile.

But as discussed in the dist meeting, I close this as invalid for 10.3 and hopefully come back with a %logfile tag (or a much better solution) for the next distribution.