Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard wired cache path in GPM.php causes issues with non-standard grav installation #3410

Closed
makuhama opened this issue Jul 21, 2021 · 4 comments
Assignees

Comments

@makuhama
Copy link

Follow-up to #3297

I'm the maintainer of Arch Linux' Grav package. I tried to package the recently published v1.7.18 but ran into issues when doing tests with gpm install. gpm was not able to create /usr/share/webapps/grav/cache/gpm - which is understandable from my point of view as the Grav installation via my package makes everything in and below /usr/share/webapps/grav owned by root and not writeable by the dedicated grav user grav.

IMHO the culprit is line 63 in GPM.php. The Folder::create statement there assumes the cache folder is located within GRAV_ROOT - this is not necessarily true, especially not with the installation created by my package. The statement should be

Folder::create(GRAV_CACHE_PATH . '/gpm');

I'm terribly sorry I cannot provide a PR for this. I currently have no access to my packaging and testing environment.

@mahagr mahagr self-assigned this Jul 23, 2021
@mahagr mahagr added the bug label Jul 23, 2021
@mahagr mahagr closed this as completed Jul 23, 2021
@mahagr mahagr added the fixed label Jul 23, 2021
@mahagr
Copy link
Member

mahagr commented Jul 23, 2021

@makuhama Should be fixed in above patch. :)

@mahagr
Copy link
Member

mahagr commented Jul 23, 2021

Can you apply patch to it in the package to test if it works (and get the updated package out)?

@makuhama
Copy link
Author

@mahagr I've already extended the packaging instructions (see grav.patch) to apply the suggested patch. My tests showed that the issue was solved this way. The package is out since Wednesday evening. Thanks for fixing this (so I can follow upstream more closely again with v1.7.19).

@mahagr
Copy link
Member

mahagr commented Jul 23, 2021

Just make sure you're not using GRAV_CACHE_PATH as you suggested, it'll not really work. :) Well.. it does.. in your case, but breaks the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants