Bug 198940

Summary: dovecot - incosistencies in a spec file
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: dovecotAssignee: Petr Rockai <prockai>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: tss, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-10 18:08:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2006-07-14 20:23:08 UTC
Description of problem:

In dovecot.spec %files section says:

%config(noreplace) %{ssldir}/dovecot-openssl.cnf

But earlier in a spec file we have

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/pki/dovecot/
install -p -m644 $RPM_BUILD_DIR/dovecot-%{upstream}/doc/dovecot-openssl.cnf
$RPM_BUILD_ROOT/%{_sysconfdir}/pki/dovecot/dovecot-openssl.cnf

and later

SSLDIR=%{ssldir} OPENSSLCONFIG=%{_sysconfdir}/pki/dovecot/dovecot-openssl.cnf \
	%{docdir}-%{version}/examples/mkcert.sh &> /dev/null

By a lucky accident all that happens to end up in the same location
as earlier there is

%define ssldir /etc/pki/%{name}

and %{_sysconfdir} currently evals to /etc; but if one will change
that %define above then dovecot-openssl.cnf from %files cannot be found.
%{ssldir} should be used throughout.

Also in %files section lines

%{_libdir}/%{name}/imap/*
%{_libdir}/%{name}/lda/*

generate only a bunch of "warning: File listed twice" because
next there is

%{_libdir}/%{name}/*

which covers all of that and more.  In any case instead of the
last line there really should be

%{_libdir}/%{name}

Otherwise we have "is not owned by any package" if we will try
to check what package owns that directory and removing 'dovecot'
package will result in leftovers.

Version-Release number of selected component (if applicable):
dovecot-1.0-0.beta8.2.1