Date: Tue, 14 Sep 2004 04:17:46 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: "Kenneth A. Bond" <fhb_1969@yahoo.ca> Cc: freebsd-questions@freebsd.org Subject: Re: CVS CO Error Message-ID: <20040914011746.GA25812@gothmog.gr> In-Reply-To: <20040913210226.54466.qmail@web53401.mail.yahoo.com> References: <20040913210226.54466.qmail@web53401.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-09-13 17:02, "Kenneth A. Bond" <fhb_1969@yahoo.ca> wrote: > I am trying to update my source using CVS, as CVSup is not an option > in my current environment. I am running FreeBSD 4.10. Below are the > commands that I am entering in order to perform the update, but for > some reason, I am getting the following error when attempting to > update my source: > > lx1005# pwd > /usr/src > lx1005# setenv CVSROOT anoncvs@anoncvs.FreeBSD.org:/home/ncvs > lx1005# cvs co -rRELENG_4_10 src > cvs [checkout aborted]: cannot write /home/ncvs/CVSROOT/val-tags: Permission denied > lx1005# whoami > root * Is /usr/src a source tree that you created with a `cvs checkout'? This should be obvious from the CVS/ subdirectories of all the directories in the /usr/src hierarchy. If you don't have these CVS/ subdirectories you're probably trying to update with CVS a source tree that was created by CVSup. This won't work. * The cvs checkout command is run in the wrong path. The checkout (or `co') command of CVS will create the directory you're checking out as a subdirectory of the current path. So by running `cvs checkout src' in /tmp you'll create /tmp/src ... by running `cvs checkout src' in /usr/src you will get yourself `/usr/src/src' which is definitely wrong. The `cvs update' command, on the other hand, updates files starting with the current directory (unless told otherwise), so you'd have to be *INSIDE* /usr/src to update /usr/src. The difference is subtle but very important. * To fix the ``cannot write /home/ncvs/CVSROOT/val-tags'' message run cvs with the -R option. When running against a remote repository, cvs should be run with -R, IMHO. This way, it will consider the repository read-only and avoid attempting to write files within it. Remote repositories might also require you to `cvs login' first (if you haven't logged in at least once in the past). Bearing all this in mind, the correct sequence of commands to run in your case would be: a. If /usr/src is a checkout and not a CVSup-created directory: # cd /usr/src # export CVSROOT='anoncvs@anoncvs.FreeBSD.org:/home/ncvs' # cvs login: password for anoncvs@anoncvs.FreeBSD.org: # cvs -qR up -APd -I '!' -I CVS -rRELENG_4_10 2>&1 | \ tee /root/cvs-update.log Note the -R option to `cvs'. The extra -I options make sure that `cvs update' will ignore only the CVS subdirs of the paths it traverses. Any stale object files or other unrelated to FreeBSD files found in your source tree (i.e. your kernel configs) should show up as lines starting with "?". Useful to know if your source tree is clean. When the update is done you can skim through /root/cvs-update.log for the details you might have missed while it was running. b. If /usr/src is not a checkout but a CVSup-created directory: You'll have to backup your sources and do a real checkout. This is going to take a long time, since CVS is not so fast as CVSup; it also puts a great amount of load to the CVS server so you should be a bit patient when checking our large trees, like the entire src/. So you should first back up your existing /usr/src tree. # cd /usr # tar cvf - src | gzip -9c -> src.tar.gz # rm -fr src Then checkout: # export CVSROOT='anoncvs@anoncvs.FreeBSD.org:/home/ncvs' # cvs login: password for anoncvs@anoncvs.FreeBSD.org: # cvs -qR co -rRELENG_4_10 src 2>&1 | tee /root/cvs-checkout.log and look in `/root/cvs-checkout.log' for possible errors or anything that could be wrong. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040914011746.GA25812>