Re: [OPEN-ILS-DEV] Call for votes on moving to git as the official repository for OpenSRF and Evergreen
+1 On Sat, Apr 30, 2011 at 3:38 PM, Dan Scott d...@coffeecode.net wrote: Based on previous conversations on this list, IRC, and at the conference, and with the success that we have seen in the enablement of community contributions via git-svn and git clones of the Subversion repositories for Evergreen, I would like to call for a vote to formally move the Evergreen and OpenSRF repositories to git. Please respond with +1 if you are favour of this move, or -1 if you are against this move (and if -1, please state your objections).
[OPEN-ILS-DEV] opensrf.js Unit Tests and Fix
Hello, Attached are two patches. The first one contains some unit tests for the first half of opensrf.js. These make use of the DOH (Dojo Objective Harness) framework that Dan Scott had put into place in this commit: http://svn.open-ils.org/trac/OpenSRF/changeset/2217/ The second patch contains a fix for a bug I found in opensrf.js while writing the unit tests. There were references to arguments that weren't declared in several of the function declarations. Natually, many of the unit tests will not pass until this fix is put into place. Kevin Beswick Index: src/javascript/opensrf.js === --- src/javascript/opensrf.js (revision 2228) +++ src/javascript/opensrf.js (working copy) @@ -90,12 +90,12 @@ function osrfMethod(hash) { this.hash = hash; this._encodehash = true; } -osrfMethod.prototype.method = function() { +osrfMethod.prototype.method = function(d) { if(arguments.length == 1) this.hash.method = d; return this.hash.method; }; -osrfMethod.prototype.params = function() { +osrfMethod.prototype.params = function(d) { if(arguments.length == 1) this.hash.params = d; return this.hash.params; @@ -114,12 +114,12 @@ function osrfMethodException(hash) { this.hash = hash; this._encodehash = true; } -osrfMethodException.prototype.status = function() { +osrfMethodException.prototype.status = function(d) { if(arguments.length == 1) this.hash.status = d; return this.hash.status; }; -osrfMethodException.prototype.statusCode = function() { +osrfMethodException.prototype.statusCode = function(d) { if(arguments.length == 1) this.hash.statusCode = d; return this.hash.statusCode; @@ -128,12 +128,12 @@ function osrfConnectStatus(hash) { this.hash = hash; this._encodehash = true; } -osrfConnectStatus.prototype.status = function() { +osrfConnectStatus.prototype.status = function(d) { if(arguments.length == 1) this.hash.status = d; return this.hash.status; }; -osrfConnectStatus.prototype.statusCode = function() { +osrfConnectStatus.prototype.statusCode = function(d) { if(arguments.length == 1) this.hash.statusCode = d; return this.hash.statusCode; @@ -142,17 +142,17 @@ function osrfResult(hash) { this.hash = hash; this._encodehash = true; } -osrfResult.prototype.status = function() { +osrfResult.prototype.status = function(d) { if(arguments.length == 1) this.hash.status = d; return this.hash.status; }; -osrfResult.prototype.statusCode = function() { +osrfResult.prototype.statusCode = function(d) { if(arguments.length == 1) this.hash.statusCode = d; return this.hash.statusCode; }; -osrfResult.prototype.content = function() { +osrfResult.prototype.content = function(d) { if(arguments.length == 1) this.hash.content = d; return this.hash.content; @@ -161,12 +161,12 @@ function osrfServerError(hash) { this.hash = hash; this._encodehash = true; } -osrfServerError.prototype.status = function() { +osrfServerError.prototype.status = function(d) { if(arguments.length == 1) this.hash.status = d; return this.hash.status; }; -osrfServerError.prototype.statusCode = function() { +osrfServerError.prototype.statusCode = function(d) { if(arguments.length == 1) this.hash.statusCode = d; return this.hash.statusCode; @@ -175,12 +175,12 @@ function osrfContinueStatus(hash) { this.hash = hash; this._encodehash = true; } -osrfContinueStatus.prototype.status = function() { +osrfContinueStatus.prototype.status = function(d) { if(arguments.length == 1) this.hash.status = d; return this.hash.status; }; -osrfContinueStatus.prototype.statusCode = function() { +osrfContinueStatus.prototype.statusCode = function(d) { if(arguments.length == 1) this.hash.statusCode = d; return this.hash.statusCode; Index: src/javascript/tests/module.js === --- src/javascript/tests/module.js (revision 2228) +++ src/javascript/tests/module.js (working copy) @@ -3,6 +3,14 @@ dojo.require(DojoSRF); try{ dojo.require(opensrf.tests.testJSON_v1); + dojo.require(opensrf.tests.testosrfMessage); + dojo.require(opensrf.tests.testosrfMethod); + dojo.require(opensrf.tests.testosrfMethodException); + dojo.require(opensrf.tests.testosrfConnectStatus); + dojo.require(opensrf.tests.testosrfResult); + dojo.require(opensrf.tests.testosrfServerError); + dojo.require(opensrf.tests.testosrfContinueStatus); + }catch(e){ doh.debug(e); } Index: src/javascript/tests/testosrfConnectStatus.js new file mode 100644 === ---src/javascript/tests/testosrfConnectStatus.js (revision 0) +++src/javascript/tests/testosrfConnectStatus.js (revision 0) @@ -0,0 +1,45
[OPEN-ILS-DEV] Re: removing legacy json from autotools
Looks good to me Kevin On Mon, 2008-07-28 at 09:33 -0400, Bill Erickson wrote: In my previous patch, all of the objson code was removed from OpenSRF, including the autotools bits that compiled objson. This patch removes the remaining autotools bits, in particular giving the user the choice of whether to build legacy json. -b
Re: SPAM: Re: [OPEN-ILS-DEV] SPAM: OpenSRF autotools update
Noticed a small error in src/gateway/Makefile.am Here is the fix Kevin On Sun, 2008-07-27 at 23:58 -0400, Dan Scott wrote: 2008/7/25 Bill Erickson [EMAIL PROTECTED]: On Friday 25 July 2008 11:43 Kevin Beswick wrote: Updated patch to reflect the changes since the revision that just happened in trunk (r1372). Working for me, FWIW. I had to munge the patch a bit more to deal with the removal of the objson API compat layer, but have committed this to the OpenSRF repository. Thanks Kevin! Index: src/gateway/Makefile.am === --- src/gateway/Makefile.am (revision 1376) +++ src/gateway/Makefile.am (working copy) @@ -21,8 +21,8 @@ $(APXS2) -c $(DEF_LDLIBS) $(options) @srcdir@/osrf_http_translator.c install-exec-local: - $(APXS2) -i -a @srcdir@/osrf_json_gateway.c - $(APXS2) -i -a @srcdir@/osrf_http_translator.c + $(APXS2) -i -a @srcdir@/osrf_json_gateway.la + $(APXS2) -i -a @srcdir@/osrf_http_translator.la clean-local: rm -f @srcdir@/osrf_http_translator.la @srcdir@/osrf_http_translator.lo @srcdir@/osrf_http_translator.slo @srcdir@/osrf_json_gateway.la @srcdir@/osrf_json_gateway.lo @srcdir@/osrf_json_gateway.slo
[OPEN-ILS-DEV] SPAM: OpenSRF autotools update
Enclosed is a patch to update the OpenSRF autotools implementation. It fixes most bugs such as: -correctly replacing hardcoded directory paths in various files -correctly implementing clean, and uninstall make targets -fixes building src/c-apps modules without the lib prefix -builds the src/gateway apache modules with apxs -fixed the naming of the opensrf-c binary Also, it implements more of the autotools features: -rolling a tarball with make dist -enables VPATH (parallel) builds -checking a distribution with make distcheck Kevin. - Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: [Kevin Beswick ([EMAIL PROTECTED])] === modified file 'Makefile.am' --- Makefile.am 2008-07-17 18:15:09 + +++ Makefile.am 2008-07-25 13:48:43 + @@ -33,44 +33,44 @@ AM_CFLAGS = $(DEF_CFLAGS) -DOC_FILES = doc/Application-HOWTO.txt \ - doc/dokuwiki-doc-stubber.pl \ - doc/OpenSRF-Messaging-Protocol.html \ - doc/Persist-API.html \ - doc/Roadmap.txt - -EXAMPLES_FILES = examples/fieldmapper2cdbi.xsl \ - examples/fieldmapper2javascript.xsl \ - examples/fieldmapper2perl.xsl \ - examples/gen-fieldmapper.xml \ - examples/math_bench.pl \ - examples/multisession-test.pl \ - examples/register.pl \ - examples/srfsh_config.xsd \ - examples/math_xul_client/math \ - examples/math_xul_client/install.js - -strn_compat_FILES = src/ports/strn_compat/strndup.c \ - src/ports/strn_compat/strndup.h \ - src/ports/strn_compat/strnlen.c \ - src/ports/strn_compat/strnlen.h - -python_FILES = src/python/opensrf.py \ - src/python/setup.py \ - src/python/srfsh.py \ - src/python/osrf - -java_FILES = src/java/deps.inc \ - src/java/deps.sh \ - src/java/org - -libosrf_FILES = src/libopensrf/basic_client.c \ - src/libopensrf/osrf_big_hash.c \ - src/libopensrf/osrf_big_list.c \ - src/libopensrf/osrfConfig.c - - -EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) autogen.sh src/extras src/gateway/fieldmapper-c-xml-out.pl DCO-1.1.txt LICENSE.txt src/perlmods src/javascript +DOC_FILES = @srcdir@/doc/Application-HOWTO.txt \ + @srcdir@/doc/dokuwiki-doc-stubber.pl \ + @srcdir@/doc/OpenSRF-Messaging-Protocol.html \ + @srcdir@/doc/Persist-API.html \ + @srcdir@/doc/Roadmap.txt + +EXAMPLES_FILES = @srcdir@/examples/fieldmapper2cdbi.xsl \ + @srcdir@/examples/fieldmapper2javascript.xsl \ + @srcdir@/examples/fieldmapper2perl.xsl \ + @srcdir@/examples/gen-fieldmapper.xml \ + @srcdir@/examples/math_bench.pl \ + @srcdir@/examples/multisession-test.pl \ + @srcdir@/examples/register.pl \ + @srcdir@/examples/srfsh_config.xsd \ + @srcdir@/examples/math_xul_client/math \ + @srcdir@/examples/math_xul_client/install.js + +strn_compat_FILES = @srcdir@/src/ports/strn_compat/strndup.c \ + @srcdir@/src/ports/strn_compat/strndup.h \ + @srcdir@/src/ports/strn_compat/strnlen.c \ + @srcdir@/src/ports/strn_compat/strnlen.h + +python_FILES = @srcdir@/src/python/opensrf.py \ + @srcdir@/src/python/setup.py \ + @srcdir@/src/python/srfsh.py \ + @srcdir@/src/python/osrf + +java_FILES = @srcdir@/src/java/deps.inc \ + @srcdir@/src/java/deps.sh \ + @srcdir@/src/java/org + +libosrf_FILES = @srcdir@/src/libopensrf/basic_client.c \ + @srcdir@/src/libopensrf/osrf_big_hash.c \ + @srcdir@/src/libopensrf/osrf_big_list.c \ + @srcdir@/src/libopensrf/osrfConfig.c + + +EXTRA_DIST = $(DOC_FILES) $(EXAMPLES_FILES) $(libosrf_FILES) $(strn_compat_FILES) $(python_FILES) $(java_FILES) @srcdir@/autogen.sh @srcdir@/src/extras @srcdir@/src/gateway/fieldmapper-c-xml-out.pl @srcdir@/DCO-1.1.txt @srcdir@/LICENSE.txt @srcdir@/src/perlmods @srcdir@/src/javascript objsonincludedir = @includedir@/objson opensrfincludedir = @includedir@/opensrf @@ -122,5 +122,5 @@ make -s
Re: [OPEN-ILS-DEV] SPAM: autoconf support for openSRF (resubmission)
On Fri, May 16, 2008 at 11:09 AM, Bill Erickson [EMAIL PROTECTED] wrote: Some comments: When I invoke 'automake -a', I get some warnings: configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found. configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE, configure.ac: that aclocal.m4 is present in the top-level directory, configure.ac: and that aclocal.m4 was recently regenerated (using aclocal). configure.ac: installing `./install-sh' configure.ac: installing `./missing' automake: no `Makefile.am' found for any configure output Should I fear these? Not yet. I am still working on the automake portion, which requires the Makefile.am file. automake -a is just installing install-sh (required file) for now. -- It's also important to note that if you run ./configure as a non-root user, it may die with: checking for ejabberd... no configure: error: *** ejabberd not found, aborting /usr/sbin, where ejabberd lives on my test system (Debian Lenny), is not in my path. This works fine: PATH=$PATH:/usr/sbin/ ./configure Thanks for pointing that out, I will fix this. I ran configure with the defaults and later realized that I needed to update my tmp_dir, since it was already in use by another user on this system. I ran: PATH=$PATH:/usr/sbin/ ./configure --with-tmp_dir=/tmp/osrftmp The configure output reports: Tmp dir location: /tmp/osrftmp However, Makefile[.in] still shows TMP=/tmp/ilstemp, which causes my 'make' attempts to fail. Should re-running configure update that? It's likely my own autoconf ignorance is coming into play here... Nope, totally my fault. I forgot to update the Makefile.in's hardcoded locations for the install directories (prefix,tmp, whatever) with variables set by configure - Minor nit: Can we make the default TMP directory /tmp/osrftmp (or similar)? Yes, no problem! --- To prevent filling up the file, can we wrap the mod_placeholder insertion (in 'make install') in a check to see if it's needed? For example: if [ ! $$(grep mod_placeholder /etc/apache2/httpd.conf) ]; then \ echo #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so \ /etc/apache2/httpd.conf; \ fi; \ make -s -C src install For sure. -- Kevin, this is looking /very/ good. I didn't realize you had gotten this far until I went for it. Kudos. -bill Thanks! I'm stuck on the automake now with a few problems, which are getting resolved slowly. Kevin
Re: [OPEN-ILS-DEV] SPAM: autoconf support for openSRF
I am planning on it now! On Wed, May 14, 2008 at 1:15 PM, Mike Rylander [EMAIL PROTECTED] wrote: On Wed, May 14, 2008 at 11:53 AM, Kevin Beswick [EMAIL PROTECTED] wrote: This is an initial patch supporting the effort of porting OpenSRF to the GNU autotools. AWESOME! Great work Kevin. Quick question for the future ... are you planning {foo}-config support? That will allow us to ask the system where the libs and headers are installed to override the default without having to specify the location of the header files for the dependencies that support that mechanism. For instance, postgres has pg_config that will spit out things like INCLUDEDIR, and libxml2 has xml2_config the does something similar. Again, great work. The goal of this patch is to enable someone to generate a configure script using autoconf, allow someone to choose various install options through the generated configure script, and to remove the need for the install.conf file. /me adds another step to the release process... The configure script makes various checks based on the dependencies of openSRF, allows users to customize the install directories, and select various install options (whether or not to install python modules, java libraries, legacy json headers). It outputs the results of these custom checks/settings at the end of the default configure script output. The automake Makefile.am's are not included as of yet, instead only Makefile.in's are included so that configure can generate appropriate Makefiles based on the already existing ones. To test: automake -a autoconf ./configure [--option] make make install Options included in configure script: --enable-install-java#enable building and installing the java libraries --disable-legacy-json#disable the legacy json headers and .so file for backwards compatibility --disable-install-python #disable building and installing python modules --with-tmp_dir=path #location for the tmp dir for openSRF (/tmp/ilstemp by default) --with-apxs_dir=path #location of apxs2 (default is /usr/bin/apxs2) --with-apache_headers=path #location of the apache2 headers (default is /usr/include/apache2) --with-apr_headers=path #location of the apr headers (default is /usr/include/apr-1.0/) --with-libxml_headers=path #location of the libxml headers (default is /usr/include/libxml2/) -- Mike Rylander | VP, Research and Design | Equinox Software, Inc. / The Evergreen Experts | phone: 1-877-OPEN-ILS (673-6457) | email: [EMAIL PROTECTED] | web: http://www.esilibrary.com