[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .cvsrc files
From: |
Joi Ellis |
Subject: |
Re: .cvsrc files |
Date: |
Tue, 9 Apr 2002 11:31:36 -0500 (CDT) |
On Tue, 9 Apr 2002, Jason Frisvold wrote:
> Is there a way to enable a user to commit files to a repository without
> a .cvsrc file? I have a script that I use to commit router backup files
> to a cvs repository. I want to be able to run this via a "fake" user..
> The user has no home directory, nor does it have a shell. So, I need to
> specify everything as a command line...
>
> The errors I'm getting when trying to do this are :
>
> cvs [checkout aborted]: can't chdir(/home/script): No such file or
> directory
>
> cvs add: /tmp/Routers/10.7.0.1.config added independently by second
> party
> cvs commit: Up-to-date check failed for `/tmp/Routers/10.7.0.1.config'
> cvs [commit aborted]: correct above errors first!
>
>
> Any ideas on how to fix this?
>
Here's a section of a perl script I wrote that allows user nobody to
perform checkouts to /tmp.
sub _cvsLogin {
my $target = shift;
my $workDir = $target->workdir();
my $repository= $target->repository();
my $cmd = "export CVS_PASSFILE=$workDir/.cvspass; cvs -d $repository login";
my @input = ( $target->userpw() );
my ($i,$j) = &logTick( $cmd, $target->buildlog(), address@hidden, 0);
}
Basically I'm telling cvs to put the .cvspass file in /tmp instead of ~,
since user nobody as a ~ default of / and no rights to use it.
export CVS_PASSFILE=/tmp/.cvspass
I am able to do cvs login, checkout, update, and tag without a .cvsrc file.
I haven't tried to code up a commit routine, but if tag will work, I think
commit will also. (My code is tested with repositories that use pserver and
local access.)
--
Joi Ellis Software Engineer
Aravox Technologies address@hidden, address@hidden
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
- .cvsrc files, Jason Frisvold, 2002/04/09
- Re: .cvsrc files,
Joi Ellis <=