Re: [fossil-users] Help install fossil as window service

2011-06-03 Thread Tony Perovic
Ingo is right, a Windows service is a special type of executable. Fossil..exe 
is an ordinary Windows executable. But you cannot have Fossil just idling, 
waiting for commands. Fossil just does what the command line arguments tell it 
to do then exits. What are you trying to do?

Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Ingo Koch
Sent: Wednesday, June 01, 2011 12:16 PM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Help install fossil as window service

On 01.06.2011 17:37, Steeve St-Laurent wrote:
Hi,

I'm trying to install fossil as a window service.

i sucessfully created the service with this command

sc create fossil binPaht=GoodPath\fossil.exe server

but when i start the fossil service i get this error

Error 1053: The service did not respond to the start or control request in a 
timely fashion.

What did i do wrong ?

You can't register an arbitrary program directly as a Windows service. Every 
Windows service has to implement at least two functions which are called by the 
service manager to start and stop the service. Fossil obviously does not 
implement those functions, so it doesn't respond to the service manager as 
expected.

There are programs available which implement those functions and can then run 
an arbitrary program.
Just do a search for run windows program as a service

Ingo
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Cloning on IIS

2011-04-20 Thread Tony Perovic
All,

To troubleshoot my cloning problem, I tried running Fossil in CGI mode like 
this:

Set CONTENT_LENGTH=65
Set PATH_INFO=/xfer/xfer
Set REMOTE_USER=tperovic
Set REQUEST_MODE=POST
Set SCRIPT_NAME=/Projects/Test/Test.fossil
Set SERVER_NAME=myserver
Set SERVER_PORT=80
Set SERVER_PORT_SECURE=0
Set SERVER_PROTOCOL=HTTP/1.0
Fossil.exe cgi test.cgi

Also tried:

Set GATEWAY_INTERFACE=CGI/1.1
Fossil.exe test.cgi

Getting this error:

Assertion failed: (pFrom)-xRealloc==blobReallocMalloc || 
(pFrom)-xRealloc==blobReallocStatic, file ./bld/blob_.c, line 379

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I set all the environmental variables that I think it needs. Did I miss any?
Probably looking for those 65 bytes of content on stdin, huh?
What do those 65 bytes contain?

Tony Perovic
Compumation, Inc.

From: Tony Perovic
Sent: Tuesday, April 19, 2011 5:22 PM
To: 'fossil-users@lists.fossil-scm.org'
Subject: Cloning on IIS

Cloning works if I run Fossil in server mode:

Server:  Fossil server myrepository.fossil
Workstation:  Fossil clone 
http://myserver:8080http://myserver:8080/ myclone.fossil

It also works using IIS/CGI if I clone a new, empty repository. However, if I 
try to clone a repository that contains artifacts using IIS/CGI then I get 
errors:

C:\Program Files\Fossil\Fossil.exe: malformed file line.

Comparing the data packets I can see the problem:

Fossil server response:

HTTP/1.0 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430

: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0D 0A 63 66

Fossil/IIS/CGI response:

Status: 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430

: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0A 63 66 69

All the 0D/0A pairs got replaced with 0A. Text mode converts \n to \r\n but 
what the hell is converting \r\n to \n ???!?!?!??!

The Perl code that handles CGI requests, in part, looks like this:

$fossil = C:\Program Files\Fossil\Fossil.exe
$cgifile = full path to CGI file
$output = `\$fossil\ \$cgifile\`; # Execute Fossil, capture output

$eoh = index($output,\n\n); # Find end-of-header
$header = substr($output,0,$index); # Just the HTTP header

if ($header =~ m/Content-Type: text/) { # text or binary?
print $output;  # Everything is text mode
}
else {
   print $header\n\n;   # Header is text
   binmode stdout;# The rest is binary
   print substr($output,$eoh + 2);
}

Any chance that Fossil is doing this?

[cid:image001.jpg@01CBFF7F.B8638350]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Cloning on IIS

2011-04-19 Thread Tony Perovic
Cloning works if I run Fossil in server mode:

Server:  Fossil server myrepository.fossil
Workstation:  Fossil clone 
http://myserver:8080http://myserver:8080/ myclone.fossil

It also works using IIS/CGI if I clone a new, empty repository. However, if I 
try to clone a repository that contains artifacts using IIS/CGI then I get 
errors:

C:\Program Files\Fossil\Fossil.exe: malformed file line.

Comparing the data packets I can see the problem:

Fossil server response:

HTTP/1.0 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430

: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0D 0A 63 66

Fossil/IIS/CGI response:

Status: 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430

: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0A 63 66 69

All the 0D/0A pairs got replaced with 0A. Text mode converts \n to \r\n but 
what the hell is converting \r\n to \n ???!?!?!??!

The Perl code that handles CGI requests, in part, looks like this:

$fossil = C:\Program Files\Fossil\Fossil.exe
$cgifile = full path to CGI file
$output = `\$fossil\ \$cgifile\`; # Execute Fossil, capture output

$eoh = index($output,\n\n); # Find end-of-header
$header = substr($output,0,$index); # Just the HTTP header

if ($header =~ m/Content-Type: text/) { # text or binary?
print $output;  # Everything is text mode
}
else {
   print $header\n\n;   # Header is text
   binmode stdout;# The rest is binary
   print substr($output,$eoh + 2);
}

Any chance that Fossil is doing this?

[cid:image001.jpg@01CBFEB6.4AA98E00]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Cloning on IIS

2011-04-07 Thread Tony Perovic
I'm still having trouble cloning/pulling/pushing on Windows/IIS

This is my configuration:

Anonymous access.in IIS is disabled.
Integrated Windows Authentication is enabled.
Basic Authentication is enabled.
Allow REMOTE_USER authentication is enabled in the repository.

If I run Fossil in server mode on my server:

Fossil open \Projects\Test\Test.fossil
Fossil.server

then I can clone the repository like this:

Fossil clone http://myserver:8080/ Test.fossil

I captured the exchange:

Request:

POST /xfer/xfer HTTP/1.0
Host: myserver:8080
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 65

65 bytes of binary data

Reponse:

POST /xfer/xfer HTTP/1.0
Host: myserver:8080
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 267

data packets

Since I do not see any login information, I assume that authentication is not 
required for cloning.

If I browse the repository, the browser provides authentication to IIS which, 
in turn, sets REMOTE_USER=tperovic before invoking Fossil via CGI. The result 
is auto-login based on Windows integrated authentication. I get Logged on as 
tperovic on every Fossil web page.

Now, if I try to clone the repository using the IIS/CGI  interface, it fails:

Fossil clone http://myserver/Projects/Test/Test.fossil Test.fossil

Request:

POST /Projects/Test/Test.fossil/xfer/xfer HTTP/1.0
Host: vserver1
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 63

Media Type: application/x-fossil (63 bytes)

Reponse:

HTTP/1.1 401 Unauthorized
Content-Length: 1539
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm=My Domain
Date: Fri, 01 Apr 2011 18:05:16 GMT
Connection: close

HTMLHEADTITLEYou are not authorized to view this page/TITLE
...
.h2HTTP Error 401.2 - Unauthorized: Access is denied due to server 
configuration.brInternet Information Services (IIS)/h2
...
/HTML

Normally, the browser would negotiate the authentication method with IIS. The 
WWW-Authenticate directives tell the browser which authentication methods are 
available. Fossil provides no authentication so IIS rejects the request . Thus, 
I conlude, anonymous access must to be enabled for cloning to work. I would 
imagine you would have the same issue on Unix/Linux.

Is this correct?

[cid:image001.jpg@01CBF508.D3E254C0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Cloning on IIS

2011-04-07 Thread Tony Perovic
So, is anonymous access required for cloning even on Unix/Linux?

Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Richard Hipp
Sent: Thursday, April 07, 2011 9:54 AM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Cloning on IIS


On Thu, Apr 7, 2011 at 10:48 AM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
I'm still having trouble cloning/pulling/pushing on Windows/IIS

This is my configuration:

Anonymous access.inhttp://access.in IIS is disabled.
Integrated Windows Authentication is enabled.
Basic Authentication is enabled.
Allow REMOTE_USER authentication is enabled in the repository.

Yeah.  The Fossil clone client-side still doesn't know how to do Basic 
Authentication.  Somebody posted a patch to fix this a week or two ago.  I was 
going to look into that, but I it just hasn't come up on my queue yet.


If I run Fossil in server mode on my server:

Fossil open \Projects\Test\Test.fossil
Fossil.server

then I can clone the repository like this:

Fossil clone http://myserver:8080/ Test.fossil

I captured the exchange:

Request:

POST /xfer/xfer HTTP/1.0
Host: myserver:8080
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 65

65 bytes of binary data

Reponse:

POST /xfer/xfer HTTP/1.0
Host: myserver:8080
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 267

data packets

Since I do not see any login information, I assume that authentication is not 
required for cloning.

If I browse the repository, the browser provides authentication to IIS which, 
in turn, sets REMOTE_USER=tperovic before invoking Fossil via CGI. The result 
is auto-login based on Windows integrated authentication. I get Logged on as 
tperovic on every Fossil web page.

Now, if I try to clone the repository using the IIS/CGI  interface, it fails:

Fossil clone http://myserver/Projects/Test/Test.fossil Test.fossil

Request:

POST /Projects/Test/Test.fossil/xfer/xfer HTTP/1.0
Host: vserver1
User-Agent: Fossil/[1d93222627]
Content-Type: application/x-fossil
Content-Length: 63

Media Type: application/x-fossil (63 bytes)

Reponse:

HTTP/1.1 401 Unauthorized
Content-Length: 1539
Content-Type: text/html
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm=My Domain
Date: Fri, 01 Apr 2011 18:05:16 GMT
Connection: close

HTMLHEADTITLEYou are not authorized to view this page/TITLE
...
.h2HTTP Error 401.2 - Unauthorized: Access is denied due to server 
configuration.brInternet Information Services (IIS)/h2
...
/HTML

Normally, the browser would negotiate the authentication method with IIS. The 
WWW-Authenticate directives tell the browser which authentication methods are 
available. Fossil provides no authentication so IIS rejects the request . Thus, 
I conlude, anonymous access must to be enabled for cloning to work. I would 
imagine you would have the same issue on Unix/Linux.

Is this correct?

[cid:image001.jpg@01CBF50B.080CE7E0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.comhttp://www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921tel:630-860-1921  Phone
630-860-1928tel:630-860-1928  Fax



___
fossil-users mailing list
fossil-users@lists.fossil-scm.orgmailto:fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users



--
D. Richard Hipp
d...@sqlite.orgmailto:d...@sqlite.org
inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Commit question

2011-04-04 Thread Tony Perovic
Command: Fossil commit -m Added Test.bat Test.bat
Response: Test.bat contains CR/NL line endings; commit anyhow (y/N/a)?

Of course it does. All Windows text files contain /r/n.

Why is Fossil asking this question and, more importantly, how do I make it stop?

This must have been added within the last few weeks because I never saw it 
until I upgraded to the latest version of Fossil.

[cid:image002.jpg@01CBF2B5.7E50D4A0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image002.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Commit question

2011-04-04 Thread Tony Perovic
Just curious: why is cr/lf in text files undesirable?

Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Richard Hipp
Sent: Monday, April 04, 2011 10:51 AM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Commit question


On Mon, Apr 4, 2011 at 11:46 AM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
Command: Fossil commit -m Added Test.bat Test.bat
Response: Test.bat contains CR/NL line endings; commit anyhow (y/N/a)?

Of course it does. All Windows text files contain /r/n.

Why is Fossil asking this question and, more importantly, how do I make it stop?

fossil setting crnl-glob *


This must have been added within the last few weeks because I never saw it 
until I upgraded to the latest version of Fossil.

Added on 2011-02-25


[cid:image001.jpg@01CBF2BB.0AFB0420]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.comhttp://www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921tel:630-860-1921  Phone
630-860-1928tel:630-860-1928  Fax



___
fossil-users mailing list
fossil-users@lists.fossil-scm.orgmailto:fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users



--
D. Richard Hipp
d...@sqlite.orgmailto:d...@sqlite.org
inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil on IIS

2011-03-29 Thread Tony Perovic
IIS/CGI sets the following environmental variable:
SERVER_SOFTWARE=Microsoft-IIS/6.0
So you could look for that.

IIS has another bug that prevents Set-Cookie and Redirection within the same 
HTTP response. IIS tries to be efficient by executing the redirection without 
involving the browser but fails to pass along the cookie so the Login/Logout 
pages don't work. I had to script around that too. Now that I've got all that 
worked out I'm battling the Active Directory security model. Painful.

Are you sure you want to start modifying Fossil to compensate for IIS 
idiosyncrasies (bugs)? Judging by the lack of responses I've gotten, I don't 
think there are too many Fossil on IIS/CGI users out there. A Wiki page with 
detailed instructions might suffice.

Regards,
Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Richard Hipp
Sent: Tuesday, March 29, 2011 1:21 PM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil on IIS


On Tue, Mar 29, 2011 at 2:14 PM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
From RFC3875 Section 4.1,5:


The PATH_INFO variable specifies a path to be interpreted by the CGI

script.  It identifies the resource or sub-resource to be returned by

the CGI script, and is derived from the portion of the URI path

hierarchy following the part that identifies the script itself.


So, basically, my Perl script is taking a non-compliant IIS/CGI PATH_INFO and 
making it compliant.

Are their any other distinguishing environment variables that IIS outputs?  
Perhaps we can add special code to Fossil to work around the IIS bug.

Or, perhaps we can add a special parameter to the cgi file that starts up 
Fossil.  In addition to the repository: line, add a new line something like:

 iis-bug-workaround=yes

The issue is that the PATH_INFO environment variable is not removing the 
SCRIPT_NAME prefix?









From: 
fossil-users-boun...@lists.fossil-scm.orgmailto:fossil-users-boun...@lists.fossil-scm.org
 
[mailto:fossil-users-boun...@lists.fossil-scm.orgmailto:fossil-users-boun...@lists.fossil-scm.org]
 On Behalf Of Richard Hipp
Sent: Tuesday, March 29, 2011 12:38 PM

To: fossil-users@lists.fossil-scm.orgmailto:fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil on IIS


On Tue, Mar 29, 2011 at 12:40 PM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
This is driving me nuts..

I created a CGI file for my repository on the server:


It seems that Fossil uses the PATH_INFO to construct its reply in CGI mode. I 
achieved the correct results by writing a Perl script that strips the 
SCRIPT_NAME portion from the PATH_INFO environment variable before invoking 
Fossil:

$path = $ENV{PATH_INFO};
$script = $ENV{SCRIPT_NAME};

if ($path =~ m/^$script/) { # PATH_INFO starts with SCRIPT_NAME?
$ENV{PATH_INFO} = substr($path, length($script));
}

All Fossil / CGI requests must be processed through this Perl script. Thus, I 
concluded, Fossil/CGI cannot possibly work on Windows/IIS without scripting.

Fossil assumes that PATH_INFO and SCRIPT_NAME are set up as described in 
RFC3875.  If what you say is correct, ISS appears not to follow RFC3875 and 
hence does not really support CGI, but rather something that is merely CGI-like.



Q: Is this correct? Am I missing something?

In fact, given the above analysis, it shouldn't work in Linux either, yet, (I 
assume) it does.

The main Fossil website (http://www.fossil-scm.org/) is just an instance of 
Fossil running on a Linux box as CGI.   See 
http://www.fossil-scm.org/fossil/doc/trunk/www/selfhost.wiki for additional 
information, including the scripts used to enable CGI on the various Fossil 
mirrors.


Q: Can somebody please explain what is or isn't happening in Linux that is or 
isn't happening in Windows/IIS?

Reminds me of a haiku I read years ago:

Yesterday it worked.
Today it is not working.
Windows is like that.


Tony Perovic
Compumation, Inc.

From: 
fossil-users-boun...@lists.fossil-scm.orgmailto:fossil-users-boun...@lists.fossil-scm.org
 
[mailto:fossil-users-boun...@lists.fossil-scm.orgmailto:fossil-users-boun...@lists.fossil-scm.org]
 On Behalf Of Tony Perovic
Sent: Tuesday, March 01, 2011 3:58 PM

To: 
'fossil-users@lists.fossil-scm.orgmailto:fossil-users@lists.fossil-scm.org'
Subject: [fossil-users] Fossil on IIS

Anybody get Fossil working as a CGI script on Microsoft Server 2003 / IIS?

I'm trying to access multiple repositories with one script as described at:
http://www.fossil-scm.org/index.html/doc/trunk/www/server.wiki

Learned more than I ever wanted to know about IIS/CGI/Scripting.

[cid:image001.jpg@01CBEE27.8ECC9AE0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.comhttp://www.compumation.com

205 W. Grand

Re: [fossil-users] Fossil on IIS

2011-03-29 Thread Tony Perovic
Works with Chrome, but Microsoft Internet Explorer didn't like it.
Now, if I could just get the users to switch

Tony Perovic
Compumation, Inc.

From: Tony Perovic
Sent: Tuesday, March 29, 2011 4:39 PM
To: 'fossil-users@lists.fossil-scm.org'
Subject: RE: [fossil-users] Fossil on IIS

I'm not familiar with the HTML meta reload tag...I had to google it.

Clicking the Login button, Fossil outputs this:

Status: 302 Moved Temporarily
Set-Cookie: fossil_login_3213c06d=anon%2F2455644... Path: 
/Projects/Test/Test.fossil; expires=Wed, 23 Mar 2011 23:51:39 GMT; Version=1
Location: /Projects/Test/Test.fossil/index
Cache-control: no-cache, no-store
Content-Type: text/html; charset=utf-8
Content-Length: 58

html
pRedirect to /Fossil/Fossil.pl/index/p
/html

My understanding is that the Location directive specifies the redirection. The 
html.../html is only for Netscape compatibility.

IIS redirects to /Projects/Test/Test.fossil/index but forgets the cookie. Login 
fails.

So, are you suggesting I change that to:

Status: 302 Moved Temporarily
Set-Cookie: fossil_login_3213c06d=anon%2F2455644... Path: 
/Projects/Test/Test.fossil; expires=Wed, 23 Mar 2011 23:51:39 GMT; Version=1
Location: /Projects/Test/Test.fossil/index
Cache-control: no-cache, no-store
Content-Type: text/html; charset=utf-8
Content-Length: 109

html
head
meta HTTP-EQUIV=REFRESH content=0; 
url=/Projects/Test/Test.fossil/index.html/
/head
/html

Then see if the browser gets the cookie and redirects?

Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Ron Wilson
Sent: Tuesday, March 29, 2011 4:11 PM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil on IIS

On Tue, Mar 29, 2011 at 4:39 PM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
IIS has another bug that prevents Set-Cookie and Redirection within the same 
HTTP response. IIS tries to be efficient by executing the redirection without 
involving the browser but fails to pass along the cookie so the Login/Logout 
pages don't work. I had to script around that too.

Seems to me that a meta reload HTML tag could be used, assuming IIS doesn't 
mess with that, too. I have seen many websites that display a login-succeded 
page that automatically loads the target page after a very short delay. I 
assume this is done via meta reload.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Cloning question

2011-03-28 Thread Tony Perovic
Q: Does cloning (or sync or push or pull) work with CGI?

If Fossil server is running on my server:

Fossil open myrepo.fossil
Fossil server

Then cloning works as expected:

Fossil clone http://myserver:8080/ mycopy.fossil

However, I've got multiple repositories so I'm using a Perl script to process 
CGI requests:

http://myserver/Fossil.pl?repository=\Path\myrepo.fossil

The script looks for repository=\Path\myrepo.fossil and steers Fossil to the 
repository when browsing.

However, this doesn't even invoke the Perl t:

Fossil clone 
http://myserver/Fossil.pl?repository=\Path\myrepo.fossil mycopy.fossil

Where should the requests go?

Note: This is CGI on IIS.

[cid:image001.jpg@01CBED68.5AEBDDE0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil on IIS

2011-03-23 Thread Tony Perovic
Same shit with IIS 7.5. Good news is that I won't have to upgrade the server. 
I'll have script around it somehow.

So, clicking the Login button on the Login page returns this:

Status: 302 Moved Temporarily
Set-Cookie: fossil_login_3213c06d=anon%2F2455644... Path=/Fossil/Fossil.pl; 
expires=Wed, 23 Mar 2011 23:51:39 GMT; Version=1
Location: /Fossil/Fossil.pl/index
Cache-control: no-cache, no-store
Content-Type: text/html; charset=utf-8
Content-Length: 58

html
pRedirect to /Fossil/Fossil.pl/index/p
/html

The browser never gets it. Instead, IIS redirects automatically but forgets to 
pass the cookie.

Wouldn't this suffice?

Status: 302 Moved Temporarily
Set-Cookie: fossil_login_3213c06d=anon%2F2455644...; Path=/Fossil/Fossil.pl; 
expires=Wed, 23 Mar 2011 23:51:39 GMT; Version=1
Location: /Fossil/Fossil.pl/index

All it needs to do is create the login cookie and redirect to the home page. In 
fact, that's probably how I'll script it assuming that IIS doesn't try to 
outsmart itself again.

Tony Perovic
Compumation, Inc.

From: Tony Perovic
Sent: Tuesday, March 22, 2011 2:08 PM
To: 'fossil-users@lists.fossil-scm.org'
Subject: RE: [fossil-users] Fossil on IIS

Yes but, upgrading to IIS 7.x involves upgrading the server to Windows Server 
2008. Not exactly a walk in the park. I think I'll setup a virtual machine with 
Windows Server 2008 and test it there before suggesting a server upgrade. I'll 
post the results in a couple days.

Thanks,
Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Richard Hipp
Sent: Tuesday, March 22, 2011 11:02 AM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil on IIS


On Tue, Mar 22, 2011 at 11:23 AM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
Apparently, the Fossil Login with never work with IIS 6.0:
http://support.microsoft.com/kb/176113

Do I understand that the bug in question has been fixed in IIS 7.0 and that 
upgrading to IIS 7.0 will fix the issue?

--
D. Richard Hipp
d...@sqlite.orgmailto:d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil on IIS

2011-03-22 Thread Tony Perovic
Yes but, upgrading to IIS 7.x involves upgrading the server to Windows Server 
2008. Not exactly a walk in the park. I think I'll setup a virtual machine with 
Windows Server 2008 and test it there before suggesting a server upgrade. I'll 
post the results in a couple days.

Thanks,
Tony Perovic
Compumation, Inc.

From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Richard Hipp
Sent: Tuesday, March 22, 2011 11:02 AM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Fossil on IIS


On Tue, Mar 22, 2011 at 11:23 AM, Tony Perovic 
tpero...@compumation.commailto:tpero...@compumation.com wrote:
Apparently, the Fossil Login with never work with IIS 6.0:
http://support.microsoft.com/kb/176113

Do I understand that the bug in question has been fixed in IIS 7.0 and that 
upgrading to IIS 7.0 will fix the issue?


--
D. Richard Hipp
d...@sqlite.orgmailto:d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil on IIS

2011-03-18 Thread Tony Perovic
I'm having trouble with the Login page on IIS/CGI

I wrote a Perl script that accepts Fossil requests like this:

http://myserver/cgi-bin/Fossil.pl?repository=\Projects\...\Test.fossil


It generates a CGI script (Fossil.cgi):



#! Fossil

repository: \Projects\...\Test.fossil



then invokes Fossil and logs the output:



$output = `Fossil.exe Fossil.cgi`

print $output

log $output

It also creates a cookie that used for subsequent page requests:

Set-Cookie: repository=\Projects\...\Test.fossil

Now the Login page URL looks like this:

http://myserver/cgi-bin/Fossil.pl/login

Using Fill out captcha and clicking the Login button generates the following 
HTTP request:

POST /cgi-bin/Fossil.pl/login HTTP/1.1
Host: vserver1
Connection: keep-alive
Referer: http://myserver/cgi-bin/Fossil.pl/login
Content-Length: 45
Cache-Control: max-age=0
Origin: http://myserver
Content-Type: application/x-www-form-urlencoded
Accept: 
application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: repository=\Projects\Test\Test.fossil

u=anonymousp=c22b0422in=Logincs=1403348019

Fossil reponds with:

Status: 302 Moved Temporarily
Set-Cookie: 
fossil_login_b213c069=anon%2F2455639.13208575%2F3590e822388f03d7bd4897801ec42b0a7d5e88b6;
 Path=/cgi-bin/Fossil.pl; expires=Fri, 18 Mar 2011 21:10:12 GMT; Version=1
Location: /cgi-bin/Fossil.pl/index
Cache-control: no-cache, no-store
Content-Type: text/html; charset=utf-8
Content-Length: 59

html
pRedirect to /cgi-bin/Fossil.pl/index/p
/html

Which should display the Home page logged in as Anonymous but, instead, the 
browser receives:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Length: 1305
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
Date: Fri, 18 Mar 2011 15:10:12 GMT

!DOCTYPE htmlhtml
head
titleUnnamed Fossil Project: Home/title
link rel=alternate type=application/rss+xml title=RSS Feed
  href=/cgi-bin/Fossil.pl/timeline.rss /
link rel=stylesheet href=/cgi-bin/Fossil.pl/style.css?default 
type=text/css
  media=screen /
/head
body
div class=header
  div class=logo
img src=/cgi-bin/Fossil.pl/logo alt=logo /
  /div
  div class=titlesmallUnnamed Fossil Project/smallbr /Home/div
  div class=statusNot logged in/div
/div
div class=mainmenua href='/cgi-bin/Fossil.pl/home'Home/a a 
href='/cgi-bin/Fossil.pl/timeline'Timeline/a a 
href='/cgi-bin/Fossil.pl/brlist'Branches/a a 
href='/cgi-bin/Fossil.pl/taglist'Tags/a a 
href='/cgi-bin/Fossil.pl/reportlist'Tickets/a a 
href='/cgi-bin/Fossil.pl/wiki'Wiki/a a 
href='/cgi-bin/Fossil.pl/login'Login/a /div
div class=content
pThis is a stub home-page for the project.
To fill in this page, first go to
a href=/cgi-bin/Fossil.pl/setup_configsetup/config/a
and establish a Project Name.  Then create a
wiki page with that name.  The content of that wiki page
will be displayed in place of this message./p
/div
div class=footer
Fossil version [1d93222627] 2011-03-01 19:04

This is the Home page but I'm not logged in because I never got the login 
cookie Fossil sent.

I realize this is probably an IIS question more than a Fossil question but I'm 
hoping somebody out there got this working on IIS 6.0 or can at least point me 
in the right direction.

Switching from IIS to Linux is not an option. The web server is what it is.

Thank you,
Tony Perovic
Compumation, Inc.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Basic question: how to create fossil web service using bash cgi

2011-03-07 Thread Tony Perovic
Looking at the source code, it looks like Fossil goes into CGI mode when it 
sees that the GATEWAY_INTERFACE is defined or the cgi command line parameter is 
specified.

Try clearing GATEWAY_INTERFACE.

Tony Perovic
Compumation, Inc.

-Original Message-
From: fossil-users-boun...@lists.fossil-scm.org 
[mailto:fossil-users-boun...@lists.fossil-scm.org] On Behalf Of Gé Weijers
Sent: Monday, March 07, 2011 10:25 AM
To: fossil-users@lists.fossil-scm.org
Subject: Re: [fossil-users] Basic question: how to create fossil web service 
using bash cgi



On Sun, 6 Mar 2011, David Bovill wrote:

 My bash scripting is very basic. I've been trying to create some cgi's on
 the server that will let me create new fossil repos. I've this test cgi, and
 am unable to issue the commands to fossil that I am able to in the
 terminal.

fossil sees that the environment contains CGI variables and switches to
CGI mode. To make this work you'll have to purge the environment, I'm not
quite sure which variable you need to remove.

Ge'
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Fossil on IIS

2011-03-04 Thread Tony Perovic
This is what I've got:

- All our project files area stored on a shared file server (Windows Server 
2003)
- We have multiple clients
- Clients have one or more projects
- Clients could have multiple locations
- Projects could have one or more subprojects
- Each client/location/project/subproject has a folder
- Each project or subproject will have a Fossil repository on the server
- Each repository will be kept in the appropriate project or subproject folder

Here is an example directory structure on the file server:

\Projects
\Client1 (This client has multiple locations)
\Location1
\Project1 (This project has subprojects)
\Subproject1
\Subproject2
\Subproject3
\Project2 (This project has no subprojects)
\Project3 (This project has no subprojects)
...
\Location2
...
\Location3
...
\Client2 (This client has only one location)
\Project1
\Project2
\Project3
...
\Client3
...

Clearly, all the Fossil repositories will not be stored in the same folder. I'm 
testing a Perl script that'll sort it all out and invoke Fossil using CGI as 
required.  Almost there. One last hurdle:

The script generates a Fossil.cgi file dynamically, as needed, per repository, 
then invokes Fossil. The initial CGI file looks like this:

#!\Program Files\Fossil\Fossil
repository: \Projects\Client\Location\Project\repository.fossil

Subsequently, the browser comes back asking for resources referenced in the 
resulting HTML:

img src=/cgi-bin/Fossil.pl/logo alt=logo /

It's obviously asking for the logo within the repository it just accessed.

Q: How should the CGI script invoke Fossil to request these internal resources?

I tried:

#!\Program Files\Fossil\Fossil
repository: \Projects\Client\Location\Project\repository.fossil/logo

without success.

Please advise.

[cid:image001.jpg@01CBDA88.AE35A5F0]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image001.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Fossil on IIS

2011-03-01 Thread Tony Perovic
Anybody get Fossil working as a CGI script on Microsoft Server 2003 / IIS?

I'm trying to access multiple repositories with one script as described at:
http://www.fossil-scm.org/index.html/doc/trunk/www/server.wiki

Learned more than I ever wanted to know about IIS/CGI/Scripting.

[cid:image002.jpg@01CBD829.6BEE9E10]

TONY PEROVIC

tpero...@compumation.commailto:tpero...@compumation.com
www.compumation.com

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921  Phone
630-860-1928  Fax


inline: image002.jpg___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users