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

zef can't find install target of install itself there #431

Open
JJ opened this issue Dec 19, 2021 · 4 comments
Open

zef can't find install target of install itself there #431

JJ opened this issue Dec 19, 2021 · 4 comments

Comments

@JJ
Copy link
Contributor

JJ commented Dec 19, 2021

On the heels of #430, what I'm trying to do is simply to have a Rakudo installation that uses /github/home as a home, as opposed to /home/raku (or any other user, for that matter). Alas, that does not seem to be possible

Context

Essentially, follow instructions to install zef in a standard way:

RUN git clone --depth 1 https://github.com/ugexe/zef.git \
    && cd zef && ls -alt . && raku -I. bin/zef install . \
    && ls -alt ${WORKDIR} && ls -alt ${HOME} \
    && zef install Linenoise \
    && cd .. && rm -rf zef``

Expected Behavior

Install as usual

Actual Behavior

First a warning:

Use of uninitialized value element of type Any in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.

Then, seconds later, an error:

===> CompUnit::Repository install target is not writeable/installable: /github/home/zef/auto
  in sub guess-path at /github/home/zef/lib/Zef/Config.rakumod (Zef::Config) line 21
Need a valid installation target to continue

Steps to Reproduce

FROM ghcr.io/jj/raku-gha

ENV PKGS="git" PKGS_TMP="make gcc linux-headers musl-dev" WORKDIR="/github/home" HOME=$WORKDIR
LABEL version="1.0.1" maintainer="JJMerelo@GMail.com" rakuversion=$VER

USER root
RUN apk update && apk upgrade && apk add --no-cache $PKGS $PKGS_TMP
USER raku

# Environment
ENV PATH="${WORKDIR}/.raku/bin:${WORKDIR}/.raku/share/perl6/site/bin:${PATH}" \
    ENV="${WORKDIR}/.profile"

# Basic setup, programs and init
WORKDIR $WORKDIR
RUN git clone --depth 1 https://github.com/ugexe/zef.git \
    && cd zef && ls -alt . && raku -I. bin/zef install . \
    && ls -alt ${WORKDIR} && ls -alt ${HOME} \
    && zef install Linenoise \
    && cd .. && rm -rf zef

USER root
RUN apk del $PGKS_TMP
USER raku

ENTRYPOINT ["raku"]

Your Environment

  • raku -v

2021.10

@JJ
Copy link
Contributor Author

JJ commented Dec 19, 2021

Using

raku -I. bin/zef install --install-to=${HOME}/.raku .

as a workarond fixes it. However, I don't understand why that's not the default.

@ugexe
Copy link
Owner

ugexe commented Dec 19, 2021

Well the obvious question, and which the error message eludes to, is are your permissions set up properly?

as a workarond fixes it. However, I don't understand why that's not the default

You are changing $HOME, so you are quite literally changing the default.

@JJ
Copy link
Contributor Author

JJ commented Dec 19, 2021

Well the obvious question, and which the error message eludes to, is are your permissions set up properly?

They are, as far as I can tell. The directory /github/home/zef/auto does have permission to write.

as a workarond fixes it. However, I don't understand why that's not the default

You are changing $HOME, so you are quite literally changing the default.

Then the question is, is it using $HOME or some other default? And it fails if $HOME and the default are not the same?

@ugexe
Copy link
Owner

ugexe commented Dec 19, 2021

They are, as far as I can tell. The directory /github/home/zef/auto does have permission to write.

As far as I can tell the permissions are not setup properly for /github/raku/.raku. Yes the error references 'auto', but that isn't actually relevant (it just means 'auto' couldn't find a writable repository, which implies /github/raku/.raku did not have the correct permissions by it not being chosen).

Then the question is, is it using $HOME or some other default? And it fails if $HOME and the default are not the same?

I'm not sure I understand. The home repo points to %*ENV<HOME>/.raku, simple as that -- don't assume it does anything more.

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

No branches or pull requests

2 participants