Index: openacs-4/packages/acs-core-docs/www/cvs-tips.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-tips.html,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 5 May 2004 12:36:03 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 11 Jun 2004 10:17:37 -0000 1.20 @@ -1,62 +1,62 @@ -Appendix�D.�Using CVS with an OpenACS Site

Appendix�D.�Using CVS with an OpenACS Site

By Joel Aufrecht

+Appendix�D.�Using CVS with an OpenACS Site

Appendix�D.�Using CVS with an OpenACS Site

By Joel Aufrecht

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Add the Service to CVS - OPTIONAL.�These steps take an existing OpenACS directory and add +

Add the Service to CVS - OPTIONAL.�These steps take an existing OpenACS directory and add it to a CVS - repository.

  1. Create and set permissions on a subdirectory in the local cvs repository.

    [root root]# mkdir /cvsroot/service0
    -[root root]# chown service0.service0 /cvsroot/service0
    +          repository.

    1. Create and set permissions on a subdirectory in the local cvs repository.

      [root root]# mkdir /cvsroot/$OPENACS_SERVICE_NAME
      +[root root]# chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
       [root root]#
      -mkdir /cvsroot/service0
      -chown service0.service0 /cvsroot/service0
    2. Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc.

      [root root]# su - service0
      -[service0 service0]$ emacs .bashrc

      Put this string into /home/service0/.bashrc:

      export CVSROOT=/cvsroot
      [service0 service0]$ exit
      +mkdir /cvsroot/$OPENACS_SERVICE_NAME
      +chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
    3. Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc.

      [root root]# su - $OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ emacs .bashrc

      Put this string into /home/$OPENACS_SERVICE_NAME/.bashrc:

      export CVSROOT=/cvsroot
      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
       logout
       
       [root root]#
    4. Import all files into cvs. In order to work on files with source control, the files must be checked out from cvs. So we will import, move aside, and then check out all of the files. In the cvs import command, - service0 + $OPENACS_SERVICE_NAME refers to the cvs repository to use; it uses the CVSROOT plus this string, i.e. - /cvsroot/service0. + /cvsroot/$OPENACS_SERVICE_NAME. "OpenACS" is the vendor tag, and "HEAD" is the release tag. These tags will be useful in upgrading and - branching. -m sets the version comment.

      [root root]# su - service0
      -[service0 service0]$ cd /var/lib/aolserver/service0
      -[service0 service0]$ cvs import -m "initial install" service0 OpenACS HEAD
      -N service0/license.txt
      -N service0/readme.txt
      +            branching.  -m sets the version comment.

      [root root]# su - $OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs import -m "initial install" $OPENACS_SERVICE_NAME OpenACS HEAD
      +N $OPENACS_SERVICE_NAME/license.txt
      +N $OPENACS_SERVICE_NAME/readme.txt
       (many lines omitted)
      -N service0/www/SYSTEM/flush-memoized-statement.tcl
      +N $OPENACS_SERVICE_NAME/www/SYSTEM/flush-memoized-statement.tcl
       
       No conflicts created by this import
       
      -[service0 service0]$ exit
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
       [root root]#
      -su - service0
      -cd /var/lib/aolserver/service0
      -cvs import -m "initial install" service0 OpenACS HEAD
      -exit

      Move the original directory to a temporary location, and check out the cvs repository in its place.

      [root root]# mv /var/lib/aolserver/service0 /var/tmp
      -[root root]# mkdir /var/lib/aolserver/service0
      -[root root]# chown service0.service0 /var/lib/aolserver/service0
      -[root root]# su - service0
      -[service0 service0]$ cd /var/lib/aolserver
      -[service0 aolserver]$ cvs checkout service0
      -cvs checkout: Updating service0
      -U service0/license.txt
      +su - $OPENACS_SERVICE_NAME
      +cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +cvs import -m "initial install" $OPENACS_SERVICE_NAME OpenACS HEAD
      +exit

      Move the original directory to a temporary location, and check out the cvs repository in its place.

      [root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME /var/tmp
      +[root root]# mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +[root root]# chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +[root root]# su - $OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
      +[$OPENACS_SERVICE_NAME aolserver]$ cvs checkout $OPENACS_SERVICE_NAME
      +cvs checkout: Updating $OPENACS_SERVICE_NAME
      +U $OPENACS_SERVICE_NAME/license.txt
       (many lines omitted)
      -U service0/www/SYSTEM/dbtest.tcl
      -U service0/www/SYSTEM/flush-memoized-statement.tcl
      -[service0 aolserver]$ exit
      +U $OPENACS_SERVICE_NAME/www/SYSTEM/dbtest.tcl
      +U $OPENACS_SERVICE_NAME/www/SYSTEM/flush-memoized-statement.tcl
      +[$OPENACS_SERVICE_NAME aolserver]$ exit
       logout
       
       [root root]#
       
      -mv /var/lib/aolserver/service0 /var/tmp
      -mkdir /var/lib/aolserver/service0
      -chown service0.service0 /var/lib/aolserver/service0
      -su - service0
      +mv /var/lib/aolserver/$OPENACS_SERVICE_NAME /var/tmp
      +mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +su - $OPENACS_SERVICE_NAME
       cd /var/lib/aolserver
      -cvs checkout service0
      +cvs checkout $OPENACS_SERVICE_NAME
       exit
    5. If the service starts correctly, come back and remove the temporary copy of the uploaded files.

View comments on this page at openacs.org