/usr/lib/debug ownership

Panu Matilainen pmatilai at laiskiainen.org
Sat Feb 16 15:50:25 UTC 2013


On 02/16/2013 04:01 PM, Alec Leamas wrote:
> On 02/16/2013 12:47 PM, Panu Matilainen wrote:
>> On 02/16/2013 01:33 PM, Alec Leamas wrote:
>>> On 02/16/2013 11:41 AM, Panu Matilainen wrote:
>>>> On 02/16/2013 11:44 AM, Alec Leamas wrote:
>>>>> On 02/15/2013 11:58 PM, Till Maas wrote:
>>>>>> On Fri, Feb 15, 2013 at 10:50:28AM -0700, Kevin Fenzi wrote:
>>>>>>
>>>>>>> - make a script to identify all the packages that are broken and
>>>>>>>    shipping debug stuff.
>>>>>> AT least for the directory a simple yum call should suffice:
>>>>>> yum --disablerepo '*' --enablerepo fedora\*  whatprovides
>>>>>> /usr/lib/debug
>>>>>>
>>>>>> But it shows that a lot (all?) debuginfo packages own the directory
>>>>>> which probably needs to be fixed in rpm itself.
>>>>>>
>>>>>> Regards
>>>>>> Till
>>>>> I have filed a bug against filesystem: BZ 911831.
>>>>>
>>>>> I get 46 owners of /usr/lib/debug, that can't be all debug packages...
>>>>>
>>>>> Shall we file a bug against rpm, saying that claiming the complete
>>>>> path
>>>>> doesn't really work? I see the problems here, if rpm shouldn't
>>>>> claim the
>>>>> complete path /usr/lib/debug/lib/whatever, the part to claim is
>>>>> more or
>>>>> less arbitrary.
>>>>
>>>>
>>>> Multiple owned directories might not be "packaging purist clean" :)
>>>> but since -debuginfo packages are auto-generated and thus kinda
>>>> guaranteed to be non-conflicting, it's just the less ugly option when
>>>> the alternative is leaving empty directories behind. Which is what
>>>> would happen if -debuginfo packages didn't own *all* the directories
>>>> they put files into.
>>>>
>>>>     - Panu -
>>>>
>>>>
>>> Well, I try to be practical (believe it or not). This explanation looks
>>> perfectly sound to me (although  it still seems inconsistent that
>>> filesystem owns /usr/src/debug but not /usr/lib/debug).
>>
>> Ah, didn't know filesystem owns some of the toplevel debug
>> directories. Not particularly harmful but consistency rarely hurts.
>>
>>>
>>> I ran into this while automating some tests about directory ownership in
>>> fedora-review. If we all agree that Panu's position is OK, I would be
>>> more than happy to just exclude /usr/l{lib,src}/debug from the ownership
>>> checks. With that we should be able to close this discussion.
>>>
>>> However,  at least Kevin had other ideas. So did I, but I'm flexible and
>>> have changed my mind  :)
>>
>> I think Kevin was talking about "normal", ie non-debuginfo packages
>> like the example case of nacl-devel owning /usr/lib/debug, which
>> indeed is a (trivial) packaging bug. Except perhaps for the filesystem
>> package which is fairly special case anyway.
>>
>> OTOH because -debuginfo packages always own all the relevant
>> directories there's no need for filesystem to own them, which would
>> allow for a nice and clean rule: any non-debuginfo package owning the
>> *debug directories can be considered an unnecessary multiple directory
>> ownership (and a bug of sorts).
>>
>>     - Panu -
>>
> Well, isn't the rule is actually simpler than that: any  package owning
> a directory owned by another package is  broken. It's just that we
> should not apply this rule to debuginfo packages, which are
> auto-generated and thus are OK by definition.

That's not what I see in 
http://fedoraproject.org/wiki/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
---

It's the packages with unowned directories that are broken, not the ones 
with multiply owned directories when there's no clean natural owner for 
them.

Since debuginfo packages are automatically generated, there's no way to 
manually select the least worst alternative between the directory 
ownership options case-by-case. The only way to guarantee no unowned 
directories in automatically generated packages is to own them all, 
which is only really feasible because they are automatically generated :)

	- Panu -



More information about the devel mailing list