Flint
View Ticket
Not logged in
Ticket Hash: 81e3ec6097bfc62d366ca2781fa3724826df042b
Title: Problem with repository when using flint on windows
Status: Closed Type: Incident
Severity: Important Priority: Immediate
Subsystem: Resolution: Workaround
Last Modified: 2012-03-22 00:04:35
Version Found In:
Description:
I am trying to port flint to windows, but I get an error (500) when referred to http://localhost/user/me/repository/test

What exactly is apache supposed to do here?

In the flint error_log I get: [Tue Mar 20 16:49:27 2012] [error] [client ::1] (70014)End of file found: Failed to read cgi file C:/xampp/flint/repos/me/repository for testing, referer: http://localhost/repositories/ [Tue Mar 20 16:49:27 2012] [error] [client ::1] (70014)End of file found: don't know how to spawn child process: C:/xampp/flint/repos/me/repository, referer: http://localhost/repositories/


james added on 2012-03-20 18:26:59 UTC:
So when a user creates a repository a little cgi script is created, "repository" this calls the fossil binary and serves the repo. You need to make sure Apache is setup to serve cgi scripts and that the correct ScriptAliasMatch is present, something like:

ScriptAliasMatch ^/user/(.*)/repository/(.*) /var/www/htdocs/flint/repos/$1/repository/$2

You may need to change the path of the fossil binary in the "repository" script. The file gets created in nano/fossil.php. For any "repository" scripts already created you will need to change the path by hand. I hope this helps.


anonymous added on 2012-03-20 19:56:05 UTC:
The contents of the "repository" script is:

#!c:/fossil directory: ./ notfound: http://localhost/notfound

which is almost certainly wrong?


james added on 2012-03-20 20:05:19 UTC:
Is your fossil binary located at c:/fossil? Also I know nothing about running shell scripts on Windows so I have no idea if it supports running fossil from shebang.


anonymous added on 2012-03-20 20:06:54 UTC:
Yes, c:/fossil is the executable itself. I will try and write my own script, if you can explain to me what the script is supposed to do.


james added on 2012-03-21 00:32:08 UTC:
It's the CGI script that serves the various fossil repositories. You can find more information on the fossil site.

http://fossil-scm.org/index.html/doc/trunk/www/quickstart.wiki#serversetup


anonymous added on 2012-03-21 08:12:38 UTC:
I hope you can maintain your patience with me, because I have a feeling that I'm very close to succeceeding.

So it's similar to fossil serve? If so, the flint site would eventually start serving lots of fossil servers on the same port?

Can you comment on the contents of the cgi script; it seems like fossil is called without parameters, and then the "directory ./" is called, is that similar to changing directory?


anonymous added on 2012-03-21 20:57:46 UTC:
I managed to get further. I finally understood the cgi-script, and changed some stuff that windows didn't understand, aswell as the httpd.conf ScriptAliasMatch.

I can now see the fossil ui, however, it says that I am not logged in. When I go back to the flint website, I am still logged in.

Any ideas?


anonymous added on 2012-03-21 21:34:42 UTC:
I see that this is not the case for chiselapp either, and I understand why. So it works now. Thanks for the help.


james added on 2012-03-22 00:04:35 UTC:
Sorry I wasn't ignoring you, but for some reason the rss feed stopped notifying me.

You are correct your chisel user is different then your fossil user. Chisel is just a way to serve up a number of fossil repositories you manage your fossil users independent of chisel, although when you create a fossil repo from chisel a default user is created for you.

directory: ./ allows the single repository cgi script to serve all fossil repositories in the same directory as the script.

It sounds like you've gotten things working so I'm going to close this ticket.

If your changes aren't windows specific, feel free to open a new ticket and attach a patch and maybe I can integrate them with flint.