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

SLAX_EXTDIR should be configurable #34

Open
ilovezfs opened this issue May 5, 2016 · 1 comment
Open

SLAX_EXTDIR should be configurable #34

ilovezfs opened this issue May 5, 2016 · 1 comment

Comments

@ilovezfs
Copy link

ilovezfs commented May 5, 2016

See Homebrew/homebrew-core#865 for the motivation for this issue.

It would help with the Homebrew formula to have a configure option for the target directory into which juise's libslax extensions are installed (i.e., what is referred to as SLAX_EXTDIR in juise's build system).

Perhaps it could be called --with-libslax-extdir or something similar.

We would then be able to set --with-libslax-extdir="#{lib}/slax/extensions" (i.e., /usr/local/Cellar/juise/0.6.1/lib/slax/extensions) rather than hacking around the sandbox violation.

Currently, in order to restrict juise to its configured prefix, I am having to use the following workaround:

    inreplace "configure",
      "SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"",
      "SLAX_EXTDIR=\"#{lib}/slax/extensions\""

The reason this is necessary is that make install causes a sandbox violation when it attempts to install juise's slax extensions into slax-config --extdir (https://github.com/Juniper/juise/blob/master/libjuise/Makefile.am#L105-L119), which is outside of juise's prefix.

Here's how the sandbox violation looks:

==> Sandbox log
May  5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/jcs.prefix
May  5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/jcs.prefix
May  5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext
May  5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext
/Library/Developer/CommandLineTools/usr/bin/make  install-exec-hook
Install link libjuise.0.dylib -> jcs.prefix:http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext ...
rm: jcs.prefix: Operation not permitted
rm: http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext: Operation not permitted
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
@philshafer
Copy link
Contributor

Will do. Thanks…..

On May 5, 2016, at 8:18 AM, ilovezfs [email protected] wrote:

See Homebrew/homebrew-core#865 Homebrew/homebrew-core#865 for the motivation for this issue.

It would help with the Homebrew formula to have a configure option for the target directory into which juise's libslax extensions are installed (i.e., what is referred to as SLAX_EXTDIR in juise's build system).

Perhaps it could be called --with-libslax-extdir or something similar.

We would then be able to set --with-libslax-extdir="#{lib}/slax/extensions" (i.e., /usr/local/Cellar/juise/0.6.1/lib/slax/extensions) rather than hacking around the sandbox violation.

Currently, in order to restrict juise to its configured prefix, I am having to use the following workaround:

inreplace "configure",
  "SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"",
  "SLAX_EXTDIR=\"#{lib}/slax/extensions\""

The reason this is necessary is that make install causes a sandbox violation when it attempts to install juise's slax extensions into slax-config --extdir (https://github.com/Juniper/juise/blob/master/libjuise/Makefile.am#L105-L119 https://github.com/Juniper/juise/blob/master/libjuise/Makefile.am#L105-L119), which is outside of juise's prefix.

Here's how the sandbox violation looks:

==> Sandbox log
May 5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/jcs.prefix
May 5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/jcs.prefix
May 5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext
May 5 05:02:06 sandboxd[137]: rm(39316) deny file-write-unlink /usr/local/Cellar/libslax/0.20.1/lib/slax/extensions/http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext
/Library/Developer/CommandLineTools/usr/bin/make install-exec-hook
Install link libjuise.0.dylib -> jcs.prefix:http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext ...
rm: jcs.prefix: Operation not permitted
rm: http%3A%2F%2Fxml.juniper.net%2Fjunos%2Fcommit-scripts%2F1.0.ext: Operation not permitted
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #34

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