03-06-08 -------- Summary - DBIndex fix - Documentation - CVS lesson - Make lesson DBIndex fix ----------- Phil pointed out a problem in my first implementation of DBIndex where DBIndex information is only used in creating a series, and it was not stored in the database anywhere. This would prevent us from recreating a series based on the information we have in the DB. To fix this problem, I added a column, dbidx, in drms_series table to record this information, much like what we did with prime keys. For backward compatibility, both "Index" and "PrimeKeys" are accepted as valid for specifying prime keys. Fixed a bug reported by Rick when all three, "Index", "PrimeKeys", and "DBIndex", are missing. Documentation writing --------------------- Wrote doxygen documentation for the following modules and functions, modules: . create_series . delete_series . modify_series . masterlists . drms_log . drms_query . drms_server (only command-line stuff, internal to be added) functions . drms_open(), etc. CVS Lesson ---------- Experimented with lock up cvs from commit. Changing file permission in the cvs root directory will write as well as read. To allow make, we can move the locks out of the cvs root directory. /home/cvsuser/cvsroot/CVSROOT/config # Put CVS lock files in this directory rather than directly in the repository. #LockDir=/var/lock/cvs Say we uncomment the above line and create /var/lock/cvs with appropriate permission (writeable by group SOI). Now after you change all files to permission 755, people should still be able to check out but not commit anything. I did a quick test in my own mini cvs repository. The lock idea seems to work. After removing group write permission from the repository on a module, I can still check out that module, but can't commit anything. I got an error message like the following: cvs [commit aborted]: could not open lock file `/home-l5m5/tmp/cvstest/first/,hello,': Permission denied /home-l5m5/tmp/cvstest/ is my $CVSROOT first is my module name and hello is the only file in it. One thing I found out is that the file permission is only effective for all the file in the same directory. Any subdirectory can still be written into if write permission is not removed. In other words, we can't lock a whole cvs module by only removing write permission from the top level. I guess the only tricky thing is to make sure we don't lose the setuid bit for the repository directories. drwxrwsr-x 12 arta SOI 4096 Mar 5 11:32 JSOC/ Make lesson ----------- This problem with computed Make variable names came up again. http://www.gnu.org/software/make/manual/make.html#Computed-Names Appearantly such computed names do not expand on the command potion of a rule.