[rancid] rancid git setup question
heasley
heas at shrubbery.net
Sat Feb 6 01:09:42 UTC 2016
Fri, Feb 05, 2016 at 10:28:31PM +0000, Dan Weintraub:
> Hi,
>
> I’m a first time user having a question about making rancid work with git. I’m on CentOS 7 with rancid 3.3.0, perl v5.16.3, and git 1.8.3.1.
>
> I read that "no attempt will be made to create the repository when running rancid-cvs” so I cloned my empty git repo into the rancid $BASEDIR and pointed at it in the rancid.conf:
I need to make that clearer; no attempt will be made to create repos if
CVSROOT looks like a URL. the script does not handle remote repos.
ie: if you want the origin (if i have the parlance correct) to be on a
remote host, you must create it yourself. My suggestion would be that you
let rancid-cvs create the repo locally, then move that to your remote host
and update group/.git/config to reflect that.
CVSROOT does not translate well to git; for rancid's purpose, it puts all
of it origins - one per group - under CVSROOT. so CVSROOT/myGroup,
CVSROOT/youGroup, CVSROOT/groupies etc. And, the working directory is
BASEDIR/myGroup.
lmk if thats muddy ... or if i have a bug.
> CVSROOT=$BASEDIR/rancid-backups/; export CVSROOT
>
> I then ran rancid-cvs, but I don’t understand the behavior. I would expect it to prepare the CVSROOT, but it made a new folder and repo named after my sole group. It then made a new folder in my intended git repo ($CVSROOT), with my group name, but it looks like a .git directory:
>
> [rancid at rancid rancid-backups]$ ls -al
> total 20
> ...
> drwxr-x--- 7 rancid rancid 4096 Feb 5 22:01 myGroup
> drwxr-xr-x 8 rancid rancid 4096 Feb 5 22:01 .git
> -rw-r--r-- 1 rancid rancid 60 Feb 5 22:01 README.md
> [rancid at rancid rancid-backups]$ ls -al myGroup/
> total 40
> ...
> drwxr-x--- 2 rancid rancid 4096 Feb 5 22:01 branches
> -rw-r----- 1 rancid rancid 66 Feb 5 22:01 config
> -rw-r----- 1 rancid rancid 73 Feb 5 22:01 description
> -rw-r----- 1 rancid rancid 23 Feb 5 22:01 HEAD
> drwxr-x--- 2 rancid rancid 4096 Feb 5 22:01 hooks
> drwxr-x--- 2 rancid rancid 4096 Feb 5 22:01 info
> drwxr-x--- 11 rancid rancid 4096 Feb 5 22:01 objects
> drwxr-x--- 4 rancid rancid 4096 Feb 5 22:01 refs
>
>
> When I run rancid-run, it puts the config files in the myGroup directory of the BASEDIR, but it also seems to touch some objects in the myGroup .git directory.
>
> I then thought that I would only use the repo generated my rancid-cvs, so I put the CVSROOT back to default and tried again. It still makes a $CVSROOT/myGroup directory that doesn’t seem to make sense. I would appreciate it if someone could explain what’s going on or recommend some good documentation on getting rancid and git set up.
>
> Thanks,
> Dan
>
>
>
>
>
> Dan Weintraub | Systems Engineer
> V: 877.327.8422 x
> mailto:Dan.Weintraub at dealer.com | www.dealer.com
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
More information about the Rancid-discuss
mailing list