Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919376 - dev-php/ca-bundle-1.3.1: Supplied autoload.php does not respect EPREFIX
Summary: dev-php/ca-bundle-1.3.1: Supplied autoload.php does not respect EPREFIX
Status: CONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-06 19:04 UTC by Moritz Brunner
Modified: 2023-12-25 11:22 UTC (History)
2 users (show)

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


Attachments
Patch to include $EPREFIX in autoload.php paths (dev-php-ca-bundle-Respect-EPREFIX-in-autoload.php.patch,1.32 KB, patch)
2023-12-06 19:06 UTC, Moritz Brunner
Details | Diff
v2 of patch, using prefix.eclass/prefixify_ro (dev-php-ca-bundle-Respect-EPREFIX-in-autoload.php-v2.patch,1.47 KB, patch)
2023-12-07 17:59 UTC, Moritz Brunner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Brunner 2023-12-06 19:04:33 UTC
The bundled autoload.php file from the ebuild's files subdirectory hardcodes library dependency paths to /usr/share/php/..., which will not be valid in a Prefix installation. 

One example:
> require_once '/usr/share/php/Fedora/Autoloader/autoload.php';

The file should be modified to include EPREFIX in all paths before being included in the final installation image.
Comment 1 Moritz Brunner 2023-12-06 19:06:34 UTC
Created attachment 877958 [details, diff]
Patch to include $EPREFIX in autoload.php paths
Comment 2 Fabian Groffen gentoo-dev 2023-12-07 08:18:18 UTC
I think you should be able to require prefix, and then use prefixify_ro "${FILESDIR}"/autoload.php, it will place an adapted copy in ${T}.
Comment 3 Moritz Brunner 2023-12-07 17:59:39 UTC
Created attachment 878162 [details, diff]
v2 of patch, using prefix.eclass/prefixify_ro

Thank you for your improvement suggestion, this is indeed less verbose and more elegant. I've adapted the patch to use prefixify_ro instead of sed.
Comment 4 Fabian Groffen gentoo-dev 2023-12-25 11:22:08 UTC
@PHP, @Guillame: does this look acceptable?  OK to apply?