Index: openacs-4/packages/acs-core-docs/www/acs-admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-admin.html,v diff -u -r1.41.2.2 -r1.41.2.3 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 12 Dec 2010 00:07:01 -0000 1.41.2.2 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 12 Dec 2010 01:37:24 -0000 1.41.2.3 @@ -1,7 +1,2 @@ -<<<<<<< acs-admin.html - -Part II. Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 4
Install OpenACS 5.6.0
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
Installing OpenACS packages
Mounting OpenACS packages
Configuring an OpenACS package
Setting Permissions on an OpenACS package
How Do I?
5. Upgrading
Overview
Upgrading 4.5 or higher to 4.6.3
Upgrading OpenACS 4.6.3 to 5.0
Upgrading an OpenACS 5.0.0 or greater installation
Upgrading the OpenACS files
Upgrading Platform components
6. Production Environments
Starting and Stopping an OpenACS instance.
AOLserver keepalive with inittab
Running multiple services on one machine
High Availability/High Performance Configurations
Staged Deployment for Production Networks
Installing SSL Support for an OpenACS service
Set up Log Analysis Reports
External uptime validation
Diagnosing Performance Problems
7. Database Management
Running a PostgreSQL database on another server
Deleting a tablespace
Vacuum Postgres nightly
8. Backup and Recovery
Backup Strategy
Manual backup and recovery
Automated Backup
Using CVS for backup-recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search using Tsearch2
Install Full Text Search using OpenFTS (deprecated see tsearch2)
Install nsopenssl
Install tclwebtest.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
Install PAM Radius for use as external authentication
Install LDAP for use as external authentication
Install AOLserver 3.3oacs1
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
-======= -Part II. Administrator's Guide

Part II. Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 4
Install OpenACS 5.6.0
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
Installing OpenACS packages
Mounting OpenACS packages
Configuring an OpenACS package
Setting Permissions on an OpenACS package
How Do I?
5. Upgrading
Overview
Upgrading 4.5 or higher to 4.6.3
Upgrading OpenACS 4.6.3 to 5.0
Upgrading an OpenACS 5.0.0 or greater installation
Upgrading the OpenACS files
Upgrading Platform components
6. Production Environments
Starting and Stopping an OpenACS instance.
AOLserver keepalive with inittab
Running multiple services on one machine
High Availability/High Performance Configurations
Staged Deployment for Production Networks
Installing SSL Support for an OpenACS service
Set up Log Analysis Reports
External uptime validation
Diagnosing Performance Problems
7. Database Management
Running a PostgreSQL database on another server
Deleting a tablespace
Vacuum Postgres nightly
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search using Tsearch2
Install Full Text Search using OpenFTS (deprecated see tsearch2)
Install nsopenssl
Install tclwebtest.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
Install PAM Radius for use as external authentication
Install LDAP for use as external authentication
Install AOLserver 3.3oacs1
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
Section missing
View comments on this page at openacs.org
->>>>>>> 1.43 +Part II. Administrator's Guide

Part II. Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 4
Install OpenACS 5.6.0
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
Installing OpenACS packages
Mounting OpenACS packages
Configuring an OpenACS package
Setting Permissions on an OpenACS package
How Do I?
5. Upgrading
Overview
Upgrading 4.5 or higher to 4.6.3
Upgrading OpenACS 4.6.3 to 5.0
Upgrading an OpenACS 5.0.0 or greater installation
Upgrading the OpenACS files
Upgrading Platform components
6. Production Environments
Starting and Stopping an OpenACS instance.
AOLserver keepalive with inittab
Running multiple services on one machine
High Availability/High Performance Configurations
Staged Deployment for Production Networks
Installing SSL Support for an OpenACS service
Set up Log Analysis Reports
External uptime validation
Diagnosing Performance Problems
7. Database Management
Running a PostgreSQL database on another server
Deleting a tablespace
Vacuum Postgres nightly
8. Backup and Recovery
Backup Strategy
Manual backup and recovery
Automated Backup
Using CVS for backup-recovery
A. Install Red Hat 8/9
B. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
Section missing
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-package-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-package-dev.html,v diff -u -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/acs-core-docs/www/acs-package-dev.html 12 Dec 2010 00:07:01 -0000 1.29.2.2 +++ openacs-4/packages/acs-core-docs/www/acs-package-dev.html 12 Dec 2010 01:37:24 -0000 1.29.2.3 @@ -1,11 +1,5 @@ -<<<<<<< acs-package-dev.html - -Part III. For OpenACS Package Developers

For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. -

Table of Contents

9. Development Tutorial
Creating an Application Package
Setting Up Database Objects
Creating Web Pages
Debugging and Automated Testing
10. Advanced Topics
Write the Requirements and Design Specs
Add the new package to CVS
OpenACS Edit This Page Templates
Adding Comments
Admin Pages
Categories
Profile your code
Prepare the package for distribution.
Distributing upgrades of your package
Notifications
Hierarchical data
Using .vuh files for pretty urls
Laying out a page with CSS instead of tables
Sending HTML email from your application
Basic Caching
Scheduled Procedures
Enabling WYSIWYG
Adding in parameters for your package
Writing upgrade scripts
Connect to a second database
Future Topics
11. Development Reference
OpenACS Packages
OpenACS Data Models and the Object System
The Request Processor
The OpenACS Database Access API
Using Templates in OpenACS
Groups, Context, Permissions
Writing OpenACS Application Pages
Parties in OpenACS
OpenACS Permissions Tediously Explained
Object Identity
Programming with AOLserver
Using Form Builder: building html forms dynamically
12. Engineering Standards
OpenACS Style Guide
Release Version Numbering
Constraint naming standard
ACS File Naming and Formatting Standards
PL/SQL Standards
Variables
Automated Testing
13. Documentation Standards
OpenACS Documentation Guide
Using PSGML mode in Emacs
Using nXML mode in Emacs
Detailed Design Documentation Template
System/Application Requirements Template
14. Internationalization
Internationalization and Localization Overview
How Internationalization/Localization works in OpenACS
How to Internationalize a Package
Design Notes
Translator's Guide
CVS Section missing
View comments on this page at openacs.org
-======= -Part III. For OpenACS Package Developers

Part III. For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. -

Table of Contents

8. Development Tutorial
Creating an Application Package
Setting Up Database Objects
Creating Web Pages
Debugging and Automated Testing
9. Advanced Topics
Write the Requirements and Design Specs
Add the new package to CVS
OpenACS Edit This Page Templates
Adding Comments
Admin Pages
Categories
Profile your code
Prepare the package for distribution.
Distributing upgrades of your package
Notifications
Hierarchical data
Using .vuh files for pretty urls
Laying out a page with CSS instead of tables
Sending HTML email from your application
Basic Caching
Scheduled Procedures
Enabling WYSIWYG
Adding in parameters for your package
Writing upgrade scripts
Connect to a second database
Future Topics
10. Development Reference
OpenACS Packages
OpenACS Data Models and the Object System
The Request Processor
The OpenACS Database Access API
Using Templates in OpenACS
Groups, Context, Permissions
Writing OpenACS Application Pages
Parties in OpenACS
Object Identity
Programming with AOLserver
Using Form Builder: building html forms dynamically
11. Engineering Standards
OpenACS Style Guide
+Part III. For OpenACS Package Developers

Part III. For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. +

Table of Contents

9. Development Tutorial
Creating an Application Package
Setting Up Database Objects
Creating Web Pages
Debugging and Automated Testing
10. Advanced Topics
Write the Requirements and Design Specs
Add the new package to CVS
OpenACS Edit This Page Templates
Adding Comments
Admin Pages
Categories
Profile your code
Prepare the package for distribution.
Distributing upgrades of your package
Notifications
Hierarchical data
Using .vuh files for pretty urls
Laying out a page with CSS instead of tables
Sending HTML email from your application
Basic Caching
Scheduled Procedures
Enabling WYSIWYG
Adding in parameters for your package
Writing upgrade scripts
Connect to a second database
Future Topics
11. Development Reference
OpenACS Packages
OpenACS Data Models and the Object System
The Request Processor
The OpenACS Database Access API
Using Templates in OpenACS
Groups, Context, Permissions
Writing OpenACS Application Pages
Parties in OpenACS
OpenACS Permissions Tediously Explained
Object Identity
Using Form Builder: building html forms dynamically
12. Engineering Standards
OpenACS Style Guide
CVS Guidelines -
Release Version Numbering
Constraint naming standard
ACS File Naming and Formatting Standards
PL/SQL Standards
Variables
Automated Testing
12. Documentation Standards
OpenACS Documentation Guide
Using PSGML mode in Emacs
Using nXML mode in Emacs
System/Application Requirements Template
13. Internationalization
Internationalization and Localization Overview
How Internationalization/Localization works in OpenACS
How to Internationalize a Package
Design Notes
Translator's Guide
D. Using CVS with an OpenACS Site
View comments on this page at openacs.org
->>>>>>> 1.31 +
Release Version Numbering
Constraint naming standard
ACS File Naming and Formatting Standards
PL/SQL Standards
Variables
Automated Testing
13. Documentation Standards
OpenACS Documentation Guide
Using PSGML mode in Emacs
Using nXML mode in Emacs
Detailed Design Documentation Template
System/Application Requirements Template
14. Internationalization
Internationalization and Localization Overview
How Internationalization/Localization works in OpenACS
How to Internationalize a Package
Design Notes
Translator's Guide
C. Using CVS with an OpenACS Site
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-plat-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-plat-dev.html,v diff -u -r1.27.2.2 -r1.27.2.3 --- openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 12 Dec 2010 00:07:01 -0000 1.27.2.2 +++ openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 12 Dec 2010 01:37:24 -0000 1.27.2.3 @@ -1,7 +1,2 @@ -<<<<<<< acs-plat-dev.html - -Part IV. For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

15. Kernel Documentation
Overview
Object Model Requirements
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Security Requirements
Security Design
Security Notes
Request Processor Requirements
Request Processor Design
Bootstrapping OpenACS
External Authentication Requirements
16. Releasing OpenACS
OpenACS Core and .LRN
How to Update the OpenACS.org repository
How to package and release an OpenACS Package
How to Update the translations
View comments on this page at openacs.org
-======= -Part IV. For OpenACS Platform Developers

Part IV. For OpenACS Platform Developers

Table of Contents

14. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Security Requirements
Security Design
Security Notes
Request Processor Requirements
Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
15. Releasing OpenACS
OpenACS Core and .LRN
How to Update the OpenACS.org repository
How to package and release an OpenACS Package
How to Update the translations
View comments on this page at openacs.org
->>>>>>> 1.29 +Part IV. For OpenACS Platform Developers

Part IV. For OpenACS Platform Developers

Table of Contents

15. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Security Requirements
Security Design
Security Notes
Request Processor Requirements
Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
16. Releasing OpenACS
OpenACS Core and .LRN
How to Update the OpenACS.org repository
How to package and release an OpenACS Package
How to Update the translations
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/analog-setup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/analog-setup.html,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/acs-core-docs/www/analog-setup.html 12 Dec 2010 00:07:02 -0000 1.12.2.1 +++ openacs-4/packages/acs-core-docs/www/analog-setup.html 12 Dec 2010 01:37:24 -0000 1.12.2.2 @@ -1,7 +1,7 @@ Set up Log Analysis Reports

Set up Log Analysis Reports

Analog is a program with processes webserver access logs, performs DNS lookup, and outputs HTML reports. Analog should - already be + already be installed. A modified configuration file is included in the OpenACS tarball.

  1. [root src]# su - $OPENACS_SERVICE_NAME
     [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
    Index: openacs-4/packages/acs-core-docs/www/aolserver4.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver4.html,v
    diff -u -r1.23.2.2 -r1.23.2.3
    --- openacs-4/packages/acs-core-docs/www/aolserver4.html	12 Dec 2010 00:07:02 -0000	1.23.2.2
    +++ openacs-4/packages/acs-core-docs/www/aolserver4.html	12 Dec 2010 01:37:24 -0000	1.23.2.3
    @@ -1,10 +1,5 @@
    -<<<<<<< aolserver4.html
    -
    -Install AOLserver 4

    Install AOLserver 4

    by Malte Sussdorff

    -======= Install AOLserver 4

    Install AOLserver 4

    by Malte Sussdorff

    ->>>>>>> 1.25 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    1. Check suitability of previously installed TCL. Start tcl (type tclsh or find it using which tclsh). @@ -104,34 +99,17 @@ OpenACS code, but don't forget to come back. (Note to maintainers: this should be moved to the next page and integrated into the text there) -<<<<<<< aolserver4.html -

      • Oracle

        [root aolserver]# cd /usr/local/aolserver/bin
        -[root bin]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
        -[root bin]# chmod 750 nsd-oracle
        -=======
             

        • Oracle

          [root aolserver]# cd /usr/local/aolserver/bin
           [root bin]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
           [root bin]# chmod 750 nsd-oracle
          ->>>>>>> 1.25
           [root bin]#
           cd /usr/local/aolserver/bin
          -<<<<<<< aolserver4.html
           cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
          -chmod 750 nsd-oracle
        • PostgreSQL

          [root aolserver]# cd /usr/local/aolserver/bin
          -[root bin]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
          -[root bin]# chmod 755 nsd-postgres
          -=======
          -cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
           chmod 750 nsd-oracle
        • PostgreSQL

          [root aolserver]# cd /usr/local/aolserver/bin
           [root bin]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
           [root bin]# chmod 755 nsd-postgres
          ->>>>>>> 1.25
           [root bin]#
           cd /usr/local/aolserver/bin
           cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
           chmod 755 nsd-postgres

        You may need to edit these scripts if you are not using -<<<<<<< aolserver4.html - /usr/local/aolserver as the directory of Aolserver4.

      • Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

      • Test AOLserver.

    ($Id$)
    View comments on this page at openacs.org
    -======= - /usr/local/aolserver as the directory of Aolserver4.

  2. Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

  3. Test AOLserver.

($Id$)
View comments on this page at openacs.org
->>>>>>> 1.25 + /usr/local/aolserver as the directory of Aolserver4.

  • Change startup script (optional). If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

  • Test AOLserver.

  • ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/apm-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-design.html,v diff -u -r1.36.2.2 -r1.36.2.3 --- openacs-4/packages/acs-core-docs/www/apm-design.html 12 Dec 2010 00:07:02 -0000 1.36.2.2 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 12 Dec 2010 01:37:24 -0000 1.36.2.3 @@ -1,10 +1,5 @@ -<<<<<<< apm-design.html - -Package Manager Design

    Package Manager Design

    By Bryan Quinn

    -======= -Package Manager Design

    Package Manager Design

    By Bryan Quinn

    ->>>>>>> 1.38 +Package Manager Design

    Package Manager Design

    By Bryan Quinn

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

    Essentials

    Authors

    • System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd -Nightingale.

    • System owner: Bryan Quinn

    • Documentation author: Bryan Quinn, building from earlier versions by Jon -Salz, Michael Yoon, and Lars Pind.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/25/2000Bryan Quinn
    0.8Ready for QA9/29/2000Bryan Quinn
    0.9Edited for ACS 4 Beta release10/02/2000Kai Wu
    1.0Edited for OpenACS 4.5 Beta release03/02/2002Roberto Mello
    View comments on this page at openacs.org
    -======= usability perspective.

    Authors

    • System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd Nightingale.

    • System owner: Bryan Quinn

    • Documentation author: Bryan Quinn, building from earlier versions by Jon Salz, Michael Yoon, and Lars Pind.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/25/2000Bryan Quinn
    0.8Ready for QA9/29/2000Bryan Quinn
    0.9Edited for ACS 4 Beta release10/02/2000Kai Wu
    1.0Edited for OpenACS 4.5 Beta release03/02/2002Roberto Mello
    View comments on this page at openacs.org
    ->>>>>>> 1.38 Index: openacs-4/packages/acs-core-docs/www/apm-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-requirements.html,v diff -u -r1.32.2.2 -r1.32.2.3 --- openacs-4/packages/acs-core-docs/www/apm-requirements.html 12 Dec 2010 00:07:02 -0000 1.32.2.2 +++ openacs-4/packages/acs-core-docs/www/apm-requirements.html 12 Dec 2010 01:37:24 -0000 1.32.2.3 @@ -1,10 +1,5 @@ -<<<<<<< apm-requirements.html - -Package Manager Requirements

    Package Manager Requirements

    By Bryan Quinn and Todd Nightingale

    -======= -Package Manager Requirements

    Package Manager Requirements

    By Bryan Quinn and Todd Nightingale

    ->>>>>>> 1.34 +Package Manager Requirements

    Package Manager Requirements

    By Bryan Quinn and Todd Nightingale

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

    Introduction

    The following is a requirements document for the OpenACS Package Manager Index: openacs-4/packages/acs-core-docs/www/automated-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-backup.html,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/acs-core-docs/www/automated-backup.html 18 Jun 2010 21:29:34 -0000 1.10.2.1 +++ openacs-4/packages/acs-core-docs/www/automated-backup.html 12 Dec 2010 01:37:24 -0000 1.10.2.2 @@ -1,4 +1,4 @@ - -Automated Backup

    Automated Backup

    The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup and then backs up all of /var/lib/aolserver/$OPENACS_SERVICE_NAME to a single zip file, and then copies that zip file to another computer.

    1. Make sure that the manual backup process described above works.

    2. Customize the default backup script. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh with your specific parameters.

    3. - Make sure the file is executable:

      chmod +x backup.sh
    4. - Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e.) This example runs the backup script at 1:30 am every day.

      30 1 * * *        sh /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
    View comments on this page at openacs.org
    + +Automated Backup

    Automated Backup

    The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup and then backs up all of /var/lib/aolserver/$OPENACS_SERVICE_NAME to a single zip file, and then copies that zip file to another computer.

    1. Make sure that the manual backup process described above works.

    2. Customize the default backup script. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh with your specific parameters.

    3. + Make sure the file is executable:

      chmod +x backup.sh
    4. + Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e.) This example runs the backup script at 1:30 am every day.

      30 1 * * *        sh /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html,v diff -u -r1.24.2.2 -r1.24.2.3 --- openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 12 Dec 2010 00:07:02 -0000 1.24.2.2 +++ openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 12 Dec 2010 01:37:24 -0000 1.24.2.3 @@ -1,10 +1,5 @@ -<<<<<<< automated-testing-best-practices.html - -Automated Testing

    Automated Testing

    By Jeff Davis

    -======= -Automated Testing

    Automated Testing

    By Jeff Davis

    ->>>>>>> 1.26 +Automated Testing

    Automated Testing

    By Jeff Davis

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

    Best practices in writing OpenACS automated tests

    • Special characters in Tcl.  @@ -30,8 +25,4 @@ Make sure that if a duplicate name is entered that there is a reasonable error rather than a server error. Check for insert, move, copy, and rename. -<<<<<<< automated-testing-best-practices.html

    ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.26 Index: openacs-4/packages/acs-core-docs/www/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -r1.40.2.2 -r1.40.2.3 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 12 Dec 2010 00:07:02 -0000 1.40.2.2 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 12 Dec 2010 01:37:24 -0000 1.40.2.3 @@ -1,18 +1,12 @@ -<<<<<<< backup-recovery.html - -Chapter 8. Backup and Recovery

    Chapter 8. Backup and Recovery

    ($Id$)

    By Don Baccus with additions - by Joel Aufrecht

    We will cover some basic backup and recovery strategies. These are intended to -======= - -Chapter 8. Backup and Recovery

    Chapter 8. Backup and Recovery

    ($Id$)

    By Don Baccus with additions - by Joel Aufrecht

    We will cover some basic backup and recovery strategies. These are intended to ->>>>>>> 1.41 + +Chapter 8. Backup and Recovery

    Chapter 8. Backup and Recovery

    ($Id$)

    By Don Baccus with additions + by Joel Aufrecht

    We will cover some basic backup and recovery strategies. These are intended to be robust but simple enough to set up. For a large scale production site you would probably need to create your own backup strategies (in particular full dumps from oracle, while easy to set up, are far from the best solution).

    There are three basic things which need to be backed up, the database data, the server source tree, and the acs-content-repository (which is in the server source tree).

    -

    Figure 8.1. Backup and Recovery Strategy

    Backup and Recovery Strategy

    +

    Figure 8.1. Backup and Recovery Strategy

    Backup and Recovery Strategy


    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/backups-with-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backups-with-cvs.html,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/acs-core-docs/www/backups-with-cvs.html 18 Jun 2010 21:29:34 -0000 1.10.2.1 +++ openacs-4/packages/acs-core-docs/www/backups-with-cvs.html 12 Dec 2010 01:37:24 -0000 1.10.2.2 @@ -1,31 +1,31 @@ - -Using CVS for backup-recovery

    Using CVS for backup-recovery

    CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't + +Using CVS for backup-recovery

    Using CVS for backup-recovery

    CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't need to do anything to back up your files. Just make sure that your current work is checked into the system. You can then roll back based on date - note the current system time, down to the minute. For maximum safety, you can apply a tag to your current - files. You will still need to back up your database.

    Note that, if you did the CVS options in this document, the /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc directory is not included in cvs and you may want to add it.

    [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 commit -m "last-minute commits before upgrade to 4.6"
    +      files.  You will still need to back up your database.

    Note that, if you did the CVS options in this document, the /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc directory is not included in cvs and you may want to add it.

    [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 commit -m "last-minute commits before upgrade to 4.6"
     cvs commit: Examining .
     cvs commit: Examining bin
     (many lines omitted)
    -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs tag before_upgrade_to_4_6
    +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs tag before_upgrade_to_4_6
     cvs server: Tagging bin
     T bin/acs-4-0-publish.sh
     T bin/ad-context-server.pl
     (many lines omitted)
    -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
    +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
     [root root]# 
     su - $OPENACS_SERVICE_NAME
     cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
    -cvs commit -m "last-minute commits before upgrade to 4.6"
    +cvs commit -m "last-minute commits before upgrade to 4.6"
     cvs tag before_upgrade_to_4_6
    -exit

    To restore files from a cvs tag such as the one used above:

    [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 up -r current
    -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
    +exit

    To restore files from a cvs tag such as the one used above:

    [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 up -r current
    +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
     su - $OPENACS_SERVICE_NAME
     cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
     cvs up -r current
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/bootstrap-acs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< bootstrap-acs.html - -Bootstrapping OpenACS

    Bootstrapping OpenACS

    By Jon Salz

    -======= -Bootstrapping OpenACS

    Bootstrapping OpenACS

    By Jon Salz

    ->>>>>>> 1.47 +Bootstrapping OpenACS

    Bootstrapping OpenACS

    By Jon Salz

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    • Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl

    This document describes the startup (bootstrapping) process for an AOLserver @@ -91,8 +86,4 @@ At this point, bootstrap.tcl is done executing. AOLserver proceeds to source the remaining files in the /tcl directory (i.e., unpackaged libraries) and begins listening for connections. -<<<<<<< bootstrap-acs.html -

    ($Id$)
    View comments on this page at openacs.org
    -=======

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/complete-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/complete-install.html,v diff -u -r1.21.2.2 -r1.21.2.3 --- openacs-4/packages/acs-core-docs/www/complete-install.html 12 Dec 2010 00:07:02 -0000 1.21.2.2 +++ openacs-4/packages/acs-core-docs/www/complete-install.html 12 Dec 2010 01:37:24 -0000 1.21.2.3 @@ -1,7 +1,2 @@ -<<<<<<< complete-install.html - -Chapter 3. Complete Installation
    View comments on this page at openacs.org
    -======= Chapter 3. Complete Installation
    View comments on this page at openacs.org
    ->>>>>>> 1.23 Index: openacs-4/packages/acs-core-docs/www/configuring-configuring-packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-configuring-packages.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-configuring-packages.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-configuring-packages.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@ Configuring an OpenACS package

    Configuring an OpenACS package

    by Jade Rubick

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

    Configuring an OpenACS package

    After you've installed and mounted your package, you can -======= -

    Configuring an OpenACS package

    After you've installed and mounted your package, you can ->>>>>>> 1.8 +

    Configuring an OpenACS package

    After you've installed and mounted your package, you can configure each instance to act as you would like.

    This is done from the Applications page. Log in, go to the Admin or Control Panel, click on the subsite the application is in, and click on Applications. If you click on the 'Parameters' Index: openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-configuring-permissions.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@ Setting Permissions on an OpenACS package

    Setting Permissions on an OpenACS package

    by Jade Rubick

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

    Setting Permission on an OpenACS package

    After you've installed and mounted your package, you can -======= -

    Setting Permission on an OpenACS package

    After you've installed and mounted your package, you can ->>>>>>> 1.8 +

    Setting Permission on an OpenACS package

    After you've installed and mounted your package, you can configure each instance to act as you would like.

    This is done from the Applications page. Log in, go to the Admin or Control Panel, click on the subsite the application is in, and click on Applications. If you click on the 'Permissions' Index: openacs-4/packages/acs-core-docs/www/configuring-install-packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-install-packages.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-install-packages.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-install-packages.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@ Installing OpenACS packages

    Installing OpenACS packages

    by Jade Rubick

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-install-packages.html -

    Installing OpenACS packages

    An OpenACS package extends your website and lets it do -======= -

    Installing OpenACS packages

    An OpenACS package extends your website and lets it do ->>>>>>> 1.8 +

    Installing OpenACS packages

    An OpenACS package extends your website and lets it do things it wasn't able to do before. You can have a weblog, a forums, a calendar, or even do sophisticated project-management via your website.

    After you've installed OpenACS, you can congratulate Index: openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html 12 Dec 2010 00:07:02 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/configuring-mounting-packages.html 12 Dec 2010 01:37:24 -0000 1.6.2.3 @@ -2,11 +2,7 @@ Mounting OpenACS packages

    Mounting OpenACS packages

    by Jade Rubick

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< configuring-mounting-packages.html -

    Mounting OpenACS packages

    After you've installed your packages, you have to 'mount' -======= -

    Mounting OpenACS packages

    After you've installed your packages, you have to 'mount' ->>>>>>> 1.8 +

    Mounting OpenACS packages

    After you've installed your packages, you have to 'mount' them in order to make them appear on your website.

    Make sure you are logged in, and then click on the 'Admin' or 'Control Panel' link to get to the Site-Wide Administration page (at /acs-admin). Click on the subsite you'd Index: openacs-4/packages/acs-core-docs/www/credits.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/credits.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/credits.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/credits.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,5 +1,5 @@ -Appendix C. Credits

    Appendix C. Credits

    By Vinod Kurup

    +Appendix B. Credits

    Appendix B. Credits

    By Vinod Kurup

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

    Vinod Kurup put @@ -31,12 +31,6 @@ Fred Yankowski, Dan Chak, Sebastiano Pilla, Reuven Lerner, Malte Sussdorff, Stan Kaufman and Pascal Scheffers.

    -<<<<<<< credits.html - All questions and comments regarding - this guide should be posted on the OpenACS forums. -

    ($Id$)
    View comments on this page at openacs.org
    -======= All questions and comments regarding this guide should be posted on the OpenACS forums. -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.45 +

    ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/cvs-guidelines.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-guidelines.html,v diff -u -r1.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/cvs-guidelines.html 12 Dec 2010 00:07:02 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/cvs-guidelines.html 12 Dec 2010 01:37:24 -0000 1.7.2.2 @@ -1,12 +1,12 @@ -CVS Guidelines

    +CVS Guidelines

    CVS Guidelines

    ($Id$)

    By Joel Aufrecht with input from Jeff Davis, Branimir Dolicki, and Jade Rubick.

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

    Using CVS with OpenACS

    Getting Started

    +

    Using CVS with OpenACS

    Getting Started

    All OpenACS code is available anonymously. To get code anonymously, use the parameter -d:pserver:anonymous@cvs.openacs.org:/cvsroot immediately after cvs in a cvs command to check out or export code. @@ -51,7 +51,7 @@ cd CVSROOT emacs avail

    Add an avail line of the form:

    avail|username|openacs-4
    cvs commit -m "added commit on X for username" avail

    Checkout for Package Development

    If you are actively developing a non-core package, you + User yournamehere

    into your ~/.ssh/config file, then you can use -d :ext:cvs-server:/cvsroot instead of -d :ext:cvs.openacs.org:/cvsroot. You can then change the definition of cvs-server by changing one file instead of editing hundreds of CVSROOT/Repository files.

    Checkout for Package Development

    If you are actively developing a non-core package, you should work from the latest core release branch. Currently this is oacs-5-6. This ensures that you are working on top of a stable OpenACS core, but still allows you to commit feature @@ -66,13 +66,13 @@ Inventory and Package maintainers and status for a list of available packages and their current state. -

    Checkout for Core Development

    If you are actively developing packages in the OpenACS +

    Checkout for Core Development

    If you are actively developing packages in the OpenACS Core, work from the HEAD branch. HEAD is used for active development of the next version of core OpenACS. It may be very buggy; it may not even install correctly. Do not use this branch for development of non-core features unless your work depends on some of the HEAD core work. To check out HEAD, omit the - -r tag.

    To check out HEAD for development, which requires an OpenACS developer account:

    cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core

    To check out HEAD anonymously:

    cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot checkout acs-core

    Checkout .LRN

    + -r tag.

    To check out HEAD for development, which requires an OpenACS developer account:

    cvs -d:ext:cvs.openacs.org:/cvsroot checkout acs-core

    To check out HEAD anonymously:

    cvs -d:pserver:anonymous@cvs.openacs.org:/cvsroot checkout acs-core

    Checkout .LRN

    .LRN consists of a given version openacs core, plus a set of packages. These are collectively packages together to form a distrubution of .LRN. F .LRN 2.0.0 sits on top of OpenACS 5.0.0. @@ -87,7 +87,7 @@ mv dotlrn/install.xml ..

    Working with CVS

    Once you have a checkout you can use some commands to track what has changed since you checked out your copy. cvs -n update does not change any files, but reports which changes have been updated or locally modified, or are not present in CVS. -

    To update your files, use cvs update. This will merge changes from the repository with your local files. It has no effect on the cvs.openacs.org repository.

    OpenACS CVS Concepts

    Modules

    +

    To update your files, use cvs update. This will merge changes from the repository with your local files. It has no effect on the cvs.openacs.org repository.

    OpenACS CVS Concepts

    Modules

    All OpenACS code resides within a single CVS module, openacs-4. (The openacs-4 directory contains code for all versions of OpenACS 4 and later, and .LRN 1 and later.) Checking out this module retrieves all openacs code of any type. For convenience, subsets of openacs-4 are repackaged as smaller modules.

    acs-core contains only critical common packages. It does not have any user applications, such as forums, @@ -115,7 +115,7 @@ project-manager-all contains the packages required, in combination with acs-core, to run the project-manager package.

    Each OpenACS package (i.e., directory in openacs-4/packages/) is also aliased as a module of the same name. -

    +

    Tags and Branches

    Tags and Branches look similar in commands, but behave differently. A tag is a fixed point on a branch. Check out @@ -315,7 +315,7 @@ flag which defaults to no-effect wouldn't require a TIP. Added a new mandatory flag to an existing function would require a TIP. -

    +

    Informal Guidelines

    Informal guidelines which may be obsolete in places and should be reviewed: 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.31.2.1 -r1.31.2.2 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 12 Dec 2010 00:07:02 -0000 1.31.2.1 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 12 Dec 2010 01:37:24 -0000 1.31.2.2 @@ -1,9 +1,9 @@ -Appendix D. Using CVS with an OpenACS Site

    Appendix D. Using CVS with an OpenACS Site

    By Joel Aufrecht

    +Appendix C. Using CVS with an OpenACS Site

    Appendix C. 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 - it to a CVS +

    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/$OPENACS_SERVICE_NAME
       [root root]# chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
       [root root]#
      Index: openacs-4/packages/acs-core-docs/www/db-api-detailed.html
      ===================================================================
      RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api-detailed.html,v
      diff -u -r1.44.2.2 -r1.44.2.3
      --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html	12 Dec 2010 00:07:02 -0000	1.44.2.2
      +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html	12 Dec 2010 01:37:24 -0000	1.44.2.3
      @@ -1,29 +1,24 @@
      -<<<<<<< db-api-detailed.html
      -
      -Database Access API

      Database Access API

      By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

      -======= -Database Access API

      Database Access API

      By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

      ->>>>>>> 1.46 +Database Access API

      Database Access API

      By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
      • Tcl procedures: /packages/acs-kernel/10-database-procs.tcl

      • Tcl initialization: /packages/acs-kernel/database-init.tcl

      The Big Picture

      +

      • Tcl procedures: /packages/acs-kernel/10-database-procs.tcl

      • Tcl initialization: /packages/acs-kernel/database-init.tcl

      The Big Picture

      One of OpenACS's great strengths is that code written for it is very close to the database. It is very easy to interact with the database from anywhere within OpenACS. Our goal is to develop a coherent API for database access which makes this even easier.

      There were four significant problems with the way OpenACS previously used the -database (i.e., directly through the ns_db interface):

      1. Handle management. We required code to pass database +database (i.e., directly through the ns_db interface):

        1. Handle management. We required code to pass database handles around, and for routines which needed to perform database access but didn't receive a database handle as input, it was difficult to know from -which of the three "magic pools" (main, subquery, and log) to +which of the three "magic pools" (main, subquery, and log) to allocate a new handle. -

        2. Nested transactions. In our Oracle driver, begin -transaction really means "turn auto-commit mode off" and -end transaction means "commit the current transaction and -turn auto-commit mode on." Thus if transactional code needed to call a +

        3. Nested transactions. In our Oracle driver, begin +transaction really means "turn auto-commit mode off" and +end transaction means "commit the current transaction and +turn auto-commit mode on." Thus if transactional code needed to call a routine which needed to operate transactionally, the semantics were non-obvious. Consider:

           
          @@ -34,47 +29,47 @@
           }
           
           db_transaction {
          -db_dml unused "insert into greeble(bork) values(33)"
          +db_dml unused "insert into greeble(bork) values(33)"
           foo $db
          -db_dml unused "insert into greeble(bork) values(50)"
          +db_dml unused "insert into greeble(bork) values(50)"
           }
           
           

          -This would insert greeble #33 and do all the stuff in foo -transactionally, but the end transaction in foo +This would insert greeble #33 and do all the stuff in foo +transactionally, but the end transaction in foo would actually cause a commit, and greeble #50 would later be inserted in auto-commit mode. This could cause subtle bugs: e.g., in the case that the -insert for greeble #50 failed, part of the "transaction" would have +insert for greeble #50 failed, part of the "transaction" would have already have been committed!. This is not a good thing. -

        4. Unorthodox use of variables. The standard mechanism for +

        5. Unorthodox use of variables. The standard mechanism for mapping column values into variables involved the use of the -set_variables_after_query routine, which relies on an uplevel -variable named selection (likewise for -set_variables_after_subquery and subselection). +set_variables_after_query routine, which relies on an uplevel +variable named selection (likewise for +set_variables_after_subquery and subselection). -

        6. Hard-coded reliance on Oracle. It's difficult to +

        7. Hard-coded reliance on Oracle. It's difficult to write code supporting various different databases (dynamically using the appropriate dialect based on the type of database being used, e.g., using -DECODE on Oracle and CASE ... WHEN on +DECODE on Oracle and CASE ... WHEN on Postgres).

        The Database Access API addresses the first three problems by: -

        1. making use of database handles transparent

        2. wrapping common database operations (including transaction management) in +

          1. making use of database handles transparent

          2. wrapping common database operations (including transaction management) in Tcl control structures (this is, after all, what Tcl is good at!)

          It lays the groundwork for addressing the fourth problem by assigning each SQL statement a logical name. In a future version of the OpenACS Core, this API will translate logical statement names into actual SQL, based on the type of database in use. (To smooth the learning curve, we provide a facility for -writing SQL inline for a "default SQL dialect", which we assume to +writing SQL inline for a "default SQL dialect", which we assume to be Oracle for now.)

          To be clear, SQL abstraction is not fully implemented in OpenACS 3.3.1. The statement names supplied to each call are not used by the API at all. The API's design for SQL abstraction is in fact incomplete; -unresolved issues include:

          • how to add WHERE clause criteria dynamically

          • how to build a dynamic ORDER BY clause (Ben Adida has a -proposed solution for this)

          • how to define a statement's formal interface (i.e., what bind -variables it expects, what columns its SELECT clause must +unresolved issues include:

            • how to add WHERE clause criteria dynamically

            • how to build a dynamic ORDER BY clause (Ben Adida has a +proposed solution for this)

            • how to define a statement's formal interface (i.e., what bind +variables it expects, what columns its SELECT clause must contain if it's a query) without actually implementing the statement in a specific SQL dialect

            So why is the incremental change of adding statement naming to the API worth @@ -83,81 +78,81 @@ design. Therefore, we know that the effort will not be wasted, and taking advantage of the new support for bind variables will already require code that uses 3.3.0 version of the API to be updated. -

          The Bell Tolls for set_variables_after_query

          -set_variables_after_query is gone! (Well, it's still there, +

          The Bell Tolls for set_variables_after_query

          +set_variables_after_query is gone! (Well, it's still there, but you'll never need to use it.) The new API routines set local variables automatically. For instance:

           
          -db_1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"
          -doc_body_append "Hello, $first_names $last_name!"
          +db_1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"
          +doc_body_append "Hello, $first_names $last_name!"
           
           

          -Like ns_db 1row, this will bomb if the query doesn't return +Like ns_db 1row, this will bomb if the query doesn't return any rows (no such user exists). If this isn't what you want, you can write:

           
          -if { [db_0or1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"] } {
          -    doc_body_append "Hello, $first_names $last_name!"
          +if { [db_0or1row select_names "select first_names, last_name from users where user_id = [ad_get_user_id]"] } {
          +    doc_body_append "Hello, $first_names $last_name!"
           } else {
               # Executed if the query returns no rows.
          -    doc_body_append "There's no such user!"
          +    doc_body_append "There's no such user!"
           }
           
           

          Selecting a bunch of rows is a lot prettier now:

           
          -db_foreach select_names "select first_names, last_name from users" {
          -     doc_body_append "Say hi to $first_names $last_name for me!<br>"
          +db_foreach select_names "select first_names, last_name from users" {
          +     doc_body_append "Say hi to $first_names $last_name for me!<br>"
           }
           
           

          -That's right, db_foreach is now like ns_db -select plus a while loop plus -set_variables_after_query plus an if statement +That's right, db_foreach is now like ns_db +select plus a while loop plus +set_variables_after_query plus an if statement (containing code to be executed if no rows are returned).

           
          -db_foreach select_names "select first_names, last_name from users where last_name like 'S%'" {
          -     doc_body_append "Say hi to $first_names $last_name for me!<br>"
          +db_foreach select_names "select first_names, last_name from users where last_name like 'S%'" {
          +     doc_body_append "Say hi to $first_names $last_name for me!<br>"
           } if_no_rows {
          -     doc_body_append "There aren't any users with last names beginnings with S!"
          +     doc_body_append "There aren't any users with last names beginnings with S!"
           }
           
          -

          Handle Management

          +

    Handle Management

    The new API keeps track of which handles are in use, and automatically allocates new handles when they are necessary (e.g., to perform subqueries while a select is active). For example:

     
    -doc_body_append "<ul>"
    -db_foreach select_names "select first_names, last_name, user_id from users" {
    +doc_body_append "<ul>"
    +db_foreach select_names "select first_names, last_name, user_id from users" {
         # Automatically allocated a database handle from the main pool.
    -    doc_body_append "<li>User $first_names $last_name\n<ul>"
    +    doc_body_append "<li>User $first_names $last_name\n<ul>"
     
    -    db_foreach select_groups "select group_id from user_group_map where user_id = $user_id" {
    +    db_foreach select_groups "select group_id from user_group_map where user_id = $user_id" {
             # There's a selection in progress, so we allocated a database handle
             # from the subquery pool for this selection.
    -        doc_body_append "<li>Member of group #$group_id.\n"
    +        doc_body_append "<li>Member of group #$group_id.\n"
         } if_no_rows {
             # Not a member of any groups.
    -        doc_body_append "<li>Not a member of any group.\n"
    +        doc_body_append "<li>Not a member of any group.\n"
         }
     }
    -doc_body_append "</ul>"
    +doc_body_append "</ul>"
     db_release_unused_handles
     
     

    A new handle isn't actually allocated and released for every selection, of course - as a performance optimization, the API keeps old handles around -until db_release_unused_handles is invoked (or the script +until db_release_unused_handles is invoked (or the script terminates). -

    Note that there is no analogue to ns_db gethandle - the -handle is always automatically allocated the first time it's needed.

    Bind Variables

    Introduction

    +

    Note that there is no analogue to ns_db gethandle - the +handle is always automatically allocated the first time it's needed.

    Bind Variables

    Introduction

    Most SQL statements require that the code invoking the statement pass along data associated with that statement, usually obtained from the user. For instance, in order to delete a WimpyPoint presentation, a Tcl script might @@ -167,10 +162,10 @@ delete from wp_presentations where presentation_id = some_presentation_id

    -where some_presentation_id is a number which is a valid +where some_presentation_id is a number which is a valid presentation ID of the presentation I want to delete. It's easy to write code handling situations like this since SQL statements can include -bind variables, which represent placeholders for actual +bind variables, which represent placeholders for actual data. A bind variable is specified as a colon followed by an identifier, so the statement above can be coded as:

    @@ -181,43 +176,43 @@
     
     

    When this SQL statement is invoked, the value for the bind variable -:some_presentation_id is pulled from the Tcl variable -$some_presentation_id (in the caller's environment). Note +:some_presentation_id is pulled from the Tcl variable +$some_presentation_id (in the caller's environment). Note that bind variables are not limited to one per statement; you can use an arbitrary number, and each will pull from the correspondingly named Tcl -variable. (Alternatively, you can also specify an list or ns_set +variable. (Alternatively, you can also specify an list or ns_set providing bind variables' values; see Usage.)

    The value of a bind variable is taken literally by the database driver, so there is never any need to put single-quotes around the value for a bind -variable, or to use db_quote to escape single-quotes contained +variable, or to use db_quote to escape single-quotes contained in the value. The following works fine, despite the apostrophe:

     
    -set exclamation "That's all, folks!"
    +set exclamation "That's all, folks!"
     db_dml exclamation_insert { insert into exclamations(exclamation) values(:exclamation) }
     
     

    Note that you can use a bind variable in a SQL statement only where you could use a literal (a number or single-quoted string). Bind variables cannot be placeholders for things like SQL keywords, table names, or column names, -so the following will not work, even if $table_name is set +so the following will not work, even if $table_name is set properly:

     
     select * from :table_name
     
    -

    Why Bind Variables Are Useful

    +

    Why Bind Variables Are Useful

    Why bother with bind variables at all - why not just write the Tcl statement above like this:

     
    -db_dml presentation_delete "
    +db_dml presentation_delete "
         delete from wp_presentations where presentation_id = $some_presentation_id
    -"
    +"
     
     

    (Note the use of double-quotes to allow the variable reference to -$some_presentation_id to be interpolated in.) This will work, +$some_presentation_id to be interpolated in.) This will work, but consider the case where some devious user causes -some_presentation_id to be set to something like '3 or -1 = 1', which would result in the following statement being +some_presentation_id to be set to something like '3 or +1 = 1', which would result in the following statement being executed:

     
    @@ -227,24 +222,24 @@
     This deletes every presentation in the database! Using bind variables
     eliminates this gaping security hole: since bind variable values are taken
     literally. Oracle will attempt to delete presentations whose presentation ID
    -is literally '3 or 1 = 1' (i.e., no presentations, since
    -'3 or 1 = 1' can't possibly be a valid integer
    -primary key for wp_presentations. In general, since Oracle
    +is literally '3 or 1 = 1' (i.e., no presentations, since
    +'3 or 1 = 1' can't possibly be a valid integer
    +primary key for wp_presentations. In general, since Oracle
     always considers the values of bind variables to be literals, it becomes more
     difficult for users to perform URL surgery to trick scripts into running
     dangerous queries and DML. 
    -

    Usage

    Every db_* command accepting a SQL command as an argument -supports bind variables. You can either

    • specify the -bind switch to provide a set with bind variable -values, or

    • specify the -bind switch to explicitly provide a list of -bind variable names and values, or

    • not specify a bind variable list at all, in which case Tcl variables are +

      Usage

      Every db_* command accepting a SQL command as an argument +supports bind variables. You can either

      • specify the -bind switch to provide a set with bind variable +values, or

      • specify the -bind switch to explicitly provide a list of +bind variable names and values, or

      • not specify a bind variable list at all, in which case Tcl variables are used as bind variables.

      -The default behavior (i.e., if the -bind switch is omitted) is +The default behavior (i.e., if the -bind switch is omitted) is that these procedures expect to find local variables that correspond in name to the referenced bind variables, e.g.:

       
       set user_id 123456
      -set role "administrator"
      +set role "administrator"
       
       db_foreach user_group_memberships_by_role {
           select g.group_id, g.group_name
      @@ -254,18 +249,18 @@
           and map.role = :role
       } {
           # do something for each group of which user 123456 is in the role
      -    # of "administrator"
      +    # of "administrator"
       }
       
       

      -The value of the local Tcl variable user_id (123456) is bound to -the user_id bind variable. -

      The -bind switch can takes the name of an ns_set +The value of the local Tcl variable user_id (123456) is bound to +the user_id bind variable. +

      The -bind switch can takes the name of an ns_set containing keys for each bind variable named in the query, e.g.:

       
       set bind_vars [ns_set create]
       ns_set put $bind_vars user_id 123456
      -ns_set put $bind_vars role "administrator"
      +ns_set put $bind_vars role "administrator"
       
       db_foreach user_group_memberships_by_role {
           select g.group_id, g.group_name
      @@ -275,11 +270,11 @@
           and map.role = :role
       } -bind $bind_vars {
           # do something for each group in which user 123456 has the role
      -    # of "administrator"
      +    # of "administrator"
       }
       
       

      -Alternatively, as an argument to -bind you can specify a list of +Alternatively, as an argument to -bind you can specify a list of alternating name/value pairs for bind variables:

       
      @@ -289,22 +284,22 @@
           where g.group_id = map.user_id
           and map.user_id = :user_id
           and map.role = :role
      -} -bind [list user_id 123456 role "administrator"] {
      +} -bind [list user_id 123456 role "administrator"] {
           # do something for each group in which user 123456 has the role
      -    # of "administrator"
      +    # of "administrator"
       }
       
      -

      Nulls and Bind Variables

      +

    Nulls and Bind Variables

    When processing a DML statement, Oracle coerces empty strings into -null. (This coercion does not occur in the -WHERE clause of a query, i.e. -col = '' and -col is null are not equivalent.) +null. (This coercion does not occur in the +WHERE clause of a query, i.e. +col = '' and +col is null are not equivalent.)

    As a result, when using bind variables, the only way to make Oracle set a -column value to null is to set the corresponding bind variable +column value to null is to set the corresponding bind variable to the empty string, since a bind variable whose value is the string -"null" will be interpreted as the literal string -"null".

    These Oracle quirks complicate the process of writing clear and abstract +"null" will be interpreted as the literal string +"null".

    These Oracle quirks complicate the process of writing clear and abstract DML difficult. Here is an example that illustrates why:

     
     #
    @@ -316,259 +311,259 @@
     #   );
     #
     
    -set bar ""
    -set baz ""
    +set bar ""
    +set baz ""
     
    -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)"
    +db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)"
     #
    -# the values of the "bar" and "baz" columns in the new row are both
    +# the values of the "bar" and "baz" columns in the new row are both
     # null, because Oracle has coerced the empty string (even for the
    -# numeric column "bar") into null in both cases
    +# numeric column "bar") into null in both cases
     
     

    Since databases other than Oracle do not coerce empty strings into -null, this code has different semantics depending on the +null, this code has different semantics depending on the underlying database (i.e., the row that gets inserted may not have null as its column values), which defeats the purpose of SQL abstraction.

    Therefore, the Database Access API provides a database-independent way to -represent null (instead of the Oracle-specific idiom of the -empty string): db_null.

    Use it instead of the empty string whenever you want to set a column value -explicitly to null, e.g.:

    +represent null (instead of the Oracle-specific idiom of the
    +empty string): db_null.

    Use it instead of the empty string whenever you want to set a column value +explicitly to null, e.g.:

     
     set bar [db_null]
     set baz [db_null]
     
    -db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)"
    +db_dml foo_create "insert into foo(bar, baz) values(:bar, :baz)"
     #
    -# sets the values for both the "bar" and "baz" columns to null
    +# sets the values for both the "bar" and "baz" columns to null
     
    -

    SQL Abstraction

    +

    SQL Abstraction

    We now require that each SQL statement be assigned a logical name for the statement that is unique to the procedure or page in which it is defined. This is so that (eventually) we can implement logically named statements with alternative SQL for non-Oracle databases (e.g., Postgres). More on this later. -

    Placing Column Values in Arrays and Sets

    -Normally, db_foreach, db_0or1row, and -db_1row places the results of queries in Tcl variables, so you +

    Placing Column Values in Arrays and Sets

    +Normally, db_foreach, db_0or1row, and +db_1row places the results of queries in Tcl variables, so you can say:

     
    -db_foreach users_select "select first_names, last_name from users" {
    -    doc_body_append "<li>$first_names $last_name\n"
    +db_foreach users_select "select first_names, last_name from users" {
    +    doc_body_append "<li>$first_names $last_name\n"
     }
     
     

    However, sometimes this is not sufficient: you may need to examine the rows returned, to dynamically determine the set of columns returned by the query, or to avoid collisions with existing variables. You can use the --column_array and -column_set switches to -db_foreach, db_0or1row, and db_1row to +-column_array and -column_set switches to +db_foreach, db_0or1row, and db_1row to instruct the database routines to place the results in a Tcl array or -ns_set, respectively, where the keys are the column names and +ns_set, respectively, where the keys are the column names and the values are the column values. For example:

     
    -db_foreach users_select "select first_names, last_name from users" -column_set columns {
    +db_foreach users_select "select first_names, last_name from users" -column_set columns {
         # Now $columns is an ns_set.
    -    doc_body_append "<li>"
    +    doc_body_append "<li>"
         for { set i 0 } { $i < [ns_set size $columns] } { incr i } {
    -        doc_body_append "[ns_set key $columns $i] is [ns_set value $columns $i]. \n"
    +        doc_body_append "[ns_set key $columns $i] is [ns_set value $columns $i]. \n"
         }
     }
     
     

    will write something like: -

    • first_names is Jon. last_name is Salz.

    • first_names is Lars. last_name is Pind.

    • first_names is Michael. last_name is Yoon.

    API

    -Note that you never have to use ns_db anymore (including -ns_db gethandle)! Just start doing stuff, and (if you want) call -db_release_unused_handles when you're done as a hint to +

    • first_names is Jon. last_name is Salz.

    • first_names is Lars. last_name is Pind.

    • first_names is Michael. last_name is Yoon.

    API

    +Note that you never have to use ns_db anymore (including +ns_db gethandle)! Just start doing stuff, and (if you want) call +db_release_unused_handles when you're done as a hint to release the database handle. -

    db_null +

    db_null
    -db_null
    +db_null
     

    Returns a value which can be used in a bind variable to represent the SQL -value null. See Nulls and Bind Variables +value null. See Nulls and Bind Variables above.

    -db_foreach +db_foreach
    -db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
    +db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
         [ -column_array array_name | -column_set set_name ] \
         code_block [ if_no_rows if_no_rows_block ]
    -

    Performs the SQL query sql, executing -code_block once for each row with variables set to -column values (or a set or array populated if -column_array or -column_set is specified). If the query returns no rows, executes -if_no_rows_block (if provided).

    Example:

    +

    Performs the SQL query sql, executing +code_block once for each row with variables set to +column values (or a set or array populated if -column_array or +column_set is specified). If the query returns no rows, executes +if_no_rows_block (if provided).

    Example:

     
    -db_foreach select_foo "select foo, bar from greeble" {
    -    doc_body_append "<li>foo=$foo; bar=$bar\n"
    +db_foreach select_foo "select foo, bar from greeble" {
    +    doc_body_append "<li>foo=$foo; bar=$bar\n"
     } if_no_rows {
    -    doc_body_append "<li>There are no greebles in the database.\n"
    +    doc_body_append "<li>There are no greebles in the database.\n"
     }
     
     

    -The code block may contain break statements (which terminate the -loop and flush the database handle) and continue statements -(which continue to the next row of the loop).

    db_1row
    -db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
    +The code block may contain break statements (which terminate the
    +loop and flush the database handle) and continue statements
    +(which continue to the next row of the loop). 

    db_1row
    +db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
         [ -column_array array_name | -column_set set_name ]
    -

    Performs the SQL query sql, setting variables to +

    Performs the SQL query sql, setting variables to column values. Raises an error if the query does not return exactly 1 row.

    Example:

     
    -db_1row select_foo "select foo, bar from greeble where greeble_id = $greeble_id"
    +db_1row select_foo "select foo, bar from greeble where greeble_id = $greeble_id"
     # Bombs if there's no such greeble!
     # Now $foo and $bar are set.
     
    -
    db_0or1row
    -db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
    +
    db_0or1row
    +db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
         [ -column_array array_name | -column_set set_name ]
    -

    Performs the SQL query sql. If a row is returned, +

    Performs the SQL query sql. If a row is returned, sets variables to column values and returns 1. If no rows are returned, -returns 0. If more than one row is returned, throws an error.

    db_string
    -db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]
    +returns 0. If more than one row is returned, throws an error. 

    db_string
    +db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]
     

    Returns the first column of the result of SQL query -sql. If sql doesn't return a -row, returns default (or throws an error if -default is unspecified). Analogous to -database_to_tcl_string and -database_to_tcl_string_or_null. +sql. If sql doesn't return a +row, returns default (or throws an error if +default is unspecified). Analogous to +database_to_tcl_string and +database_to_tcl_string_or_null. -

    db_nextval
    -db_nextval sequence-name
    +

    db_nextval
    +db_nextval sequence-name
     

    Returns the next value for the sequence sequence-name (using a -SQL statement like SELECT sequence-name.nextval FROM -DUAL). If sequence pooling is enabled for the sequence, transparently +SQL statement like SELECT sequence-name.nextval FROM +DUAL). If sequence pooling is enabled for the sequence, transparently uses a value from the pool if available to save a round-trip to the database. -

    db_list
    -db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    +

    db_list
    +db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
     

    Returns a Tcl list of the values in the first column of the result of SQL -query sql. If sql doesn't +query sql. If sql doesn't return any rows, returns an empty list. Analogous to -database_to_tcl_list. +database_to_tcl_list. -

    db_list_of_lists
    -db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    +

    db_list_of_lists
    +db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
     

    Returns a Tcl list, each element of which is a list of all column values -in a row of the result of SQL query sql. If -sql doesn't return any rows, returns an empty list. -(Analogous to database_to_tcl_list_list.) +in a row of the result of SQL query sql. If +sql doesn't return any rows, returns an empty list. +(Analogous to database_to_tcl_list_list.) -

    db_list_of_ns_sets
    -db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    +

    db_list_of_ns_sets
    +db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
     

    Returns a list of ns_sets with the values of each column of each row - returned by the sql query specified. -

    db_dml
    -db_dml statement-name sql \
    +	returned by the sql query specified.
    +  

    db_dml
    +db_dml statement-name sql \
         [ -bind bind_set_id | -bind bind_value_list ] \
         [ -blobs blob_list | -clobs clob_list |
           -blob_files blob_file_list | -clob_files clob_file_list ]
    -

    Performs the DML or DDL statement sql.

    If a length-n list of blobs or clobs is provided, then the SQL +

    Performs the DML or DDL statement sql.

    If a length-n list of blobs or clobs is provided, then the SQL should return n blobs or clobs into the bind variables -:1, :2, ... :n. -blobs or clobs, if specified, +:1, :2, ... :n. +blobs or clobs, if specified, should be a list of individual BLOBs or CLOBs to insert; -blob_files or clob_files, if +blob_files or clob_files, if specified, should be a list of paths to files containing the data to -insert. Only one of -blobs, -clobs, --blob_files, and -clob_files may be provided.

    Example:

    +insert. Only one of -blobs, -clobs,
    +-blob_files, and -clob_files may be provided.

    Example:

     
    -db_dml insert_photos "
    +db_dml insert_photos "
             insert photos(photo_id, image, thumbnail_image)
             values(photo_id_seq.nextval, empty_blob(), empty_blob())
             returning image, thumbnail_image into :1, :2
    -    "  -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"] 
    +    "  -blob_files [list "/var/tmp/the_photo" "/var/tmp/the_thumbnail"] 
     
     

    -This inserts a new row into the photos table, with the contents -of the files /var/tmp/the_photo and -/var/tmp/the_thumbnail in the image and -thumbnail columns, respectively. +This inserts a new row into the photos table, with the contents +of the files /var/tmp/the_photo and +/var/tmp/the_thumbnail in the image and +thumbnail columns, respectively.

    -db_write_clob, -db_write_blob, -db_blob_get_file +db_write_clob, +db_write_blob, +db_blob_get_file
    -db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    +db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
     
    -db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    +db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
     
    -db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
    -

    Analagous to ns_ora write_clob/write_blob/blob_get_file. +db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ] +

    Analagous to ns_ora write_clob/write_blob/blob_get_file. -

    db_release_unused_handles
    -db_release_unused_handles
    -

    Releases any allocated, unused database handles.

    db_transaction
    -db_transaction code_block [ on_error { code_block } ]
    -

    Executes code_block transactionally. Nested -transactions are supported (end transaction is transparently -ns_db dml'ed when the outermost transaction completes). The -db_abort_transaction command can be used to abort all levels of -transactions. It is possible to specify an optional on_error +

    db_release_unused_handles
    +db_release_unused_handles
    +

    Releases any allocated, unused database handles.

    db_transaction
    +db_transaction code_block [ on_error { code_block } ]
    +

    Executes code_block transactionally. Nested +transactions are supported (end transaction is transparently +ns_db dml'ed when the outermost transaction completes). The +db_abort_transaction command can be used to abort all levels of +transactions. It is possible to specify an optional on_error code block that will be executed if some code in code_block throws -an exception. The variable errmsg will be bound in that scope. -If there is no on_error code, any errors will be propagated.

    Example:

    +an exception. The variable errmsg will be bound in that scope.
    +If there is no on_error code, any errors will be propagated. 

    Example:

     
     proc replace_the_foo { col } {
         db_transaction {
    -        db_dml "delete from foo"
    -        db_dml "insert into foo(col) values($col)"
    +        db_dml "delete from foo"
    +        db_dml "insert into foo(col) values($col)"
         }
     }
     
     proc print_the_foo {} {
    -    doc_body_append "foo is [db_string "select col from foo"]<br>\n"
    +    doc_body_append "foo is [db_string "select col from foo"]<br>\n"
     }
     
     replace_the_foo 8
    -print_the_foo ; # Writes out "foo is 8"
    +print_the_foo ; # Writes out "foo is 8"
     
     db_transaction {
         replace_the_foo 14
    -    print_the_foo ; # Writes out "foo is 14"
    -    db_dml "insert into some_other_table(col) values(999)"
    +    print_the_foo ; # Writes out "foo is 14"
    +    db_dml "insert into some_other_table(col) values(999)"
         ...
         db_abort_transaction
     } on_error {
    -    doc_body_append "Error in transaction: $errmsg"
    +    doc_body_append "Error in transaction: $errmsg"
     }
         
     
    -print_the_foo ; # Writes out "foo is 8"
    +print_the_foo ; # Writes out "foo is 8"
     
    -
    db_abort_transaction +
    db_abort_transaction
    -db_abort_transaction
    +db_abort_transaction
     

    Aborts all levels of a transaction. That is if this is called within several nested transactions, all of them are terminated. Use this insetead of -db_dml "abort" "abort transaction". +db_dml "abort" "abort transaction". -

    db_multirow
    -db_multirow [ -local ] [ -append ] [ -extend column_list ] \
    +

    db_multirow
    +db_multirow [ -local ] [ -append ] [ -extend column_list ] \
         var-name statement-name sql \
         [ -bind bind_set_id | -bind bind_value_list ] \
         code_block [ if_no_rows if_no_rows_block ]
     

    - Performs the SQL query sql, saving results in variables + Performs the SQL query sql, saving results in variables of the form - var_name:1, var_name:2, etc, - setting var_name:rowcount to the total number - of rows, and setting var_name:columns to a + var_name:1, var_name:2, etc, + setting var_name:rowcount to the total number + of rows, and setting var_name:columns to a list of column names.

    Each row also has a column, rownum, automatically added and set to the row number, starting with 1. Note that this will override any column in the SQL statement named 'rownum', also if you're using the Oracle rownum pseudo-column.

    - If the -local is passed, the variables defined + If the -local is passed, the variables defined by db_multirow will be set locally (useful if you're compiling dynamic templates in a function or similar situations).

    @@ -581,19 +576,19 @@ multirow.

    You may also add additional, computed columns to the multirow, using the - -extend { col_1 col_2 ... } switch. This is + -extend { col_1 col_2 ... } switch. This is useful for things like constructing a URL for the object retrieved by the query.

    If you're constructing your multirow through multiple queries with the same set of columns, but with different rows, you can use the - -append switch. This causes the rows returned by this query + -append switch. This causes the rows returned by this query to be appended to the rows already in the multirow, instead of starting a clean multirow, as is the normal behavior. The columns must match the columns in the original multirow, or an error will be thrown.

    - Your code block may call continue in order to skip a row - and not include it in the multirow. Or you can call break + Your code block may call continue in order to skip a row + and not include it in the multirow. Or you can call break to skip this row and quit looping.

    @@ -608,28 +603,28 @@ } { set user_url [acs_community_member_url -user_id $user_id] } -

    db_resultrows
    -db_resultrows
    +    
    db_resultrows
    +db_resultrows
     

    Returns the number of rows affected or returned by the previous statement. -

    db_with_handle
    -db_with_handle var code_block
    -

    Places a database handle into the variable var and -executes code_block. This is useful when you don't -want to have to use the new API (db_foreach, -db_1row, etc.), but need to use database handles explicitly.

    Example:

    +

    db_with_handle
    +db_with_handle var code_block
    +

    Places a database handle into the variable var and +executes code_block. This is useful when you don't +want to have to use the new API (db_foreach, +db_1row, etc.), but need to use database handles explicitly.

    Example:

     
     proc lookup_the_foo { foo } {
         db_with_handle db {
    -        return [db_string unused "select ..."]
    +        return [db_string unused "select ..."]
         }
     }
     
     db_with_handle db {
         # Now there's a database handle in $db.
    -    set selection [ns_db select $db "select foo from bar"]
    +    set selection [ns_db select $db "select foo from bar"]
         while { [ns_db getrow $db $selection] } {
             set_variables_after_query
     
    @@ -638,103 +633,99 @@
     }
     
     
    - - + + db_name - - + +
    -			
    -				db_name
    -			
    +			
    +				db_name
    +			
     		

    Returns the name of the database, as returned by the driver.

    - - + + db_type - - + +
    -			
    -				db_type
    -			
    +			
    +				db_type
    +			
     		

    Returns the RDBMS type (i.e. oracle, postgresql) this OpenACS installation is using. The nsv ad_database_type is set up during the bootstrap process.

    - - + + db_compatible_rdbms_p - - + +
    -			db_compatible_rdbms_p db_type
    +			db_compatible_rdbms_p db_type
     		

    Returns 1 if the given db_type is compatible with the current RDBMS.

    - - + + db_package_supports_rdbms_p - - + +
    -			db_package_supports_rdbms_p db_type_list
    +			db_package_supports_rdbms_p db_type_list
     		

    Returns 1 if db_type_list contains the current RDMBS type. A package intended to run with a given RDBMS must note this in it's package info file regardless of whether or not it actually uses the database.

    - - + + db_legacy_package_p - - + +
    -			db_legacy_package_p db_type_list
    +			db_legacy_package_p db_type_list
     		

    Returns 1 if the package is a legacy package. We can only tell for certain if it explicitly supports Oracle 8.1.6 rather than the OpenACS more general oracle.

    - - + + db_version - - + +
    -			db_version
    +			db_version
     		

    Returns the RDBMS version (i.e. 8.1.6 is a recent Oracle version; 7.1 a recent PostgreSQL version.

    - - + + db_current_rdbms - - + +
    -			db_current_rdbms
    +			db_current_rdbms
     		

    Returns the current rdbms type and version.

    - - + + db_known_database_types - - + +
    -			db_known_database_types
    +			db_known_database_types
     		

    Returns a list of three-element lists describing the database engines known to OpenACS. Each sublist contains the internal database name (used in file - paths, etc), the driver name, and a "pretty name" to be used in selection + paths, etc), the driver name, and a "pretty name" to be used in selection forms displayed to the user.

    The nsv containing the list is initialized by the bootstrap script and should never be referenced directly by user code. Returns the current rdbms type and version. -<<<<<<< db-api-detailed.html

    ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -r1.46.2.2 -r1.46.2.3 --- openacs-4/packages/acs-core-docs/www/db-api.html 12 Dec 2010 00:07:02 -0000 1.46.2.2 +++ openacs-4/packages/acs-core-docs/www/db-api.html 12 Dec 2010 01:37:24 -0000 1.46.2.3 @@ -1,10 +1,5 @@ -<<<<<<< db-api.html - -The OpenACS Database Access API

    The OpenACS Database Access API

    -======= -The OpenACS Database Access API

    The OpenACS Database Access API

    ->>>>>>> 1.48 +The OpenACS Database Access API

    The OpenACS Database Access API

    By Pete Su and Jon Salz. Modified by Roberto Mello.

    Overview

    One of OpenACS's great strengths is that code written for it is @@ -13,13 +8,8 @@ coherent API for database access which makes this even easier.

    More detailed information about the DB api is available at -<<<<<<< db-api.html - Database Access API. -

    DB API Examples

    -======= Database Access API.

    DB API Examples

    ->>>>>>> 1.48 The OpenACS database API is meant to save developers from making common mistakes and to provide a more structured syntax for specifying database operations, including transactions. Here's @@ -666,13 +656,8 @@ db_dml foo_insert "insert into foo(baz) values(:1)" {[db_nullify_empty_string $baz]}

    -<<<<<<< db-api.html

    ($Id$)

    -

    Caching Database API Results

    The database API allows for direct caching of query results. Repeated calls will -======= -

    ($Id$)

    Caching Database API Results

    The database API allows for direct caching of query results. Repeated calls will ->>>>>>> 1.48 return the cached value until it is either explicitly flushed using db_flush_cache, times out (configured the ns_cache is called to create the cache), or another cached query fills the cache, causing older entries to be flushed. Index: openacs-4/packages/acs-core-docs/www/dev-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/dev-guide.html,v diff -u -r1.32.2.2 -r1.32.2.3 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 12 Dec 2010 00:07:02 -0000 1.32.2.2 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 12 Dec 2010 01:37:24 -0000 1.32.2.3 @@ -1,7 +1,2 @@ -<<<<<<< dev-guide.html - -Chapter 11. Development Reference

    View comments on this page at openacs.org
    -======= -Chapter 10. Development Reference
    View comments on this page at openacs.org
    ->>>>>>> 1.34 +Chapter 11. Development Reference
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/doc-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/doc-standards.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/doc-standards.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/doc-standards.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,7 +1,2 @@ -<<<<<<< doc-standards.html - -Chapter 13. Documentation Standards
    View comments on this page at openacs.org
    -======= -Chapter 12. Documentation Standards
    View comments on this page at openacs.org
    ->>>>>>> 1.16 +Chapter 13. Documentation Standards
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/docbook-primer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/docbook-primer.html,v diff -u -r1.48.2.2 -r1.48.2.3 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 12 Dec 2010 00:07:02 -0000 1.48.2.2 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 12 Dec 2010 01:37:24 -0000 1.48.2.3 @@ -1,10 +1,5 @@ -<<<<<<< docbook-primer.html - -OpenACS Documentation Guide

    OpenACS Documentation Guide

    -======= -OpenACS Documentation Guide

    OpenACS Documentation Guide

    ->>>>>>> 1.50 +OpenACS Documentation Guide

    OpenACS Documentation Guide

    By Claus Rasmussen, with additions by Roberto Mello, Vinod Kurup, and the OpenACS Community

    Overview of OpenACS Documentation

    OpenACS™ is a powerful system with @@ -562,11 +557,7 @@

    OpenACS Documentation Strategy

    OpenACS documentation development is subject to the constraints of the software project development and release -<<<<<<< docbook-primer.html - methods and cycles (???). -======= methods and cycles (Using CVS with OpenACS). ->>>>>>> 1.50 Essentially, all phases of work may be active to accommodate the asynchronous nature of multiple subprojects evolving by the efforts of a global base of participants with culturally @@ -587,11 +578,7 @@ DTD. The remaining discussion is about publishing using Docbook.

    -<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + is a publishing standard based on XML with similar goals to the OpenACS Documentation project. Some specific reasons why we are using DocBook:

    • @@ -653,15 +640,9 @@ list of elements and use more exotic features in your documents. The list is made up of SGML-elements but basically -<<<<<<< docbook-primer.html - the same elements are valid in the XML DTD as long as you remember to: - -

      • -======= the same elements are valid in the XML DTD as long as you remember to: - +

        • ->>>>>>> 1.50 Always close your tags with corresponding end-tags and to not use other tag minimization

        • @@ -709,11 +690,7 @@ The documentation for each package will make up a little "book" that is structured like this - examples are emphasized: -<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 +

               book                        : Docs for one package - templating
          @@ -736,43 +713,23 @@
                 and we will provide a set of templates for documenting an entire package. 

          For now you can take a look at the sources of these DocBook documents to get an idea of how they are tied together. -<<<<<<< docbook-primer.html -

        Headlines, Sections

        - - Given that your job starts at the sect1-level, all your documents should open with a - <sect1>-tag and end - with the corresponding </sect1>. -

        - - You need to feed every <sect1> two attributes. The first attribute, - id, is standard and can be used with all elements. It comes in very - handy when interlinking between documents (more about this when talking about links in Section , “Links”). - The value of id has to be unique - throughout the book you're making since the id's in your - sect1's will turn into filenames when the book is parsed into HTML. -

        - - The other attribute is xreflabel. The value of this is the text that will appear - as the link when referring to this sect1. -=======

        Headlines, Sections

        - + Given that your job starts at the sect1-level, all your documents should open with a <sect1>-tag and end with the corresponding </sect1>.

        - + You need to feed every <sect1> two attributes. The first attribute, id, is standard and can be used with all elements. It comes in very handy when interlinking between documents (more about this when talking about links in Links). The value of id has to be unique throughout the book you're making since the id's in your sect1's will turn into filenames when the book is parsed into HTML.

        - + The other attribute is xreflabel. The value of this is the text that will appear as the link when referring to this sect1. ->>>>>>> 1.50

        Right after the opening tag you put the title of the document - this is usually the same as xreflabel-attribute. E.g. the top level of the document you're @@ -785,26 +742,16 @@ </sect1>

        -<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + Inside this container your document will be split up into <sect2>'s, each with the same requirements - id and xreflabel attributes, and a <title>-tag inside. Actually, the xreflabel is never required in sections, but it makes linking to that section a lot easier.

        When it comes to naming your -<<<<<<< docbook-primer.html - sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview. -

        Code

        - -======= sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview.

        Code

        - ->>>>>>> 1.50 + For displaying a snippet of code, a filename or anything else you just want to appear as a part of a sentence, we use <computeroutput> @@ -818,28 +765,16 @@ <programlisting> is used. Just wrap your code block in it; mono-spacing, indents and all that stuff is taken care of automatically.

        For expressing user interaction via a terminal window, we wrap -<<<<<<< docbook-primer.html - the <screen> - tag around text that has been wrapped by combinations of <computeroutput> - and <userinput> -

        Links

        - -======= the <screen> tag around text that has been wrapped by combinations of <computeroutput> and <userinput>

        Links

        - ->>>>>>> 1.50 + Linking falls into two different categories: inside the book you're making and outside:

        1. Inside linking, cross-referencing other parts of your book

        By having unique id's you can cross-reference any part of your book with a simple tag, regardless of where that part is. -<<<<<<< docbook-primer.html -

        Check out how I link to a subsection of the Developer's Guide:

        Put this in your XML:

        -=======
        -      

        Check out how I link to a subsection of the Developer's Guide:

        Put this in your XML:

        ->>>>>>> 1.50
        +      

        Check out how I link to a subsection of the Developer's Guide:

        Put this in your XML:

         - Find information about creating a package in
         <xref linkend="packages-making-a-package"></xref>.
         

        And the output is:

        @@ -862,13 +797,8 @@
                 Note that since I haven't provided an xreflabel for the subsection, 
                 packages-looks, the
                 parser will try its best to explain where the link takes you.
        -<<<<<<< docbook-primer.html
        -      

        2. Linking outside the documentation

        - -=======

        2. Linking outside the documentation

        - ->>>>>>> 1.50 + If you're hyper-linking out of the documentation, it works almost the same way as HTML - the tag is just a little different @@ -889,11 +819,7 @@ for you.

        -<<<<<<< docbook-primer.html - -======= - ->>>>>>> 1.50 + To insert a graphic we use the elements <mediaobject>, <imageobject>, @@ -918,13 +844,8 @@

        Put your graphics in a separate directory ("images") and link to them only with relative paths. -<<<<<<< docbook-primer.html -

        Lists

        - -=======

        Lists

        - ->>>>>>> 1.50 + Here's how you make the DocBook equivalent of the three usual HTML-lists:

        1. How to make an <ul>

        Making an unordered list is pretty much like doing the same thing in HTML - if you close your <li>, that is. The only differences are that each list item has to be wrapped in something more, such as @@ -968,13 +889,8 @@ </varlistentry> </variablelist> -<<<<<<< docbook-primer.html -

        Tables

        - -=======

        Tables

        - ->>>>>>> 1.50 + DocBook supports several types of tables, but in most cases, the <informaltable> is enough: @@ -1010,13 +926,8 @@ If you want cells to span more than one row or column, it gets a bit more complicated - check out <table> for an example. -<<<<<<< docbook-primer.html -

        Emphasis

        - -=======

        Emphasis

        - ->>>>>>> 1.50 + Our documentation uses two flavors of emphasis - italics and bold type. DocBook uses one - <emphasis>.

        @@ -1070,13 +981,8 @@ to PSGML Mode. nXML Mode can validate a file as it is edited.

      • David Lutterkort -<<<<<<< docbook-primer.html - wrote an intro to the PSGML Mode in Emacs -

      • -======= wrote an intro to the PSGML Mode in Emacs

      • ->>>>>>> 1.50 James Clark's free Java parser XP. Note that this does not validate XML, only parses it. @@ -1097,8 +1003,4 @@ script with directions (now via archive.org) that gets you most of the way. -<<<<<<< docbook-primer.html

    View comments on this page at openacs.org
    -======= -

    View comments on this page at openacs.org
    ->>>>>>> 1.50 Index: openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-constraint-naming.html - -Constraint naming standard

    Constraint naming standard

    By Michael Bryzek

    -======= -Constraint naming standard

    Constraint naming standard

    By Michael Bryzek

    ->>>>>>> 1.46 +Constraint naming standard

    Constraint naming standard

    By Michael Bryzek

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

    The Big Picture

    @@ -90,8 +85,4 @@ debugging (e.g. the error will say something like "Cannot insert null value into column"), we recommend naming not null constraints to be consistent in our naming of all constraints. -<<<<<<< eng-standards-constraint-naming.html

    ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 12 Dec 2010 01:37:24 -0000 1.44.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-filenaming.html - -ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By Michael Yoon and Aurelius Prochazka

    -======= -ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By Michael Yoon and Aurelius Prochazka

    ->>>>>>> 1.46 +ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By Michael Yoon and Aurelius Prochazka

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

    @@ -100,11 +95,7 @@ This can be at the top or bottom of the file.

    Using ad_page_contract

    For non-library Tcl files (those not in the private Tcl directory), -<<<<<<< eng-standards-filenaming.html -use ad_page_contract -======= use ad_page_contract ->>>>>>> 1.46 after the file path comment (this supersedes set_the_usual_form_variables and ad_return_complaint). Here is an example of using ad_page_contract, which serves both documentation and page input @@ -150,11 +141,7 @@ set_the_usual_form_variables. The use of bind variables makes such previous variable syntax obsolete.

    Using ad_library

    -<<<<<<< eng-standards-filenaming.html -For shared Tcl library files, use ad_library after -======= For shared Tcl library files, use ad_library after ->>>>>>> 1.46 the file path comment. Its only argument is a doc_string in the standard (javadoc-style) format, like ad_page_contract. Don't forget to put the @cvs-id in @@ -178,11 +165,7 @@ -- author -- created -- -<<<<<<< eng-standards-filenaming.html --- $Id$ -======= -- $Id$ ->>>>>>> 1.46

    Of course, replace "--" with the comment delimiter appropriate for the language in which you are programming. @@ -245,8 +228,4 @@

    Tcl Library Files

    Further standards for Tcl library files are under discussion; we plan to include naming conventions for procs. -<<<<<<< eng-standards-filenaming.html

    ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-plsql.html - -PL/SQL Standards

    PL/SQL Standards

    -======= -PL/SQL Standards

    PL/SQL Standards

    ->>>>>>> 1.47 +PL/SQL Standards

    PL/SQL Standards

    By Richard Li and Yon Feldman

    OpenACS docs are written by the named authors, and may be edited @@ -157,8 +152,4 @@ as possible to all source code readers.

  • Lowercase everything, with the exception of %TYPE and %ROWTYPE. -<<<<<<< eng-standards-plsql.html

  • ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 12 Dec 2010 01:37:24 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< eng-standards-versioning.html - -Release Version Numbering

    Release Version Numbering

    ($Id$)

    By Ron Henderson, Revised by Joel Aufrecht

    -======= -Release Version Numbering

    Release Version Numbering

    ($Id$)

    By Ron Henderson, Revised by Joel Aufrecht

    ->>>>>>> 1.49 +Release Version Numbering

    Release Version Numbering

    ($Id$)

    By Ron Henderson, Revised by Joel Aufrecht

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

    @@ -90,18 +85,10 @@

  • Level 3: Mature and Standard. Same as level 2, plus meets published coding standards; is fully internationalized; available on both supported databases. -<<<<<<< eng-standards-versioning.html -

  • Naming Database Upgrade Scripts

    Database upgrade scripts must be named very precisely in order for the Package Manager to run the correct script at the correct time.

    1. Upgrade scripts should be named /packages/myfirstpackage/sql/postgresql/upgrade/upgrade-OLDVERSION-NEWVERSION.sql

    2. If the version you are working on is a later version than the current released version, OLDVERSION should be the current version. The current version is package version in the APM and in /packages/myfirstpackage/myfirstpackage.info. So if forums is at 2.0.1, OLDVERSION should be 2.0.1d1. Note that this means that new version development that includes an upgrade must start at d2, not d1. -

    3. If you are working on a pre-release version of a package, use the current package version as OLDVERSION. Increment the package version as appropriate (see above) and use the new version as NEWVERSION. For example, if you are working on 2.0.1d3, make it 2.0.1d4 and use upgrade-2.0.1d3-2.0.1d4.sql.

    4. Database upgrades should be confined to development releases, not alpha or beta releases.

    5. - Never use a final release number as a NEWVERSION. If you do, then it is impossible to add any more database upgrades without incrementing the overall package version.

    6. Use only the d, a, and b letters in OLDVERSION and NEWVERSION. rc is not supported by OpenACS APM.

    7. The distance from OLDVERSION to NEWVERSION should never span a release. For example if we had a bug fix in -acs-kernel on 5.1.0 you wouldn't want a file upgrade-5.0.4-5.1.0d1.sql since if you subsequently need to provide a 5.0.4-5.0.5 upgrade you will have to rename the 5.0.4-5.1.0 upgrade since you can't have upgrades which overlap like that. Instead, use upgrade-5.1.0d1-5.1.0d2.sql -

    View comments on this page at openacs.org
    -=======

    Naming Database Upgrade Scripts

    Database upgrade scripts must be named very precisely in order for the Package Manager to run the correct script at the correct time.

    1. Upgrade scripts should be named /packages/myfirstpackage/sql/postgresql/upgrade/upgrade-OLDVERSION-NEWVERSION.sql

    2. If the version you are working on is a later version than the current released version, OLDVERSION should be the current version. The current version is package version in the APM and in /packages/myfirstpackage/myfirstpackage.info. So if forums is at 2.0.1, OLDVERSION should be 2.0.1d1. Note that this means that new version development that includes an upgrade must start at d2, not d1.

    3. If you are working on a pre-release version of a package, use the current package version as OLDVERSION. Increment the package version as appropriate (see above) and use the new version as NEWVERSION. For example, if you are working on 2.0.1d3, make it 2.0.1d4 and use upgrade-2.0.1d3-2.0.1d4.sql.

    4. Database upgrades should be confined to development releases, not alpha or beta releases.

    5. Never use a final release number as a NEWVERSION. If you do, then it is impossible to add any more database upgrades without incrementing the overall package version.

    6. Use only the d, a, and b letters in OLDVERSION and NEWVERSION. rc is not supported by OpenACS APM.

    7. The distance from OLDVERSION to NEWVERSION should never span a release. For example if we had a bug fix in acs-kernel on 5.1.0 you wouldn't want a file upgrade-5.0.4-5.1.0d1.sql since if you subsequently need to provide a 5.0.4-5.0.5 upgrade you will have to rename the 5.0.4-5.1.0 upgrade since you can't have upgrades which overlap like that. Instead, use upgrade-5.1.0d1-5.1.0d2.sql

    View comments on this page at openacs.org
    ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/eng-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards.html,v diff -u -r1.28.2.2 -r1.28.2.3 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 12 Dec 2010 00:07:02 -0000 1.28.2.2 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 12 Dec 2010 01:37:24 -0000 1.28.2.3 @@ -1,9 +1,4 @@ -<<<<<<< eng-standards.html - -Chapter 12. Engineering Standards
    View comments on this page at openacs.org
    -======= -Chapter 11. Engineering Standards

    Chapter 11. Engineering Standards

    Table of Contents

    OpenACS Style Guide
    +Chapter 12. Engineering Standards
    View comments on this page at openacs.org
    ->>>>>>> 1.30 Index: openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html,v diff -u -r1.36.2.2 -r1.36.2.3 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 12 Dec 2010 00:07:02 -0000 1.36.2.2 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 12 Dec 2010 01:37:24 -0000 1.36.2.3 @@ -1,10 +1,5 @@ -<<<<<<< ext-auth-requirements.html - -External Authentication Requirements

    External Authentication Requirements

    Vision

    People have plenty of usernames and passwords already, we -======= -External Authentication Requirements

    External Authentication Requirements

    Vision

    People have plenty of usernames and passwords already, we ->>>>>>> 1.38 +External Authentication Requirements

    External Authentication Requirements

    Vision

    People have plenty of usernames and passwords already, we don't want them to have yet another. We want people to be able to log in to OpenACS with the same password they use to log in to any other system.

    Besides, administrators have better things to do than create @@ -48,15 +43,9 @@ Directory.

  • Authentication API: The API through which login pages and applications talk to the authentication service. There's one and only one implementation of the authentication API, namly the one -<<<<<<< ext-auth-requirements.html - included in OpenACS Core.

  • Authentication Driver API: The service contract which - authentication drivers implement.

  • Conceptual Pictures

    Authentication:

    -

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

    FeatureStatusDescription
    New API
    EXT-AUTH-01AExtend Authentication/Acct Status API
    EXT-AUTH-03AAccount Creation API
    EXT-AUTH-05APassword Management API
    EXT-AUTH-30AAuthority Management API

    Login

    FeatureStatusDescription
    Login
    EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
    EXT-AUTH-38Aad_form complain feature
    EXT-AUTH-19ARewrite password recovery to use API
    EXT-AUTH-21ARewrite email verification with API
    EXT-AUTH-28AUsername is email switch

    Users will log in using a username, a authority, and a -======= included in OpenACS Core.

  • Authentication Driver API: The service contract which authentication drivers implement.

  • Conceptual Pictures

    Authentication:

    -

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

    FeatureStatusDescription
    New API
    EXT-AUTH-01AExtend Authentication/Acct Status API
    EXT-AUTH-03AAccount Creation API
    EXT-AUTH-05APassword Management API
    EXT-AUTH-30AAuthority Management API

    Login

    FeatureStatusDescription
    Login
    EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
    EXT-AUTH-38Aad_form complain feature
    EXT-AUTH-19ARewrite password recovery to use API
    EXT-AUTH-21ARewrite email verification with API
    EXT-AUTH-28AUsername is email switch

    Users will log in using a username, a authority, and a ->>>>>>> 1.38 +

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

    FeatureStatusDescription
    New API
    EXT-AUTH-01AExtend Authentication/Acct Status API
    EXT-AUTH-03AAccount Creation API
    EXT-AUTH-05APassword Management API
    EXT-AUTH-30AAuthority Management API

    Login

    FeatureStatusDescription
    Login
    EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
    EXT-AUTH-38Aad_form complain feature
    EXT-AUTH-19ARewrite password recovery to use API
    EXT-AUTH-21ARewrite email verification with API
    EXT-AUTH-28AUsername is email switch

    Users will log in using a username, a authority, and a password. The authority is the source for user/password verification. OpenACS can be an authority itself.

    Each user in OpenACS will belong to exactly one authority, which can either be the "local" OpenACS users table, in which case the @@ -387,8 +376,4 @@ PAM specification

  • Draft Proposal by Andrew Grumet.

  • Yale CAS, a centrl authentication service a' la -<<<<<<< ext-auth-requirements.html - Passport.

  • Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    1Updated work-in-progress for consortium-sponsored ext-auth work at Collaboraid.20 Aug 2003Joel Aufrecht
    View comments on this page at openacs.org
    -======= - Passport.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    1Updated work-in-progress for consortium-sponsored ext-auth work at Collaboraid.20 Aug 2003Joel Aufrecht
    View comments on this page at openacs.org
    ->>>>>>> 1.38 + Passport.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    1Updated work-in-progress for consortium-sponsored ext-auth work at Collaboraid.20 Aug 2003Joel Aufrecht
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/filename.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/filename.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/filename.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/filename.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,5 +1,5 @@ - -Detailed Design Documentation Template

    Detailed Design Documentation Template

    By You

    Start Note

    + +Detailed Design Documentation Template

    Detailed Design Documentation Template

    By You

    Start Note

    NOTE: Some of the sections of this template may not apply to your package, e.g. there may be no user-visible UI elements for a component of the OpenACS Core. Furthermore, it may be easier in some circumstances @@ -11,48 +11,48 @@ your own judgment, consult with peers when possible, and adapt intelligently.

    - Also, bear in mind the audience for detailed design: fellow + Also, bear in mind the audience for detailed design: fellow programmers who want to maintain/extend the software, AND parties interested in evaluating software quality. -

    Essentials

    +

    Essentials

    When applicable, each of the following items should receive its own link: -

    • User directory

    • OpenACS administrator directory

    • Subsite administrator directory

    • Tcl script directory (link to the API browser page for the package)

    • PL/SQL file (link to the API browser page for the package)

    • Data model

    • Requirements document

    • ER diagram

    • Transaction flow diagram

    Introduction

    +

    • User directory

    • OpenACS administrator directory

    • Subsite administrator directory

    • Tcl script directory (link to the API browser page for the package)

    • PL/SQL file (link to the API browser page for the package)

    • Data model

    • Requirements document

    • ER diagram

    • Transaction flow diagram

    Introduction

    This section should provide an overview of the package and address at least the following issues: -

    • What this package is intended to allow the user (or different - classes of users) to accomplish.

    • Within reasonable bounds, what this package is not intended to allow users to - accomplish.

    • The application domains where this package is most likely to be of use.

    • A high-level overview of how the package meets its +

      • What this package is intended to allow the user (or different + classes of users) to accomplish.

      • Within reasonable bounds, what this package is not intended to allow users to + accomplish.

      • The application domains where this package is most likely to be of use.

      • A high-level overview of how the package meets its requirements (which should have been documented elsewhere). This - is to include relevant material from the "features" section of the + is to include relevant material from the "features" section of the cover sheet (the cover sheet is a wrapper doc with links to all other package docs).

      Also worthy of treatment in this section: -

      • When applicable, a careful demarcation between the +

        • When applicable, a careful demarcation between the functionality of this package and others which - at least superficially - appear to address the same requirements.

        Note: it's entirely possible that a discussion of what a package is not intended to do differs from a discussion of future improvements for the package. -

      Historical Considerations

      +

      Historical Considerations

      For a given set of requirements, typically many possible implementations and solutions exist. Although eventually only one solution is implemented, a discussion of the alternative solutions canvassed - noting why they were rejected - proves helpful to both current and future developers. All readers would be reminded as to why and how the particular solution developed over time, avoiding re-analysis of problems already solved. -

      Competitive Analysis

      +

      Competitive Analysis

      Although currently only a few package documentation pages contain a discussion of competing software, (e.g. chat, portals), this section should be present whenever such competition exists. -

      • If your package exhibits features missing from competing - software, this fact should be underscored.

      • If your package lacks features which are present in competing +

        • If your package exhibits features missing from competing + software, this fact should be underscored.

        • If your package lacks features which are present in competing software, the reasons for this should be discussed here; our sales team needs to be ready for inquiries regarding features our software lacks.

        Note that such a discussion may differ from a discussion of a package's potential future improvements. -

      Design Tradeoffs

      +

      Design Tradeoffs

      No single design solution can optimize every desirable software attribute. For example, an increase in the security of a system will likely entail a decrease in its ease-of-use, and an increase in the @@ -62,14 +62,14 @@ should include a discussion of the tradeoffs involved with the design chosen, and the reasons for your choices. Some areas of importance to keep in mind are: -

      Areas of interest to users:

      • Performance: availability and efficiency

      • Flexibility

      • Interoperability

      • Reliability and robustness

      • Usability

      Areas of interest to developers:

      • Maintainability

      • Portability

      • Reusability

      • Testability

      API

      +

      Areas of interest to users:

      • Performance: availability and efficiency

      • Flexibility

      • Interoperability

      • Reliability and robustness

      • Usability

      Areas of interest to developers:

      • Maintainability

      • Portability

      • Reusability

      • Testability

      API

      Here's where you discuss the abstractions used by your package, such as the procedures encapsulating the legal transactions on the data model. Explain the organization of procedures and their particulars (detail above and beyond what is documented in the code), including: -

      • Problem-domain components: key algorithms, e.g. a specialized - statistics package would implement specific mathematical procedures.

      • User-interface components: e.g. HTML widgets that the package may need.

      • Data management components: procedures that provide a stable +

        • Problem-domain components: key algorithms, e.g. a specialized + statistics package would implement specific mathematical procedures.

        • User-interface components: e.g. HTML widgets that the package may need.

        • Data management components: procedures that provide a stable interface to database objects and legal transactions - the latter often correspond to tasks.

        Remember that the correctness, completeness, and stability of the API @@ -80,64 +80,60 @@ handle transactions, instead of encapsulating them via procedures). Experience has taught us that we need to focus on the API for maintainability of our systems in the face of constant change. -

      Data Model Discussion

      +

      Data Model Discussion

      The data model discussion should do more than merely display the SQL code, since this information is already be available via a link in the - "essentials" section above. Instead, there should be a high-level + "essentials" section above. Instead, there should be a high-level discussion of how your data model meets your solution requirements: why the database entities were defined as they are, and what transactions you expect to occur. (There may be some overlap with the API section.) Here are some starting points: -

      • The data model discussion should address the intended usage +

        • The data model discussion should address the intended usage of each entity (table, trigger, view, procedure, etc.) when this information is not obvious from an inspection of the data model - itself.

        • If a core service or other subsystem is being used (e.g., the + itself.

        • If a core service or other subsystem is being used (e.g., the new parties and groups, permissions, etc.) this should also be - mentioned.

        • Any default permissions should be identified herein.

        • Discuss any data model extensions which tie into other - packages.

        • Transactions

          Discuss modifications which the database may undergo from + mentioned.

        • Any default permissions should be identified herein.

        • Discuss any data model extensions which tie into other + packages.

        • Transactions

          Discuss modifications which the database may undergo from your package. Consider grouping legal transactions according to the invoking user class, i.e. transactions by an OpenACS-admin, by - subsite-admin, by a user, by a developer, etc.

      User Interface

      + subsite-admin, by a user, by a developer, etc.

    User Interface

    In this section, discuss user interface issues and pages to be built; you can organize by the expected classes of users. These may include: -

    • Developers

    • OpenACS administrators (previously known as site-wide administrators)

    • Subsite administrators

    • End users

    +

    • Developers

    • OpenACS administrators (previously known as site-wide administrators)

    • Subsite administrators

    • End users

    You may want to include page mockups, site-maps, or other visual aids. Ideally this section is informed by some prototyping you've done, to establish the package's usability with the client and other interested parties.

    Note: In order that developer documentation be uniform across different system documents, these users should herein be designated as - "the developer," "the OpenACS-admin," "the sub-admin," and "the user," + "the developer," "the OpenACS-admin," "the sub-admin," and "the user," respectively.

    Finally, note that as our templating system becomes more entrenched within the OpenACS, this section's details are likely to shift from UI specifics to template interface specifics. -

    Configuration/Parameters

    +

    Configuration/Parameters

    Under OpenACS 5.6.0, parameters are set at two levels: at the global level by the OpenACS-admin, and at the subsite level by a sub-admin. In this section, list and discuss both levels of parameters. -

    Future Improvements/Areas of Likely Change

    +

    Future Improvements/Areas of Likely Change

    If the system presently lacks useful/desirable features, note details here. You could also comment on non-functional improvements to the package, such as usability.

    - Note that a careful treatment of the earlier "competitive analysis" + Note that a careful treatment of the earlier "competitive analysis" section can greatly facilitate the documenting of this section. -

    Authors

    +

    Authors

    Although a system's data model file often contains this information, this isn't always the case. Furthermore, data model files often undergo substantial revision, making it difficult to track down the system creator. An additional complication: package documentation may be authored by people not directly involved in coding. Thus to avoid unnecessary confusion, include email links to the following roles as they may apply: -

    • System creator

    • System owner

    • Documentation author

    Revision History

    +

    • System creator

    • System owner

    • Documentation author

    Revision History

    The revision history table below is for this template - modify it as needed for your actual design document. -<<<<<<< filename.html

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Creation8/21/2000Josh Finkler, Audrey McLoghlin
    ($Id$)
    View comments on this page at openacs.org
    -======= -

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Creation8/21/2000Josh Finkler, Audrey McLoghlin
    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/for-everyone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/for-everyone.html,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 12 Dec 2010 00:07:02 -0000 1.25.2.1 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 12 Dec 2010 01:37:24 -0000 1.25.2.2 @@ -1,2 +1,2 @@ -Part I. OpenACS For Everyone
    View comments on this page at openacs.org
    +Part I. OpenACS For Everyone

    Part I. OpenACS For Everyone

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/form-builder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/form-builder.html,v diff -u -r1.26.2.2 -r1.26.2.3 --- openacs-4/packages/acs-core-docs/www/form-builder.html 12 Dec 2010 00:07:02 -0000 1.26.2.2 +++ openacs-4/packages/acs-core-docs/www/form-builder.html 12 Dec 2010 01:37:24 -0000 1.26.2.3 @@ -1,22 +1,12 @@ -<<<<<<< form-builder.html - -Using Form Builder: building html forms dynamically

    Using Form Builder: building html forms dynamically

    Overview

    ($Id$)
    -======= -Using Form Builder: building html forms dynamically

    Using Form Builder: building html forms dynamically

    Overview

    ($Id$)
    ->>>>>>> 1.28 +Using Form Builder: building html forms dynamically

    Using Form Builder: building html forms dynamically

    Overview

    ($Id$)
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    OpenACS has a form manager called ad_form. Ad_form has an adaptable UI. Error handling includes inline error reporting, and is customizable. However, ad_form can be tricky to use. In addition to this document, -<<<<<<< form-builder.html - the ad_form api - documentation is helpful.

    Multi-part Elements

    Some elements have more than one choice, or can submit more than one value.

    SELECT elements

    1. Creating the form element. Populate a list of lists with values for the option list.

      set foo_options [db_list_of_lists foo_option_list "
      -=======
        the ad_form api
      - documentation is helpful.

    Multi-part Elements

    Some elements have more than one choice, or can submit more than one value.

    SELECT elements

    1. Creating the form element. Populate a list of lists with values for the option list.

      set foo_options [db_list_of_lists foo_option_list "
      ->>>>>>> 1.28
      + documentation is helpful.

    Multi-part Elements

    Some elements have more than one choice, or can submit more than one value.

    SELECT elements

    1. Creating the form element. Populate a list of lists with values for the option list.

      set foo_options [db_list_of_lists foo_option_list "
           select foo,
                  foo_id
             from foos
      @@ -60,12 +50,6 @@
           ns_log notice the following form was submitted on my page
           ns_set print $mypage
       }
      -<<<<<<< form-builder.html
      -    

    Tips for form widgets

    Here are some tips for dealing with some of the form widgets:

    Current widget

    Common Errors

    Here are some common errors and what to do when you - encounter them:

    Error when selecting values

    This generally happens when there is an error in your - query.

    View comments on this page at openacs.org
    -=======

    Tips for form widgets

    Here are some tips for dealing with some of the form widgets:

    Current widget

    Common Errors

    Here are some common errors and what to do when you - encounter them:

    Error when selecting values

    This generally happens when there is an error in your - query.

    View comments on this page at openacs.org
    ->>>>>>> 1.28 + encounter them:

    Error when selecting values

    This generally happens when there is an error in your + query.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/general-documents.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/general-documents.html,v diff -u -r1.25.2.1 -r1.25.2.2 --- openacs-4/packages/acs-core-docs/www/general-documents.html 12 Dec 2010 00:07:02 -0000 1.25.2.1 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 12 Dec 2010 01:37:24 -0000 1.25.2.2 @@ -1,2 +1,2 @@ -Chapter 1. High level information: What is OpenACS?

    Chapter 1. High level information: What is OpenACS?

    View comments on this page at openacs.org
    +Chapter 1. High level information: What is OpenACS?

    Chapter 1. High level information: What is OpenACS?

    Table of Contents

    Overview
    Release Notes Section Missing
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/groups-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-design.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/groups-design.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< groups-design.html - -Groups Design

    Groups Design

    By Rafael H. Schloming and Mark Thomas

    -======= -Groups Design

    Groups Design

    By Rafael H. Schloming and Mark Thomas

    ->>>>>>> 1.32 +Groups Design

    Groups Design

    By Rafael H. Schloming and Mark Thomas

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

    Essentials

    • User directory

    • Sitewide administrator directory

    • Subsite administrator directory

    • TCL script directory

    • OpenACS 4 Groups Requirements

    • Data model

    • PL/SQL file

      • Index: openacs-4/packages/acs-core-docs/www/groups-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< groups-requirements.html - -Groups Requirements

        Groups Requirements

        By Rafael H. Schloming, Mark Thomas

        -======= -Groups Requirements

        Groups Requirements

        By Rafael H. Schloming, Mark Thomas

        ->>>>>>> 1.32 +Groups Requirements

        Groups Requirements

        By Rafael H. Schloming, Mark Thomas

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

        Introduction

        Almost all database-backed websites have users, and need to model the Index: openacs-4/packages/acs-core-docs/www/high-avail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/high-avail.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/high-avail.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/high-avail.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,7 +1,2 @@ -<<<<<<< high-avail.html - -High Availability/High Performance Configurations

        High Availability/High Performance Configurations

        See also Section , “Running a PostgreSQL database on another server”.

        Figure 6.1. Multiple-server configuration

        Multiple-server configuration
        View comments on this page at openacs.org
        -======= -High Availability/High Performance Configurations

        High Availability/High Performance Configurations

        See also Running a PostgreSQL database on another server.

        Figure 6.1. Multiple-server configuration

        Multiple-server configuration

        View comments on this page at openacs.org
        ->>>>>>> 1.22 +High Availability/High Performance Configurations

        High Availability/High Performance Configurations

        See also Running a PostgreSQL database on another server.

        Figure 6.1. Multiple-server configuration

        Multiple-server configuration

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/how-do-I.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/how-do-I.html,v diff -u -r1.23.2.2 -r1.23.2.3 --- openacs-4/packages/acs-core-docs/www/how-do-I.html 12 Dec 2010 00:07:02 -0000 1.23.2.2 +++ openacs-4/packages/acs-core-docs/www/how-do-I.html 12 Dec 2010 01:37:24 -0000 1.23.2.3 @@ -1,19 +1,7 @@ -<<<<<<< how-do-I.html - -How Do I?

        How Do I?

        How do I edit the front page of a new site through a web interface?

        The easiest way is to install the Edit-This-Page package.

        1. Log in to the web site as an administrator.

        2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

        3. Choose Edit This Page and install

        4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

        How do I let anybody who registers post to a weblog?

        Go to /admin/permissions and grant Create to Registered Users

        How do I replace the front page of a new site with the front page of an application on that site

        Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

        1. On the front page, click the Admin button.

        2. On the administration page, click Parameters link.

        3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

        How do I put custom functionality on front page of a new site?

        Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/$OPENACS_SERVICE_NAME/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

        1. cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index* /var/lib/aolserver/$OPENACS_SERVICE_NAME/www
        2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

        How do I change the site-wide style?

        Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

        • -======= -How Do I?

          How Do I?

          How do I edit the front page of a new site through a web interface?

          The easiest way is to install the Edit-This-Page package.

          1. Log in to the web site as an administrator.

          2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

          3. Choose Edit This Page and install

          4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

          How do I let anybody who registers post to a weblog?

          Go to /admin/permissions and grant Create to Registered Users

          How do I replace the front page of a new site with the front page of an application on that site

          Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

          1. On the front page, click the Admin button.

          2. On the administration page, click Parameters link.

          3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

          How do I put custom functionality on front page of a new site?

          Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/$OPENACS_SERVICE_NAME/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

          1. cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index* /var/lib/aolserver/$OPENACS_SERVICE_NAME/www
          2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

          How do I change the site-wide style?

          Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

          • ->>>>>>> 1.25 +How Do I?

            How Do I?

            How do I edit the front page of a new site through a web interface?

            The easiest way is to install the Edit-This-Page package.

            1. Log in to the web site as an administrator.

            2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

            3. Choose Edit This Page and install

            4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

            How do I let anybody who registers post to a weblog?

            Go to /admin/permissions and grant Create to Registered Users

            How do I replace the front page of a new site with the front page of an application on that site

            Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

            1. On the front page, click the Admin button.

            2. On the administration page, click Parameters link.

            3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

            How do I put custom functionality on front page of a new site?

            Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/$OPENACS_SERVICE_NAME/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

            1. cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index* /var/lib/aolserver/$OPENACS_SERVICE_NAME/www
            2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

            How do I change the site-wide style?

            Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

            • A templated page uses an ADP/TCL pair. The first line in the ADP file is usually: -<<<<<<< how-do-I.html -

              <master>

              If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/$OPENACS_SERVICE_NAME/www, this is /var/lib/aolserver/$OPENACS_SERVICE_NAME/www/default-master.adp and the associated .tcl file. -

            • The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp and .tcl)

            • The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp and .tcl).

            • Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

            Figure 4.1. Site Templates

            Site Templates

            How do I diagnose a permissions problem?

            • Steps to Reproduce. The events package does not allow users to register for new events.

              1. Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.

              2. Select an available event

              3. A link such as Registration: Deadline is 03/15/2004 10:00am. -» Login or sign up to register for this event. is visible. Click on "Login or sign up" -

              4. Complete a new registration. Afterwards, you should be redirected back to the same page.

              Actual Results: The page says "You do not have permission to register for this event."

              Expected results: A link or form to sign up for the event is shown.

            • Finding the problem. We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl. It contains this line:

              set can_register_p [events::security::can_register_for_event_p -event_id $event_id]

              We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply

              return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]

              This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.

            • Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.

              1. To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".

              2. Click "Grant Permission"

              3. Grant the write permission to Registered Users.

                Figure 4.2. Granting Permissions

                Granting Permissions

              OpenACS 5.0 offers a prettier version at /admin/applications.

              Figure 4.3. Granting Permissions in 5.0

              Granting Permissions in 5.0
            View comments on this page at openacs.org
            -=======

            <master>

            If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/$OPENACS_SERVICE_NAME/www, this is /var/lib/aolserver/$OPENACS_SERVICE_NAME/www/default-master.adp and the associated .tcl file. -

          • The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp and .tcl)

          • The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp and .tcl).

          • Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

          Figure 4.1. Site Templates

          Site Templates

          How do I diagnose a permissions problem?

          • Steps to Reproduce. The events package does not allow users to register for new events.

            1. Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.

            2. Select an available event

            3. A link such as Registration: Deadline is 03/15/2004 10:00am. +

            4. The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp and .tcl)

            5. The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp and .tcl).

            6. Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

          Figure 4.1. Site Templates

          Site Templates

          How do I diagnose a permissions problem?

          • Steps to Reproduce. The events package does not allow users to register for new events.

            1. Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.

            2. Select an available event

            3. A link such as Registration: Deadline is 03/15/2004 10:00am. » Login or sign up to register for this event. is visible. Click on "Login or sign up" -

            4. Complete a new registration. Afterwards, you should be redirected back to the same page.

            Actual Results: The page says "You do not have permission to register for this event."

            Expected results: A link or form to sign up for the event is shown.

          • Finding the problem. We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl. It contains this line:

            set can_register_p [events::security::can_register_for_event_p -event_id $event_id]

            We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply

            return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]

            This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.

          • Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.

            1. To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".

            2. Click "Grant Permission"

            3. Grant the write permission to Registered Users.

              Figure 4.2. Granting Permissions

              Granting Permissions

            OpenACS 5.0 offers a prettier version at /admin/applications.

            Figure 4.3. Granting Permissions in 5.0

            Granting Permissions in 5.0

          View comments on this page at openacs.org
          ->>>>>>> 1.25 +

        • Complete a new registration. Afterwards, you should be redirected back to the same page.

        Actual Results: The page says "You do not have permission to register for this event."

        Expected results: A link or form to sign up for the event is shown.

      • Finding the problem. We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl. It contains this line:

        set can_register_p [events::security::can_register_for_event_p -event_id $event_id]

        We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply

        return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]

        This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.

      • Setting Permissions. A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.

        1. To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".

        2. Click "Grant Permission"

        3. Grant the write permission to Registered Users.

          Figure 4.2. Granting Permissions

          Granting Permissions

        OpenACS 5.0 offers a prettier version at /admin/applications.

        Figure 4.3. Granting Permissions in 5.0

        Granting Permissions in 5.0

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-convert.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-convert.html,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 00:07:02 -0000 1.22.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-convert.html 12 Dec 2010 01:37:24 -0000 1.22.2.3 @@ -1,10 +1,5 @@ -<<<<<<< i18n-convert.html - -How to Internationalize a Package

    How to Internationalize a Package

    Tip

    -======= -How to Internationalize a Package

    How to Internationalize a Package

    Tip

    ->>>>>>> 1.24 +How to Internationalize a Package

    How to Internationalize a Package

    Tip

    For multilingual websites we recommend using the UTF8 charset. In order for AOLserver to use utf8 you need to set the config parameters OutputCharset and @@ -77,13 +72,8 @@ test. If you don't provide the package_key argument then all packages with catalog files will be checked. The script will run its checks primarily on en_US xml catalog files. -<<<<<<< i18n-convert.html -

    Avoiding common i18n mistakes

    • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

      The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

        <p class="form-help-text"><b>Invitations</b> are sent,
      -          when this wizard is completed and casting begins.</p>

      has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

      Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

        <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, 
      -=======
      -      

    Avoiding common i18n mistakes

    • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

      The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

        <p class="form-help-text"><b>Invitations</b> are sent,
      +      

    Avoiding common i18n mistakes

    • Replace complicated keys with longer, simpler keys. When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

      The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

        <p class="form-help-text"><b>Invitations</b> are sent,
                 when this wizard is completed and casting begins.</p>

      has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

      Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

        <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, 
      ->>>>>>> 1.24
       when this wizard is completed and casting begins.#>
         </p>

      Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:

      Select which case <if @simulation.casting_type@ eq "open">and
       role</if> to join, or create a new case for yourself.  If you do not
      Index: openacs-4/packages/acs-core-docs/www/i18n-design.html
      ===================================================================
      RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-design.html,v
      diff -u -r1.12.2.2 -r1.12.2.3
      --- openacs-4/packages/acs-core-docs/www/i18n-design.html	12 Dec 2010 00:07:02 -0000	1.12.2.2
      +++ openacs-4/packages/acs-core-docs/www/i18n-design.html	12 Dec 2010 01:37:24 -0000	1.12.2.3
      @@ -1,8 +1,3 @@
      -<<<<<<< i18n-design.html
      -
      -Design Notes

      Design Notes

      User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:

      1. Use user preference for this package (stored in ad_locale_user_prefs)

      2. Use system preference for the package (stored in apm_packages)

      3. Use user's general preference (stored in user_preferences)

      4. Use Browser header (Accept-Language HTTP header)

      5. Use system locale (an APM parameter for acs_lang)

      6. default to en_US

      For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is -======= -Design Notes

      Design Notes

      User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:

      1. Use user preference for this package (stored in ad_locale_user_prefs)

      2. Use system preference for the package (stored in apm_packages)

      3. Use user's general preference (stored in user_preferences)

      4. Use Browser header (Accept-Language HTTP header)

      5. Use system locale (an APM parameter for acs_lang)

      6. default to en_US

      For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is ->>>>>>> 1.14 +Design Notes

      Design Notes

      User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:

      1. Use user preference for this package (stored in ad_locale_user_prefs)

      2. Use system preference for the package (stored in apm_packages)

      3. Use user's general preference (stored in user_preferences)

      4. Use Browser header (Accept-Language HTTP header)

      5. Use system locale (an APM parameter for acs_lang)

      6. default to en_US

      For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is found, then that locale is offered instead.

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/i18n-introduction.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-introduction.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-introduction.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-introduction.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,10 +1,5 @@ -<<<<<<< i18n-introduction.html - -How Internationalization/Localization works in OpenACS

      How Internationalization/Localization works in OpenACS

      -======= -How Internationalization/Localization works in OpenACS

      How Internationalization/Localization works in OpenACS

      ->>>>>>> 1.16 +How Internationalization/Localization works in OpenACS

      How Internationalization/Localization works in OpenACS

      This document describes how to develop internationalized OpenACS packages, including writing new packages with internationalization and converting old packages. Text that Index: openacs-4/packages/acs-core-docs/www/i18n-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-overview.html,v diff -u -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-overview.html 12 Dec 2010 00:07:02 -0000 1.12.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-overview.html 12 Dec 2010 01:37:24 -0000 1.12.2.3 @@ -1,7 +1,2 @@ -<<<<<<< i18n-overview.html - -Internationalization and Localization Overview

      Internationalization and Localization Overview

      Table 14.1. Internationalization and Localization Overview

      StageTaskWho
      InternationalizationPackage Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information)Package Developer
      Release ManagementThe newly internationalized package is released.Package Developer
      The translation server is updated with the new package.Translation server maintainers
      LocalizationTranslators work in their respective locales to write text for each message key. (More information)Translators
      Release ManagementThe translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server.Translation server maintainers
      The catalog files are committed to the OpenACS code base.Translation server maintainers
      A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository.Release Manager
      UpgradingSite Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators
      Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten.Site Administrators
      View comments on this page at openacs.org
      -======= -Internationalization and Localization Overview

      Internationalization and Localization Overview

      Table 13.1. Internationalization and Localization Overview

      StageTaskWho
      InternationalizationPackage Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information)Package Developer
      Release ManagementThe newly internationalized package is released.Package Developer
      The translation server is updated with the new package.Translation server maintainers
      LocalizationTranslators work in their respective locales to write text for each message key. (More information)Translators
      Release ManagementThe translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server.Translation server maintainers
      The catalog files are committed to the OpenACS code base.Translation server maintainers
      A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository.Release Manager
      UpgradingSite Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators
      Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten.Site Administrators

      View comments on this page at openacs.org
      ->>>>>>> 1.14 +Internationalization and Localization Overview

      Internationalization and Localization Overview

      Table 14.1. Internationalization and Localization Overview

      StageTaskWho
      InternationalizationPackage Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information)Package Developer
      Release ManagementThe newly internationalized package is released.Package Developer
      The translation server is updated with the new package.Translation server maintainers
      LocalizationTranslators work in their respective locales to write text for each message key. (More information)Translators
      Release ManagementThe translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server.Translation server maintainers
      The catalog files are committed to the OpenACS code base.Translation server maintainers
      A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository.Release Manager
      UpgradingSite Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators
      Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten.Site Administrators

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/i18n-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-requirements.html,v diff -u -r1.22.2.2 -r1.22.2.3 --- openacs-4/packages/acs-core-docs/www/i18n-requirements.html 12 Dec 2010 00:07:02 -0000 1.22.2.2 +++ openacs-4/packages/acs-core-docs/www/i18n-requirements.html 12 Dec 2010 01:37:24 -0000 1.22.2.3 @@ -1,18 +1,9 @@ -<<<<<<< i18n-requirements.html - -OpenACS Internationalization Requirements

      OpenACS Internationalization Requirements

      by Henry Minsky, - Yon Feldman, - Lars Pind, - Peter Marklund, - Christian Hvid, -======= -OpenACS Internationalization Requirements

      OpenACS Internationalization Requirements

      by Henry Minsky, +OpenACS Internationalization Requirements

      OpenACS Internationalization Requirements

      by Henry Minsky, Yon Feldman, Lars Pind, Peter Marklund, Christian Hvid, ->>>>>>> 1.24 and others.

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -99,21 +90,12 @@ for other locales. This would include support for creating resources such as message catalogs, non-text assets such as graphics, and use of templates which help to separate application -<<<<<<< i18n-requirements.html -logic from presentation.

    Competitive -Analysis

    Other application servers: ATG Dyanmo, Broadvision, Vignette, -... ? Anyone know how they deal with i18n ?

    Related -Links

    Competitive Analysis

    Other application servers: ATG Dyanmo, Broadvision, Vignette, ... ? Anyone know how they deal with i18n ?

    Related Links

    ($Id$)
    View comments on this page at openacs.org
    -======= - to production, or get or contribute development code from openacs.org.

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.31 Index: openacs-4/packages/acs-core-docs/www/install-next-add-server.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-add-server.html,v diff -u -r1.13.2.2 -r1.13.2.3 --- openacs-4/packages/acs-core-docs/www/install-next-add-server.html 12 Dec 2010 00:07:02 -0000 1.13.2.2 +++ openacs-4/packages/acs-core-docs/www/install-next-add-server.html 12 Dec 2010 01:37:24 -0000 1.13.2.3 @@ -1,12 +1,6 @@ -<<<<<<< install-next-add-server.html - -Running multiple services on one machine

    Running multiple services on one machine

    Services on different ports. To run a different service on another port but the same - ip, simply repeat Install OpenACS 5.6.0 replacing -======= Running multiple services on one machine

    Running multiple services on one machine

    Services on different ports. To run a different service on another port but the same ip, simply repeat Install OpenACS 5.6.0 replacing ->>>>>>> 1.15 $OPENACS_SERVICE_NAME, and change the

    set httpport              8000
     set httpsport             8443 

    Index: openacs-4/packages/acs-core-docs/www/install-next-backups.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-backups.html,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-core-docs/www/install-next-backups.html 18 Jun 2010 21:29:35 -0000 1.9.2.1 +++ openacs-4/packages/acs-core-docs/www/install-next-backups.html 12 Dec 2010 01:37:24 -0000 1.9.2.2 @@ -1,36 +1,36 @@ - -Backup Strategy

    Backup Strategy

    + +Backup Strategy

    Backup Strategy

    The purpose of backup is to enable recovery. Backup and recovery are always risky; here are some steps that minimize the chance recovery is necessary: -

    • +

      • Store everything on a fault-tolerant disk array (RAID 1 or 5 or better). -

      • +

      • Use battery backup. -

      • +

      • Use more reliable hardware, such as SCSI instead of IDE. -

      These steps improve the chances of successful recovery:

      • +

      These steps improve the chances of successful recovery:

      • Store backups on a third disk on another controller -

      • +

      • Store backups on a different computer on a different network in a different physical location. (Compared to off-line backup such as tapes and CDRs, on-line backup is faster and more likely to succeed, but requires maintenance of another machine.) -

      • +

      • Plan and configure for recovery from the beginning. -

      • +

      • Test your recovery strategy from time to time. -

      • +

      • Make it easy to maintain and test your recovery strategy, so that you are more likely to do it.

      OpenACS installations comprise files and database contents. If you follow the reference install and put all files, including configuration files, in - /var/lib/aolserver/$OPENACS_SERVICE_NAME/, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/, and back up the database nightly to a file in - /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup, then you can apply standard file-based backup strategies to - /var/lib/aolserver/$OPENACS_SERVICE_NAME + /var/lib/aolserver/$OPENACS_SERVICE_NAME

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html,v diff -u -r1.19.2.2 -r1.19.2.3 --- openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 12 Dec 2010 00:07:02 -0000 1.19.2.2 +++ openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 12 Dec 2010 01:37:24 -0000 1.19.2.3 @@ -1,14 +1,7 @@ -<<<<<<< install-next-nightly-vacuum.html - -Vacuum Postgres nightly

    Vacuum Postgres nightly

    - The "vacuum" command must be run periodically to reclaim space - in versions of PostgreSQL before 7.4. The "vacuum analyze" form -======= -Vacuum Postgres nightly

    Vacuum Postgres nightly

    +Vacuum Postgres nightly

    Vacuum Postgres nightly

    The "vacuum" command must be run periodically to reclaim space in versions of PostgreSQL before 7.4. The "vacuum analyze" form ->>>>>>> 1.21 additionally collects statistics on the disbursion of columns in the database, which the optimizer uses when it calculates just how to execute queries. The availability of this @@ -23,8 +16,4 @@ step.

    Edit your crontab:

    [joeuser ~]$ crontab -e

    We'll set vacuum up to run nightly at 1 AM. Add the following line:

    -<<<<<<< install-next-nightly-vacuum.html
     0 1 * * * /usr/local/pgsql/bin/vacuumdb $OPENACS_SERVICE_NAME
    ($Id$)
    View comments on this page at openacs.org
    -======= -0 1 * * * /usr/local/pgsql/bin/vacuumdb $OPENACS_SERVICE_NAME
    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.21 Index: openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,5 +1,5 @@ -Starting and Stopping an OpenACS instance.

    Starting and Stopping an OpenACS instance.

    The simplest way to start and stop and OpenACS site is to run the startup shell script provided, /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.

    A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.

    The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.

    1. Daemontools must already be installed. If not, install it.

    2. Each service controlled by daemontools must have a +Starting and Stopping an OpenACS instance.

      Starting and Stopping an OpenACS instance.

      The simplest way to start and stop and OpenACS site is to run the startup shell script provided, /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.

      A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.

      The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.

      1. Daemontools must already be installed. If not, install it.

      2. Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. It works like this:

        • The init program starts every @@ -64,12 +64,6 @@ Most of this information comes from Tom Jackson's AOLserver+Daemontools Mini-HOWTO. -<<<<<<< install-openacs-keepalive.html -

      Table 6.1. How it Works

      ProgramInvoked by this program ...... using this fileWhere to find errorsLog goes toUse these commands to control it
      svscanboot - init/etc/inittabps -auxw | grep readproctitlen/a 
      aolserversupervise -(a child of svscanboot)/service/$OPENACS_SERVICE_NAME/run/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.logsvc -k /service/$OPENACS_SERVICE_NAME
      postgresqlRedhat init scripts during boot/etc/init.d/postgresql/usr/local/pgsql/data/server.log service postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)
      View comments on this page at openacs.org
      -======= -

    Table 6.1. How it Works

    ProgramInvoked by this program ...... using this fileWhere to find errorsLog goes toUse these commands to control it
    svscanboot +

    Table 6.1. How it Works

    ProgramInvoked by this program ...... using this fileWhere to find errorsLog goes toUse these commands to control it
    svscanboot init/etc/inittabps -auxw | grep readproctitlen/a 
    aolserversupervise (a child of svscanboot)/service/$OPENACS_SERVICE_NAME/run/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.logsvc -k /service/$OPENACS_SERVICE_NAME
    postgresqlRedhat init scripts during boot/etc/init.d/postgresql/usr/local/pgsql/data/server.log service postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)

    View comments on this page at openacs.org
    ->>>>>>> 1.22 Index: openacs-4/packages/acs-core-docs/www/install-origins.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-origins.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/install-origins.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/install-origins.html 12 Dec 2010 01:37:24 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Where did this document come from?

    Where did this document come from?

    +Where did this document come from?

    Where did this document come from?

    This document was created by Vinod Kurup, but it's really just plagiarism from a number of documents that came before it. If I've used something that you've written without proper credit, let me @@ -19,5 +19,5 @@ Joel Aufrecht's OpenACS 4.5 Quick Guide.

    - Please also see the Credits section for more acknowledgements. -

    View comments on this page at openacs.org
    + Please also see the Credits section for more acknowledgements. +

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-redhat.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-redhat.html,v diff -u -r1.37.2.2 -r1.37.2.3 --- openacs-4/packages/acs-core-docs/www/install-redhat.html 12 Dec 2010 00:07:02 -0000 1.37.2.2 +++ openacs-4/packages/acs-core-docs/www/install-redhat.html 12 Dec 2010 01:37:24 -0000 1.37.2.3 @@ -1,10 +1,5 @@ -<<<<<<< install-redhat.html - -Appendix A. Install Red Hat 8/9

    Appendix A. Install Red Hat 8/9

    by Joel Aufrecht

    -======= -Appendix A. Install Red Hat 8/9

    Appendix A. Install Red Hat 8/9

    by Joel Aufrecht

    ->>>>>>> 1.39 +Appendix A. Install Red Hat 8/9

    Appendix A. Install Red Hat 8/9

    by Joel Aufrecht

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

    This section takes a blank PC and sets up some supporting @@ -32,11 +27,7 @@

    1. Unplug the network cable from your computer. We don't want to connect to the network until we're sure the computer is secure. -<<<<<<< install-redhat.html - -======= - ->>>>>>> 1.39 + (Wherever you see the word secure, you should always read it as, "secure enough for our purposes, given the amount of work we're @@ -59,21 +50,12 @@ Next.

    2. Reformat the hard drive. If you know what you're doing, do this step on your own. Otherwise: we're going to let the installer wipe out the everything on the main hard drive and then arrange things to -<<<<<<< install-redhat.html - its liking.

      1. Choose Automatically Partition - and click Next

      2. Uncheck -Review (and modify if needed) the partitions created and click Next

      3. On the pop-up window asking "Are you sure - you want to do this?" click - Yes - IF YOU ARE WIPING YOUR HARD DRIVE.

      4. Click Next on the boot loader screen

    3. Configure Networking. -======= its liking.

      1. Choose Automatically Partition and click Next

      2. Uncheck Review (and modify if needed) the partitions created and click Next

      3. On the pop-up window asking "Are you sure you want to do this?" click Yes - IF YOU ARE WIPING YOUR HARD DRIVE.

      4. Click Next on the boot loader screen

    4. Configure Networking. ->>>>>>> 1.39 + IF YOU ARE WIPING YOUR HARD DRIVE.

    5. Click Next on the boot loader screen

  • Configure Networking. Again, if you know what you're doing, do this step yourself, being sure to note the firewall holes. Otherwise, follow the instructions in this step to set up a computer directly connected to the internet with a dedicated IP address.

    1. DHCP is a system by which a computer that @@ -89,21 +71,12 @@ we'll add a few holes to the firewall for services which we need and know are secure. Choose High security level. Check -<<<<<<< install-redhat.html -WWW, -SSH, and -Mail (SMTP). In the Other ports -box, enter 443, 8000, 8443. Click -Next. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the -======= WWW, SSH, and Mail (SMTP). In the Other ports box, enter 443, 8000, 8443. Click Next. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the ->>>>>>> 1.39 +Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the computer to support and then click Next

  • Choose your time zone and click Next.

  • Type in a root password, twice.

  • On the Package selection page, we're going to @@ -115,23 +88,13 @@ risk that's still screened by the firewall, or a resource hog. Just don't install a database or web server, because that would conflict with the database and web server we'll install later. -<<<<<<< install-redhat.html -

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. -======= -

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. ->>>>>>> 1.39 +

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. The same rules apply as in the last step - you can add more stuff, but you shouldn't remove anything the guide adds. We're going to go through all the packages in one big list, so select -<<<<<<< install-redhat.html -Flat -View and wait. In a minute, a -list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    check ImageMagick (required for the photo-album packages,
    uncheckisdn4k-utils (unless you are using isdn, this installs a useless daemon),
    check mutt (a mail program that reads Maildir),
    uncheck nfs-utils (nfs is a major security risk),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination -======= Flat View and wait. In a minute, a -list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    check ImageMagick (required for the photo-album packages,
    uncheckisdn4k-utils (unless you are using isdn, this installs a useless daemon),
    check mutt (a mail program that reads Maildir),
    uncheck nfs-utils (nfs is a major security risk),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination ->>>>>>> 1.39 +list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    check ImageMagick (required for the photo-album packages,
    uncheckisdn4k-utils (unless you are using isdn, this installs a useless daemon),
    check mutt (a mail program that reads Maildir),
    uncheck nfs-utils (nfs is a major security risk),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination of packages we've selected, and wants to satisfy some dependencies. Don't let it. On the next screen, choose Ignore Package @@ -156,13 +119,8 @@ kernel and openssl/openssh root exploits, so you should be upgrading all of that. Since you are upgrading the kernel, reboot after this step. -<<<<<<< install-redhat.html -

  • Lock down SSH

    1. - -=======

    2. Lock down SSH

      1. - ->>>>>>> 1.39 + SSH is the protocol we use to connect securely to the computer (replacing telnet, which is insecure). sshd is the daemon that listens for incoming @@ -243,4 +201,4 @@ cd /var/tmp wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm rpm -Uvh kernel-2.4.18-27.7.x.i686.rpm -reboot

    View comments on this page at openacs.org
    +reboot
  • View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-resources.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-resources.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/install-resources.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/install-resources.html 12 Dec 2010 01:37:24 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Resources

    Resources

    +Resources

    Resources

    Here are some resources that OpenACS users have found useful.

    Books

    • Index: openacs-4/packages/acs-core-docs/www/install-ssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-ssl.html,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/acs-core-docs/www/install-ssl.html 12 Dec 2010 00:07:02 -0000 1.12.2.1 +++ openacs-4/packages/acs-core-docs/www/install-ssl.html 12 Dec 2010 01:37:24 -0000 1.12.2.2 @@ -1,5 +1,5 @@ -Installing SSL Support for an OpenACS service

      Installing SSL Support for an OpenACS service

      Debian Users: apt-get install openssl before proceeding.

      1. Make sure nsopenssl.so is installed for AOLserver.

      2. Uncomment this line from config.tcl.

        #ns_param   nsopenssl       ${bindir}/nsopenssl.so
        +Installing SSL Support for an OpenACS service

        Installing SSL Support for an OpenACS service

        Debian Users: apt-get install openssl before proceeding.

        1. Make sure nsopenssl.so is installed for AOLserver.

        2. Uncomment this line from config.tcl.

          #ns_param   nsopenssl       ${bindir}/nsopenssl.so
           
        3. Prepare a certificate directory for the service.

          [$OPENACS_SERVICE_NAME etc]$ mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
           [$OPENACS_SERVICE_NAME etc]$ chmod 700 /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
           [$OPENACS_SERVICE_NAME etc]$ 
          Index: openacs-4/packages/acs-core-docs/www/install-steps.html
          ===================================================================
          RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-steps.html,v
          diff -u -r1.31.2.2 -r1.31.2.3
          --- openacs-4/packages/acs-core-docs/www/install-steps.html	12 Dec 2010 00:07:02 -0000	1.31.2.2
          +++ openacs-4/packages/acs-core-docs/www/install-steps.html	12 Dec 2010 01:37:24 -0000	1.31.2.3
          @@ -5,15 +5,9 @@
                   Install PostgreSQL).

        4. Install AOLserver (Install AOLserver 4) .

        5. Create a unique database and system user. Install the OpenACS tarball, start and AOLserver instance, and use the OpenACS web pages to complete installation -<<<<<<< install-steps.html - (see Install OpenACS 5.6.0).

        Specific instructions are available for Mac OS X and - Windows2000 (see Section , “OpenACS Installation Guide for Mac OS X” or - Section , “OpenACS Installation Guide for Windows2000”).

        Binaries and other shortcuts

        You can try out OpenACS using some binary installers. In -======= (see Install OpenACS 5.6.0).

      Specific instructions are available for Mac OS X and Windows2000 (see OpenACS Installation Guide for Mac OS X or OpenACS Installation Guide for Windows2000).

      Binaries and other shortcuts

      You can try out OpenACS using some binary installers. In ->>>>>>> 1.33 general, they are not yet supported by the community, so they are mostly for evaluation purposes. Installing OpenACS

      You can see a list of current installers. @@ -47,18 +41,10 @@ su - $OPENACS_SERVICE_NAME svc -d /service/$OPENACS_SERVICE_NAME dropdb $OPENACS_SERVICE_NAME -<<<<<<< install-steps.html -createdb $OPENACS_SERVICE_NAME

      Setting a global shell variable for cut and paste. In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file /etc/profile ( /etc/share/skel/dot.profile for FreeBSD) and add this line:

      export OPENACS_SERVICE_NAME=service0

    Paths and Users

    Table 2.1. Default directories for a standard install

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS service$OPENACS_SERVICE_NAME (set to service0 in default install)
    OpenACS service account$OPENACS_SERVICE_NAME
    OpenACS database name$OPENACS_SERVICE_NAME
    Root of OpenACS service file tree (SERVERROOT)/var/lib/aolserver/$OPENACS_SERVICE_NAME
    Location of source code tarballs for new software/var/tmp
    The OpenACS tarball contains some files which -======= -createdb $OPENACS_SERVICE_NAME

    Setting a global shell variable for cut and paste. In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file /etc/profile ( /etc/share/skel/dot.profile for FreeBSD) and add this line:

    export OPENACS_SERVICE_NAME=service0

    Paths and Users

    Table 2.1. Default directories for a standard install

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS service +createdb $OPENACS_SERVICE_NAME

    Setting a global shell variable for cut and paste. In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file /etc/profile ( /etc/share/skel/dot.profile for FreeBSD) and add this line:

    export OPENACS_SERVICE_NAME=service0

    Paths and Users

    Table 2.1. Default directories for a standard install

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS service $OPENACS_SERVICE_NAME (set to service0 in default install)
    OpenACS service account$OPENACS_SERVICE_NAME
    OpenACS database name$OPENACS_SERVICE_NAME
    Root of OpenACS service file tree (SERVERROOT)/var/lib/aolserver/$OPENACS_SERVICE_NAME
    Location of source code tarballs for new software/var/tmp
    The OpenACS tarball contains some files which ->>>>>>> 1.33 are useful while setting up other software. Those -<<<<<<< install-steps.html - files are located at:/var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files
    Database backup directory/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
    Service config files/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
    Service log files/var/lib/aolserver/$OPENACS_SERVICE_NAME/log
    Compile directory/usr/local/src
    PostgreSQL directory/usr/local/pgsql
    AOLserver directory/usr/local/aolserver

    -======= files are located at:

    /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files
    Database backup directory/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
    Service config files/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
    Service log files/var/lib/aolserver/$OPENACS_SERVICE_NAME/log
    Compile directory/usr/local/src
    PostgreSQL directory/usr/local/pgsql
    AOLserver directory/usr/local/aolserver

    ->>>>>>> 1.33 None of these locations are set in stone - they're simply the values that we've chosen. The values that you'll probably want to change, such as service name, are @@ -107,10 +93,5 @@

  • If you find errors in this document or if you have ideas about making it better, please post them in our -<<<<<<< install-steps.html - BugTracker. -

  • ($Id$)
    View comments on this page at openacs.org
    -======= BugTracker.

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.33 Index: openacs-4/packages/acs-core-docs/www/ix01.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ix01.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/ix01.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/ix01.html 12 Dec 2010 01:37:24 -0000 1.25.2.3 @@ -1,9 +1,3 @@ -<<<<<<< ix01.html - -Index

    Index

    Symbols

    $OPENACS_SERVICE_NAME, Paths and Users

    C

    computeroutput
    code, Code
    cvs
    initializing, Initialize CVS (OPTIONAL)

    E

    emacs
    installation, Install Red Hat 8/9
    emphasis
    bold, italics, Emphasis

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

    language
    installation, Install Red Hat 8/9
    Linking, Links
    lists, Lists

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Installation Option 2: Install from tarball

    Q

    qmail
    installation, Install qmail (OPTIONAL)
    Maildir, Install qmail (OPTIONAL)
    rcpthosts error message, Install qmail (OPTIONAL)

    T

    The publish point for new packages should be - fixed., Prepare the package for distribution.

    U

    ulink, Links
    upgrade
    OpenACS 4.5 to 4.6.x
    Linux/Unix, Upgrading 4.5 or higher to 4.6.3
    View comments on this page at openacs.org
    -======= -Index

    Index

    Symbols

    $OPENACS_SERVICE_NAME, Paths and Users

    C

    computeroutput
    code, Code
    cvs
    initializing, Initialize CVS (OPTIONAL)
    setup, Using CVS with an OpenACS Site

    E

    emacs
    installation, Install Red Hat 8/9
    emphasis
    bold, italics, Emphasis

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

    language
    installation, Install Red Hat 8/9
    Linking, Links
    lists, Lists

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Installation Option 2: Install from tarball

    Q

    qmail
    installation, Install qmail (OPTIONAL)
    Maildir, Install qmail (OPTIONAL)
    rcpthosts error message, Install qmail (OPTIONAL)

    T

    The publish point for new packages should be +Index

    Index

    Symbols

    $OPENACS_SERVICE_NAME, Paths and Users

    C

    computeroutput
    code, Code
    cvs
    setup, Using CVS with an OpenACS Site

    D

    docbook
    installation, Install Red Hat 8/9
    DocBook
    DTD, OpenACS Documentation Strategy: Why DocBook?
    Document structure, Document Structure

    E

    emacs
    installation, Install Red Hat 8/9
    emphasis
    bold, italics, Emphasis

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

    language
    installation, Install Red Hat 8/9
    Linking, Links
    lists, Lists

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Installation Option 2: Install from tarball

    T

    The publish point for new packages should be fixed., Prepare the package for distribution.

    U

    ulink, Links
    upgrade
    OpenACS 4.5 to 4.6.x
    Linux/Unix, Upgrading 4.5 or higher to 4.6.3
    View comments on this page at openacs.org
    ->>>>>>> 1.27 Index: openacs-4/packages/acs-core-docs/www/kernel-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-doc.html,v diff -u -r1.33.2.2 -r1.33.2.3 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 12 Dec 2010 00:07:02 -0000 1.33.2.2 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 12 Dec 2010 01:37:24 -0000 1.33.2.3 @@ -1,7 +1,2 @@ -<<<<<<< kernel-doc.html - -Chapter 15. Kernel Documentation
    View comments on this page at openacs.org
    -======= -Chapter 14. Kernel Documentation
    View comments on this page at openacs.org
    ->>>>>>> 1.35 +Chapter 15. Kernel Documentation
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/kernel-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-overview.html,v diff -u -r1.27.2.2 -r1.27.2.3 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 12 Dec 2010 00:07:02 -0000 1.27.2.2 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 12 Dec 2010 01:37:24 -0000 1.27.2.3 @@ -1,10 +1,5 @@ -<<<<<<< kernel-overview.html - -Overview

    Overview

    • -======= -Overview

      Overview

      View comments on this page at openacs.org
      ->>>>>>> 1.29 +

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/mac-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/mac-installation.html,v diff -u -r1.39.2.2 -r1.39.2.3 --- openacs-4/packages/acs-core-docs/www/mac-installation.html 12 Dec 2010 00:07:02 -0000 1.39.2.2 +++ openacs-4/packages/acs-core-docs/www/mac-installation.html 12 Dec 2010 01:37:24 -0000 1.39.2.3 @@ -5,10 +5,5 @@ readline-4.3 ./configure make -<<<<<<< mac-installation.html -make install
    • Proceed with the Unix-like system instructions. OS X is incompatible with Oracle 8, and Oracle 9i on OSX is not yet verified for OpenACS. So continue with Install PostgreSQL. Additional special steps for OS X are documented inline with the standard Unix-like instructions.

    Additional resources for installing on OS X.

    ($Id$)
    View comments on this page at openacs.org
    -======= make install
  • Proceed with the Unix-like system instructions. OS X is incompatible with Oracle 8, and Oracle 9i on OSX is not yet verified for OpenACS. So continue with Install PostgreSQL. Additional special steps for OS X are documented inline with the standard Unix-like instructions.

  • Additional resources for installing on OS X.

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.40 Index: openacs-4/packages/acs-core-docs/www/maint-performance.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maint-performance.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/maint-performance.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/maint-performance.html 12 Dec 2010 01:37:24 -0000 1.25.2.3 @@ -1,13 +1,8 @@ Diagnosing Performance Problems

    Diagnosing Performance Problems

    • Did performance problems happen overnight, or did they sneak up on you? Any clue what caused the performance problems (e.g. loading 20K -<<<<<<< maint-performance.html - users into .LRN)

    • Is the file system out of space? Is the machine swapping to disk constantly?

    • Isolating and solving database problems.

      • Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see Section , “Vacuum Postgres nightly”. For Oracle, use exec dbms_stats.gather_schema_stats('SCHEMA_NAME') (Andrew Piskorski's Oracle notes).

      • You can track the exact amount of time each database query on a page takes:

        1. Go to Main Site : Site-Wide Administration : Install Software

        2. Click on "Install New Application" in "Install from OpenACS Repository"

        3. Choose "ACS Developer Support">

        4. After install is complete, restart the server.

        5. Browse to Developer Support, which is automatically mounted at /ds. -

        6. Turn on Database statistics

        7. Browse directly to a slow page and click "Request Information" at the bottom of the page.

        8. This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

          Figure 6.8. Query Analysis example

          Query Analysis example
      • Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

        Log in to SQL*Plus as the admin:

        [$OPENACS_SERVICE_NAME ~]$ svrmgrl
        -=======
             users into .LRN)

      • Is the file system out of space? Is the machine swapping to disk constantly?

      • Isolating and solving database problems.

        • Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see Vacuum Postgres nightly. For Oracle, use exec dbms_stats.gather_schema_stats('SCHEMA_NAME') (Andrew Piskorski's Oracle notes).

        • You can track the exact amount of time each database query on a page takes:

          1. Go to Main Site : Site-Wide Administration : Install Software

          2. Click on "Install New Application" in "Install from OpenACS Repository"

          3. Choose "ACS Developer Support">

          4. After install is complete, restart the server.

          5. Browse to Developer Support, which is automatically mounted at /ds. -

          6. Turn on Database statistics

          7. Browse directly to a slow page and click "Request Information" at the bottom of the page.

          8. This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

            Figure 6.8. Query Analysis example

            Query Analysis example

        • Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

          Log in to SQL*Plus as the admin:

          [$OPENACS_SERVICE_NAME ~]$ svrmgrl
          ->>>>>>> 1.27
          +              

        • Turn on Database statistics

        • Browse directly to a slow page and click "Request Information" at the bottom of the page.

        • This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

          Figure 6.8. Query Analysis example

          Query Analysis example

      • Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

        Log in to SQL*Plus as the admin:

        [$OPENACS_SERVICE_NAME ~]$ svrmgrl
         
         Oracle Server Manager Release 3.1.7.0.0 - Production
         
        @@ -63,13 +58,8 @@
               Oracle Support information.
             

        To be able to get a overview of how Oracle executes a particular query, -<<<<<<< maint-performance.html - install "autotrace". I usually follow the instructions here http://asktom.oracle.com/~tkyte/article1/autotrace.html. -

        Make sure, that the Oracle CBO works with adequate statistics

        -======= install "autotrace". I usually follow the instructions here http://asktom.oracle.com/~tkyte/article1/autotrace.html. -

        Make sure, that the Oracle CBO works with adequate statistics

        ->>>>>>> 1.27 +

        Make sure, that the Oracle CBO works with adequate statistics

        The Oracle Cost Based optimizer is a piece of software that tries to find the "optimal" execution plan for a given SQL statement. For that it estimates the costs of running a SQL query in a particular way (by default Index: openacs-4/packages/acs-core-docs/www/maintenance-deploy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-deploy.html,v diff -u -r1.20.2.2 -r1.20.2.3 --- openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 12 Dec 2010 00:07:02 -0000 1.20.2.2 +++ openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 12 Dec 2010 01:37:24 -0000 1.20.2.3 @@ -1,17 +1,8 @@ -<<<<<<< maintenance-deploy.html - -Staged Deployment for Production Networks

        Staged Deployment for Production Networks

        ($Id$)

        By Joel Aufrecht

        -======= Staged Deployment for Production Networks

        Staged Deployment for Production Networks

        ($Id$)

        By Joel Aufrecht

        ->>>>>>> 1.22 OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -<<<<<<< maintenance-deploy.html -

        This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

        • Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.

        • Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.

        Method 1: Deployment with CVS

        With this method, we control the files on a site via -======= -

        This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

        • Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.

        • Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.

        Method 1: Deployment with CVS

        With this method, we control the files on a site via ->>>>>>> 1.22 +

        This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

        • Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.

        • Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.

        Method 1: Deployment with CVS

        With this method, we control the files on a site via CVS. This example uses one developmental server (service0-dev) and one production server (service0). Depending on your needs, you can also have a staging server for extensive testing before you go @@ -76,8 +67,4 @@ cvs up -Pd index.adp

        If you make changes that require changes to the database, test them out first on service0-dev, using either -create.sql or upgrade scripts. Once you've tested them, you then update and -<<<<<<< maintenance-deploy.html - run the upgrade scripts from the package manager.

        The production site can run "HEAD" from cvs.

        The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

      Method 2: A/B Deployment

      The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

      This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

      Simple A/B Deployment: Database is not changed

      Figure 6.2. Simple A/B Deployment - Step 1

      Simple A/B Deployment - Step 1

      Figure 6.3. Simple A/B Deployment - Step 2

      Simple A/B Deployment - Step 2

      Figure 6.4. Simple A/B Deployment - Step 3

      Simple A/B Deployment - Step 3

      Complex A/B Deployment: Database is changed

      Figure 6.5. Complex A/B Deployment - Step 1

      Complex A/B Deployment - Step 1

      Figure 6.6. Complex A/B Deployment - Step 2

      Complex A/B Deployment - Step 2

      Figure 6.7. Complex A/B Deployment - Step 3

      Complex A/B Deployment - Step 3
    View comments on this page at openacs.org
    -======= - run the upgrade scripts from the package manager.

    The production site can run "HEAD" from cvs.

    The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

    Method 2: A/B Deployment

    The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

    This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

    Simple A/B Deployment: Database is not changed

    Figure 6.2. Simple A/B Deployment - Step 1

    Simple A/B Deployment - Step 1

    Figure 6.3. Simple A/B Deployment - Step 2

    Simple A/B Deployment - Step 2

    Figure 6.4. Simple A/B Deployment - Step 3

    Simple A/B Deployment - Step 3

    Complex A/B Deployment: Database is changed

    Figure 6.5. Complex A/B Deployment - Step 1

    Complex A/B Deployment - Step 1

    Figure 6.6. Complex A/B Deployment - Step 2

    Complex A/B Deployment - Step 2

    Figure 6.7. Complex A/B Deployment - Step 3

    Complex A/B Deployment - Step 3

    View comments on this page at openacs.org
    ->>>>>>> 1.22 + run the upgrade scripts from the package manager.

    The production site can run "HEAD" from cvs.

    The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

    Method 2: A/B Deployment

    The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

    This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

    Simple A/B Deployment: Database is not changed

    Figure 6.2. Simple A/B Deployment - Step 1

    Simple A/B Deployment - Step 1

    Figure 6.3. Simple A/B Deployment - Step 2

    Simple A/B Deployment - Step 2

    Figure 6.4. Simple A/B Deployment - Step 3

    Simple A/B Deployment - Step 3

    Complex A/B Deployment: Database is changed

    Figure 6.5. Complex A/B Deployment - Step 1

    Complex A/B Deployment - Step 1

    Figure 6.6. Complex A/B Deployment - Step 2

    Complex A/B Deployment - Step 2

    Figure 6.7. Complex A/B Deployment - Step 3

    Complex A/B Deployment - Step 3

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/nxml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/nxml-mode.html,v diff -u -r1.14.2.2 -r1.14.2.3 --- openacs-4/packages/acs-core-docs/www/nxml-mode.html 12 Dec 2010 00:07:02 -0000 1.14.2.2 +++ openacs-4/packages/acs-core-docs/www/nxml-mode.html 12 Dec 2010 01:37:24 -0000 1.14.2.3 @@ -1,23 +1,11 @@ -<<<<<<< nxml-mode.html - -Using nXML mode in Emacs

    Using nXML mode in Emacs

    By Jeff Davis

    -======= -Using nXML mode in Emacs

    Using nXML mode in Emacs

    By Jeff Davis

    ->>>>>>> 1.16 +Using nXML mode in Emacs

    Using nXML mode in Emacs

    By Jeff Davis

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

    An alternative to psgml mode is nXML by James Clark, a new major mode for GNU Emacs for editing XML, and which features highlighting, indentation, and on the fly validation versus a RelaxNG Schema. -<<<<<<< nxml-mode.html -

    View comments on this page at openacs.org
    -=======

    View comments on this page at openacs.org
    ->>>>>>> 1.16 +

  • The nXML download page at thaiopensource.com.

  • View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/object-identity.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -1,21 +1,10 @@ -<<<<<<< object-identity.html - -Object Identity

    Object Identity

    By Rafael H. Schloming

    -======= -Object Identity

    Object Identity

    By Rafael H. Schloming

    ->>>>>>> 1.47 +Object Identity

    Object Identity

    By Rafael H. Schloming

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

    One of the major design features of OpenACS 5.6.0 is the explicit representation -of object identity. The reason I say "explicit -representation" is because the concept of object identity has been -======= -

    One of the major design features of OpenACS 5.6.0 is the explicit representation of object identity. The reason I say "explicit representation" is because the concept of object identity has been ->>>>>>> 1.47 around forever. It is inherent to our problem domain. Consider the example of 3.x style scoping. The 3.x data models use the triple (user_id, group_id, scope) to identify an object. In the 5.6.0 data model this @@ -43,8 +32,4 @@ even capable of fully tracking the history of membership state.

    The design choice of explicitly representing object identity with an integer primary key that is derived from a globally unique sequence is the key to eliminating redundant code and replacing it with generic object -<<<<<<< object-identity.html -level services.

    ($Id$)
    View comments on this page at openacs.org
    -======= -level services.

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.47 +level services.

    ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/object-system-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-design.html,v diff -u -r1.31.2.1 -r1.31.2.2 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 12 Dec 2010 00:07:02 -0000 1.31.2.1 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 12 Dec 2010 01:37:24 -0000 1.31.2.2 @@ -1,5 +1,5 @@ -Object Model Design

    Object Model Design

    By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

    +Object Model Design

    Object Model Design

    By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

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

    Essentials

    Data Model

    • Index: openacs-4/packages/acs-core-docs/www/object-system-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 12 Dec 2010 01:37:24 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< object-system-requirements.html - -Object Model Requirements

      Object Model Requirements

      By Pete Su

      -======= -Object Model Requirements

      Object Model Requirements

      By Pete Su

      ->>>>>>> 1.32 +Object Model Requirements

      Object Model Requirements

      By Pete Su

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

      I. Introduction

      A major goal in OpenACS 4 is to unify and normalize many of the core services @@ -90,11 +85,7 @@ between data.

      Design Note: While this doesn't really belong in a requirements document, the fact that we are constrained to using relational databases means that certain constraints on the overall design of the object -<<<<<<< object-system-requirements.html -data model exist, which you can read about in ???.

      Modifiable Data Models

      Another recurring applications problem is how to store a modifiable data -======= data model exist, which you can read about in Summary and Design Considerations.

      Modifiable Data Models

      Another recurring applications problem is how to store a modifiable data ->>>>>>> 1.32 model, or how to store information that may change extensively between releases or in different client installations. Furthermore, we want to avoid changes to an application's database queries in the face of any custom @@ -135,13 +126,8 @@ that store metadata on application objects. The object type system supports subtyping with inheritance, so new object types can be defined in terms of existing object types.

      The OM data model forms the main part of the OpenACS 4 Kernel data model. The -<<<<<<< object-system-requirements.html -other parts of the Kernel data model include:

      • Parties and Groups

      • Permissions

      Each of these is documented elsewhere at length.

      Use-cases and User-scenarios

      (Pending as of 8/27/00)

      Requirements: Data Model

      The data model for the object system provides support for the following -kinds of schema patterns that are used by many existing OpenACS modules:

      10.0 Object Identification and Storage

      Object identification is a central mechanism in the new metadata system. -======= other parts of the Kernel data model include:

      • Parties and Groups

      • Permissions

      Each of these is documented elsewhere at length.

      Use-cases and User-scenarios

      (Pending as of 8/27/00)

      Requirements: Data Model

      The data model for the object system provides support for the following kinds of schema patterns that are used by many existing OpenACS modules:

      10.0 Object Identification and Storage

      Object identification is a central mechanism in the new metadata system. ->>>>>>> 1.32 The fact that every object has a known unique identifier means that the core can deal with all objects in a generic way. Thus the only action required of an application to obtain any general service is to "hook into" the @@ -216,17 +202,10 @@ developers to represent a hierarchy of object contexts. These contexts are used as the basis for the permissions system. In general, if an object has no explicit permissions attached to it, then it inherits -<<<<<<< object-system-requirements.html -permissions from its context.

      The context data model also forms the basis of the subsites system, and is -a basic part of the permissions system, -described in separate documents.

      The context data model should provide the following facilities:

      50.10 Unique ID

      Every context should have a unique ID in the system.

      50.20 Tree Structure

      The data model should support a tree structured organization of contexts. -That is, contexts can be logically "contained" within other -======= permissions from its context.

      The context data model also forms the basis of the subsites system, and is a basic part of the permissions system, described in separate documents.

      The context data model should provide the following facilities:

      50.10 Unique ID

      Every context should have a unique ID in the system.

      50.20 Tree Structure

      The data model should support a tree structured organization of contexts. That is, contexts can be logically "contained" within other ->>>>>>> 1.32 contexts (i.e. contexts have parents) and contexts can contain other contexts (i.e. contexts can have children).

      50.30 Data Model Constraints

      All objects must have a context ID. This ID must refer to an existing context or be NULL. The meaning of a NULL context is determined by the @@ -285,4 +264,4 @@ this integrate with application level SQL queries?

      Revision History

      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Creation08/10/2000Bryan Quinn
      0.2Major re-write08/11/2000Pete Su
      0.3Draft completed after initial reviews08/22/2000Pete Su
      0.4Edited, updated to conform to requirements template, pending freeze08/23/2000Kai Wu
      Final edits before freeze08/24/2000Pete Su
      0.5Edited for consistency08/27/2000Kai Wu
      0.6Put Object ID stuff first, because it makes more sense08/28/2000Pete Su
      0.7Added requirement that knowledge-level objects must be moveable between databases.08/29/2000Richard Li
      0.8Rewrote intro to match language and concepts in the design document. Also cleaned up usage a bit in the requirements section. Added short vague -requirements on relation types.09/06/2000Pete Su
      0.9Edited for ACS 4 Beta release.09/30/2000Kai Wu
      View comments on this page at openacs.org
      +requirements on relation types.
    09/06/2000Pete Su
    0.9Edited for ACS 4 Beta release.09/30/2000Kai Wu
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/objects.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/objects.html,v diff -u -r1.48.2.2 -r1.48.2.3 --- openacs-4/packages/acs-core-docs/www/objects.html 12 Dec 2010 00:07:02 -0000 1.48.2.2 +++ openacs-4/packages/acs-core-docs/www/objects.html 12 Dec 2010 01:37:24 -0000 1.48.2.3 @@ -1,19 +1,9 @@ -<<<<<<< objects.html - -OpenACS Data Models and the Object System

    OpenACS Data Models and the Object System

    By Pete Su

    -======= -OpenACS Data Models and the Object System

    OpenACS Data Models and the Object System

    By Pete Su

    ->>>>>>> 1.50 +OpenACS Data Models and the Object System

    OpenACS Data Models and the Object System

    By Pete Su

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

    Overview

    -Developing data models in OpenACS 5.6.0 is much like developing data models -=======

    Overview

    Developing data models in OpenACS 5.6.0 is much like developing data models ->>>>>>> 1.50 for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of SQL tables. In our Notes @@ -87,17 +77,10 @@ system.

    Fire up your text editor and open the -<<<<<<< objects.html -ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created -when we created the package. Then, do the following: -

    Describe the new type to the type system

    -First, add an entry to the acs_object_types table with the following PL/SQL call: -======= ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created when we created the package. Then, do the following: -

    Describe the new type to the type system

    +

    Describe the new type to the type system

    First, add an entry to the acs_object_types table with the following PL/SQL call: ->>>>>>> 1.50

     begin  
       acs_object_type.create_type ( 
    @@ -156,11 +139,7 @@
     because the new type note is a subtype of
     acs_object, it will inherit these attributes, so there is
     no need for us to define them.
    -<<<<<<< objects.html
    -

    Define a table in which to store your objects

    -======= -

    Define a table in which to store your objects

    ->>>>>>> 1.50 +

    Define a table in which to store your objects

    The next thing we do is make a small modification to the data model to reflect the fact that each row in the notes table represents something that is not only an object of type @@ -184,13 +163,8 @@ we model inheritance; it guarantees that any services that use the acs_objects table to find objects will transparently find any objects that are instances of any subtype of -<<<<<<< objects.html -acs_objects. -

    Define a package for type specific procedures

    -======= acs_objects. -

    Define a package for type specific procedures

    ->>>>>>> 1.50 +

    Define a package for type specific procedures

    The next step is to define a PL/SQL package for your new type, and write some basic procedures to create and delete objects. Here is a package definition for our new type: @@ -238,11 +212,7 @@ object OBJ was "read only", then any other object that used OBJ as its context would also be "read only" by default. We'll talk about this more later. -<<<<<<< objects.html -

    Define a package body for type specific procedures

    -======= -

    Define a package body for type specific procedures

    ->>>>>>> 1.50 +

    Define a package body for type specific procedures

    The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use acs_object.new to insert a row into @@ -399,13 +369,8 @@ when to use inherited attributes is fairly straightforward, but requires a good amount of thought at design time even for simple applications. -<<<<<<< objects.html -

    Summary

    -Hooking into the OpenACS 5.6.0 object system brings the application developer -=======

    Summary

    Hooking into the OpenACS 5.6.0 object system brings the application developer ->>>>>>> 1.50 numerous benefits, and doing it involves only four easy steps: @@ -429,8 +394,4 @@ especially true for the context_id field.

    -<<<<<<< objects.html

    ($Id$)
    View comments on this page at openacs.org
    -======= -

    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.50 Index: openacs-4/packages/acs-core-docs/www/openacs-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-overview.html,v diff -u -r1.26.2.1 -r1.26.2.2 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 12 Dec 2010 00:07:02 -0000 1.26.2.1 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 12 Dec 2010 01:37:24 -0000 1.26.2.2 @@ -1,5 +1,5 @@ -Overview

    Overview

    +Overview

    Overview

    OpenACS (Open Architecture Community System) is an advanced toolkit for building scalable, community-oriented web applications. If you're thinking of building an @@ -49,4 +49,4 @@ can help you in your endeavors with the system. Visit our web site and feel free to ask questions or provide feedback. -

    View comments on this page at openacs.org
    +

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/openacs.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/openacs.html 12 Dec 2010 01:37:24 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< openacs.html - -Install OpenACS 5.6.0

    Install OpenACS 5.6.0

    by Vinod Kurup

    -======= Install OpenACS 5.6.0

    Install OpenACS 5.6.0

    by Vinod Kurup

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

    Set up a user account for each site.

    @@ -57,7 +52,7 @@ [root root]# mkdir /var/lib/aolserver chgrp web /var/lib/aolserver -chmod 770 /var/lib/aolserver

    Installation Option 1: Use automated script

    A bash script is available to automate all of the steps for the rest of this section. It requires tclwebtest. The automated script can greatly accelerate the install process, but is very sensitive to the install environment. We recommend that you run the automated install and, if it does not work the first time, consider switching to a manual installation.

    Get the install script from CVS. It is located within +chmod 770 /var/lib/aolserver

    Installation Option 1: Use automated script

    A bash script is available to automate all of the steps for the rest of this section. It requires tclwebtest. The automated script can greatly accelerate the install process, but is very sensitive to the install environment. We recommend that you run the automated install and, if it does not work the first time, consider switching to a manual installation.

    Get the install script from CVS. It is located within the main cvs tree, at /etc/install. Use anonymous CVS checkout to get that directory in the home directory of the service's dedicated user. We put it there so that it is not @@ -89,16 +84,6 @@ to the /var/tmp directory. If not, download the OpenACS tarball and save it in -<<<<<<< openacs.html - /var/tmp and proceed:

    1. Unpack the OpenACS tarball and rename it to $OPENACS_SERVICE_NAME. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.

      FreeBSD note: Change the period in chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME to a colon: chown -R $OPENACS_SERVICE_NAME:$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME -

      [root root]# su - $OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
      -[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/openacs-5.6.0.tgz
      -[$OPENACS_SERVICE_NAME aolserver]$ mv openacs-5.6.0 $OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME aolserver]$ ls -al
      -=======
             /var/tmp and proceed:

      1. Unpack the OpenACS tarball and rename it to $OPENACS_SERVICE_NAME. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.

        FreeBSD note: Change the period in chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME to a colon: chown -R $OPENACS_SERVICE_NAME:$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME

        [root root]# su - $OPENACS_SERVICE_NAME
         [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
        @@ -107,7 +92,6 @@
         [$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
         [$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
         [$OPENACS_SERVICE_NAME aolserver]$ ls -al
        ->>>>>>> 1.49
         total 3
         drwxrwx---    3 root     web          1024 Mar 29 16:41 .
         drwxr-xr-x   25 root     root         1024 Mar 29 16:24 ..
        @@ -121,11 +105,7 @@
         mv openacs-5.6.0 $OPENACS_SERVICE_NAME
         chmod -R 755 $OPENACS_SERVICE_NAME
         chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
        -<<<<<<< openacs.html
        -exit
      2. Add the Service to CVS (OPTIONAL)

      3. Prepare the database

    2. Add the Service to CVS (OPTIONAL)

    3. Prepare the database

      • Prepare Oracle for OpenACS. If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service

        ->>>>>>> 1.49 You should be sure that your user account (e.g. $OPENACS_SERVICE_NAME) is in the dba group. @@ -258,33 +238,22 @@ CREATE DATABASE [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ su - $OPENACS_SERVICE_NAME -<<<<<<< openacs.html -/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAME

      • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ export EDITOR=emacs;crontab -e

        Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

        0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME
        -=======
        -/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAME
      • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ export EDITOR=emacs;crontab -e

        Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

        0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME
        ->>>>>>> 1.49
        +/usr/local/pgsql/bin/createdb -E UNICODE $OPENACS_SERVICE_NAME
      • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ export EDITOR=emacs;crontab -e

        Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

        0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME
         0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze $OPENACS_SERVICE_NAME

        Depending on your distribution, you may receive email when the crontab items are executed. If you don't want to receive email for those crontab items, you can add > /dev/null 2>&1 to the end of each crontab - line

      • Add Full Text Search Support (OPTIONAL)

      • At this point the database should be ready for installing OpenACS.

  • Configure an AOLserver Service for OpenACS. 

    1. + line

    2. Add Full Text Search Support (OPTIONAL)

    3. At this point the database should be ready for installing OpenACS.

  • Configure an AOLserver Service for OpenACS. 

    1. The AOLserver architecture lets you run an arbitrary number of virtual servers. A virtual server is an HTTP service running on a specific port, e.g. port 80. In order for OpenACS to work, you need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball, -<<<<<<< openacs.html - /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl. - Open it in an editor to adjust the parameters.

      [root root]# su - $OPENACS_SERVICE_NAME
      -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
      -[$OPENACS_SERVICE_NAME etc]$ emacs config.tcl
      -=======
       	  /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl.
      -	   Open it in an editor to adjust the parameters.

      [root root]# su - $OPENACS_SERVICE_NAME
      +	   Open it in an editor to adjust the parameters.

      [root root]# su - $OPENACS_SERVICE_NAME
       [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
       [$OPENACS_SERVICE_NAME etc]$ emacs config.tcl
      ->>>>>>> 1.49
       

      You can continue without changing any values in the file. However, if you don't change address to match the computer's ip address, you won't be able to browse to your server from other machines.

  • Verify AOLserver startup. 

    1. Kill any current running AOLserver processes and start a new one. The recommended way to start an AOLserver process is by running the included script, /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run. If you are not using the default file paths and names, you will need to edit run.

      If you want to use port 80, there are complications. AOLserver must be root to use system ports such as @@ -323,15 +292,9 @@ nsd: no process killed [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file... -<<<<<<< openacs.html -[08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.

    2. - Attempt to connect to the service from a web browser. You should specify a URL like: http://yourserver.test:8000

      - You should see a page that looks like this. If you imported your files into -======= [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.

    3. Attempt to connect to the service from a web browser. You should specify a URL like: http://yourserver.test:8000

      You should see a page that looks like this. If you imported your files into ->>>>>>> 1.49 cvs, now that you know it worked you can erase the temp directory with rm -rf /var/lib/aolserver/$OPENACS_SERVICE_NAME.orig.

      @@ -349,13 +312,8 @@ AOLserver keepalive (OPTIONAL)

  • Configure a Service with the OpenACS Installer.  Now that you've got AOLserver up and running, let's install OpenACS -<<<<<<< openacs.html 5.6.0. -

    • -======= - 5.6.0.

      • ->>>>>>> 1.49 You should see a page from the webserver titled OpenACS Installation: Welcome. You will be warned if your version of @@ -410,27 +368,14 @@ Give the server a few minutes to start up. Then reload the final page above. You should see the front page, with an area to login near the upper right. Congratulations, OpenACS -<<<<<<< openacs.html 5.6.0 is now up and running! -

  • Installation Option 3: Install from CVS

    If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of tar xzf /var/tmp/openacs-5.6.0.tgz, cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core.

    Next Steps

    • Use daemontools supervise and svc, or inittab, to automate server startup and shutdown.

    • Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled - OpenFTS, you can now install the OpenFTS Driver package and - Full Text Search Engine package in the OpenACS service.

    • This is a good time to make a backup of your service. If this is a - production site, you should set up automatic nightly backups.

    • If you want traffic reports, set up analog or another log - processing program.

    • Follow the instruction on the home page to -======= - 5.6.0 is now up and running! -

    Installation Option 3: Install from CVS

    If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of tar xzf /var/tmp/openacs-5.6.0.tgz, cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core.

    Next Steps

    Installation Option 3: Install from CVS

    If you want to track fresh code developments inbetween releases, or you are an OpenACS core developer, you may want to install from CVS. This is identical to Option 2 except that you get the files from CVS instead of the tarball: CVS Checkout Instructions. So, instead of tar xzf /var/tmp/openacs-5.6.0.tgz, cvs -z3 -d :pserver:anonymous@openacs.org:/cvsroot co acs-core.

    Next Steps

    • Use daemontools supervise and svc, or inittab, to automate server startup and shutdown.

    • Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled + OpenFTS, you can now install the OpenFTS Driver package and + Full Text Search Engine package in the OpenACS service.

    • This is a good time to make a backup of your service. If this is a + production site, you should set up automatic nightly backups.

    • If you want traffic reports, set up analog or another log processing program.

    • Follow the instruction on the home page to ->>>>>>> 1.49 change the appearance of your service or add more -<<<<<<< openacs.html - packages. (more information)

    • Proceed to the tutorial to learn how to develop your own packages.

    • Set up database environment variables for the site -======= - packages. (more information)

    • Proceed to the tutorial to learn how to develop your own packages.

    • Set up database environment variables for the site ->>>>>>> 1.49 + packages. (more information)

    • Proceed to the tutorial to learn how to develop your own packages.

    • Set up database environment variables for the site user. Depending on how you installed Oracle or PostGreSQL, these settings may be necessary for working with the database while logged in as the service user. They do not directly affect the service's run-time connection with the @@ -462,8 +407,4 @@ LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib ORACLE_SID=ora8 ORACLE_TERM=vt100 -<<<<<<< openacs.html -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

  • Test your backup and recovery procedure.

  • Set up Section , “External uptime validation”.

  • ($Id$)
    View comments on this page at openacs.org
    -======= -ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
  • Test your backup and recovery procedure.

  • Set up External uptime validation.

  • ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.49 +ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
  • Test your backup and recovery procedure.

  • Set up External uptime validation.

  • ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/oracle.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/oracle.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/oracle.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/oracle.html 12 Dec 2010 01:37:24 -0000 1.45.2.3 @@ -5,11 +5,7 @@

    If you are installing PostGreSQL instead of Oracle, skip this section.

    -<<<<<<< oracle.html - OpenACS 5.6.0 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. See Andrew Piskorski's Oracle 9i notes for guidance. -======= OpenACS 5.6.0 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. See Andrew Piskorski's Oracle 9i notes for guidance. ->>>>>>> 1.47

    This installation guide attempts to present all of the information necessary to complete an OpenACS installation. We try hard to make all of the steps possible in one pass, rather than having a step which amounts to "go away and develop a profound understanding of software X and then come back and, in 99% of all cases, type these two lines." The exception to our rule is Oracle production systems. This page describes a set of steps to get a working Oracle development server, but it is unsuitable for production systems. If you will be using OpenACS on Oracle in a production environment, you will experience many problems unless you develop a basic understanding of Oracle which is outside the scope of this document. T

    @@ -1239,14 +1235,7 @@ For more information on Oracle, please consult the documentation.

    Defaults

    We used the following defaults while installing Oracle.

    VariableValueReason
    ORACLE_HOME/ora8/m01/app/oracle/product/8.1.7This is the default Oracle installation directory.
    ORACLE_SERVICEora8The service name is a domain-qualified identifier for your Oracle server.
    ORACLE_SIDora8This is an identifier for your Oracle server.
    ORACLE_OWNERoracleThe user who owns all of the oracle files.
    ORACLE_GROUPdbaThe special oracle group. Users in the dba group are -<<<<<<< oracle.html - authorized to do a connect - internal within - svrmgrl to gain full system - access to the Oracle system.
    ($Id$)
    View comments on this page at openacs.org
    -======= authorized to do a connect internal within svrmgrl to gain full system access to the Oracle system.
    ($Id$)
    View comments on this page at openacs.org
    ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/os-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-install.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/os-install.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/os-install.html 12 Dec 2010 01:37:25 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Linux Install Guides

    Linux Install Guides

    +Linux Install Guides

    Linux Install Guides

    Here's a list of some helpful documentation for various OS's

    • Painless Debian Index: openacs-4/packages/acs-core-docs/www/os-security.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-security.html,v diff -u -r1.14.2.1 -r1.14.2.2 --- openacs-4/packages/acs-core-docs/www/os-security.html 12 Dec 2010 00:07:02 -0000 1.14.2.1 +++ openacs-4/packages/acs-core-docs/www/os-security.html 12 Dec 2010 01:37:25 -0000 1.14.2.2 @@ -1,5 +1,5 @@ -Security Information

      Security Information

      +Security Information

      Security Information

      Once you get your OS installed, it's imperative that you secure your installation. As Jon Griffin repeatedly warns us, "No distribution is secure out of the box." The Reference Platform implements Index: openacs-4/packages/acs-core-docs/www/packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/packages.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/packages.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/packages.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< packages.html - -OpenACS Packages

      OpenACS Packages

      By Pete Su and Bryan Quinn

      -======= -OpenACS Packages

      OpenACS Packages

      By Pete Su and Bryan Quinn

      ->>>>>>> 1.49 +OpenACS Packages

      OpenACS Packages

      By Pete Su and Bryan Quinn

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

      Overview

      @@ -18,11 +13,7 @@

      Server file layout

      Here is how an OpenACS 5 server is laid out starting from the Server root (ROOT): -<<<<<<< packages.html -

      Figure 11.1. Server file layout diagram

      -=======
      -    

      Figure 10.1. Server file layout diagram

      ->>>>>>> 1.49
      +    

      Figure 11.1. Server file layout diagram

       ROOT/
           bin/
               Various executables and scripts for server maintanence.
      @@ -59,13 +50,8 @@
           

      To illustrate the general structure of a package, let's see what the -<<<<<<< packages.html - package for the "notes" application should look like. -

      Figure 11.2. Package file layout diagram

      -=======
             package for the "notes" application should look like.
      -    

      Figure 10.2. Package file layout diagram

      ->>>>>>> 1.49
      +    

      Figure 11.2. Package file layout diagram

       ROOT/
         +-- packages/    APM Root
               |
      @@ -138,11 +124,7 @@
             directories.  This makes it suitable for storing icons, css
             files, javascript, and other static content which can be treated
             this way.
      -<<<<<<< packages.html
      -    

      Table 11.1. Package files

      File TypeIts UseNaming Convention
      Package Specification FileThe package specification file is an XML file generated and -======= -

      Table 10.1. Package files

      File TypeIts UseNaming Convention
      Package Specification FileThe package specification file is an XML file generated and ->>>>>>> 1.49 +

      Table 11.1. Package files

      File TypeIts UseNaming Convention
      Package Specification FileThe package specification file is an XML file generated and maintained by the OpenACS Package Manager (APM). It specifies information about the package including its parameters and its files.notes.info
      Data Model Creation Script @@ -367,11 +349,7 @@ this point, you should add your package files to your CVS repository. I'll assume that you have set up your development repository according to the standards described in -<<<<<<< packages.html - this appendix. If so, then you just do this: -======= this appendix. If so, then you just do this: ->>>>>>> 1.49

      % cd ROOT/packages
       % cvs add notes
       % cd notes
      @@ -383,13 +361,8 @@
       % cvs commit -m "add new package for notes"
           
    • Now you can start developing the package. In addition to writing code, -<<<<<<< packages.html - you should also consider the tasks outlined in the package development tutorial. -

    • The Site Map and Package Instances

      -======= you should also consider the tasks outlined in the package development tutorial.

      The Site Map and Package Instances

      ->>>>>>> 1.49 At this point, you are probably excited to see your new package in action. But, we haven't added any user visible pages yet. By convention, user visible pages go in the @@ -416,11 +389,7 @@ of many indedendent applications that actually run on a single shared code base. The request-processor document shows you how OpenACS figures out which instance of your application was -<<<<<<< packages.html - requested by the user at any given time. The page development tutorial shows you how to use this -======= requested by the user at any given time. The page development tutorial shows you how to use this ->>>>>>> 1.49 information in your user interface.

      In order to make the new notes application visible to @@ -442,13 +411,8 @@ yet written Notes application at various places in the site. In a later document, we'll see how to write your application so that the code can detect from what URL it was invoked. This is the key -<<<<<<< packages.html - to supporting subsites. -

      Summary

      -======= to supporting subsites.

      Summary

      ->>>>>>> 1.49 The APM performs the following tasks in an OpenACS site:

      • Manages creation, installation, and removal of packages from the @@ -463,8 +427,4 @@

      • Writes out package distribution files for other people to download and install. We'll cover this later. -<<<<<<< packages.html -

      View comments on this page at openacs.org
      -======= -

      View comments on this page at openacs.org
      ->>>>>>> 1.49 +

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/parties.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/parties.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/parties.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/parties.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -1,10 +1,5 @@ -<<<<<<< parties.html - -Parties in OpenACS

      Parties in OpenACS

      By Rafael H. Schloming

      -======= -Parties in OpenACS

      Parties in OpenACS

      By Rafael H. Schloming

      ->>>>>>> 1.49 +Parties in OpenACS

      Parties in OpenACS

      By Rafael H. Schloming

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

      Introduction

      While many applications must deal with individuals and many applications @@ -350,8 +345,4 @@ single integer primary key in what could be thought of as a pure relation. Because a membership relation is an ordinary acs object with object identity, it is as easy to extend the membership relation to store extra information as it is to extend the users -<<<<<<< parties.html table or the groups table.

      ($Id$)
      View comments on this page at openacs.org
      -======= -table or the groups table.

      ($Id$)
      View comments on this page at openacs.org
      ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/permissions-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-design.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 12 Dec 2010 01:37:25 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< permissions-design.html - -Permissions Design

      Permissions Design

      By John Prevost and Rafael H. Schloming

      -======= -Permissions Design

      Permissions Design

      By John Prevost and Rafael H. Schloming

      ->>>>>>> 1.32 +Permissions Design

      Permissions Design

      By John Prevost and Rafael H. Schloming

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

      Essentials

      • Tcl in packages/acs-kernel

      • OpenACS 4 Permissions Requirements

      • Index: openacs-4/packages/acs-core-docs/www/permissions-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-requirements.html,v diff -u -r1.30.2.2 -r1.30.2.3 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 12 Dec 2010 00:07:02 -0000 1.30.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 12 Dec 2010 01:37:25 -0000 1.30.2.3 @@ -1,10 +1,5 @@ -<<<<<<< permissions-requirements.html - -Permissions Requirements

        Permissions Requirements

        By John McClary Prevost

        -======= -Permissions Requirements

        Permissions Requirements

        By John McClary Prevost

        ->>>>>>> 1.32 +Permissions Requirements

        Permissions Requirements

        By John McClary Prevost

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

        Introduction

        This document records requirements for the OpenACS 4 Permissions system, a @@ -91,12 +86,6 @@ current user has access to should not be much slower than the SELECT on its own.

        120.0 Ease of Use

        Since most SQL queries will contain an allowed target check in the where clause, whatever mechanism is used to make checks in SQL should be fairly -<<<<<<< permissions-requirements.html -small and simple.

        In particular, constraining a SELECT to return only rows the -current user has access to should not add more than one line to a query.

        Revision History

        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation8/17/2000John Prevost
        0.2Revised, updated with new terminology8/25/2000John Prevost
        0.3Edited, reformatted to conform to requirements template, pending -freeze.8/26/2000Kai Wu
        0.4Edited for ACS 4 Beta release.10/03/2000Kai Wu
        View comments on this page at openacs.org
        -======= small and simple.

        In particular, constraining a SELECT to return only rows the current user has access to should not add more than one line to a query.

        Revision History

        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation8/17/2000John Prevost
        0.2Revised, updated with new terminology8/25/2000John Prevost
        0.3Edited, reformatted to conform to requirements template, pending freeze.8/26/2000Kai Wu
        0.4Edited for ACS 4 Beta release.10/03/2000Kai Wu
        View comments on this page at openacs.org
        ->>>>>>> 1.32 Index: openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html,v diff -u -r1.43.2.1 -r1.43.2.2 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 18 Jun 2010 21:29:35 -0000 1.43.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 12 Dec 2010 01:37:25 -0000 1.43.2.2 @@ -1,29 +1,29 @@ - -OpenACS Permissions Tediously Explained

        OpenACS Permissions Tediously Explained

        + +OpenACS Permissions Tediously Explained

        OpenACS Permissions Tediously Explained

        by Vadim Nasardinov. Modified and converted to Docbook XML by Roberto Mello -

        The code has been modified since this document was written so it is now out of date. See this forum thread.

        Permissions Overview

        Who - (grantee_id) can do what - (privilege) on which object - (object_id). -

        +

        The code has been modified since this document was written so it is now out of date. See this forum thread.

        Permissions Overview

        Who + (grantee_id) can do what + (privilege) on which object + (object_id). +

        The general permissions system has a flexible (and relatively complex) data model in OpenACS. Developers who have not had the time to learn the internals of the data model may end up writing seemingly correct code that crashes their system in weird ways. This writeup is the result of my running into such a piece of code and trying to understand exactly what went wrong. It is geared towards developers who understand the general permissions system to the extent that is described in the - + Groups, Context, Permissions documentation, but who have not had the opportunity to take a long, careful look at the system internals.

        In OpenACS, most of the interesting tables are expected to extend (subtype) - the acs_objects table, i.e. they are expected to have an integer - primary key column that references the object_id column of - acs_objects. + the acs_objects table, i.e. they are expected to have an integer + primary key column that references the object_id column of + acs_objects.

        -create table acs_objects (
        +create table acs_objects (
               object_id             integer
                   not null
                   constraint acs_objects_pk primary key,
        @@ -47,50 +47,50 @@
         );
             

        This means that items that want to use the features of the - OpenACS object system needs to have an entry in the acs_objects. This + OpenACS object system needs to have an entry in the acs_objects. This allows developers to define relationships between any two entities A and B by defining a relationship between their corresponding entries - in the acs_objects table. One of the applications of this + in the acs_objects table. One of the applications of this powerful capability is the general permissions system.

        - At the heart of the permission system are two tables: acs_privileges - and acs_permissions. + At the heart of the permission system are two tables: acs_privileges + and acs_permissions.

        -  create table acs_privileges (
        +  create table acs_privileges (
               privilege           varchar2(100) not null
                   constraint acs_privileges_pk primary key,
               pretty_name         varchar2(100),
               pretty_plural       varchar2(100)
           );
             
        -  create table acs_permissions (
        +  create table acs_permissions (
               object_id
                   not null
        -          constraint acs_permissions_on_what_id_fk references acs_objects (object_id),
        +          constraint acs_permissions_on_what_id_fk references acs_objects (object_id),
               grantee_id
                   not null
        -          constraint acs_permissions_grantee_id_fk references parties (party_id),
        +          constraint acs_permissions_grantee_id_fk references parties (party_id),
               privilege
                   not null
        -          constraint acs_permissions_priv_fk references acs_privileges (privilege),
        +          constraint acs_permissions_priv_fk references acs_privileges (privilege),
               constraint acs_permissions_pk
                   primary key (object_id, grantee_id, privilege)
           );
             

        - The acs_privileges table stores + The acs_privileges table stores named privileges like read, write, delete, create, and - admin. The acs_permissions + admin. The acs_permissions table stores assertions of the form:

        - Who (grantee_id) can do what (privilege) - on which object (object_id). + Who (grantee_id) can do what (privilege) + on which object (object_id).

        The micromanaging approach to system security would be to require application developers to store permission information explicitly about every object, i.e. if the system has 100,000 and 1,000 users who have the read privilege on all objects, then we would need to store 100,000,000 entries of the form: -

        object_idgrantee_idprivilege
        object_id_1user_id_1'read'
        object_id_1user_id_2'read'
        ...
        object_id_1user_id_n'read'
        object_id_2user_id_1'read'
        object_id_2user_id_2'read'
        ...
        object_id_2user_id_n'read'
        ...
        ...
        object_id_muser_id_1'read'
        object_id_muser_id_2'read'
        ...
        object_id_muser_id_n'read'

        +

        object_idgrantee_idprivilege
        object_id_1user_id_1'read'
        object_id_1user_id_2'read'
        ...
        object_id_1user_id_n'read'
        object_id_2user_id_1'read'
        object_id_2user_id_2'read'
        ...
        object_id_2user_id_n'read'
        ...
        ...
        object_id_muser_id_1'read'
        object_id_muser_id_2'read'
        ...
        object_id_muser_id_n'read'

        Although quite feasible, this approach fails to take advantage of the fact that objects in the system are commonly organized hierarchally, and permissions usually follow the hierarchical structure, so that if user @@ -102,42 +102,60 @@ necessity to explicitly maintain security information for every single object. There are three kinds of hierarchies involved. These are discussed in the following sections. -

        Context Hierarchy

        +

        Context Hierarchy

        Suppose objects A, B, ..., and F form the following hierarchy. -

        Table 11.2. Context Hierarchy Example

        A

        - object_id=10 -

        B

        - object_id=20 -

        C

        - object_id=30 -

        D

        - object_id=40 -

        E

        - object_id=50 -

        F

        - object_id=60 -

        +

        Table 11.2. Context Hierarchy Example

        + A +

        + object_id=10 +

        +
        + B +

        + object_id=20 +

        +
        + C +

        + object_id=30 +

        +
        + D +

        + object_id=40 +

        +
        + E +

        + object_id=50 +

        +
        + F +

        + object_id=60 +

        +

        This can be represented in the - acs_objects table + acs_objects table by the following entries: -

        Table 11.3. acs_objects example data

        object_idcontext_id
        2010
        3010
        4020
        5020
        6030

        +

        Table 11.3. acs_objects example data

        object_idcontext_id
        2010
        3010
        4020
        5020
        6030

        The first entry tells us that object 20 is the descendant of object 10, and the third entry shows that object 40 is the descendant of object 20. By - running a CONNECT BY query, + running a CONNECT BY query, we can compute that object 40 is the second-generation descendant of object 10. With this in mind, if we want to record the fact that user Joe has the read privilege on objects A, ..., F, we only need to record one entry in the - acs_permissions table. -

        objectgranteeprivilege
        AJoeread

        + acs_permissions table. +

        objectgranteeprivilege
        AJoeread

        The fact that Joe can also read B, C, ..., and F can be derived by ascertaining that these objects are children of A by traversing the context hierarchy. As it turns out, hierarchical queries are expensive. As Rafael Schloming put it so aptly, Oracle can't deal with hierarchies for shit.

        One way to solve this problem is to cache a flattened view of the context tree like so: -

        objectancestorn_generations
        AA0
        BB0
        BA1
        CC0
        CA1
        DD0
        DB1
        DA2
        EE0
        EB1
        EA2
        FF0
        FC1
        FA2

        +

        objectancestorn_generations
        AA0
        BB0
        BA1
        CC0
        CA1
        DD0
        DB1
        DA2
        EE0
        EB1
        EA2
        FF0
        FC1
        FA2

        Note that the number of entries in the flattened view grows exponentially with respect to the depth of the context tree. For instance, if you have a fully populated binary tree with a depth of n, then the number of entries @@ -147,15 +165,15 @@ Despite its potentially great storage costs, maintaining a flattened representation of the context tree is exactly what OpenACS does. The flattened context tree is stored in the - acs_object_context_index table. + acs_object_context_index table.

        -  create table acs_object_context_index (
        +  create table acs_object_context_index (
               object_id
                   not null
        -          constraint acs_obj_context_idx_obj_id_fk references acs_objects (object_id),
        +          constraint acs_obj_context_idx_obj_id_fk references acs_objects (object_id),
               ancestor_id
                   not null
        -          constraint acs_obj_context_idx_anc_id_fk references acs_objects (object_id),
        +          constraint acs_obj_context_idx_anc_id_fk references acs_objects (object_id),
               n_generations	    integer
                   not null
                   constraint acs_obj_context_idx_n_gen_ck check (n_generations >= 0),
        @@ -164,75 +182,87 @@
           ) organization index;
             

        A few things to note about this table are these. Number one, it is - an index-organized + an index-organized table, which means it is substantially optimized for access by primary key. Number two, as the above computations suggest, the size of the table - grows polynomially + grows polynomially with respect to the average number of descendants that an object - has, and exponentially + has, and exponentially with respect to the depth of the context tree.

        - The acs_object_context_index is kept in sync with the - acs_objects + The acs_object_context_index is kept in sync with the + acs_objects table by triggers like this:

         create or replace trigger acs_objects_context_id_in_tr
        -after insert on acs_objects
        +after insert on acs_objects
         for each row
         begin
        -    insert into acs_object_context_index
        +    insert into acs_object_context_index
              (object_id, ancestor_id, n_generations)
             values
              (:new.object_id, :new.object_id, 0);
         
             if :new.context_id is not null and :new.security_inherit_p = 't' then
        -      insert into acs_object_context_index
        +      insert into acs_object_context_index
                (object_id, ancestor_id,
                 n_generations)
               select
                :new.object_id as object_id, ancestor_id,
                n_generations + 1 as n_generations
        -      from acs_object_context_index
        +      from acs_object_context_index
               where object_id = :new.context_id;
             elsif :new.object_id != 0 then
               -- 0 is the id of the security context root object
        -      insert into acs_object_context_index
        +      insert into acs_object_context_index
                (object_id, ancestor_id, n_generations)
               values
                (:new.object_id, 0, 1);
             end if;
         end;
         

        One final note about - acs_objects. By setting - an object's security_inherit_p column to 'f', you can stop permissions + acs_objects. By setting + an object's security_inherit_p column to 'f', you can stop permissions from cascading down the context tree. In the following example, Joe does not have the read permissions on C and F. -


        -A
        -object_id=10
        +

        +


        +A
        +object_id=10
        readable by Joe
        -       


        -B
        -object_id=20
        +       

        +
        +


        +B
        +object_id=20
        readable by Joe
        -              


        -C
        -object_id=30
        +              

        +
        +


        +C
        +object_id=30
        security_inherit_p = 'f'
        not readable by Joe
        -       


        -D
        -object_id=40
        -       


        -E
        -object_id=50
        -       


        -F
        -object_id=60
        +       

        +
        +


        +D
        +object_id=40
        +       

        +
        +


        +E
        +object_id=50
        +       

        +
        +


        +F
        +object_id=60
        security_inherit_p = 'f'
        not readable by Joe
        -       

        Privilege Hierarchy

        +       

        +

        Privilege Hierarchy

        Privileges are also organized hierarchically. In addition to the five main system privileges defined in the ACS Kernel data model, application developers may define their own. Note, @@ -246,42 +276,42 @@ privileges on an object, it is sufficient to grant the user the admin privilege to which the first four privileges are tied. Privileges are structured as follows. -

        admin
        createdeletereadwrite

        - Note that admin privileges are +

        admin
        createdeletereadwrite

        + Note that admin privileges are greater than read, write, create and delete privileges combined. Issuing someone read, write, create and delete privileges will not result in the person getting - admin privileges.

        The parent-child relationship between privileges is represented in - the acs_privilege_hierarchy table: + admin privileges.

        The parent-child relationship between privileges is represented in + the acs_privilege_hierarchy table:

        -  create table acs_privilege_hierarchy (
        +  create table acs_privilege_hierarchy (
               privilege
                   not null
        -          constraint acs_priv_hier_priv_fk references acs_privileges (privilege),
        +          constraint acs_priv_hier_priv_fk references acs_privileges (privilege),
               child_privilege
                   not null
        -          constraint acs_priv_hier_child_priv_fk references acs_privileges (privilege),
        +          constraint acs_priv_hier_child_priv_fk references acs_privileges (privilege),
               constraint acs_privilege_hierarchy_pk
                   primary key (privilege, child_privilege)
           );
             

        As in the case of the context hierarchy, it is convenient to have a flattened representation of this hierarchal structure. This is accomplished by defining the following view.

        -  create or replace view acs_privilege_descendant_map
        +  create or replace view acs_privilege_descendant_map
           as
           select
             p1.privilege,
             p2.privilege as descendant
           from
        -    acs_privileges p1,
        -    acs_privileges p2
        +    acs_privileges p1,
        +    acs_privileges p2
           where
             p2.privilege in 
               (select
                  child_privilege
                from
        -         acs_privilege_hierarchy
        +         acs_privilege_hierarchy
                start with
                  privilege = p1.privilege
                connect by
        @@ -293,51 +323,59 @@
               reasonably small, there is no pressing need to cache the flattened ansector-descendant
               view of the privilege hierarchy in a specially maintained table like
               it is done in the case of the context hierarchy.
        -    

        Party Hierarchy

        +

        Party Hierarchy

        Now for the third hierarchy playing a promiment role in the permission system. The party data model is set up as follows. -

        -  create table parties (
        +    

        + parties +
        + persons + + groups +
        + users +
        +  create table parties (
               party_id
                   not null
        -          constraint parties_party_id_fk references acs_objects (object_id)
        +          constraint parties_party_id_fk references acs_objects (object_id)
                   constraint parties_pk primary key,
               email               varchar2(100)
                   constraint parties_email_un unique,
               url                 varchar2(200)
           );
             
        -  create table persons (
        +  create table persons (
               person_id
                   not null
        -          constraint persons_person_id_fk references parties (party_id)
        +          constraint persons_person_id_fk references parties (party_id)
                   constraint persons_pk primary key,
               first_names          varchar2(100)
                   not null,
               last_name            varchar2(100)
                   not null
           );
             
        -  create table users (
        +  create table users (
               user_id
                   not null
        -          constraint users_user_id_fk references persons (person_id)
        +          constraint users_user_id_fk references persons (person_id)
                   constraint users_pk primary key,
               password        char(40),
               -- other attributes
           );
             
         
        -  create table groups (
        +  create table groups (
               group_id
                   not null
        -          constraint groups_group_id_fk references parties (party_id)
        +          constraint groups_group_id_fk references parties (party_id)
                   constraint groups_pk primary key,
               group_name           varchar2(100) not null
           );
             

        - Recall that the grantee_id column of the - acs_permissions table references - parties.party_id. + Recall that the grantee_id column of the + acs_permissions table references + parties.party_id. This means that you can grant a privilege on an object to a party, person, user, or group. Groups represent aggregations of parties. The most common scenario that you are likely to encounter is a group that is a collection of users, although you could also @@ -348,39 +386,45 @@ a group named Pranksters, you can assign membership to Pete, Poly, and Penelope. The fact that these users are members of the Pranksters group will be recorded in the - membership_rels and acs_rels tables: + membership_rels and acs_rels tables:

        -  create table acs_rels (
        +  create table acs_rels (
               rel_id
                   not null
        -          constraint acs_rels_rel_id_fk references acs_objects (object_id)
        +          constraint acs_rels_rel_id_fk references acs_objects (object_id)
                   constraint acs_rels_pk primary key,
               rel_type
                   not null
                   constraint acs_rels_rel_type_fk references acs_rel_types (rel_type),
               object_id_one
                   not null
        -          constraint acs_object_rels_one_fk references acs_objects (object_id),
        +          constraint acs_object_rels_one_fk references acs_objects (object_id),
               object_id_two
                   not null
        -          constraint acs_object_rels_two_fk references acs_objects (object_id),
        +          constraint acs_object_rels_two_fk references acs_objects (object_id),
               constraint acs_object_rels_un
                   unique (rel_type, object_id_one, object_id_two)
           );
             
        -  create table membership_rels (
        +  create table membership_rels (
               rel_id
        -          constraint membership_rel_rel_id_fk references acs_rels (rel_id)
        +          constraint membership_rel_rel_id_fk references acs_rels (rel_id)
                   constraint membership_rel_rel_id_pk primary key,
               -- null means waiting for admin approval
               member_state         varchar2(20)
                   constraint membership_rel_mem_ck
                    check (member_state in ('approved', 'banned', 'rejected', 'deleted'))
           );
             

        - The acs_rels + The acs_rels table entries would look like so: -

        rel_typeobject_oneobject_two
        +

        + rel_type + + object_one + + object_two +
        membership_rel Pranksters @@ -398,28 +442,34 @@ Pranksters Penelope -

        Read acs_rels: right-side is a +

        Read acs_rels: right-side is a subset of left-side, ie - object2 is a part of - object1. + object2 is a part of + object1.

        Another way of building up groups is by adding subgroups. Suppose we define Merry Pranksters and Sad Pranksters as subgroups of Pranksters. We say that the Pranksters group - is composed of + is composed of groups Merry Pranksters and Sad Pranksters. This - information is stored in the acs_rels - and composition_rels tables. + information is stored in the acs_rels + and composition_rels tables.

        -create table composition_rels (
        +create table composition_rels (
             rel_id
        -        constraint composition_rels_rel_id_fk references acs_rels (rel_id)
        +        constraint composition_rels_rel_id_fk references acs_rels (rel_id)
                 constraint composition_rels_rel_id_pk primary key
         );
             

        The relevant entries in the - acs_rels look like so. -

        rel_typeobject_oneobject_two
        + acs_rels look like so. +

        + rel_type + + object_one + + object_two +
        composition_rel Pranksters @@ -444,58 +494,58 @@ of G3.

        Traversing the group composition hierarchy requires running - hierarchical queries, + hierarchical queries, which are expensive in Oracle. As we saw in the Context Hierarchy section, one way of reducing the performance hit incurred by hierarchical queries is to cache query results in a table maintained by triggers. The OpenACS data model defines two such tables:

        - create table group_component_index (
        + create table group_component_index (
                   group_id        not null
                                   constraint group_comp_index_group_id_fk
        -                          references groups (group_id),
        +                          references groups (group_id),
                   component_id    not null
                                   constraint group_comp_index_comp_id_fk
        -                          references groups (group_id),
        +                          references groups (group_id),
                   rel_id          not null
                                   constraint group_comp_index_rel_id_fk
                                   references composition_rels (rel_id),
                   container_id    not null
                                   constraint group_comp_index_cont_id_ck
        -                          references groups (group_id),
        +                          references groups (group_id),
                   constraint group_component_index_ck
                   check (group_id != component_id),
                   constraint group_component_index_pk
                   primary key (group_id, component_id, rel_id)
           ) organization index;
             
        -  create table group_member_index (
        +  create table group_member_index (
               group_id
                   not null
        -          constraint group_member_index_grp_id_fk references groups (group_id),
        +          constraint group_member_index_grp_id_fk references groups (group_id),
               member_id
                   not null
        -          constraint group_member_index_mem_id_fk references parties (party_id),
        +          constraint group_member_index_mem_id_fk references parties (party_id),
               rel_id
                   not null
        -          constraint group_member_index_rel_id_fk references membership_rels (rel_id),
        +          constraint group_member_index_rel_id_fk references membership_rels (rel_id),
               container_id
                   not null
        -          constraint group_member_index_cont_id_fk references groups (group_id),
        +          constraint group_member_index_cont_id_fk references groups (group_id),
               constraint group_member_index_pk
                   primary key (member_id, group_id, rel_id)
           ) organization index;
             

        - The group_component_index table stores a flattened representation of the - group composition hierarchy that is maintained in sync with the acs_rels - and composition_rels tables through triggers. -

        additional comments

        - As far as the group_member_index table goes, I am not sure I understand its + The group_component_index table stores a flattened representation of the + group composition hierarchy that is maintained in sync with the acs_rels + and composition_rels tables through triggers. +

        additional comments

        + As far as the group_member_index table goes, I am not sure I understand its purpose. It maintains group-member relationships that are resolved with respect to group composition. Note that information stored in - group_member_index can be trivially derived by joining - membership_rels, - acs_rels, - and group_component_index. Here + group_member_index can be trivially derived by joining + membership_rels, + acs_rels, + and group_component_index. Here is a view that does it. (This view is not part of the OpenACS Kernel data model.)

         create or replace view group_member_view
        @@ -507,21 +557,21 @@
            select
              group_id, group_id as component_id
            from
        -     groups
        +     groups
            union
            select
              group_id, component_id
            from
              group_component_index
           ) gci,
        -  membership_rels mr,
        -  acs_rels r
        +  membership_rels mr,
        +  acs_rels r
         where
           mr.rel_id = r.rel_id
           and r.object_id_one = gci.component_id;
             

        - A heuristic way to verify that group_member_view is essentially identical - to group_member_index is to compute the + A heuristic way to verify that group_member_view is essentially identical + to group_member_index is to compute the symmetric difference between the two:

         select
        @@ -530,34 +580,34 @@
           (
            select group_id, member_id from group_member_view
            minus
        -   select group_id, member_id from group_member_index
        +   select group_id, member_id from group_member_index
           )
         union
         select
           group_id, member_id
         from
           (
        -   select group_id, member_id from group_member_index
        +   select group_id, member_id from group_member_index
            minus
            select group_id, member_id from group_member_view
           )
             

        The query returns no rows. The important point is, if we have a flattened view of the composition hierarchy -- like one provided - by the group_component_index table -- + by the group_component_index table -- membership relationship resolution can be computed trivially with no hierarchical queries involved. There is no need to keep the view in a denormalized table, unless doing so results in substantial performance gains. -

        Putting It All Together

        - Security information is queried by calling the acs_permission.permission_p +

        Putting It All Together

        + Security information is queried by calling the acs_permission.permission_p function in OpenACS. This is accessible from Tcl via the - permission::permission_p procedure. + permission::permission_p procedure.

          
           create or replace package body acs_permission
           as
             -- some stuff removed for the sake of brevity
           
        -    function permission_p (
        +    function permission_p (
               object_id	 acs_objects.object_id%TYPE,
               party_id	 parties.party_id%TYPE,
               privilege	 acs_privileges.privilege%TYPE
        @@ -567,30 +617,30 @@
             begin
               -- XXX This must be fixed: -1 shouldn't be hardcoded (it is the public)
               select decode(count(*),0,'f','t') into exists_p
        -        from acs_object_party_privilege_map
        +        from acs_object_party_privilege_map
                where object_id = permission_p.object_id
                  and party_id in (permission_p.party_id, -1)
                  and privilege = permission_p.privilege;
               return exists_p;
             end;
         
           end acs_permission;
        -    

        problem avoidance

        +

        problem avoidance

        The function queries - acs_object_party_privilege_map, + acs_object_party_privilege_map, which is a humongous view that joins three flattened hierarchies: the context tree, the privilege hierarchy, the party composition (and membership) hierarchy. It contains an extremely large number of rows. About the only kind of query you can run against it is the one - performed by the acs_permission.permission_p + performed by the acs_permission.permission_p function. Anything other than that would take forever to finish or would ultimately result in a query error.

        For example, do not try to do things like

         select count(*)
        -  from acs_object_party_privilege_map;
        +  from acs_object_party_privilege_map;
             

        To give another example of things to avoid, I have seen code like this:

        @@ -599,7 +649,7 @@
                 select
                    object_id, party_id
                 from
        -           acs_object_party_privilege_map
        +           acs_object_party_privilege_map
                 where
                    privilege = 'foo_create';
           begin
        @@ -619,7 +669,7 @@
           end;
           /
             

        - The acs_permission.revoke_permission function merely runs a + The acs_permission.revoke_permission function merely runs a delete statement like so:

          
           delete from
        @@ -629,9 +679,15 @@
              and grantee_id = revoke_permission.grantee_id
              and privilege = revoke_permission.privilege;
             

        - Note that in the above example, acs_permissions had only + Note that in the above example, acs_permissions had only one entry that needed to be deleted: -

        object_idgrantee_idprivilege
        +

        + object_id + + grantee_id + + privilege +
        default_context registered_users @@ -640,17 +696,17 @@

        The above script would never get around to deleting this entry because it had to loop through a gazillion rows in the humongous - acs_object_party_privilege_map view. -

        Appendix: Various View Definitions

        -create or replace view acs_object_party_privilege_map
        +      acs_object_party_privilege_map view. 
        +    

        Appendix: Various View Definitions

        +create or replace view acs_object_party_privilege_map
         as
         select
           ogpm.object_id,
           gmm.member_id as party_id,
           ogpm.privilege
         from
        -  acs_object_grantee_priv_map ogpm,
        -  group_member_map gmm
        +  acs_object_grantee_priv_map ogpm,
        +  group_member_map gmm
         where
           ogpm.grantee_id = gmm.group_id
         union
        @@ -659,49 +715,49 @@
           grantee_id as party_id,
           privilege
         from
        -  acs_object_grantee_priv_map;
        +  acs_object_grantee_priv_map;
             
        -create or replace view acs_object_grantee_priv_map
        +create or replace view acs_object_grantee_priv_map
         as
         select
           a.object_id,
           a.grantee_id,
           m.descendant as privilege
         from
        -  acs_permission_all a,
        -  acs_privilege_descendant_map m
        +  acs_permission_all a,
        +  acs_privilege_descendant_map m
         where
           a.privilege = m.privilege;
             
         
        -create or replace view acs_permissions_all
        +create or replace view acs_permissions_all
         as
         select
           op.object_id,
           p.grantee_id,
           p.privilege
         from
        -  acs_object_paths op,
        -  acs_permissions p
        +  acs_object_paths op,
        +  acs_permissions p
         where
           op.ancestor_id = p.object_id;
             
        -create or replace view acs_object_paths
        +create or replace view acs_object_paths
         as
         select
           object_id,
           ancestor_id,
           n_generations
         from
        -  acs_object_context_index;
        +  acs_object_context_index;
             
         
         
        -create or replace view group_member_map
        +create or replace view group_member_map
         as
         select
           group_id,
           member_id,
           rel_id,
           container_id
         from
        -  group_member_index;
        +  group_member_index;
             
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions.html,v diff -u -r1.46.2.2 -r1.46.2.3 --- openacs-4/packages/acs-core-docs/www/permissions.html 12 Dec 2010 00:07:02 -0000 1.46.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions.html 12 Dec 2010 01:37:25 -0000 1.46.2.3 @@ -1,19 +1,9 @@ -<<<<<<< permissions.html - -Groups, Context, Permissions

        Groups, Context, Permissions

        By Pete Su

        -======= -Groups, Context, Permissions

        Groups, Context, Permissions

        By Pete Su

        ->>>>>>> 1.48 +Groups, Context, Permissions

        Groups, Context, Permissions

        By Pete Su

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

        Overview

        -The OpenACS 5.6.0 Permissions system allows developers and administrators to -=======

        Overview

        The OpenACS 5.6.0 Permissions system allows developers and administrators to ->>>>>>> 1.48 set access control policies at the object level, that is, any application or system object represented by a row in the acs_objects table can be access-controlled via a @@ -30,13 +20,8 @@ together into larger security domains.

        The rest of this document discusses each of these parts, and how they fit together with the permissions system. -<<<<<<< permissions.html -

        Groups

        -OpenACS 5.6.0 has an abstraction called a party. Parties have a recursive -=======

        Groups

        OpenACS 5.6.0 has an abstraction called a party. Parties have a recursive ->>>>>>> 1.48 definition. We can illustrate how it works with the following simplified data model. First, we define the parties table, where each party has an email address and a URL for contact @@ -89,7 +74,7 @@

        Permissions

        NOTE: Much more detailed information about the permissions system and how to use it is available in the - ??? document. + OpenACS Permissions Tediously Explained document.

        The permissions data model is a mapping between privileges, parties and objects. Parties and @@ -150,15 +135,9 @@ would become very tedious. OpenACS provides a object contexts as a means for controlling permissions of a large group of objects at the same time. -<<<<<<< permissions.html -

        Object Context

        -In OpenACS 5.6.0, object context is a scoping -mechanism. "Scoping" and "scope" are terms best -=======

        Object Context

        In OpenACS 5.6.0, object context is a scoping mechanism. "Scoping" and "scope" are terms best ->>>>>>> 1.48 explained by example: consider some hypothetical rows in the address_book table:

        ...scopeuser_idgroup_id...
        ...user123 ...
        ...group 456...
        ...public ...

        @@ -219,15 +198,9 @@ context_id is null, this context is used by default.

        See the package developer tutorials for examples on how to use permissions code. -<<<<<<< permissions.html -

        Summary

        -OpenACS 5.6.0 defines three separate mechanisms for specifying access control -in applications.

        1. -=======

        Summary

        OpenACS 5.6.0 defines three separate mechanisms for specifying access control in applications.

        1. ->>>>>>> 1.48 The Groups data model allows you to define hierarchical organizations of users and groups of users.

        2. @@ -238,8 +211,4 @@ permissions in a hierarchical fashion.

        A PL/SQL or Tcl API is then used to check permissions in application pages. -<<<<<<< permissions.html

        ($Id$)
        View comments on this page at openacs.org
        -======= -

        ($Id$)
        View comments on this page at openacs.org
        ->>>>>>> 1.48 Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.47.2.2 -r1.47.2.3 --- openacs-4/packages/acs-core-docs/www/postgres.html 12 Dec 2010 00:07:02 -0000 1.47.2.2 +++ openacs-4/packages/acs-core-docs/www/postgres.html 12 Dec 2010 01:37:25 -0000 1.47.2.3 @@ -2,11 +2,7 @@ Install PostgreSQL

        Install PostgreSQL

        by Vinod Kurup

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

        Skip this section if you will run only Oracle.

        OpenACS 5.6.0 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4 and 7.4.x. 7.4.7 is the recommended version of PostgreSQL.

        • Special notes for Mac OS X. If you are running Mac OS X prior to 10.3, you should be -=======

        Skip this section if you will run only Oracle.

        OpenACS 5.6.0 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4 and 7.4.x. 7.4.7 is the recommended version of PostgreSQL.

        • Special notes for Mac OS X. If you are running Mac OS X prior to 10.3, you should be ->>>>>>> 1.49 able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.

        • Special Notes for Debian. 

          Debian stable user should install PostGreSQL from source as detailed below, or they should use the www.backports.org @@ -217,19 +213,11 @@ bunch of symlinks that ensure that, when the operating system changes runlevels, postgresql goes to the appropriate state. Red Hat and Debian and SuSE each work a little -<<<<<<< postgres.html - differently. If you haven't untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file. -

          • Red Hat RPM:

            The init script is already installed; just turn it on for the appropriate run levels.

            [root root]# chkconfig --level 345 postgresql on
            -[root root]# 
          • Red Hat from source:

            [root src]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
            -[root src]# chown root.root /etc/rc.d/init.d/postgresql
            -[root src]# chmod 755 /etc/rc.d/init.d/postgresql
            -=======
                     differently.  If you haven't  untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file.
             	

            • Red Hat RPM:

              The init script is already installed; just turn it on for the appropriate run levels.

              [root root]# chkconfig --level 345 postgresql on
               [root root]# 
            • Red Hat from source:

              [root src]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
               [root src]# chown root.root /etc/rc.d/init.d/postgresql
               [root src]# chmod 755 /etc/rc.d/init.d/postgresql
              ->>>>>>> 1.49
               [root src]# 
               cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
               chown root.root /etc/rc.d/init.d/postgresql
              @@ -272,15 +260,9 @@
                  /etc/rc5.d/S20postgresql -> ../init.d/postgresql
               [root ~]# /etc/init.d/postgresql start
               Starting PostgreSQL: ok
              -<<<<<<< postgres.html
              -[root ~]#
            • FreeBSD:

              [root ~]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
              -[root ~]# chown root:wheel /usr/local/etc/rc.d/postgresql.sh
              -[root ~]# chmod 755 /usr/local/etc/rc.d/postgresql.sh
              -=======
               [root ~]#
            • FreeBSD:

              [root ~]# cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
               [root ~]# chown root:wheel /usr/local/etc/rc.d/postgresql.sh
               [root ~]# chmod 755 /usr/local/etc/rc.d/postgresql.sh
              ->>>>>>> 1.49
               [root ~]# 
               cp /tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /usr/local/etc/rc.d/postgresql.sh
               chown root:wheel /usr/local/etc/rc.d/postgresql.sh
              @@ -300,15 +282,9 @@
                           rc.d/ part in each of the
                           following commands.
               
              -<<<<<<< postgres.html
              -          

            [root ~]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
            -[root ~]# chown root.root /etc/rc.d/init.d/postgresql
            -[root ~]# chmod 755 /etc/rc.d/init.d/postgresql

            -=======

          [root ~]# cp /var/tmp/openacs-5.6.0/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
           [root ~]# chown root.root /etc/rc.d/init.d/postgresql
           [root ~]# chmod 755 /etc/rc.d/init.d/postgresql

          ->>>>>>> 1.49 Test the script. @@ -405,8 +381,4 @@ PostgreSQL Performance Tuning -<<<<<<< postgres.html

        ($Id$)
        View comments on this page at openacs.org
        -======= -

        ($Id$)
        View comments on this page at openacs.org
        ->>>>>>> 1.49 Index: openacs-4/packages/acs-core-docs/www/profile-code.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/profile-code.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/profile-code.html 12 Dec 2010 00:07:02 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/profile-code.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< profile-code.html - -Profile your code

        Profile your code

        by Jade Rubick

        -======= -Profile your code

        Profile your code

        by Jade Rubick

        ->>>>>>> 1.13 +Profile your code

        Profile your code

        by Jade Rubick

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

        There are several facilities for profiling your code in Index: openacs-4/packages/acs-core-docs/www/psgml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-mode.html,v diff -u -r1.44.2.2 -r1.44.2.3 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 12 Dec 2010 00:07:02 -0000 1.44.2.2 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 12 Dec 2010 01:37:25 -0000 1.44.2.3 @@ -1,58 +1,53 @@ -<<<<<<< psgml-mode.html - -Using PSGML mode in Emacs

        Using PSGML mode in Emacs

        By David Lutterkort

        -======= -Using PSGML mode in Emacs

        Using PSGML mode in Emacs

        By David Lutterkort

        ->>>>>>> 1.46 +Using PSGML mode in Emacs

        Using PSGML mode in Emacs

        By David Lutterkort

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

        Note: nxml mode replaces and/or complements psgml mode. More information.

        What it is

        PSGML Mode is a mode for editing, umm, SGML and XML documents in emacs. It +

        Note: nxml mode replaces and/or complements psgml mode. More information.

        What it is

        PSGML Mode is a mode for editing, umm, SGML and XML documents in emacs. It can parse a DTD and help you insert the right tags in the right place, knows about tags' attributes and can tell you in which contexts a tag can be used. If you give it the right DTD, that is. But even without a DTD, -it can save you some typing since pressing C-c/ will close an open -tag automatically.

        Where to get it

        Most newer emacsen come with PSGML mode preinstalled. You can find out -whether your emacs has it with the locate-library command. In Emacs, -type M-x locate-library and enter psgml. Emacs will tell +it can save you some typing since pressing C-c/ will close an open +tag automatically.

        Where to get it

        Most newer emacsen come with PSGML mode preinstalled. You can find out +whether your emacs has it with the locate-library command. In Emacs, +type M-x locate-library and enter psgml. Emacs will tell you if it found it or not.

        If you don't have PSGML preinstalled in your Emacs, there are two -things you can do:

        1. On Linux: Get the -psgml rpm from RedHat's -docbook-tools and install it as usual.

        2. On other systems: Get the tarball from the PSGML Website. -Unpack it and follow the install instructions.

        Using CATALOG files

        The easiest way to teach PSGML mode about a DTD is by adding it to your -own CATALOG. Here is an example of how you can set that up for the -Docbook XML DTD.

        1. Get the Docbook XML DTD -zip archive from docbook.org

        2. Go somewhere in your working directory and do

          +things you can do:

          1. On Linux: Get the +psgml rpm from RedHat's +docbook-tools and install it as usual.

          2. On other systems: Get the tarball from the PSGML Website. +Unpack it and follow the install instructions.

        Using CATALOG files

        The easiest way to teach PSGML mode about a DTD is by adding it to your +own CATALOG. Here is an example of how you can set that up for the +Docbook XML DTD.

        1. Get the Docbook XML DTD +zip archive from docbook.org

        2. Go somewhere in your working directory and do

                 mkdir -p dtd/docbook-xml
                 cd dtd/docbook-xml
                 unzip -a <docbook XML DTD zip archive>
              
          -
        3. Create a file with the name CATALOG in the dtd +

        4. Create a file with the name CATALOG in the dtd directory and put the line

          -      CATALOG "docbook-xml/docbook.cat"
          +      CATALOG "docbook-xml/docbook.cat"
           

          -in it. By maintaining your own CATALOG, it is easy to add more +in it. By maintaining your own CATALOG, it is easy to add more DTD's without changing your emacs settings. (How about that HTML 4.01 DTD you -always wanted to get from W3C ? The +always wanted to get from W3C ? The DTD is in the zip archives and tarballs available on the site.)

        That's it. Now you are ready to tell emacs all about PSGML mode and -that funky CATALOG

        What to tell emacs

        If you installed PSGML mode in a non-standard location, e.g., somewhere in -your home directory, you need to add this to the load-path by adding -this line to your .emacs file:

        -      (add-to-list 'load-path "/some/dir/that/contains/psgml.elc")
        +that funky CATALOG

        What to tell emacs

        If you installed PSGML mode in a non-standard location, e.g., somewhere in +your home directory, you need to add this to the load-path by adding +this line to your .emacs file:

        +      (add-to-list 'load-path "/some/dir/that/contains/psgml.elc")
            
        -

        To let PSGML mode find your CATALOG and to enable PSGML mode for -all your editing, add these lines to your .emacs:

        +

        To let PSGML mode find your CATALOG and to enable PSGML mode for +all your editing, add these lines to your .emacs:

               (require 'psgml)
         
        -      (add-to-list 'auto-mode-alist '("\\.html" . sgml-mode))
        -      (add-to-list 'auto-mode-alist '("\\.adp" . xml-mode))
        -      (add-to-list 'auto-mode-alist '("\\.xml" . xml-mode))
        -      (add-to-list 'auto-mode-alist '("\\.xsl" . xml-mode))
        +      (add-to-list 'auto-mode-alist '("\\.html" . sgml-mode))
        +      (add-to-list 'auto-mode-alist '("\\.adp" . xml-mode))
        +      (add-to-list 'auto-mode-alist '("\\.xml" . xml-mode))
        +      (add-to-list 'auto-mode-alist '("\\.xsl" . xml-mode))
               
        -      (add-to-list 'sgml-catalog-files "/path/to/your/dtd/CATALOG")
        +      (add-to-list 'sgml-catalog-files "/path/to/your/dtd/CATALOG")
            
         

        If you want font-locking and indentation, you can also add these lines -into the .emacs file:

        +into the .emacs file:

               (setq sgml-markup-faces '((start-tag . font-lock-function-name-face)
                                         (end-tag . font-lock-function-name-face)
                         (comment . font-lock-comment-face)
        @@ -64,37 +59,28 @@
               (setq sgml-set-face t)
               (setq-default sgml-indent-data t)
               ;; Some convenient key definitions:
        -      (define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type)
        -      (define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info)
        -      (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity)
        +      (define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type)
        +      (define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info)
        +      (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity)
            
        -

        What is a DOCTYPE ?

        All SGML and XML documents that should conform to a DTD have to declare a -doctype. For the docbook XML, all your .xml files whould start with +

        What is a DOCTYPE ?

        All SGML and XML documents that should conform to a DTD have to declare a +doctype. For the docbook XML, all your .xml files whould start with the line

        -      <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "docbookx.dtd">
        +      <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "docbookx.dtd">
            
         

        If your document is only part of a larger XML document, you can tell PSGML mode about it by appending the following lines to your file. In this case, do not include a DOCTYPE declaration in your file.

               <!--
                Local Variables:
        -       sgml-parent-document: ("top.xml" "book" "sect1")
        +       sgml-parent-document: ("top.xml" "book" "sect1")
                End:
               -->
            
         

        Which says that the parent of this document can be found in the file -<<<<<<< psgml-mode.html -top.xml, that the element in the parent that will enclose the -current document is a book and that the current file's topmost -element is a sect1.

        How to use it

        Of course, you should read the emacs texinfo pages that come with PSGML -mode from start to finish. Barring that, here are some handy commands:

        KeyCommand
        C-c C-eInsert an element. Uses completion and only lets you insert elements that -are valid
        C-c C-aEdit attributes of enclosing element.
        C-c C-x C-iShow information about the document's DTD.
        C-c C-x C-eDescribe element. Shows for one element which elements can be parents, -what its contents can be and lists its attributes.

        Further reading

        Start with the Section , “OpenACS Documentation Guide”

        ($Id$)
        View comments on this page at openacs.org
        -======= top.xml, that the element in the parent that will enclose the current document is a book and that the current file's topmost element is a sect1.

        How to use it

        Of course, you should read the emacs texinfo pages that come with PSGML mode from start to finish. Barring that, here are some handy commands:

        KeyCommand
        C-c C-eInsert an element. Uses completion and only lets you insert elements that are valid
        C-c C-aEdit attributes of enclosing element.
        C-c C-x C-iShow information about the document's DTD.
        C-c C-x C-eDescribe element. Shows for one element which elements can be parents, what its contents can be and lists its attributes.

        Further reading

        Start with the OpenACS Documentation Guide

        ($Id$)
        View comments on this page at openacs.org
        ->>>>>>> 1.46 Index: openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html,v diff -u -r1.16.2.2 -r1.16.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 12 Dec 2010 00:07:02 -0000 1.16.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 12 Dec 2010 01:37:25 -0000 1.16.2.3 @@ -1,10 +1,5 @@ -<<<<<<< releasing-openacs-core.html - -OpenACS Core and .LRN

        OpenACS Core and .LRN

        1. Update Translations. Section , “How to Update the translations”

        2. Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:

          cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
          -=======
           
          -OpenACS Core and .LRN

          OpenACS Core and .LRN

          1. Update Translations. How to Update the translations

          2. Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:

            cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
            ->>>>>>> 1.18
            +OpenACS Core and .LRN

            OpenACS Core and .LRN

            1. Update Translations. How to Update the translations

            2. Rebuild the Changelog. Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir. We generate two changelogs, one for the minor branch and one for the most recent release. The example below is for OpenACS 5.0.2:

              cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
               cvs2cl -F oacs-5-0 --delta openacs-5-0-0-final:oacs-5-0 -f ChangeLog
               cvs2cl -F oacs-5-0 --delta openacs-5-0-1-final:oacs-5-0 -f ChangeLog-recent
            3. Update Version Numbers. The version numbers in the documentation and in the packages must be updated. This should only happen after a release candidate is approved.

              .LRN: this must be repeated for .LRN modules (dotlrn-core in the dotlrn cvs tree) and for any modified modules in the .LRN prerequisites (dotlrn-prereq in openacs cvs tree). My current working model is that I bulk-update .LRN and OpenACS core but that I don't touch dotlrn-prereq modules - I just use the most recent release and it's up to individual package developers to tag and release those packages when they change. This model is already broken because following it means that dotlrn-prereqs don't get new translations.

              1. Update /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/variables.ent with the new version number.

              2. Add new section in /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml @@ -144,8 +139,4 @@ # Clean up after ourselves... cd $BASE && rm -rf dotlrn-tarball tarball openacs-4 dotlrn-packages -<<<<<<< releasing-openacs-core.html

            ($Id$)
          View comments on this page at openacs.org
          -======= -
          ($Id$)
        View comments on this page at openacs.org
        ->>>>>>> 1.18 Index: openacs-4/packages/acs-core-docs/www/releasing-openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs.html,v diff -u -r1.25.2.2 -r1.25.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 12 Dec 2010 00:07:02 -0000 1.25.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 12 Dec 2010 01:37:25 -0000 1.25.2.3 @@ -1,7 +1,2 @@ -<<<<<<< releasing-openacs.html - -Chapter 16. Releasing OpenACS
        View comments on this page at openacs.org
        -======= -Chapter 15. Releasing OpenACS
        View comments on this page at openacs.org
        ->>>>>>> 1.27 +Chapter 16. Releasing OpenACS
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/releasing-package.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-package.html,v diff -u -r1.11.2.2 -r1.11.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-package.html 12 Dec 2010 00:07:02 -0000 1.11.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-package.html 12 Dec 2010 01:37:25 -0000 1.11.2.3 @@ -1,10 +1,5 @@ -<<<<<<< releasing-package.html - -How to package and release an OpenACS Package

        How to package and release an OpenACS Package

        In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.

        1. Update the version number, release date, and package maturity of your package in the APM.

        2. Make sure all changes are committed.

        3. Tag the updated work.:

          cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage
          -=======
           
          -How to package and release an OpenACS Package

          How to package and release an OpenACS Package

          In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.

          1. Update the version number, release date, and package maturity of your package in the APM.

          2. Make sure all changes are committed.

          3. Tag the updated work.:

            cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage
            ->>>>>>> 1.13
            +How to package and release an OpenACS Package

            How to package and release an OpenACS Package

            In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.

            1. Update the version number, release date, and package maturity of your package in the APM.

            2. Make sure all changes are committed.

            3. Tag the updated work.:

              cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage
               cvs tag myfirstpackages-1-0-0-final
               cvs tag -F openacs-5-0-compat
               

            Done. The package will be added to the repository automatically. If the correct version does not show up within 24 hours, ask for help on the OpenACS.org development forum.

            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/request-processor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/request-processor.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/request-processor.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,29 +1,13 @@ -<<<<<<< request-processor.html - -The Request Processor

            The Request Processor

            By Pete Su

            -======= -The Request Processor

            The Request Processor

            By Pete Su

            ->>>>>>> 1.47 +The Request Processor

            The Request Processor

            By Pete Su

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

            Overview

            -This document is a brief introduction to the OpenACS 5.6.0 Request Processor; -more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the -=======

            Overview

            This document is a brief introduction to the OpenACS 5.6.0 Request Processor; more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the ->>>>>>> 1.47 system, and implications and usage for the application developer. -<<<<<<< request-processor.html -

            Request Processor

            -The 5.6.0 Request Processor is a global filter and set of Tcl procs that -=======

            Request Processor

            The 5.6.0 Request Processor is a global filter and set of Tcl procs that ->>>>>>> 1.47 respond to every incoming URL reaching the server. The following diagram summarizes the stages of the request processor assuming a URL request like http://someserver.com/notes/somepage.adp. @@ -33,25 +17,15 @@

            Stage 1: Search Site Map

            The first thing the RP does is to map the given URL to the appropriate physical directory in the filesystem, from which to serve content. We -<<<<<<< request-processor.html -do this by searching the site map data model (touched on in the Packages, and further -discussed in Writing OpenACS Application Pages). This data model maps URLs to objects representing -======= do this by searching the site map data model (touched on in the Packages, and further discussed in Writing OpenACS Application Pages). This data model maps URLs to objects representing ->>>>>>> 1.47 content, and these objects are typically package instances.

            After looking up the appropriate object, the RP stores the URL, the ID of the object it found, and the package and package instance the object belongs to into the environment of the connection. This -<<<<<<< request-processor.html -environment can be queried using the ad_conn procedure, -which is described in detail in OpenACS 4 Request Processor Design. The page -======= environment can be queried using the ad_conn procedure, which is described in detail in OpenACS 4 Request Processor Design. The page ->>>>>>> 1.47 development tutorial shows you how to use this interface to make your pages aware of which instance was requested.

            Stage 2: Authentication

            @@ -62,15 +36,9 @@ extracts or sets up new session tokens for the user.

            Stage 3: Authorization

            Next, the Request Processor checks if the user has appropriate access -<<<<<<< request-processor.html privileges to the requested part of the site. In OpenACS 5.6.0, access control -is dictated by the permissions system. In -this case, the RP checks if the user has "read" priviledges on the -======= -privileges to the requested part of the site. In OpenACS 5.6.0, access control is dictated by the permissions system. In this case, the RP checks if the user has "read" priviledges on the ->>>>>>> 1.47 object in the site map specified by the URL. This object is typically a package instance, but it could easily be something more granular, such as whehter the user can view a particular piece of content within @@ -159,8 +127,4 @@

            In a .vuh file, path_info is the trailing part of the URL not matched by the .vuh file. -<<<<<<< request-processor.html

            ($Id$)
            View comments on this page at openacs.org
            -======= -

            ($Id$)
            View comments on this page at openacs.org
            ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/requirements-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/requirements-template.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 12 Dec 2010 00:07:02 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< requirements-template.html - -System/Application Requirements Template

            System/Application Requirements Template

            By You

            -======= -System/Application Requirements Template

            System/Application Requirements Template

            By You

            ->>>>>>> 1.47 +System/Application Requirements Template

            System/Application Requirements Template

            By You

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

            Introduction

            @@ -86,8 +81,4 @@ pre-existing system or prototype first, and thus you may want to write some thoughts on implementation, for aiding and guiding yourself or other programmers. -<<<<<<< requirements-template.html -

            Revision History

            Document Revision #Action Taken, NotesWhen?By Whom?
            0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
            0.2Edited8/22/2000Kai Wu
            0.1Created8/21/2000Josh Finkler, Audrey McLoghlin
            ($Id$)
            View comments on this page at openacs.org
            -======= -

            Revision History

            Document Revision #Action Taken, NotesWhen?By Whom?
            0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
            0.2Edited8/22/2000Kai Wu
            0.1Created8/21/2000Josh Finkler, Audrey McLoghlin
            ($Id$)
            View comments on this page at openacs.org
            ->>>>>>> 1.47 +

            Revision History

            Document Revision #Action Taken, NotesWhen?By Whom?
            0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
            0.2Edited8/22/2000Kai Wu
            0.1Created8/21/2000Josh Finkler, Audrey McLoghlin
            ($Id$)
            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/rp-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-design.html,v diff -u -r1.33.2.2 -r1.33.2.3 --- openacs-4/packages/acs-core-docs/www/rp-design.html 12 Dec 2010 00:07:02 -0000 1.33.2.2 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 12 Dec 2010 01:37:25 -0000 1.33.2.3 @@ -1,10 +1,5 @@ -<<<<<<< rp-design.html - -Request Processor Design

            Request Processor Design

            By Rafael H. Schloming

            -======= -Request Processor Design

            Request Processor Design

            By Rafael H. Schloming

            ->>>>>>> 1.35 +Request Processor Design

            Request Processor Design

            By Rafael H. Schloming

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
        [ad_conn sec_validated] This becomes "secure" when the connection uses SSL
        Database API
        [ad_conn db,handles] What are the list of handles available to AOL?
        [ad_conn db,n_handles_used] How many database handles are currently used?
        [ad_conn db,last_used] Which database handle did we use last?
        [ad_conn db,transaction_level,$db] Specifies what transaction level we are in
        [ad_conn db,db_abort_p,$dbh] Whether the transaction is aborted
        APM
        [ad_conn xml_loaded_p] Checks whether the XML parser is loaded so that it only gets loaded once. Set in apm_load_xml_packages
        Packages
        [ad_conn package_id] The package_id of the package associated with the URL.
        [ad_conn package_url] The URL on which the package is mounted.
        Miscellaneous
        [ad_conn system_p] If true then the request has been made to one of the special directories specified in the config file (somewhere), and no authentication or -<<<<<<< rp-design.html -authorization has been performed.
         
        Documentation
        [ad_conn api_page_documentation_mode_p] 
        View comments on this page at openacs.org
        -======= authorization has been performed.
        Documentation
        [ad_conn api_page_documentation_mode_p]  
        View comments on this page at openacs.org
        ->>>>>>> 1.35 Index: openacs-4/packages/acs-core-docs/www/rp-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-requirements.html,v diff -u -r1.29.2.2 -r1.29.2.3 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 12 Dec 2010 00:07:02 -0000 1.29.2.2 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 12 Dec 2010 01:37:25 -0000 1.29.2.3 @@ -1,10 +1,5 @@ -<<<<<<< rp-requirements.html - -Request Processor Requirements

        Request Processor Requirements

        By Rafael H. Schloming

        -======= -Request Processor Requirements

        Request Processor Requirements

        By Rafael H. Schloming

        ->>>>>>> 1.31 +Request Processor Requirements

        Request Processor Requirements

        By Rafael H. Schloming

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

        Introduction

        The following is a requirements document for the OpenACS 4.0 request Index: openacs-4/packages/acs-core-docs/www/security-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-design.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/security-design.html 12 Dec 2010 00:07:02 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/security-design.html 12 Dec 2010 01:37:25 -0000 1.31.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-design.html - -Security Design

        Security Design

        By Richard Li and Archit Shah

        -======= -Security Design

        Security Design

        By Richard Li and Archit Shah

        ->>>>>>> 1.33 +Security Design

        Security Design

        By Richard Li and Archit Shah

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

        Introduction

        Index: openacs-4/packages/acs-core-docs/www/security-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-notes.html,v diff -u -r1.45.2.2 -r1.45.2.3 --- openacs-4/packages/acs-core-docs/www/security-notes.html 12 Dec 2010 00:07:03 -0000 1.45.2.2 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 12 Dec 2010 01:37:25 -0000 1.45.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-notes.html - -Security Notes

        Security Notes

        By Richard Li

        -======= -Security Notes

        Security Notes

        By Richard Li

        ->>>>>>> 1.47 +Security Notes

        Security Notes

        By Richard Li

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

        @@ -59,10 +54,5 @@

        The set of string match expressions in the procedure above should be extended appropriately for other registration pages. This procedure does not use -<<<<<<< security-notes.html -ad_parameter or regular expressions for performance reasons, as -it is called by the request processor.

        ($Id$)
        View comments on this page at openacs.org
        -======= ad_parameter or regular expressions for performance reasons, as it is called by the request processor.

        ($Id$)
        View comments on this page at openacs.org
        ->>>>>>> 1.47 Index: openacs-4/packages/acs-core-docs/www/security-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-requirements.html,v diff -u -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 12 Dec 2010 00:07:03 -0000 1.31.2.2 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 12 Dec 2010 01:37:25 -0000 1.31.2.3 @@ -1,10 +1,5 @@ -<<<<<<< security-requirements.html - -Security Requirements

        Security Requirements

        By Richard Li

        -======= -Security Requirements

        Security Requirements

        By Richard Li

        ->>>>>>> 1.33 +Security Requirements

        Security Requirements

        By Richard Li

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

        Introduction

        Index: openacs-4/packages/acs-core-docs/www/snapshot-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/snapshot-backup.html,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/acs-core-docs/www/snapshot-backup.html 18 Jun 2010 21:29:36 -0000 1.10.2.1 +++ openacs-4/packages/acs-core-docs/www/snapshot-backup.html 12 Dec 2010 01:37:25 -0000 1.10.2.2 @@ -1,35 +1,35 @@ - -Manual backup and recovery

        Manual backup and recovery

        This section describes how to make a one-time backup and + +Manual backup and recovery

        Manual backup and recovery

        This section describes how to make a one-time backup and restore of the files and database. This is useful for rolling back to known-good versions of a service, such as at initial installation and just before an upgrade. First, you back up the database to a file within the file tree. Then, you back up the file tree. All of the information needed to rebuild the site, including the AOLserver config files, is then in tree for regular - file system backup.

        1. Back up the database to a file. 

          • Oracle. 

            • - Download the backup script. Save the file export-oracle.txt as - /var/tmp/export-oracle.txt -

            • + file system backup.

              1. Back up the database to a file. 

                • Oracle. 

                  • + Download the backup script. Save the file export-oracle.txt as + /var/tmp/export-oracle.txt +

                  • Login as root. The following commands will install the export script: -

                    [joeuser ~]$ su -
                    -[root ~]# cp /var/tmp/export-oracle.txt /usr/sbin/export-oracle
                    -[root ~]# chmod 700 /usr/sbin/export-oracle
                  • +

                    [joeuser ~]$ su -
                    +[root ~]# cp /var/tmp/export-oracle.txt /usr/sbin/export-oracle
                    +[root ~]# chmod 700 /usr/sbin/export-oracle
                  • Setup the export directory; this is the directory where backups will be stored. We recommend the directory - /ora8/m02/oracle-exports.

                    [root ~]# mkdir /ora8/m02/oracle-exports
                    -[root ~]# chown oracle:dba /ora8/m02/oracle-exports
                    -[root ~]# chmod 770 /ora8/m02/oracle-exports
                  • + /ora8/m02/oracle-exports.

                    [root ~]# mkdir /ora8/m02/oracle-exports
                    +[root ~]# chown oracle:dba /ora8/m02/oracle-exports
                    +[root ~]# chmod 770 /ora8/m02/oracle-exports
                  • Now edit - /usr/sbin/export-oracle and - change the SERVICE_NAME and - DATABASE_PASSWORD fields to + /usr/sbin/export-oracle and + change the SERVICE_NAME and + DATABASE_PASSWORD fields to their correct values. If you want to use a directory other than - /ora8/m02/oracle-exports, you + /ora8/m02/oracle-exports, you also need to change the - exportdir setting. + exportdir setting.

                    Test the export procedure by running the command: -

                    [root ~]# /usr/sbin/export-oracle
                    +              

                    [root ~]# /usr/sbin/export-oracle
                     mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory
                     
                     Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000
                    @@ -64,70 +64,70 @@
                       . exporting dimensions
                       . exporting post-schema procedural objects and actions
                       . exporting statistics
                    -Export terminated successfully without warnings.
                • PostgreSQL. Create a backup file and verify that it was created and has a reasonable size (several megabytes).

                  [root root]# su - $OPENACS_SERVICE_NAME
                  -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp $OPENACS_SERVICE_NAME
                  -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp 
                  +Export terminated successfully without warnings.
              2. PostgreSQL. Create a backup file and verify that it was created and has a reasonable size (several megabytes).

                [root root]# su - $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp 
                 -rw-rw-r-x    1 $OPENACS_SERVICE_NAME  $OPENACS_SERVICE_NAME   4005995 Feb 21 18:28 /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp
                -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
                 [root root]#
                 su - $OPENACS_SERVICE_NAME
                 pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp openacs-dev
                 ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp
                -exit
          • Back up the file system. Back up all of the files in the service, including the +exit

        2. Back up the file system. Back up all of the files in the service, including the database backup file but excluding the auto-generated - supervise directory, which is - unneccesary and has complicated permissions.

          In the tar command,

          • c create a - new tar archive

          • p preserves permissions.

          • s preserves file sort order

          • z compresses the output with gzip.

          • The --exclude clauses skips some daemontools files that + supervise directory, which is + unneccesary and has complicated permissions.

            In the tar command,

            • c create a + new tar archive

            • p preserves permissions.

            • s preserves file sort order

            • z compresses the output with gzip.

            • The --exclude clauses skips some daemontools files that are owned by root and thus cannot be backed up by the service owner. These files are autogenerated and we don't - break anything by omitting them.

            • The --file clause + break anything by omitting them.

            • The --file clause specifies the name of the output file to be generated; we - manually add the correct extensions.

            • The last clause, - /var/lib/aolserver/$OPENACS_SERVICE_NAME/, + manually add the correct extensions.

            • The last clause, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/, specifies the starting point for backup. Tar defaults to - recursive backup.

            [root root]# su - $OPENACS_SERVICE_NAME
            -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \
            -   --file /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/
            +            recursive backup.

          [root root]# su - $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \
          +   --file /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/
           tar: Removing leading `/' from member names
          -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
        3. Suffer a catastrophic failure on your production system. (We'll simulate this step)

          [root root]# svc -d /service/$OPENACS_SERVICE_NAME
          -[root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost
          -[root root]# rm /service/$OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
        4. Suffer a catastrophic failure on your production system. (We'll simulate this step)

          [root root]# svc -d /service/$OPENACS_SERVICE_NAME
          +[root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost
          +[root root]# rm /service/$OPENACS_SERVICE_NAME
           rm: remove symbolic link `/service/$OPENACS_SERVICE_NAME'? y
          -[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
          +[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
           root      1496  0.0  0.0  1312  252 ?        S    16:58   0:00 supervise $OPENACS_SERVICE_NAME
          -[root root]# kill 1496
          -[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
          -[root root]# su - postgres
          -[postgres pgsql]$ dropdb $OPENACS_SERVICE_NAME
          +[root root]# kill 1496
          +[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
          +[root root]# su - postgres
          +[postgres pgsql]$ dropdb $OPENACS_SERVICE_NAME
           DROP DATABASE
          -[postgres pgsql]$ dropuser $OPENACS_SERVICE_NAME
          +[postgres pgsql]$ dropuser $OPENACS_SERVICE_NAME
           DROP USER
          -[postgres pgsql]$ exit
          +[postgres pgsql]$ exit
           logout
          -[root root]#
        5. Recovery. 

          1. Restore the operating system and required software. +[root root]#

          2. Recovery. 

            1. Restore the operating system and required software. You can do this with standard backup processes or by keeping copies of the install material (OS CDs, OpenACS tarball and supporting software) and repeating the install - guide. Recreate the service user ($OPENACS_SERVICE_NAME).

            2. Restore the OpenACS files and database backup file.

              [root root]# su - $OPENACS_SERVICE_NAME
              -[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
              -[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz
              -[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
              -[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAME
            3. Restore the database

              • Oracle. 

                1. Set up a clean Oracle database user and - tablespace with the same names as the ones exported from (more information).

                2. Invoke the import command

                  imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
              • Postgres. If the database user does not already exist, create it.

                [root root]# su - postgres
                -[postgres ~]$ createuser $OPENACS_SERVICE_NAME
                -Shall the new user be allowed to create databases? (y/n) y
                -Shall the new user be allowed to create more new users? (y/n) y
                +            guide.  Recreate the service user ($OPENACS_SERVICE_NAME).

              • Restore the OpenACS files and database backup file.

                [root root]# su - $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
                +[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz
                +[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAME
              • Restore the database

                • Oracle. 

                  1. Set up a clean Oracle database user and + tablespace with the same names as the ones exported from (more information).

                  2. Invoke the import command

                    imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
                • Postgres. If the database user does not already exist, create it.

                  [root root]# su - postgres
                  +[postgres ~]$ createuser $OPENACS_SERVICE_NAME
                  +Shall the new user be allowed to create databases? (y/n) y
                  +Shall the new user be allowed to create more new users? (y/n) y
                   CREATE USER
                  -[postgres ~]$ exit
                  -

                  Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  -[$OPENACS_SERVICE_NAME ~]$ createdb $OPENACS_SERVICE_NAME
                  +[postgres ~]$ exit
                  +

                  Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME ~]$ createdb $OPENACS_SERVICE_NAME
                   CREATE DATABASE
                  -[$OPENACS_SERVICE_NAME ~]$ psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/postgresql.sql $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME ~]$ psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/postgresql.sql $OPENACS_SERVICE_NAME
                   (many lines omitted)
                  -[$OPENACS_SERVICE_NAME ~]$ psql $OPENACS_SERVICE_NAME < /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/database-backup.dmp
                  +[$OPENACS_SERVICE_NAME ~]$ psql $OPENACS_SERVICE_NAME < /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/database-backup.dmp
                   (many lines omitted)
                  -[$OPENACS_SERVICE_NAME ~]$ exit
                  -[postgres ~]$ exit
                  -logout
              • Activate the service

                [root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools /service/$OPENACS_SERVICE_NAME
                -[root root]# sleep 10
                -[root root]# svgroup web /service/$OPENACS_SERVICE_NAME
        View comments on this page at openacs.org
        +[$OPENACS_SERVICE_NAME ~]$ exit +[postgres ~]$ exit +logout
      • Activate the service

        [root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools /service/$OPENACS_SERVICE_NAME
        +[root root]# sleep 10
        +[root root]# svgroup web /service/$OPENACS_SERVICE_NAME
      • View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/style-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/style-guide.html,v diff -u -r1.24.2.2 -r1.24.2.3 --- openacs-4/packages/acs-core-docs/www/style-guide.html 12 Dec 2010 00:07:03 -0000 1.24.2.2 +++ openacs-4/packages/acs-core-docs/www/style-guide.html 12 Dec 2010 01:37:25 -0000 1.24.2.3 @@ -1,10 +1,5 @@ -<<<<<<< style-guide.html - -OpenACS Style Guide

        OpenACS Style Guide

        -======= -OpenACS Style Guide

        OpenACS Style Guide

        ->>>>>>> 1.26 +OpenACS Style Guide

        OpenACS Style Guide

        By Jeff Davis

        Motivation

        Why have coding standards for OpenACS? And if the code works why change it to @@ -93,10 +88,6 @@

      • Solicit code reviews.  Ask others to look over your code and provide feedback and do the same for others. -<<<<<<< style-guide.html -

      • Revision History

        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation12/2003Jeff Davis
        ($Id$)
        View comments on this page at openacs.org
        -======= -

        Revision History

        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation12/2003Jeff Davis
        ($Id$)