[fossil-users] How to set-up multiple-repo CGI-based server?

2013-05-29 Thread Nigel Bray
I am struggling to see what is tripping me up when a single repository works
fine, but multiple repositories within a directory fails as follows:
https://mail.google.com/mail/ca/u/0/#inbox

$ cat repo.cgi
#!/home/sites/my.domain/bin/fossil
repository: /home/sites/my.domain/repos

http://my.domain/cgi-bin/repo.cgi/repo1

SQLITE_CANTOPEN: cannot open file at line 28175 of [7e10a62d0e]
SQLITE_CANTOPEN: os_unix.c:28175: (21) open(/home/sites/my.domain/repos) -
Is a directory
Database Error
[/home/sites/my.domain/repos]: unable to open database file
...

The following edit serves a single repository without error:

$ cat repo.cgi
#!/home/sites/my.domain/bin/fossil
repository: /home/sites/my.domain/repos/repo1.fossil

Some environment data from the server gives me no clue:

$ cat bash-test.cgi
#!/bin/bash
echo Content-Type: text/plain
env | sort

DOCUMENT_ROOT=/home/sites/my.domain/public_html/
GATEWAY_INTERFACE=CGI/1.1
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_ACCEPT_LANGUAGE=en-gb,en;q=0.5
HTTP_CONNECTION=keep-alive
HTTP_HOST=my.domain
HTTP_USER_AGENT=Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:21.0)
Gecko/20100101 Firefox/21.0
PATH=/usr/local/bin:/usr/bin:/bin
PWD=/home/sites/my.domain/cgi-bin
QUERY_STRING=
REMOTE_ADDR=my.ip.61.0
REMOTE_PORT=22428
REQUEST_METHOD=GET
REQUEST_URI=/cgi-bin/bash-test.cgi
SCRIPT_FILENAME=/home/sites/my.domain/cgi-bin/bash-test.cgi
SCRIPT_NAME=/cgi-bin/bash-test.cgi
SCRIPT_URI=http://my.domain/cgi-bin/bash-test.cgi
SCRIPT_URL=/cgi-bin/bash-test.cgi
SERVER_ADDR=79.170.44.123
SERVER_ADMIN=webmaster@my.domain
SERVER_NAME=my.domain
SERVER_PORT=80
SERVER_PROTOCOL=HTTP/1.1
SERVER_SIGNATURE=addressApache/2 Server at my.domain Port 80/address
SERVER_SOFTWARE=Apache/2
SHLVL=1
_=/usr/bin/env

$ fossil version
This is fossil version 1.25 [d2e07756d9] 2013-02-16 00:04:35 UTC

A further test on my local machine gives me:

$ cat test.cgi
#!/usr/bin/fossil
repository: /home/nrb/987mb

nrb@nrb-ThinkPad-T61:~$ fossil cgi test.cgi
Status: 200 OK
X-Frame-Options: SAMEORIGIN
Cache-control: no-cache
Content-Type: text/html; charset=utf-8
Content-Length: 433

p class=generalError
SQLITE_CANTOPEN: cannot open file at line 28175 of [7e10a62d0e]
/p
p class=generalError
SQLITE_CANTOPEN: os_unix.c:28175: (21) open(/home/nrb/987mb) - Is a directory
/p
h1Database Error/h1
pre[/home/nrb/987mb]: unable to open database file/pre
pIf you have recently updated your fossil executable, you might
need to run fossil all rebuild to bring the repository
schemas up to date.
/p

Experimenting with a notfound: /repo1 does not change behaviour.

Any help would be much appreciated!

BR/ Nigel
___
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] Chiselapp.com shutting down

2013-05-29 Thread Nigel Bray
NB: Apologies if I don't get this to thread correctly, I've not got an
email copy of the original post, so can't reply properly.

As an occasional Fossil user, I have previously hosted using
inetd/althttpd[1] and Chisel[2] as well as Dropbox.

Now I have moved to cgi, given ssh access, it seems to be as simple as
just three file copies, right?

scp fossil user@webservers-ssh-domain:/path-to-host's-executables/bin/
 ## if binary not available for host machine, then instead, do wget of
the sources and ./configure  make on the host
scp repos.cgi user@webservers-ssh-domain:/path-to-host's-scripts/cgi-bin/
scp repo1.fossil user@webservers-ssh-domain:/path-to-host's-repositories/repos/
# repeat the above copy for more than one repository on the server
# backup the original copied fossil archives from the client machine,
and 'fossil clone' new copies from the server (fossils can be moved,
but I think should not be duplicated, internals of fossil need state
variables dependent upon the instance)

A further thread I found very valuable is the knowledge that this can
be done on sourceforge for open source projects [3].

I use fossil to share data with people who are normally dropbox users
for their personal use and occasional users of corporate VCS/tracking
tools.  I and people I introduce Fossil to feel that it is an
excellent model of elegant design and efficient workflow and would
like to see it adopted more widely, and perhaps bring in extra
valuable contributors.

I find that the idea of hosting [4] is great and that for me; an
additional facility matching dropbox background file syncing could
perhaps widen the user base.  A client(Fossil) installed like that for
dropbox[5] on the users local machine would be most handy.  As Fossil
already does autosync and autocheckout, some extra client side
automatic checkin and filename splitting on (rare) replication
conflicts may be needed to match dropbox usability.

On top of a Fossil hosting service, this wish I have, could be
characterised as anybody who wants to use fossil like dropbox simply
has to download the client package, open to install it, agree to let
it start on reboot and run in the background.  Given an available
hosting solution, the user would see something like: If you're running
this for the first time, you'll be asked to create a new account or
add this to an existing account. Once you do, your Fossil folder will
be created in your home directory.

[1] althttpd, http://www.sqlite.org/docsrc/artifact/14c9965da19?ln=2-62
[2] chisel and flint, http://chiselapp.com/repositories/search/flint
[3] ssh access to sourceforge,
http://thread.gmane.org/gmane.comp.version-control.fossil-scm.user/12163,
really convenient option for self hosting open source
[4] fossil hosting requirements,
http://thread.gmane.org/gmane.comp.version-control.fossil-scm.user/12160/focus=12167,
anybody who wants to host something like chiselapp simply has to
obtain a low-cost internet host, copy the fossil executable into
/usr/bin, create a single CGI script that is less than 10 lines long,
and they are up and running
[5] dropbox client application, https://www.dropbox.com/help/247/en,
seems to have wide adoption
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users