Bug 1333616

Summary: gcc package should not own directory /usr/libexec/getconf (owned by dependency: glibc).
Product: [Fedora] Fedora Reporter: Carlos O'Donell <codonell>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: davejohansen, jakub, jwakely, law, mpolacek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-6.1.1-2.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-14 23:26:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos O'Donell 2016-05-06 02:01:03 UTC
In a rawhide mock chroot when trying to upgrade glibc I observed:
~~~
file /usr/libexec/getconf from install of glibc-2.23.90-15.fc25.i686 conflicts with file from package gcc-6.1.1-1.fc25.i686
~~~
The reason for this is that glibc had different directory permissions than gcc did for the directory (setgid on it for some weird reason, perhaps a bug in mock or the chroot).

No matter the cause it turns out the Fedora Packaging guidelines say gcc should not own /usr/libexec/getconf.

Per Fedora packaging guidelines:
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#File_and_Directory_Ownership
~~~
Directory ownership is a little more complex than file ownership. Packages must own all directories they put files in, except for:

* any directories owned by the filesystem, man, or other explicitly created -filesystem packages

* any directories owned by other packages in your package's natural dependency chain 
~~~

The second bullet applies. GCC should not own /usr/libexec/getconf because the directory is owned by GCC's natural dependency on glibc which installs the various getconf binaries in that location.

I expect the fix is as easy as this:

diff --git a/gcc.spec b/gcc.spec
index 741558c..5816172 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -2449,7 +2449,6 @@ fi
 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.so
 %endif
 %endif
-%dir %{_prefix}/libexec/getconf
 %{_prefix}/libexec/getconf/default
 %doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* 
 %{!?_licensedir:%global license %%doc}
---

Comment 1 Fedora Update System 2016-05-11 21:01:46 UTC
gcc-6.1.1-2.fc24 gcc-python-plugin-0.15-5.fc24 libtool-2.4.6-11.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b319eb1348

Comment 2 Fedora Update System 2016-05-12 22:28:25 UTC
gcc-6.1.1-2.fc24, gcc-python-plugin-0.15-5.fc24, libtool-2.4.6-11.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b319eb1348

Comment 3 Fedora Update System 2016-05-14 23:26:55 UTC
gcc-6.1.1-2.fc24, gcc-python-plugin-0.15-5.fc24, libtool-2.4.6-11.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.