Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 08:46:55 -0400 (EDT)
From:      Terry Kennedy <terry@tmk.com>
To:        Ville =?ISO-8859-1?Q?Skytt=E4?= <scop@FreeBSD.org>, freebsd-cvsweb@freebsd.org
Subject:   Re: Read-only access to repository w/ cvsweb 2.0.5?
Message-ID:  <01KKP908BS6S000BQB@tmk.com>
In-Reply-To: "Your message dated Tue, 30 Jul 2002 14:31:53 %2B0300" <1028028713.1921.86.camel@bobcat.ods.org>
References:  <01KKP19SBHES000BQB@tmk.com> <01KKP19SBHES000BQB@tmk.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Terry, this looks like a configuration problem to me.  FreeBSD-CVSweb
> defaults to using the "-l" option of cvs(1), which should skip any
> logging to the history file, so your cvsweb user wouldn't need even read
> access to CVSROOT/history.  Please verify that you have set up your
> cvsweb.cgi to use the new cvsweb.conf (with your possible
> customizations) that comes with FreeBSD-CVSweb.  See @cvs_options in
> cvsweb.conf.
>
> Can you checkout from a shell as the www user using the -l option, ie:
>
>   cvs -l checkout some/file

  That gives me the same error. I'm using cvs 1.10.3, and in its src/main.c
I see:

	(void) strcat (path, "/");
	(void) strcat (path, CVSROOTADM_HISTORY);
	if (isfile (path) && !isaccessible (path, R_OK | W_OK))
	{
	    save_errno = errno;
	    error (0, 0, "Sorry, you don't have read/write access to the history file");
	    error (1, save_errno, "%s", path);
	}
	free (path);

  which looks like it has a hard-coded requirement that the history file be
writable, regardless of whether the -l command is given or not.

  I found this comment in the cvs-1.11 ChangeLog file:

2000-02-21  Karl Fogel  <kfogel@red-bean.com>

        * main.c (main): still check for repository, but not history file
        (correction to 2000-02-18 change -- that's what I get for
        believing the comment rather than the code).

  I applied that change and things got somewhat better - the "download"
link gives me the correct data, but the Revision: x.y link brings up a
mostly blank screen with "Revision , Thu Jan 1 00:00:00 1970 UTC (32 years, 7 
months ago) by " text.

  I suspect this means that there are other version incompatibilities between
my installed CVS and the one that cvsweb expects.

  I then built the full cvs 1.11 and that didn't change the output. Next, I
tried 1.11.2 and that finally is giving me proper output.

  So, it looks like cvsweb 2.0.5 requires cvs 1.11.2. Perhaps that could get
added to the release notes?

> Another thing you could check is if your platform's cvs(1) command has
> the "-R" option for read-only repository access.  If it does, please try
> adding that manually to @cvs_options in cvsweb.conf and send me the
> output of "uname" on your machine so I can make it default on it.

  Unfortunatly, it doesn't. For that matter, neither does the latest cvs
1.11.2. Where can I find a distribution of the flavor that understands "-R"?

> Yet another option (untested, not recommended _at_all_) could be to hack
> cvsweb.cgi to use the co(1) command of rcs, instead of "cvs co" on
> checkouts.

  I tried that earlier on, but that caused other problems (I would have 
needed to rewrite a bit of the CVS/RCS header parsing to deal with the
different output format).

        Terry Kennedy             http://www.tmk.com
        terry@tmk.com             New York, NY USA

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-cvsweb" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01KKP908BS6S000BQB>