From: Adam Dickmeiss Date: Wed, 17 Dec 2014 13:03:32 +0000 (+0100) Subject: Merge branch 'master' into paz-927 X-Git-Tag: v1.12.0~13 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=cea5d06318c86c9652cad5c4fefa39fa2e9745ac;hp=1c46d5e50ea73b0c0dc00bf745921ab2236b3a80;p=pazpar2-moved-to-github.git Merge branch 'master' into paz-927 --- diff --git a/IDMETA b/IDMETA index b9a55d7..d6e7ac5 100644 --- a/IDMETA +++ b/IDMETA @@ -1,4 +1,4 @@ DEBIAN_DIST="jessie wheezy squeeze" UBUNTU_DIST="utopic trusty saucy precise" CENTOS_DIST="centos5 centos6" -VERSION=1.8.2 +VERSION=1.8.5 diff --git a/NEWS b/NEWS index f79a617..9e5e6c2 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,25 @@ +--- 1.8.5 2014/12/17 + +Larger string buffer for forward address PAZ-987 +Fixes buffer overflow that could occur if forward address is IPV6. + +Updates to Windows NMAKE makefile for Visual Studio 2013. + +--- 1.8.4 2014/11/26 + +Use YAZ backtrace facility PAZ-983. In case of crashes YAZ log may +include more details about the fault. Better install gdb and the +debug version of pazpar2 (pazpar2-dbg on Debian/Ubuntu). + +Per target timeout PAZ-981 +New setting pz:timeout which overrides z3950_operation timeout +in service. + +--- 1.8.3 2014/11/20 + +Re-introduce journal-subpart PAZ-980 +Both citation and journal-subpart have same value. + --- 1.8.2 2014/10/30 Add Ubuntu utopic 14.04 and Ubuntu saucy 13.10 to the list of packages diff --git a/configure.ac b/configure.ac index 95defaf..b40a776 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_LANG(C) AC_C_INLINE -YAZ_INIT([static icu],[4.2.68]) +YAZ_INIT([static icu],[5.7.0]) if test -z "$YAZLIB"; then AC_MSG_ERROR([YAZ development libraries missing]) fi diff --git a/debian/control b/debian/control index 96daf36..507358c 100644 --- a/debian/control +++ b/debian/control @@ -4,9 +4,8 @@ Priority: extra Maintainer: Adam Dickmeiss Build-Depends: debhelper (>= 7), autotools-dev, - libyaz5-dev (>= 5.0.0), - docbook-xsl, - libgnutls-dev + libyaz5-dev (>= 5.7.0), + docbook-xsl Standards-Version: 3.7.2 Package: pazpar2 diff --git a/doc/book.xml b/doc/book.xml index 4a460b5..656af8a 100644 --- a/doc/book.xml +++ b/doc/book.xml @@ -281,7 +281,7 @@ The compilation is tuned by editing the makefile of Pazpar2. The process is similar to YAZ. Adjust the various directories - YAZ_DIR, ZLIB_DIR, etc., + YAZ_DIR, ICU_DIR, etc., as required. diff --git a/doc/common b/doc/common index f6a5ec8..790930a 160000 --- a/doc/common +++ b/doc/common @@ -1 +1 @@ -Subproject commit f6a5ec8c243e2a6829a2917cb30c849612d6fd01 +Subproject commit 790930ae30e7d12e02a512a109fc40c82675df20 diff --git a/doc/pazpar2_conf.xml b/doc/pazpar2_conf.xml index 4e82022..08b5a68 100644 --- a/doc/pazpar2_conf.xml +++ b/doc/pazpar2_conf.xml @@ -740,7 +740,7 @@ - + timeout @@ -761,6 +761,10 @@ z3950_operation (30) < session (60) < z3950_session (180) . The default values are given in parantheses. + + The Z39.50 operation timeout may be set per database. Refer to + . + @@ -1589,6 +1593,23 @@ + + + pz:timeout + + + Specifies timeout for operation (eg search, and fetch) for + a database. This overrides the z3650_operation timeout + that is given for a service. See . + + + + The timeout facility is supported for Pazpar2 version 1.8.4 and later. + + + + + pz:url diff --git a/etc/settings/testserver.xml b/etc/settings/testserver.xml index fdb7767..dfdffa4 100644 --- a/etc/settings/testserver.xml +++ b/etc/settings/testserver.xml @@ -1,9 +1,10 @@ - + + diff --git a/etc/xsl/dbc-opensearch.xsl b/etc/xsl/dbc-opensearch.xsl new file mode 100644 index 0000000..0ba2e2e --- /dev/null +++ b/etc/xsl/dbc-opensearch.xsl @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/xsl/primo-pz2.xsl b/etc/xsl/primo-pz2.xsl index aebdaaa..031cb47 100644 --- a/etc/xsl/primo-pz2.xsl +++ b/etc/xsl/primo-pz2.xsl @@ -131,6 +131,9 @@ + + + diff --git a/etc/xsl/primo-pz21.res.xml b/etc/xsl/primo-pz21.res.xml index 224dbbe..a3d9c32 100644 --- a/etc/xsl/primo-pz21.res.xml +++ b/etc/xsl/primo-pz21.res.xml @@ -4,6 +4,7 @@ article false Welcome Nature Climate Change + Nature, 2011, Vol.471(7340), pp.548 Nature, 2011, Vol.471(7340), pp.548 Climate Change Periodicals As Topic–Trends diff --git a/pazpar2.spec b/pazpar2.spec index 5bf759e..1cdd1b5 100644 --- a/pazpar2.spec +++ b/pazpar2.spec @@ -8,11 +8,11 @@ Group: Applications/Internet Vendor: Index Data ApS Source: pazpar2-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: libyaz5-devel >= 5.0.0 +BuildRequires: libyaz5-devel >= 5.7.0 Packager: Adam Dickmeiss URL: http://www.indexdata.com/pazpar2 Summary: pazpar2 daemon -Requires: libyaz5 >= 5.0.0 +Requires: libyaz5 >= 5.7.0 Requires: pazpar2-xsl %description diff --git a/src/client.c b/src/client.c index 275bd40..fbda5cd 100644 --- a/src/client.c +++ b/src/client.c @@ -921,11 +921,13 @@ int client_start_search(struct client *cl) const char *opt_preferred = session_setting_oneval(sdb, PZ_PREFERRED); const char *extra_args = session_setting_oneval(sdb, PZ_EXTRA_ARGS); const char *opt_present_chunk = session_setting_oneval(sdb, PZ_PRESENT_CHUNK); + const char *opt_timeout = session_setting_oneval(sdb, PZ_TIMEOUT); ZOOM_query query; char maxrecs_str[24], startrecs_str[24], present_chunk_str[24]; struct timeval tval; int present_chunk = 20; // Default chunk size int rc_prep_connection; + int operation_timeout = se->service->z3950_operation_timeout; cl->diagnostic = 0; cl->record_failures = cl->ingest_failures = cl->filtered = 0; @@ -933,12 +935,15 @@ int client_start_search(struct client *cl) yaz_gettimeofday(&tval); tval.tv_sec += 5; + if (opt_timeout && *opt_timeout) + operation_timeout = atoi(opt_timeout); + if (opt_present_chunk && strcmp(opt_present_chunk,"")) { present_chunk = atoi(opt_present_chunk); yaz_log(YLOG_DEBUG, "Present chunk set to %d", present_chunk); } rc_prep_connection = - client_prep_connection(cl, se->service->z3950_operation_timeout, + client_prep_connection(cl, operation_timeout, se->service->z3950_session_timeout, se->service->server->iochan_man, &tval); diff --git a/src/http.h b/src/http.h index 4bae571..1067e85 100644 --- a/src/http.h +++ b/src/http.h @@ -50,7 +50,7 @@ struct http_channel struct http_request *request; struct http_response *response; struct http_channel *next; // for freelist - char addr[20]; // forwarded address + char addr[256]; // forwarded address http_channel_observer_t observers; struct conf_server *server; http_server_t http_server; diff --git a/src/pazpar2.c b/src/pazpar2.c index 3e8ebaf..478188c 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -38,6 +38,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include // #define MTRACE #ifdef MTRACE @@ -121,6 +122,8 @@ static int sc_main( yaz_log_init_prefix("pazpar2"); yaz_log_xml_errors(0, YLOG_WARN); + yaz_enable_panic_backtrace(argv[0]); + while ((ret = options("dDf:h:l:m:p:R:tu:v:Vw:X", argv, argc, &arg)) != -2) { switch (ret) @@ -221,6 +224,7 @@ static int sc_main( #endif ); } + config = config_create(config_fname); if (!config) return 1; diff --git a/src/settings.c b/src/settings.c index ece8f04..85af04d 100644 --- a/src/settings.c +++ b/src/settings.c @@ -86,6 +86,7 @@ static char *hard_settings[] = { "pz:native_score", "pz:memcached", "pz:redis", + "pz:timeout", 0 }; diff --git a/src/settings.h b/src/settings.h index de43d28..cd01937 100644 --- a/src/settings.h +++ b/src/settings.h @@ -59,7 +59,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define PZ_NATIVE_SCORE 36 #define PZ_MEMCACHED 37 #define PZ_REDIS 38 -#define PZ_MAX_EOF 39 +#define PZ_TIMEOUT 39 +#define PZ_MAX_EOF 40 struct setting { diff --git a/win/makefile b/win/makefile index edb04a4..85a89cc 100644 --- a/win/makefile +++ b/win/makefile @@ -3,22 +3,22 @@ # See the file LICENSE for details. DEBUG=0 # 0 for release, 1 for debug -USE_MANIFEST = 1 # Can be enabled Visual Studio 2005/2008 +USE_MANIFEST = 0 # Can be enabled Visual Studio 2005/2008 PACKAGE_NAME=pazpar2 -PACKAGE_VERSION=1.8.2 +PACKAGE_VERSION=1.8.5 # YAZ YAZ_DIR=..\..\yaz # Libxml2 + libxslt + associates -ZLIB_DIR=\zlib-1.2.3.win32 -ICONV_DIR=\iconv-1.9.2.win32 -LIBXML2_DIR=\libxml2-2.7.6.win32 -LIBXSLT_DIR=\libxslt-1.1.26.win32 +LIBXML2_DIR=\libxml2-2.9.2.win32 +LIBXSLT_DIR=\libxslt-1.1.28.win32 # ICU HAVE_ICU=1 ICU_DIR=c:\icu +ICU_LIB=$(ICU_DIR)\lib +ICU_INCLUDE=$(ICU_DIR)\include default: all @@ -80,31 +80,27 @@ YAZ_DEF=/DYAZ_HAVE_XML2=2 /DYAZ_HAVE_XSLT=1 /I"$(YAZ_DIR)\include" # Copy libxslt and associates to our bin directory libxslt: $(BINDIR)\libxslt.dll -$(BINDIR)\libxslt.dll: "$(LIBXSLT_DIR)\bin\libxslt.dll" - copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR) - copy "$(ZLIB_DIR)\bin\zlib1.dll" $(BINDIR) +$(BINDIR)\libxslt.dll: "$(LIBXSLT_DIR)\lib\libxslt.dll" copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR) - copy "$(LIBXSLT_DIR)\bin\libxslt.dll" $(BINDIR) + copy "$(LIBXSLT_DIR)\lib\libxslt.dll" $(BINDIR) LIBXSLT_DEF= \ - /I"$(ICONV_DIR)\include" \ - /I"$(LIBXML2_DIR)\include" \ + /I"$(LIBXML2_DIR)\include\libxml2" \ /I"$(LIBXSLT_DIR)\include" LIBXSLT_LIB = \ - "$(ICONV_DIR)\lib\iconv.lib" \ "$(LIBXML2_DIR)\lib\libxml2.lib" \ "$(LIBXSLT_DIR)\lib\libxslt.lib" !if $(HAVE_ICU) -ICU_DEF=/DYAZ_HAVE_ICU=1 /I"$(ICU_DIR)\include" -ICU_LIB= $(ICU_DIR)\lib\icudt.lib \ - $(ICU_DIR)\lib\icuin.lib \ - $(ICU_DIR)\lib\icuuc.lib +ICU_DEF=/DYAZ_HAVE_ICU=1 /I"$(ICU_INCLUDE)" +ICU_LIBS= $(ICU_LIB)\icudt.lib \ + $(ICU_LIB)\icuin.lib \ + $(ICU_LIB)\icuuc.lib !else ICU_DEF=/DYAZ_HAVE_ICU=0 -ICU_LIB= +ICU_LIBS= !endif COMMON_C_OPTIONS= \ @@ -154,9 +150,9 @@ RELEASE_C_OPTIONS= \ LINK=link.exe LINK_LIBS= kernel32.lib ws2_32.lib advapi32.lib \ - $(YAZ_LIB) $(ICU_LIB) $(LIBXSLT_LIB) + $(YAZ_LIB) $(ICU_LIBS) $(LIBXSLT_LIB) -COMMON_LNK_OPTIONS= /nologo /subsystem:windows /machine:i386 /incremental:no +COMMON_LNK_OPTIONS= /nologo /subsystem:windows /incremental:no DEBUG_LNK_OPTIONS= /debug