Can't install this repo as a non-privileged user
The problem
Build.pm wants to write to a root-owned directory:
https://github.com/perl6/doc/blob/41c473934f9cdd8d1f70fceef0bfa0e66da6b6a7/Build.pm6#L11-L12
Suggestions
Edited from https://colabti.org/irclogger/irclogger_log/perl6?date=2019-07-11#l347
ugexe: [Build.pm] assumes it can write to any repository that contains perl6 modules
ugexe: lucs: you will want to file an issue with p6doc that they cannot assume they can create a /doc directory inside any perl6 repository in their Build.pm
lucs: Could I mention where this directory should have been created, or will they figure that out?
ugexe: its a little more complicated than just change the directory
ugexe: i.e. if you just install to $*HOME then the docs generated by root are not available
ugexe: however it probably should not be installing docs under a perl6 repo directory
ugexe: that would be ok if docs were installed along with the module, but not after-the-fact
I'm unsure why p6doc (the tool itself) would require the creation of a doc folder as it should only search and read available docs, not write or create any of them.
Was this assumption for Build.pm6 really made with p6doc in mind? The included comment inside Build.pm6 certainly suggests this.
p6doc won't need this in the coming future.
Difficult to say
El vie., 12 jul. 2019 a las 12:49, Joel ([email protected]) escribió:
I'm unsure why p6doc (the tool itself) would require the creation of a doc folder as it should only search and read available docs, not write or create any of them. Was this assumption for Build.pm6 really made with p6doc in mind?
p6doc won't need this in the coming future.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/perl6/doc/issues/2896?email_source=notifications&email_token=AAAAD5CHL2V25Z5BYCJRF33P7BOT3A5CNFSM4IBKK7EKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZZNM6A#issuecomment-510842488, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD5BWLTTDWJR7NCGZ2NTP7BOT3ANCNFSM4IBKK7EA .
-- JJ
Historic note: when p6doc was originally written, the pod files were stored in lib/ - at some point they were moved to doc/ so we could separate out the modules we needed to build/run the site from the pod documentation. The Build.pm file was implemented to install the doc/ files into the lib/ directory to keep the install working. At some point, it apparently stopped working.
See chat today in #raku on Freenode as someone else has tripped over this recently.
Note: the instructions in the README about --force mean that folks who are installing against this bug get an install with no docs, which is very likely not what was intended.
It will probably affect any zef install $module runs as as $user, where $module uses p6doc as a dependency ( see an example )
Question from nine:
02:56 < nine> [Coke]: why does this Build.pm6 copy any files at all? Any static files the module ships are resources
and must be listed in META6.json's resources section. The installer will then import them into the
repository.
So the fix is probably to list all the pod files we want to install as resources, and then update the p6doc program to pull from that folder when looking for pod.
@noisegul @JJ we do want p6doc to install doc files - the original working install allowed us to install our docs as resources so a user could do something like 'p6doc Str' and get our doc. We should be able to make both that and p6doc of
The new p6doc is using a cache, which it shares with documentable. This one is tested and, well, not deployed yet. I can bump up its priority to make it work as soon as possible.
See #3206
Rejecting, as we don't install as ANY user at this point.