Bug 791078

Summary: rpmlint: hardlink-across-config-files not reliable
Product: [openSUSE] openSUSE Tumbleweed Reporter: Jan Engelhardt <jengelh>
Component: BasesystemAssignee: Dirk Mueller <dmueller>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None    
Version: 13.1 Beta 1   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jan Engelhardt 2012-11-23 18:33:14 UTC
This is for server:irc/atheme openSUSE_12.2.

Installing the atheme package leads to /etc/atheme/atheme.conf not being owned root:atheme, even though rpm correctly determines it needs to use GID 409.

19:32 ares07:../atheme/binaries # getent group 409
atheme:!:409:
19:30 ares07:../atheme/binaries # l /etc/atheme
ls: cannot access /etc/atheme: No such file or directory
19:30 ares07:../atheme/binaries # rpm -Uhvv atheme-7.0.5-22.1.x86_64.rpm 2>&1 | grep /etc/atheme/atheme.conf
D: fini      100600  1 (   0,   0)     46978 /etc/atheme/atheme.conf.operserv-example;50afc0d0 
#D: fini      100600  1 (   0,   0)     67006 /etc/atheme/atheme.conf.userserv-example;50afc0d0 
D: fini      100640  2 (   0, 409)         0 /etc/atheme/atheme.conf;50afc0d0 
D: fini      100600  2 (   0,   0)     66921 /etc/atheme/atheme.conf.example;50afc0d0 
19:30 ares07:../atheme/binaries # l /etc/atheme/atheme.conf
-rw------- 2 root root 66921 Nov 21 01:39 /etc/atheme/atheme.conf
Comment 1 Jan Engelhardt 2012-11-23 18:47:49 UTC
This seems to have to do with the fact that it is hardlinked (against atheme.conf.example).

It looks like the hardlink-across-config-files rpmlint check does not properly fire an error in this case.

Contents of file section:

 %install
 [...]
 %fdupes %buildroot

 %files
 %config(noreplace) %attr(0640,root,atheme) %_sysconfdir/atheme/atheme.conf
 %_sysconfdir/atheme/*.example

Using

 %config(noreplace) %attr(0640,root,atheme) %_sysconfdir/atheme/atheme.conf*

instead, I get a hardlink-across-config-files error as expected.
Comment 2 Jan Engelhardt 2012-11-23 19:05:20 UTC
# Testcase specfile to show the problem (building this file should fail in OBS)
Name: a
Version: 0
Release: 0
Summary: a
License: a
BuildRequires: fdupes

%description

%install
b="%buildroot";
mkdir -p "$b/%_sysconfdir";
echo hi >"$b/%_sysconfdir/a.conf";
echo hi >"$b/%_sysconfdir/b.conf";
%fdupes %buildroot

%files
%defattr(-,root,root)
%attr(0640,root,daemon) %_sysconfdir/a.conf
%_sysconfdir/b.conf
Comment 3 Tomáš Chvátal 2018-04-13 17:18:11 UTC
This is automated batch bugzilla cleanup.

The openSUSE Tumbleweed changed its development model at the end of
year 2014. [1]
Which means that most of the older bugs are reported against completely
different product than the current release of openSUSE Tumbleweed.

There is very high probability that this bug is no-longer relevant at all.
As a result we are closing this bug.

If you can reproduce this bug against a current Tumbleweed installation of
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug.

Thank you for reporting this bug and we are sorry it was not resolved
under the old product.

[1] https://en.opensuse.org/Portal:Tumbleweed