Bug 826707 - rpm verify fails for hardlinked sources in kernel-devel
Summary: rpm verify fails for hardlinked sources in kernel-devel
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-30 20:01 UTC by Peter Backes
Modified: 2017-06-09 21:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-09 21:28:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Backes 2012-05-30 20:01:15 UTC
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 15:56:27 UTC
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 18:01:12 UTC
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 18:40:01 UTC
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 15:28:46 UTC
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 15:40:24 UTC
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 15:01:38 UTC
(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 13:18:35 UTC
This should be fixed in the current builds for rawhide and F24, it will trickle down through the usual rebase process.

Comment 8 Peter Backes 2017-06-09 21:28:48 UTC
Seems to work as of f25


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