Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 815220 - [TRACKER] Packages relying on preservation of extended metadata (xattrs, ACLs, fcaps) when merging
Summary: [TRACKER] Packages relying on preservation of extended metadata (xattrs, ACLs...
Status: CONFIRMED
Alias: None
Product: Quality Assurance
Classification: Unclassified
Component: Trackers (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 08:05 UTC by Michał Górny
Modified: 2022-04-14 03:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-09-28 08:05:30 UTC
This is the tracker for packages that install files with extended metadata (xattrs, ACLs, fcaps...) into ${D}.  Long story short, the attempts to preserve this metadata while merging package are Portage-specific and unreliable, and all packages need to reapply the necessary metadata in pkg_postinst() (plus implement fallbacks, as applicable).


More details:

1. PMS doesn't guarantee xattrs, ACLs, fcaps... being preserved via install helpers or merge phase.  This is all Portage-specific and it's going to fall apart with other PMs.

2. For this to work, at least $D and $ROOT need to support the specific kind of extended metadata.  Otherwise, it all falls apart.  Add non-portable binary packages on top of that.

3. Even then, not all extended metadata can or should be copied.  Portage already has some exclude logic which only makes things more complicated.

4. Preserving metadata in install helpers is contrary to common sense.  After all, these helpers reset mode and ownership... yet now they preserve other attributes.  This is unexpected and confusing, and in the end causes problems like local ${FILESDIR} xattrs leaking into binpackages.