Bug 826707 - rpm verify fails for hardlinked sources in kernel-devel
rpm verify fails for hardlinked sources in kernel-devel
Status: NEW
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 16:01 EDT by Peter Backes
Modified: 2016-03-04 08:18 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Peter Backes 2012-05-30 16:01:15 EDT
Description of problem:
kernel-devel now hardlinks duplicate files. However, hardlink merely checks the content of the files for equality, not inode info. Different kernel-devel packages have different mtimes. This causes rpm verify to fail.

Version-Release number of selected component (if applicable):
kernel-devel-3.3.7-1.fc17.i686
hardlink-1.0-13.fc17.i686

How reproducible:


Steps to Reproduce:
1. install more than one kernel-devel
2. rpm -V kernel-devel
  
Actual results:
.......T.    /usr/src/kernels/3.3.7-1.fc17.i686/Kconfig
.......T.    /usr/src/kernels/3.3.7-1.fc17.i686/arch/Kconfig
.......T.    /usr/src/kernels/3.3.7-1.fc17.i686/arch/alpha/Kconfig
.......T.    /usr/src/kernels/3.3.7-1.fc17.i686/arch/alpha/Kconfig.debug
.......T.    /usr/src/kernels/3.3.7-1.fc17.i686/arch/alpha/Makefile
etc...

Expected results:
verify succeeds

Additional info:
perhaps use %verify(not mtime) for hardlinkable files, or make rpm hardlink aware.
Comment 1 Josh Boyer 2012-07-05 11:56:27 EDT
If we get around to fixing this, it'll be in rawhide.  This isn't a high priority issue by any means.
Comment 2 Panu Matilainen 2012-08-21 14:01:12 EDT
The %verify(not mtime) approach seems quite reasonable to be, anything more complicated is not really worth the effort just for a bunch of timestamps. Depending on how the -devel package is constructed, it might be easier to use %defverify(not mtime) to declare defaults for the whole thing (assuming %defverify() actually works... I dont recall ever seeing that used in real-world, but if it doesn't you get to hand the bug over to rpm :)
Comment 3 Andre Robatino 2012-08-21 14:40:01 EDT
The main concern for me is when all the mtime output makes it impossible (without using grep) to see more serious issues, like missing files - for example see https://www.virtualbox.org/ticket/10847 where the System.map file in kernel-devel is missing. I only noticed it because it prevents kernel-devel drpms from working, so the full package must be downloaded.
Comment 4 DaveG 2012-10-23 11:28:46 EDT
If someone wants to test it... Single line added to spec file on the git master branch dated 2012-10-23:

$ fedpkg clone --anonymous kernel
$ fedpkg switch-branch master
$ fedpkg pull
# edit
$ fedpkg diff
diff --git a/kernel.spec b/kernel.spec
index 520615e..fbc3d3f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -2273,6 +2273,7 @@ fi
 %ghost /boot/initramfs-%{KVERREL}%{?2:.%{2}}.img\
 %{expand:%%files %{?2:%{2}-}devel}\
 %defattr(-,root,root)\
+%defverify(not mtime)\
 /usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
 %{expand:%%files %{?2:%{2}-}modules-extra}\
 %defattr(-,root,root)\
Comment 5 Fedora End Of Life 2013-04-03 11:40:24 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 6 srakitnican 2016-03-03 10:01:38 EST
(In reply to DaveG from comment #4)
> If someone wants to test it... Single line added to spec file on the git
> master branch dated 2012-10-23:
> 
> $ fedpkg clone --anonymous kernel
> $ fedpkg switch-branch master
> $ fedpkg pull
> # edit
> $ fedpkg diff
> diff --git a/kernel.spec b/kernel.spec
> index 520615e..fbc3d3f 100644
> --- a/kernel.spec
> +++ b/kernel.spec
> @@ -2273,6 +2273,7 @@ fi
>  %ghost /boot/initramfs-%{KVERREL}%{?2:.%{2}}.img\
>  %{expand:%%files %{?2:%{2}-}devel}\
>  %defattr(-,root,root)\
> +%defverify(not mtime)\
>  /usr/src/kernels/%{KVERREL}%{?2:.%{2}}\
>  %{expand:%%files %{?2:%{2}-}modules-extra}\
>  %defattr(-,root,root)\

Patch works!

$ rpm -qV kernel-devel-4.3.5-300.defverify_not_mtime.fc23.x86_64

Returns nothing

$ rpm -qvV kernel-devel-4.3.5-300.defverify_not_mtime.fc23.x86_64 | head -50 | fpaste 
http://paste.fedoraproject.org/332988/45701718/ 

I would like to see this fixed as well.
Comment 7 Justin M. Forbes 2016-03-04 08:18:35 EST
This should be fixed in the current builds for rawhide and F24, it will trickle down through the usual rebase process.

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