Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1432372 - packaged /usr/lib/.build-id break when %defattr used in spec
Summary: packaged /usr/lib/.build-id break when %defattr used in spec
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1431296
TreeView+ depends on / blocked
 
Reported: 2017-03-15 09:22 UTC by Remi Collet
Modified: 2017-03-17 09:15 UTC (History)
14 users (show)

Fixed In Version: rpm-4.13.0.1-8.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-16 15:51:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Remi Collet 2017-03-15 09:22:44 UTC
See https://kojipkgs.fedoraproject.org/work/tasks/1239/18391239/root.log

DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package libselinux-2.6-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package info-6.3-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package gmp-1:6.1.2-4.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package pam-1.3.0-2.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package binutils-2.28-4.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package nss-pem-1.0.3-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package gc-7.6.0-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package system-python-libs-3.6.0-21.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package system-python-3.6.0-21.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-json-7.1.3-1.fc27.x86_64 conflicts with file from package python3-3.6.0-21.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id conflicts between attempted installs of php-common-7.1.3-1.fc27.x86_64 and php-json-7.1.3-1.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package libselinux-2.6-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package info-6.3-3.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package gmp-1:6.1.2-4.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package pam-1.3.0-2.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id/28 from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package pam-1.3.0-2.fc27.x86_64
DEBUG util.py:435:    file /usr/lib/.build-id/40 from install of php-process-7.1.3-1.fc27.x86_64 conflicts with file from package pam-1.3.0-2.fc27.x86_64


Seems to be related to recent changes in RPM http://pkgs.fedoraproject.org/cgit/rpms/rpm.git/commit/?id=1a7230a63a110c091b4a0475c1ed2e8d92e906d8

More a mass rebuild of all packages built with broken version will be required.

Comment 1 Mark Wielaard 2017-03-15 09:38:22 UTC
So the problem is that the directories in which the build-id files are placed conflict? That is indeed not the intention. Obviously this wasn't a problem when they were installed in the old location (under /usr/lib/debug/.build-id) so there is some difference in how the directories are added that causes this. I'll investigate.

Comment 2 Remi Collet 2017-03-15 10:02:04 UTC
Diffing the package to try to understand how directories differ

$ rpmdiff php-json-7.1.3-1.fc27.x86_64.rpm libselinux-2.6-3.fc27.x86_64.rpm | grep 'build-id$'
.M....V..FT /usr/lib/.build-id

I don't know what is "vflag" is but "mode" and "digest" could be an issue.

Comment 3 Remi Collet 2017-03-15 10:03:37 UTC
$ ll -d php-json-7.1.3-1.fc27.x86_64/usr/lib/.build-id libselinux-2.6-3.fc27.x86_64/usr/lib/.build-id
drwxr-xr-x. 4 remi remi 80 15 mars  11:02 libselinux-2.6-3.fc27.x86_64/usr/lib/.build-id
drw-r--r--. 2 remi remi 40 15 mars  08:13 php-json-7.1.3-1.fc27.x86_64/usr/lib/.build-id

Comment 4 Mark Wielaard 2017-03-15 11:04:04 UTC
We determined that this is caused by not resetting the defattr flags before adding the build-id dirs. So the bug triggers if the package file list has as last %defattr a non-default value. Working on a fix.

Comment 5 Zbigniew Jędrzejewski-Szmek 2017-03-15 15:20:19 UTC
Shouldn't /usr/lib/.build-id be part of filesystem? Even /usr/lib/.build-id/* probably should. Only /usr/lib/.build-id/*/* would be part of packages. This way we save two rpm "items" per package.

Comment 6 Mark Wielaard 2017-03-15 19:32:20 UTC
Fix submitted upstream:
http://lists.rpm.org/pipermail/rpm-maint/2017-March/005252.html

And added to rpm-4.13.0.1-8.fc27.

This should fix the issue when php has been rebuild against this new version.

Comment 7 Mark Wielaard 2017-03-15 19:34:31 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #5)
> Shouldn't /usr/lib/.build-id be part of filesystem? Even
> /usr/lib/.build-id/* probably should. Only /usr/lib/.build-id/*/* would be
> part of packages. This way we save two rpm "items" per package.

I think this is a good suggestion, but not one I will try to fix with this bug.

Comment 8 Remi Collet 2017-03-16 06:31:59 UTC
Sorry, I have rebuild PHP with unneeded %attr removed (in module sub-packages), thanks to your explanation, and everything is now  ok.

BTW great thanks for the explanation, the work, and the fix on this issue.

Comment 9 Mark Wielaard 2017-03-16 07:03:35 UTC
(In reply to Remi Collet from comment #8)
> Sorry, I have rebuild PHP with unneeded %attr removed (in module
> sub-packages), thanks to your explanation, and everything is now  ok.

Thanks. That is fine of course. It shows we got the root cause correct.
The upstream fix does contain a testcase based on the extra %attr setting that shows the same thing.

Comment 10 Mark Wielaard 2017-03-17 09:15:42 UTC
*** Bug 1431896 has been marked as a duplicate of this bug. ***


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