[cvsnt] Pitfall trapped after porting of CVS repository to CVSNT under UNIX

Jan Giesen jan.giesen at web.de
Sat Jan 14 12:23:37 GMT 2006


Hi,

three month ago we ported our CVS repositories from a Gnu-CVS server running
cvs 1.11p1 on HPUX to a CVSNT server running cvsnt 2.5.01.1976 on Redhat Linux
64 bit.

The port run rather smooth; the repositories has been ported by packing
them into a tar archive; therefore all file permissions are exactly
reconstructed on the Linux server.

Nevertheless we have encountered the following problem:
Scripts, which where checked-in under Gnu-CVS with "execute" permission
have lost this permission, when checked-out later under CVSNT. But this
permission was only lost, when the files as been tagged before on the CVSNT
server.

It turned out that the problem is caused by fact, that Gnu-CVS and CVSNT
store the UNIX permission in a different way in the Repository:
- CVSNT stores the permissions as parameter in the RCS file, but
- Gnu-CVS seems to map the permissions of freshly-checked-in file to
  the permissions of the corresponding RCS file in the repository.

Due to the "tag" operation, the CVSNT server has reset the original
permissions of the RCS file from e.g. "-r-xr-x---" to the default "-r--r--r"
and has written the tag to the RCS file, but has not created a permission
parameter in the RCS file. On the next check-out of the script, the execute
permission was therefore lost.
Interestingly CVSNT -like Gnu-CVS- seems to restore the execute permission
on check-out, if the RCS file in the repository has this permissions.
Therefore the problem was not visible for scripts, which has not been tagged.

The problem can be solved by restoring the execute permission manually in the sandbox
and carrying out a "forced commit" command: cvs ci -f. This command
stores then the permission parameter in the RCS file.

To avoid such problems, I propose two improvements:
1. It would be good, if CVSNT don't touch the execute bits of RCS files
   in the repository.
2. A hint should be added to the CVSNT FAQ, that it is wise to execute a
   forced commit on all files under CVS control, after a CVS repository is
   ported from Gnu-CVS to CVSNT.

Best regards
                 Jan Giesen

PS.: After we have investigated the problem, I detected, that the same problem
     were already reported to this list:
     http://www.cvsnt.org/pipermail/cvsnt/2005-August/020529.html





More information about the cvsnt mailing list