[MacPorts] #62228: haskell-stack 1.0: set stack root to home directory
MacPorts
noreply at macports.org
Sat Feb 6 16:40:33 UTC 2021
#62228: haskell-stack 1.0: set stack root to home directory
---------------------+--------------------
Reporter: Ionic | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by Ionic):
Replying to [comment:1 neverpanic]:
> Sounds reasonable to me.
I still cannot quite explain what is happening there, though. I've been
trying to reproduce this with a minimal test case to report this as a bug
to upstream, but so far haven't finished/managed.
It's almost certainly a combination of using a build user and then running
destroot as root. The weird part is that we are supplying `--allow-
different-user`, which should enable sharing. `${workpath}/.stack` is
created as the `macports` user, so it does (initially) have write
permissions there.
The weirdest part is that it's ignoring `STACK_ROOT=${workpath}.stack`
when running as **root** in the destroot phase (and falling back to
`${HOME}/.stack`, a.k.a. `${workpath}/.home/.stack` instead), which...
just doesn't make sense to me.
You've put me on the right track, though, I think, since most files in
`${workpath}/.stack` seem to be owned by root instead of macports. They
also are newer than the ones in `${workpath}/.home/.stack`, which are
owned by macports only, so maybe I just confused the two directories.
> I'm surprised to find stack use `~/.stack`, though, since we're running
things as `macports` user, so it should be using `~macports/.stack`, where
it cannot write. I'm guessing that happens because destroot runs as root.
I didn't really mean `~loggedinuser/.stack`, but `${HOME}/.stack`, which
is `${workpath}/.home/.stack` for both the `macports` build user and
`root` in the destroot phase, since we set `HOME` explicitly to
`${workpath}/.home` for builds. The PG is not touching anything outside of
its workpath, luckily. It would be totally unacceptable if it did.
--
Ticket URL: <https://trac.macports.org/ticket/62228#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list