On Tue, Mar 28, 2017 at 8:00 AM, <fossil-users-requ...@lists.fossil-scm.org>
wrote:
>
> Date: Tue, 28 Mar 2017 09:16:35 +0200
> From: Florian Balmer <florian.bal...@gmail.com>
> To: fossil-users@lists.fossil-scm.org
> Subject: [fossil-users] "CGI" command and argc
>
...

> To get Fossil 2.1 running on my FreeBSD 9.1 shared host, I downloaded
> Fossil 2.1 and the OpenSSL libraries for FreeBSD 11 from [0], and
> grabbed a copy of libc.so.7 from a FreeBSD 11 ISO image (for
> `strchrnul`). These files were saved in a separate ./fossil2
> directory, and the symlinks libcrypto.so.9 -> libcrypto.so.7 and
> libssl.so.9 -> libssl.so.7 created. Now Fossil 2.1 works fine with the
> following one-line CGI script:
>
> #!/usr/bin/env -S LD_LIBRARY_PATH=fossil2 fossil2/fossil fossil.config
>

Aside from the libraries, I think the "magic" here is that the BSD version
of env has the -S option, which tells env to do a split("\s+", string) on
the text following the -S, which, because of how #!, is the rest of the
line.

So, I would expect both of the following to work:

#!/usr/bin/env -S fossil2/fossil cgi fossil.config

#!/user/bin/env -S fossil1/fossil cgi fossil.config

Unfortunately, the -S option for env is not implemented in most Linux
distributions.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to