Bug 998984 - tuna: W: non-conffile-in-etc /etc/tuna.conf
Summary: tuna: W: non-conffile-in-etc /etc/tuna.conf
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: tuna
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: John Kacur
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 13:21 UTC by John Kacur
Modified: 2014-07-31 15:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-31 15:02:55 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description John Kacur 2013-08-20 13:21:01 UTC
Description of problem: rpmlint noarch/tuna-0.11-2.el7.noarch.rpm
produces the following warnings
tuna.noarch: W: non-conffile-in-etc /etc/tuna.conf
tuna.noarch: W: non-conffile-in-etc /etc/tuna/example.conf

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. in dist-git do rhpkg local
2. rpmlint noarch/tuna-0.11-2.el7.noarch.rpm

This warning is a false positive, since the files are actually conf files.
This warning can be suppressed my marking the conf files in the spec as
%config(noreplace) or %config appropriately.

Comment 1 John Kacur 2013-08-20 13:23:01 UTC
The following patch will fix the problem

From 10d88f69108f08c4ab324a51f6e445c8a7856439 Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur>
Date: Mon, 19 Aug 2013 22:28:01 +0200
Subject: [PATCH] spec: Mark configuration files with %config

Explicitly declaring configuration files as such, prevents rpmlint
from falsely complaining that non-configuration files are being installed
in /etc

Signed-off-by: John Kacur <jkacur>
---
 rpm/SPECS/tuna.spec | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rpm/SPECS/tuna.spec b/rpm/SPECS/tuna.spec
index e0b8b8b..a971523 100644
--- a/rpm/SPECS/tuna.spec
+++ b/rpm/SPECS/tuna.spec
@@ -84,8 +84,8 @@ rm -rf %{buildroot}
 %{_datadir}/tuna/
 %{python_sitelib}/tuna/
 %{_mandir}/man8/tuna.8*
-%{_sysconfdir}/tuna.conf
-%{_sysconfdir}/tuna/*
+%config(noreplace) %{_sysconfdir}/tuna.conf
+%config %{_sysconfdir}/tuna/example.conf

 %files -n oscilloscope
 %defattr(-,root,root,-)
-- 
1.8.1.4

Comment 3 John Kacur 2014-03-11 11:50:31 UTC
rpmlint noarch/tuna-0.11.1-5.el7.noarch.rpm | grep non-conffile

This has been fixed since 0.11-3
Current version is 0.11.1-5

Comment 5 Jiri Kastner 2014-07-31 14:57:43 UTC
[indy@dhcp-27-216 ~]$ rpmlint rpmbuild/SRPMS/tuna-0.11.1-6.el7.src.rpm
tuna.src: W: invalid-url URL: http://userweb.kernel.org/~acme/tuna/ <urlopen error [Errno -2] Name or service not known>
tuna.src:130: W: macro-in-%changelog %config
tuna.src: E: specfile-error warning: bogus date in %changelog: Tue Mar 10 2014 John Kacur <jkacur> - 0.11.1-6
1 packages and 0 specfiles checked; 1 errors, 2 warnings.


Note You need to log in before you can comment on or make changes to this bug.