kjell
kjell copied to clipboard
Make CFG_DIR configurable
Right now, unless patched, kjell causes a sandbox violation on Homebrew since it tries to write outside of its prefix during make install-extensions
. Current workaround is
inreplace "Makefile", "CFG_DIR=~${USER}/.kjell", "CFG_DIR=#{pkgshare}"
It would help to be able to specify CFG_DIR, just as PREFIX can be specified, to prevent the sandbox violation.
Here's how the sandbox violation looks:
==> make install-extensions
mkdir: /Users/joe/.kjell: Operation not permitted
make: *** [install-extensions] Error 1
==> Sandbox log
May 5 07:08:35 sandboxd[137]: mkdir(7975) deny file-write-create /Users/joe/.kjell
You can specify CFG_DIR
: any variable that has a normal assignment in a Makefile can be overridden with a command line directive, like make install-extensions CFG_DIR=/some/other/path
.
$ make -n CFG_DIR=/tmp/kjell/config install-extensions
mkdir -p /tmp/kjell/config
cp -R ext/extensions /tmp/kjell/config
I think the problem is more that install-extensions
does user-level configuration, so it isn't appropriate to use in a system/shared installation of kjell
. If you override CFG_DIR
, it doesn't get picked up at run time, so those extensions aren't visible to users.
Maybe it would be possible to set things up so that there's a shared directory for extensions in addition to the per-user one, so extensions can be installed for all users at install time? Or provide a simple command for setting up extensions for a user that doesn't require the Makefile, so it can be done from a pre-installed kjell
?
Hi!
Sorry for the late reply. I will look at this the coming weekend.
@karlll Great, thank you.