Annotation of doc/build/software_review.html, revision 1.1
1.1 ! harris41 1: <html>
! 2: <head>
! 3: <title>Software Review</title>
! 4: </head>
! 5: <body>
! 6: <h1>Submitting software patches</h1>
! 7: <p>
! 8: The system works, yet there remains much tweaking to do.
! 9: </p>
! 10: <p>
! 11: <img src='sharetweaks.gif' />
! 12: </p>
! 13: <h3>General Guidelines</h3>
! 14: <ol>
! 15: <li>submit patches to <tt>albertel@msu.edu</tt></li>
! 16: <li>patches must be a unified diff format (-u)</li>
! 17: <li>should be against a specific CVS tag (like HEAD, or when we get to
! 18: releases, the most recent *_RELEASE tag)</li>
! 19: <li>should contain a description of bugs they fix or functionality they
! 20: add</li>
! 21: <li>try to make each patch as _targetted_ as possible. (Fix 1 bug, or
! 22: add 1 feature) to make it easier to see what is going on.</li>
! 23: <li>Large functionality changes should probably get some discussion on
! 24: the mailing list before being submitted.</li>
! 25: </ol>
! 26: <h3>Example Scenario</h3>
! 27: <table border=1><tr><td>
! 28: <p>
! 29: <b>Large functionality changes should probably get some discussion on
! 30: the mailing list before being submitted.</b>
! 31: </p>
! 32: <p>
! 33: A fictional Dr. Sherbert is writing a handler to display web statistics
! 34: (information present in /var/log/httpd/access.log). Here is
! 35: a list of e-mails and commands which take place.
! 36: </p>
! 37: <p>
! 38: Dr. Sherbert e-mails the list with his idea
! 39: <pre>
! 40: <b>sherbert %></b> mail lon-capa@hobbes.lite.msu.edu
! 41: Hi,
! 42:
! 43: I want to create a handler to show web statistics (hits
! 44: per hour, IP addresses, most popular URLs, hits per day,
! 45: etc). This would provide data I can show the
! 46: administration as well as helping me better monitor
! 47: how adequately my server cluster is performing.
! 48: I plan on calling this handler lonapachestat.pm, associating
! 49: with apachestat, and available only to those with roles (see
! 50: roles.tab and rolesplain.tab) of "gan=generating anonymous
! 51: statistics". I would make appropriate changes to
! 52: /etc/httpd/conf/srm.conf
! 53:
! 54: -Bert
! 55: </pre>
! 56: </p>
! 57: <p>
! 58: Two others respond on the mailing list.
! 59: <pre>
! 60: <b>gwynne %></b> mail lon-capa@hobbes.lite.msu.edu
! 61: Bert,
! 62:
! 63: I like that idea, but don't you think that this is
! 64: better handled as a batch-cron job? Why not have
! 65: these statistics compiled every day? I think
! 66: SOURCE="loncom/cron/loncapa" TARGET="etc/cron.d/loncapa"
! 67: handles this. Also, I assume you mean associating
! 68: with the location http://MACHINENAME/adm/lonapachestat.
! 69:
! 70: Gwynne
! 71:
! 72:
! 73: <b>godfried %></b> mail lon-capa@hobbes.lite.msu.edu
! 74: Bert,
! 75:
! 76: This would be of immense help to some questions I have.
! 77: I want to be able to "play-back" what each user session
! 78: is doing for my course. Also, if a student e-mails me,
! 79: I want to be able to see where in the course sequence
! 80: the student was working. I would need the statistics calculated
! 81: dynamically as opposed to a batch process.
! 82:
! 83: Godfried
! 84: </pre>
! 85: </p>
! 86: <p>
! 87: After more discussion, Dr. Sherbert's idea is accepted.
! 88: </p>
! 89: </td></tr></table>
! 90: <p>
! 91:
! 92: </p>
! 93: <table border=1><tr><td>
! 94: <p>
! 95: <b>PATCHING /etc/httpd/conf/srm.conf</b>
! 96: </p>
! 97: <p>
! 98: <b>submit patches to <tt>albertel@msu.edu</tt></b>
! 99: <br /><b>patches must be a unified diff format (-u)</b>
! 100: <br /><b>should be against a specific CVS tag (like HEAD, or when we get to
! 101: releases, the most recent *_RELEASE tag)</b>
! 102: <br /><b>should contain a description of bugs they fix or functionality they
! 103: add</b>
! 104: <br /><b>try to make each patch as _targetted_ as possible. (Fix 1 bug, or
! 105: add 1 feature) to make it easier to see what is going on.</b>
! 106: </p>
! 107: <p>
! 108: Dr. Sherbert wants to alter the web server configuration so that
! 109: whenever http://MACHINENAME/apachestat is requested, the lonapachestat.pm
! 110: handler is called.
! 111: </p>
! 112: <p>
! 113: To do this, he needs to alter srm.conf. After setting up CVS
! 114: and checking out LON-CAPA (cvs co loncapa), he needs to find srm.conf
! 115: in the CVS source repository.
! 116: </p>
! 117: <pre>
! 118: [sherbert@morphy1 loncapa]$ find . -type f | grep srm.conf
! 119: ./loncom/srm.conf
! 120: [sherbert@morphy1 loncapa]$
! 121: </pre>
! 122: <p>
! 123: Dr. Sherbert sees the following section of code in srm.conf.
! 124: <pre>
! 125: # -------------------------------------------------------------- Admin Programs
! 126:
! 127: <Location /adm/roles>
! 128: PerlAccessHandler Apache::lonacc
! 129: SetHandler perl-script
! 130: PerlHandler Apache::lonroles
! 131: ErrorDocument 403 /adm/login
! 132: ErrorDocument 500 /adm/errorhandler
! 133: </Location>
! 134:
! 135: <Location /adm/login>
! 136: SetHandler perl-script
! 137: PerlHandler Apache::lonlogin
! 138: </Location>
! 139:
! 140: <Location /adm/logout>
! 141: PerlAccessHandler Apache::lonacc
! 142: SetHandler perl-script
! 143: PerlHandler Apache::lonlogout
! 144: ErrorDocument 403 /adm/login
! 145: </Location>
! 146: </pre>
! 147: </p>
! 148: <p>
! 149: Dr. Sherbert then adds in his handler.
! 150: </p>
! 151: <pre>
! 152: # -------------------------------------------------------------- Admin Programs
! 153:
! 154: <Location /adm/apachestat>
! 155: PerlAccessHandler Apache::lonacc
! 156: SetHandler perl-script
! 157: PerlHandler Apache::lonapachestat
! 158: ErrorDocument 403 /adm/login
! 159: ErrorDocument 500 /adm/errorhandler
! 160: </Location>
! 161:
! 162: <Location /adm/roles>
! 163: PerlAccessHandler Apache::lonacc
! 164: SetHandler perl-script
! 165: PerlHandler Apache::lonroles
! 166: ErrorDocument 403 /adm/login
! 167: ErrorDocument 500 /adm/errorhandler
! 168: </Location>
! 169:
! 170: <Location /adm/login>
! 171: SetHandler perl-script
! 172: PerlHandler Apache::lonlogin
! 173: </Location>
! 174:
! 175: <Location /adm/logout>
! 176: PerlAccessHandler Apache::lonacc
! 177: SetHandler perl-script
! 178: PerlHandler Apache::lonlogout
! 179: ErrorDocument 403 /adm/login
! 180: </Location>
! 181: </pre>
! 182: <p>
! 183: Dr. Sherbert then creates a unified diff format of his changes
! 184: against the HEAD (current) release.
! 185: <pre>
! 186: [sherbert@morphy1]$ cd loncapa/loncom
! 187: [sherbert@morphy1]$ cvs diff -U 3 -r HEAD srm.conf
! 188: Index: srm.conf
! 189: ===================================================================
! 190: RCS file: /home/cvs/loncom/srm.conf,v
! 191: retrieving revision 1.14
! 192: diff -U3 -r1.14 srm.conf
! 193: --- srm.conf 2001/05/15 12:35:07 1.14
! 194: +++ srm.conf 2001/05/19 13:14:53
! 195: @@ -353,6 +353,14 @@
! 196:
! 197: # -------------------------------------------------------------- Admin Programs
! 198: +<Location /adm/apachestat>
! 199: +PerlAccessHandler Apache::lonacc
! 200: +SetHandler perl-script
! 201: +PerlHandler Apache::lonapachestat
! 202: +ErrorDocument 403 /adm/login
! 203: +ErrorDocument 500 /adm/errorhandler
! 204: +</Location>
! 205: +
! 206: <Location /adm/roles>
! 207: PerlAccessHandler Apache::lonacc
! 208: SetHandler perl-script
! 209: </pre>
! 210: </p>
! 211: <p>
! 212: Dr. Sherbert e-mails his patch to Guy.
! 213: <pre>
! 214: [sherbert@morphy1]$ cvs diff -U 3 -r HEAD srm.conf | mail -s 'patch to\
! 215: srm.conf to add adm/apachestat handling with lonapachestat.pm'\
! 216: albertel@msu.edu
! 217: </pre>
! 218: </p>
! 219: <p>
! 220: Guy responds
! 221: <pre>
! 222: Bert,
! 223:
! 224: Your change was checked into the LON-CAPA system. Thanks!
! 225:
! 226: -Guy
! 227: </pre>
! 228: </p>
! 229: Dr. Sherbert did the following right things.
! 230: <ul>
! 231: <li>he described the fix in his mail message
! 232: <br>patch to srm.conf to add adm/apachestat handling with lonapachestat.pm</li>
! 233: <li>his submitted change fixed 1 bug/feature</li>
! 234: <li>he created a unified diff format for his patch</li>
! 235: </ul>
! 236: </pre>
! 237: </p>
! 238: </td></tr></table>
! 239: </body>
! 240: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>