4 commit 0ed34101e67dc04292f906945dd5752c73985412
5 Author: Dan Scott <dscott@laurentian.ca>
6 Date: Fri Mar 23 13:05:31 2012 -0400
8 Add trailing period, "localhost" to ejabberd.cfg example
10 Thanks to Yamil Suarez for noticing a discrepancy between the older wiki
11 instructions and the README.
13 Signed-off-by: Dan Scott <dscott@laurentian.ca>
15 commit cf4d4798c5949abaf6bc9a4c3a62bf9a6533977b
16 Author: Bill Erickson <berick@esilibrary.com>
17 Date: Wed Mar 14 11:38:18 2012 -0400
19 Prevent undef warnings on perl socket read nbytes test
21 Signed-off-by: Bill Erickson <berick@esilibrary.com>
22 Signed-off-by: Dan Scott <dan@coffeecode.net>
25 commit f470b55b86fd59f31dd142d8cb55fe812265892e
26 Author: Bill Erickson <berick@esilibrary.com>
27 Date: Mon Feb 20 14:40:30 2012 -0500
29 Detect remote disconnect in Perl XMPP reader
31 When the jabber server severs the connection, it leaves the Perl libs
32 with a socket that perpetually appears ready for reading, but always
33 returns 0 bytes. This produces a loop in the client code. This change
34 detects this situation, logs an error, and throws an exception.
36 Signed-off-by: Bill Erickson <berick@esilibrary.com>
37 Signed-off-by: Dan Scott <dscott@laurentian.ca>
39 13 2 src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm
41 commit 974d3a0dd4ddd134033b16bcd9e2fde34302ffd5
42 Author: Dan Wells <dbw2@calvin.edu>
43 Date: Tue Mar 6 15:08:33 2012 -0500
45 Protect gateway from format-string crashes in data
47 As a common security measure, printf-style formatting codes are
48 not allowed to be directly interpreted from a writable segment.
49 The gateway code currently has the following function call:
51 osrfLogActivity( OSRF_LOG_MARK, act->buf );
53 This is a variadic function which expects the 'act->buf' position
54 to contain a format string and any trailing arguments to be the
55 values passed to the formatter. Since act->buf is the value of
56 what we passed in, some data inadvertantly contains format strings,
57 and since it is a writable segment, the program crashes. Here is
58 an example of a crash-causing call:
60 http://localhost/osrf-gateway-v1?service=test&method=test¶m=%22%251n%22
62 The param is interpreted as "%1n" and abruptly fails.
64 The simple solution is to include a formatter so that our param gets
65 demoted to being mere data, i.e.:
67 osrfLogActivity( OSRF_LOG_MARK, "%s", act->buf );
69 Signed-off-by: Dan Wells <dbw2@calvin.edu>
70 Signed-off-by: Dan Scott <dscott@laurentian.ca>
72 1 1 src/gateway/osrf_json_gateway.c
74 commit fd92a859e2ba3eeeaafe4904cd04973eb8cd572b
75 Author: Thomas Berezansky <tsbere@mvlc.org>
76 Date: Wed Mar 7 16:42:21 2012 -0500
78 Stop warning about missing parentheses...
82 Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
84 1 1 src/perl/lib/OpenSRF/Application/Validator.pm
86 commit 8cfa0ae50935176a1574e8f233c8d4d88442c0ad
87 Author: Bill Erickson <berick@esilibrary.com>
88 Date: Thu Feb 16 17:31:29 2012 -0500
90 Refresh child file handles on status read
92 If a child process dies while the parent is attempting to read status
93 information from the child, the pipe connecting the two will be cleaned
94 up. The parent mustn't attempt to read from the dead pipe or it will
95 result in a bad file descriptor error, culminating in a high-cpu
96 infinite loop on the parent (Listener) process.
99 Signed-off-by: Bill Erickson <berick@esilibrary.com>
100 Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
101 Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
103 4 3 src/perl/lib/OpenSRF/Server.pm
105 commit 37606bf64f2829258cc612e730782e081e2ac6bb
106 Author: Bill Erickson <berick@esilibrary.com>
107 Date: Fri Jan 13 10:57:59 2012 -0500
109 Python libs for OpenSRF ingress tracking
111 osrf.ses.Session.ingress(ingress)
113 This also set the "srfsh" ingress value for srfsh.py.
115 Signed-off-by: Bill Erickson <berick@esilibrary.com>
116 Signed-off-by: Mike Rylander <mrylander@gmail.com>
118 11 1 src/python/osrf/ses.py
119 2 0 src/python/osrf/stack.py
120 1 0 src/python/srfsh.py
122 commit 26c31a9d5728adbd884a1369034caff41471130b
123 Author: Bill Erickson <berick@esilibrary.com>
124 Date: Fri Jan 13 09:35:18 2012 -0500
126 Set OpenSRF ingress value for srfsh/gateways
128 Sets the "srfsh", "gateway-v1", and "translator-v1" ingress values
131 For the translater, it's necessary to stamp the unpacked messages with
132 the updated ingress, then re-serialize before sending the messages along.
134 Signed-off-by: Bill Erickson <berick@esilibrary.com>
135 Signed-off-by: Mike Rylander <mrylander@gmail.com>
137 18 21 src/gateway/osrf_http_translator.c
138 1 0 src/gateway/osrf_json_gateway.c
139 1 0 src/srfsh/srfsh.c
141 commit 7ec92808fea116ead923e475ad5242a54b688798
142 Author: Bill Erickson <berick@esilibrary.com>
143 Date: Fri Jan 13 09:15:05 2012 -0500
145 C libs for OpenSRF ingress tracking
147 osrfAppSessionSetIngress(<ingress>);
149 Signed-off-by: Bill Erickson <berick@esilibrary.com>
150 Signed-off-by: Mike Rylander <mrylander@gmail.com>
152 5 0 include/opensrf/osrf_app_session.h
153 5 0 include/opensrf/osrf_message.h
154 26 0 src/libopensrf/osrf_app_session.c
155 32 0 src/libopensrf/osrf_message.c
156 4 0 src/libopensrf/osrf_stack.c
158 commit b12de37f9480c68b1c8b033da18c3cc0d0ebc8f0
159 Author: Bill Erickson <berick@esilibrary.com>
160 Date: Thu Jan 12 16:36:16 2012 -0500
162 Perl libs for OpenSRF ingress tracking
164 Ingress is a free-form text value which represents the entry point for
165 the client into the opensrf network. The value is passed within opensrf
166 messages, similar to "locale". Clients should specify the ingress
167 before any opensrf communication occurs.
169 OpenSRF::AppSession->ingress($ingress);
171 Stock values include the following:
178 Signed-off-by: Bill Erickson <berick@esilibrary.com>
179 Signed-off-by: Mike Rylander <mrylander@gmail.com>
181 9 0 src/perl/lib/OpenSRF/AppSession.pm
182 20 1 src/perl/lib/OpenSRF/DomainObject/oilsMessage.pm
183 2 0 src/perl/lib/OpenSRF/Transport.pm
185 commit 67d4d5de8656128f32b20f4c04dbf81a1028e929
186 Author: Dan Scott <dscott@laurentian.ca>
187 Date: Wed Feb 29 10:48:38 2012 -0500
189 Copy opensrf_core.xml.example to a clean opensrf_core.xml file
191 Ben Shum with the assist again.
193 Also, add ~/.srfsh.xml to the definition list of interesting OpenSRF
196 Signed-off-by: Dan Scott <dscott@laurentian.ca>
200 commit 68025993b01cc95f66a0ca723841e1abb406709f
201 Author: Dan Scott <dscott@laurentian.ca>
202 Date: Wed Feb 29 10:42:58 2012 -0500
204 Include explicit instructions to copy the opensrf config files
206 Also noted by the sharp-eyed Ben Shum, we didn't tell people to actually
207 copy opensrf.xml.example / opensrf_core.xml.example, which could lead to
210 Signed-off-by: Dan Scott <dscott@laurentian.ca>
214 commit 75f27021d4b45eebbf52a89a35f96e775f92a207
215 Author: Dan Scott <dscott@laurentian.ca>
216 Date: Wed Feb 29 10:27:36 2012 -0500
218 Update max_user_sessions suggestion to 10000 to match wiki
220 Ben Shum noticed that the README still specified 1000 for
221 max_user_sessions in the ejabberd.cfg file, whereas current larger
222 OpenSRF systems with many services may blow past that limit. Update to
223 match the current wiki specification of 10000.
225 Signed-off-by: Dan Scott <dscott@laurentian.ca>
229 commit 61fdb582dc918a1003351ff25842a23aaff24f71
230 Author: Dan Scott <dscott@laurentian.ca>
231 Date: Wed Jan 4 15:21:36 2012 -0500
233 Remove reference to Fedora specific version in prereq installer
235 Fedora changes every 6 months, so it's probably silly to have a make
236 target of "fedora14" when that is no longer supported by the Fedora
237 project itself. As Fedora has packaged all of the OpenSRF dependencies
238 (thanks, Ben Webb!), in theory it should be supported by the latest
239 releases of Fedora in the future... as long as we don't introduce any
240 dependencies on deprecated versions of packages.
242 Signed-off-by: Dan Scott <dscott@laurentian.ca>
244 2 2 src/extras/Makefile.install
246 commit ba6d4c7cc2988dafb6ca8de2d1f2f93194dcf3b3
247 Author: Dan Scott <dscott@laurentian.ca>
248 Date: Wed Jan 4 15:17:48 2012 -0500
250 Update README to match Evergreen's format
252 Reference the various accounts in use consistently.
254 Correct reference to "fedora" target in Makefile.install.
256 Put the developer preamble up front.
258 Provide more Fedora examples.
260 Do not include leading "#" and "$" in bash examples, to make it easier
261 for people to copy and paste.
263 Include source highlighting instructions and titles for example
266 Signed-off-by: Dan Scott <dscott@laurentian.ca>
270 commit cc7a12f74a9ce4555d5abd8989dfab43290fb41c
271 Author: Bill Erickson <berick@esilibrary.com>
272 Date: Fri Feb 24 16:28:27 2012 -0500
274 Java dependencies update
276 As of Java 6, XML Stax parsing is natively supported. This change
277 removes the external Stax dependencies and updates how the JSON libs are
278 fetched (in deps.sh), which now come from github.
280 Signed-off-by: Bill Erickson <berick@esilibrary.com>
281 Signed-off-by: Dan Scott <dscott@laurentian.ca>
283 17 20 src/java/deps.sh
284 1 4 src/java/org/opensrf/net/xmpp/XMPPReader.java
285 1 4 src/java/org/opensrf/util/XMLFlattener.java
287 commit 07b2eff0a7dfc492afd8e67788eae159c5ab96b7
288 Author: Dan Scott <dscott@laurentian.ca>
289 Date: Tue Feb 21 09:55:57 2012 -0500
291 We're not in Subversion anymore, Dorothy
293 We're in git now, make the README reflect that accordingly. Thanks to
294 Warren Layton for the tip!
296 Signed-off-by: Dan Scott <dscott@laurentian.ca>
300 commit aeeb4acdc8695a640021dbc6902ab3279652583d
301 Author: Bill Erickson <berick@esilibrary.com>
302 Date: Tue Feb 14 09:10:58 2012 -0500
304 Perl parent/child write improvements
306 * Updated variable names for clarity
307 * Added more inline comments
308 * Added additional error logging
309 * For severe read errors, allow the child to gracefully skip the request
311 Signed-off-by: Bill Erickson <berick@esilibrary.com>
312 Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
313 Signed-off-by: Mike Rylander <mrylander@gmail.com>
315 25 19 src/perl/lib/OpenSRF/Server.pm
317 commit 08ee4f993fe773e37233b139961cbcdae2fe93b8
318 Author: Bill Erickson <berick@esilibrary.com>
319 Date: Mon Feb 13 16:53:59 2012 -0500
321 Perl pipe reading overhaul : data size header
323 The lockfile mechanism for preventing premature end of reads on child
324 processes suffers from one serious flaw: if the data to write exceeds
325 the pipe buffer size, the parent will block on syswrite and the service
326 will lock up. It's also not as effecient (for the normal case) as the
327 code was without the lockfile, becasue the writes and reads are
330 This commit replaces the lockfile mechanism with a protocol header in
331 the data. The first X (currently 12) bytes of data written to the child
332 process will contain the full length of the data to be written (minus
333 the header size). The child now reads the data in parallel with the parent as
334 data is available. If the child reads all available data (in the pipe)
335 but not all of the expected data, the child will go back into a select()
336 wait pending more data from the parent. The process continues until all
339 This same mechanism is already used to commicate status info from child
340 processes to the parent.
342 Signed-off-by: Bill Erickson <berick@esilibrary.com>
343 Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
344 Signed-off-by: Mike Rylander <mrylander@gmail.com>
346 49 73 src/perl/lib/OpenSRF/Server.pm
347 1 2 src/perl/lib/OpenSRF/System.pm
349 commit 04558f38c1c1d314acb978a37193dacb4a6eba31
350 Author: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
351 Date: Fri Jan 27 09:05:07 2012 -0500
353 JSON_v0 has been superseded, and it has insidious bugs anyway.
355 For example, you cannot round-trip this through JSON2js() and js2JSON()
356 in IE8: http://paste.lisp.org/display/127338
358 This will make Evergreen's build fail until the change specified in
359 LP #922609 is applied.
361 Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
362 Signed-off-by: Bill Erickson <berick@esilibrary.com>
365 0 135 src/javascript/JSON_v0.js
366 delete mode 100644 src/javascript/JSON_v0.js
368 commit 89f41c82798dbac56716fdd5beeb6c0de3e4ce2e
369 Author: Bill Erickson <berick@esilibrary.com>
370 Date: Mon Nov 7 17:30:44 2011 -0500
372 Sync parent/child write/read with lock file
374 Wrap parent writes to child socket and initial child reads of the
375 socket in file lock (via flock()) to prevent rare race condition
376 where child process reads to the end of the data before the parent
377 has written all bytes.
379 This create a new lock file on the system, which resides in the same
380 directory as the pid files. The lock file is created and destroyed by
381 the opensrf perl mods at service start up and shutdown.
383 See also https://bugs.launchpad.net/opensrf/+bug/883155
385 Signed-off-by: Bill Erickson <berick@esilibrary.com>
386 Signed-off-by: Dan Scott <dscott@laurentian.ca>
388 1 1 bin/opensrf-perl.pl.in
389 60 8 src/perl/lib/OpenSRF/Server.pm
390 3 2 src/perl/lib/OpenSRF/System.pm
392 commit 3d089bdfd067676f99807f7cb2014e122c4dbf72
393 Author: Dan Scott <dscott@laurentian.ca>
394 Date: Mon Dec 12 13:09:13 2011 -0500
396 Update Perl OpenSRF build and tests for O:A:Validator
398 Kickstarted by wanting to bring OpenSRF::Application::Validator into the
399 MANIFEST and testing coverage, I noticed a few other files that needed
400 to be added to the MANIFEST as well. This gets us closer to acceptable
401 according to "./Build distcheck"
403 Signed-off-by: Dan Scott <dscott@laurentian.ca>
405 1 0 src/perl/Build.PL
406 22 0 src/perl/MANIFEST
407 6 1 src/perl/t/01-Application.t
409 commit 5e1fbcc1c8ae2f969dbeac93fe1da80c008ca42b
410 Author: Thomas Berezansky <tsbere@mvlc.org>
411 Date: Fri Dec 9 15:19:12 2011 -0500
413 OpenSRF Validator Service
415 Add a new Validator service, and EmailAddress validators.
417 The service runs a chain of one or more validators, each one being fed the
418 normalized output of the previous one.
420 The return from each validator should be a hash of valid (0 or 1), the new
421 normalized output (the untouched input if invalid or nothing needed to be
422 changed), and if invalid an error string. Optionally, a validator can also
423 include an "additionals" hash of extra information to be included in the
426 The complete list of validators included is:
428 OpenSRF::Application::Validator::Base
429 The base validator. Always returns valid.
430 OpenSRF::Application::Validator::Invalid
431 Always returns invalid for testing purposes.
432 OpenSRF::Application::Validator::EmailAddress::Regex
433 Does a very basic regular expression check on email addresses.
434 OpenSRF::Application::Validator::EmailAddress::DNS
435 Uses Net::DNS to look up the domain on an email address
437 Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
438 Signed-off-by: Dan Scott <dscott@laurentian.ca>
440 40 0 examples/opensrf.xml.example
441 3 0 src/extras/Makefile.install
442 50 0 src/perl/lib/OpenSRF/Application/Validator.pm
443 12 0 src/perl/lib/OpenSRF/Application/Validator/Base.pm
444 96 0 src/perl/lib/OpenSRF/Application/Validator/EmailAddress/DNS.pm
445 23 0 src/perl/lib/OpenSRF/Application/Validator/EmailAddress/Regex.pm
446 16 0 src/perl/lib/OpenSRF/Application/Validator/Invalid.pm
447 create mode 100644 src/perl/lib/OpenSRF/Application/Validator.pm
448 create mode 100644 src/perl/lib/OpenSRF/Application/Validator/Base.pm
449 create mode 100644 src/perl/lib/OpenSRF/Application/Validator/EmailAddress/DNS.pm
450 create mode 100644 src/perl/lib/OpenSRF/Application/Validator/EmailAddress/Regex.pm
451 create mode 100644 src/perl/lib/OpenSRF/Application/Validator/Invalid.pm
453 commit b6b64deb16ed3f005d64f99365b0220a82d72431
454 Author: Jason Stephenson <jstephenson@mvlc.org>
455 Date: Wed Dec 7 15:08:42 2011 -0500
457 Support installation for Ubuntu 12.04 Precise Pangolin.
459 Update the README to include Precise Pangolin as a supported release.
461 Update src/extras/Makefile.install to install two new debs required on
464 Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
465 Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
468 15 1 src/extras/Makefile.install
470 commit 3a4ae77be13349fae180fdc81bcc23e5a93032b4
471 Author: Dan Scott <dscott@laurentian.ca>
472 Date: Fri Nov 4 09:42:50 2011 -0400
474 Add explicit chown command to README
476 Warren Layton noticed that there was no explicit command to change the
477 ownership of the files in the /<PREFIX> directory to be owned by
478 "opensrf", although there was a statement that the files needed to be
479 owned by "opensrf". To reduce the chance of failure, add the explicit
482 TODO (for a willing volunteer): teach the installer to change the
483 ownership at the time the files are installed!
485 Signed-off-by: Dan Scott <dscott@laurentian.ca>
489 commit a7be31f137ccf6e2f4522c9a4c690a23b5636db8
490 Author: Bill Erickson <berick@esilibrary.com>
491 Date: Fri Oct 28 11:33:24 2011 -0400
493 Add SIGPIPE retry handling to child data sysread
495 Similar to the SIGPIPE retry logic wrapped around the parent process'
496 syswrite call (for sending data to a child process), protect the child's
497 sysread call (as it reads data from the parent). In pre-2.0, the
498 sysread step was handled by Net::Server, but now we need to protect it
501 Signed-off-by: Bill Erickson <berick@esilibrary.com>
502 Signed-off-by: Galen Charlton <gmc@esilibrary.com>
504 10 0 src/perl/lib/OpenSRF/Server.pm
506 commit 40a753b10a3db58baa9179d75a76df1266589ea1
507 Author: Dan Scott <dscott@laurentian.ca>
508 Date: Wed Oct 19 11:39:41 2011 -0400
510 LP878284: stop_osrf action should stop, not start, Perl
512 As reported by Vicent Mas <uvemas@gmail.com> to the Evergreen
513 developer's mailing list:
516 It seems I've found a small bug in the
517 /openils/bin/osrf_ctl.sh script. The line for the osrf_stop action is:
519 "stop_osrf") stop_python; stop_c; start_perl;;
523 "stop_osrf") stop_python; stop_c; stop_perl;;
526 Signed-off-by: Dan Scott <dscott@laurentian.ca>
528 1 1 bin/osrf_ctl.sh.in
530 commit 07b5a335656be741353ab70c1d4717dacdbebc1b
531 Author: Bill Erickson <berick@esilibrary.com>
532 Date: Tue Oct 18 09:17:10 2011 -0400
534 Warn when sending very large messages
536 Depending on configuration, messages of a certain size sent through a
537 Jabber server will cause the jabber server to disconnect the client.
538 This change allows admins to configure a message size warning threshold.
539 When a message meets or exceeds the size threshold, a warning is issued
540 to the logs with the message size (in bytes) and the message recipient.
541 It does not prevent the message from being delivered. It's purely
544 Use 1 800 000 as the default threhold.
546 Signed-off-by: Bill Erickson <berick@esilibrary.com>
547 Signed-off-by: Galen Charlton <gmc@esilibrary.com>
549 3 0 examples/opensrf_core.xml.example
550 11 1 src/perl/lib/OpenSRF/Transport/SlimJabber/Client.pm
552 commit ffb8bb73a2f505cfda9d8b97fab1f82aa3fb7097
553 Author: Dan Scott <dscott@laurentian.ca>
554 Date: Sat Sep 10 12:22:08 2011 -0400
556 Fix README typo: 'mod_offlinex'
558 mod_offline is not that x-treme.
560 Signed-off-by: Dan Scott <dscott@laurentian.ca>
564 commit 0725d1ddced0f16c351a5953f5fd3c14714cda1a
565 Author: Dan Scott <dan@coffeecode.net>
566 Date: Thu Aug 25 11:41:19 2011 -0400
568 Don't define a variable inside a conditional block
570 ./configure --disable-core --enable-javascript was dying with an error
571 due to CHECK_TESTS not being defined; move it outside the conditional
572 block so that we can ensure that it is defined as either yes or no.
574 Signed-off-by: Dan Scott <dscott@laurentian.ca>