Subject: CVS commit: pkgsrc/net/yaz
To: None <>
From: Jim Wise <>
List: pkgsrc-changes
Date: 06/06/2005 15:58:26
Module Name:	pkgsrc
Committed By:	jwise
Date:		Mon Jun  6 15:58:26 UTC 2005

Modified Files:
	pkgsrc/net/yaz: Makefile PLIST distinfo
Removed Files:
	pkgsrc/net/yaz/patches: patch-aa

Log Message:
Update YAZ to yaz-2.1.6.  Changes since 2.0 (the last pkgsrc version):

Possible compatibility problems with earlier versions marked with '*'.

--- 2.1.6 2005/05/24

Added support for SRW sort in Generic Frontend Server. Patch
by Ko van der Sloot. Member srw_sortKeys in bend_search_rr holds
sortKeys - or NULL if none is provided.

Fixed bug #307: It was impossible to specify indefinite/no timeout
for ZOOM_event. Special timeout value -1 now means indefinite timeout
(i.e.  no timeout).

Added support for multiple languages and charsets to be specified in
ZOOM. Each charset/language is separated by a blank. If negotiation is
in effect in init-response, Option
"negotiation-charset-in-effect-for-records" set to 1(true) or 0(false).
Code based on patch by Vasiliy Osadchuk.

Fixed bug #306: infinite recursion that occurred when calling
yaz_log_level_init as the first call (before other log level or
nmem_init calls)

Fixed bug in scan handling in front end server: if preferred-Position-In-
Response was non-present, a NULL pointer referece was performed.

--- 2.1.4 2005/04/26

Changed include/yaz/diagbib1.h and added include/yaz/diagsrw.h with
diagnostic messages+codes for Bib-1 and SRW. Preprocessor defines are
now defined for all those error codes. So instead of putting 109 in
your program you'd use YAZ_BIB1_DATABASE_UNAVAILABLE. The messages
are generated from a .csv - file. See src/bib1.csv and srw/srw.csv.

Modified the yaz-marcdump utility to skip garbage bytes between MARC
records in a file.

Fixed bug - uninitialized memory - due to bad code for fix of bug #272.

Program yaz-client now exits and produces an error message if multiple
Z39.50 servers are specified on the command line (none or one allowed

Program yaz-marcdump skips garbage bytes between ISO2709 records rather
than abort.

--- 2.1.2 2005/03/16

Fixed bug #273: Update for recent MARC-8 -> UNICODE changes.

Fixed bug #272: Preserve spacing for CCL terms.

--- 2.1.0 2005/03/14

Added support for virtual hosts and multiple backend servers for
the YAZ frontend server. The configution is XML based and
support specificition of CQL to RPN mappings and explain information.
See section "Virtual Hosts" in the YAZ manual.

Extended OPAC display utility. OPAC display utility renders
bibliographic (MARC) record as well. Added yaz_opac_decode_wrbuf
to supplement yaz_marc_decode_wrbuf.

Fixed a bug in MARC decoder that could caused it to crash for some
invalid MARC records. More diagnostics and warnings where added in
XML output (warnings, etc are stored in comments).

--- 2.0.34 2005/02/08

Fixes for UNIX domain sockets. Bug #261.

Fixes for MARC-8 to UTF-8 conversion. Bugs #258 and #260.

Fixed bug #263: YAZ MARCXML dump shows extra spaces after control fields.
Added yaz_marc_subfield_str which defines subfield lead string which is
used in YAZ_MARC_LINE format. Default string is blank+$. Added
yaz_marc_endline_str which defines end of fields string used in
YAZ_MARC_LINE format. Default string is newline.

Experimental support for MarcXChange. This format can be produced
by yaz-marcdump and is implemented in yaz_marc_decode - functions.

Added yaz-client commands scansize that sets maximum number of
entries to be returned by scan.

--- 2.0.32 2005/01/11

Added support for SRW scan in yaz-client and Generic Frontend Server.

* Added whereInList member to SRW Scan Term.

* Changed Z_SRW_scanRequest to be able to carry both CCL and PQF.

Fixed NMEM system to return aligned blocks on the smallest boundaries
that are suitably aligned for all possible types on the particular
architecture YAZ is being built for.

--- 2.0.30 2005/01/04

Fixed numerious warnings that was issued with newer versions of GCC.

Fixed NMEM system to return aligned blocks on 8 byte boundaries rather
than 4 bytes, since 4 may not be enough on some systems such as GCC 3.4.3
on Solaris.

Make YAZ Generic Frontend Server slightly faster.

Enhance (and reduce) logging for Generic Frontend Server.

Revert YAZ log system so that it flushes every write operation
by default. (YAZ 2.0.26 and earlier verisons did that). Bug #240.

Modified the YAZ logging system. The LOG level defines use YLOG_ prefix
instead of LOG_, due to name clash with syslog(3). LOG_ are still
present. New applications should define YAZ_USE_NEW_LOG=1 - this
will effectively disable old definitions.

--- 2.0.28 2004/11/09

Added yaz_log_time_format which specifies log format using

Added yaz_log_module_level which returns mask for a module. Value
is non-zero mask a if module is enabled; zero if disabled.

* Fixed bug #148: CQL parser may leak. A few prototypes were changed
in include/yaz/cql.h.

Fixed bug #176: Dont throw diagnostics on empty SRU args.

Fixed bug #175: surrogate diagnostics in SRW lacking NS.

Fixed bug #172: RPM builds does not enable SSL. part of dist. Doxyfile generated by configure.

Configure aborts if any of --with-xml2, --with-openssl, --enable-tcpd
are given and the corresponding component does not exist.

Extend CCL documentation in YAZ reference. Describe r=r.

--- 2.0.26 2004/10/01

Fixed MARC->MARCXML conversion to properly deal with
fields, subfields, indicators having non-ASCII characters.

Fixed MARC->MARCXML conversion so that ASCII control characters
except TAB,CR,LF are removed from resulting XML (XML 1.0 does not
support these).

Added YAZ GFS support for conversion from Z39.50 surrogate
diagnostics to SRW surrogate diagnostics.

Bug fix: YAZ GFS did not return schema in explainResponse.

--- 2.0.25 2004/09/30

The YAZ GFS when converting SRW/SRU requests to Z39.50 structures
now converts recordSchema to elementSetName as well as schema URI.

Fixed bug in COMSTACK that prevented HTTP request packages from being
decoded properly.

--- 2.0.24 2004/09/29

Added CCL facility r=r "range" which is similar to r=o "ordered" but
does not require white-space before and after the dash in a range, e.g.
x=-1990 is equivalent to x <= 1990 iff r=r, but equivalent to x= -1980
iff r=o.

Fixed a few AC_TRY_LINK configure tests that did not operate properly
due to new GCC removing "redundant" code.

Added yaz-client commands scanpos and scanstep that sets preferred
position and step-size for scan.

Macro YAZ_INIT in yaz.m4: option --with-yazconfig renamed to --with-yaz.

Added CCL utility ccl_qual_buf which parses one or more CCL
spec lines in a buffer.

Added CCL utility ccl_qual_line which adds CCL qualifier line consisting
of name and value - ignoring empty lines and comments.

On Windows, the debug DLL/import lib is now named yazd.{dll,lib}.

Added odr_get_element_path which returns current element path for an
ODR handle. This utility is useful in error handling or user-defined
ODR_PRINT stream.

Added ODR_PRINT utility odr_set_stream which is is a more generic
alternative to odr_setprint. odr_set_stream takes a stream handle, pointer
to a write function and pointer to close function. The close function - if
non-NULL - will be called during odr_destroy.

Fixed bug in CCL parser where truncation char was not removed from
right side when truncation=both was in effect.

Fixed CQL parser to use unsigned chars for isxxx from ctype.h due
to VS.NET.

--- 2.0.23 2004/08/11

Fix buffer overrun in CQL parser when dealing with proximity (%).

Fixes for MARC-8 in yaz_iconv character set utilies. The MARC-8
to UTF-8/UCS conversion is now only based on codetables.xml.

yaz_marc_decode_buf sets leader pos 9 to "a" for MARCXML output.

--- 2.0.22 2004/08/06

Add support for more "commit changes" in ZOOM (uses Extended Services).

For yaz-client, command set_marcdump <file> / -m <file> dumps SUTRS/XML/..
records as well.

Yet another small fix for configure of SSL.

--- 2.0.21 2004/05/14

Fix SSL libs for configure when --with-openssl=DIR is given.

--- 2.0.20 2004/05/10

Add autoconf m4 macro YAZ_DOC for YAZ documentation setup (docbook).

SSL comstack now uses yaz.pem certificate file on server side
by default. Certificate filename can be configured by calling
comstack function cs_set_ssl_certificate_file before cs_bind is used.

Fix bug regarding multiple calls to ZOOM_connection_connect.

Implement cs_set_ssl_ctx which sets SSL_CTX for SSL comstack.

Do not create SSL_CTX in cs_create (ssl_type). Create in tcpip_bind,
tcpip_rcvconnect instead. This allows user to set custom SSL_CTX.

ZOOM now allows inspection of X509 peer certificate for verification.
The X509 buffer is retrived by reading ZOOM option "sslPeerCert".

Removed When SSL is enabled, has SSL support and
all programs have too (yaz-ztest, yaz-client, zoom..). May not be
as "modular" but it simplifies things.

Added cs_get_peer_certificate to that returns peer X509 PEM.

Added cs_get_ssl that returns SSL handle (SSL *) for SSL comstack; returns
NULL if SSL is unavailable.

Documentation about MARC decoding tools.

Fix --disable-tcpd to really disable tcpd. Patch by Robin H. Johnson.

--- 2.0.19 2004/03/30

Rename CHANGELOG to NEWS to follow GNU style packing.

Fix bug with missing initialization of member in init_diagnostics.
This bug affects threaded version of GFS server.

--- 2.0.18 2004/03/20

Use wrbuf_xmlputs_n instead of wrbuf_write_cdata to avoid clash with
Zebra symbol.

Ensure zlib.dll is packed with Windows install.

--- 2.0.17 2004/03/17

Fix encoding of xsd:string to use text instead of CDATA.

Fix endless loop in CQL parser with unbalanced ".

Use a more compact way to store MARC-8 conversion tables.

--- 2.0.16 2004/03/16 Debian only

Oleg Kolobov Fixed a bug in yaz_iconv regarding conversion to

Update CQL parser to use new CQL 1.1 modifiers for booleans and

Add CQL test cases.

--- 2.0.15 2004/03/01

Another fix for decoding of XML packed records.

--- 2.0.14 2004/02/25

Fixes for Chunked encoding. White space not ignored after length spec.

Update NS and use default NS for SRW diagnostic elements.

--- 2.0.13 2004/02/23

Implement ZOOM_resultset_cache_reset which resets record cache.

Implement ZOOM_resultset_sort which sorts a result set.

Implement chunked HTTP transfer.

For SSL, use -lssl -lcrypto on systems that don't have pkg-config.

--- 2.0.12 2004/02/16

Added member 'schema' to bend_explain_rr structure so that backend
can specify explain record identifier. Defaults to Zeerex 2.0.

Fix encoding of OID's of form 1.0.X. Bug introduced in 2.0.11.

--- 2.0.11 2004/02/16

* SRW/SRU 1.1 updates: updated diagnostic in srw.h to use uri instead
of code.

Added init command for yaz-client which sends "extra" init request.

Fixed two bugs in OID codec - ber_oidc. Throw error when encoding/decoding
bad truncated OID. Fix decoding of OID X.Y... when X=2 and Y>39.

Fixed a bug in ASN.1 compiler that caused Type-1 Operator codec to fail.

Make ZOOM error code for "invalid query".

Fixed compilation for SSL which wasn't properly enabled for all platforms.

--- 2.0.10 2004/02/05

For yaz.m4, allow second argument for YAZ_INIT to hold minimal version of
YAZ required.

* SRW/SRU 1.1 updates. Diagnostic code now a URI.

Added option -p <file> to make Generic Frontend Server to write PID file.

Added option -D to put Generic Frontend Server in background on its own.

Make ZOOM C recognize option "password". If unset, "pass" is used
(for backwards compatibility).

Fixed a bug in Generic Frontend Server that could make it crash if a
client sets characterSetNegotation bit, but didn't pass negotiation stuff
in InitRequest.

New YAZ client command, zversion, that sets Z39.50 version (1,2,3..).
Must be issued before open, in order to be in effect.

--- 2.0.9-6 2004/01/12  Debian/Windows

Make the SRU server more picky WRT unknown params, etc.

Bug fix: ZOOM scan response didn't return displayTerm - when present.

New YAZ client command, options, that sets Z39.50 options.

New utility functions yaz_init_opt_{encode,decode} to encode/decode Z39.50
options from a string of tokens (one token for each option bit).

Update SRW diagnostic code messages.

--- 2.0.9-5 2004/01/07  Debian/Windows

Handle user defined stylesheet for SRW/SRU.

--- 2.0.9-4 2004/01/06  Debian/Windows

Fix bug in decoding of Content-Length.

--- 2.0.9-3 2004/01/06  Debian/Windows

Fix a bug with decoding of XML packed records.

--- 2.0.9-2 2004/01/05  Debian only

Allow empty ODR (NMEM=0) for odr_oiddup and odr_getoidbystr.

Fix bug in SRW/SRU diagnostics decoding.

--- 2.0.9 2004/01/05

Fixed bug in Generic Frontend Server which could drop records exceeding
preferred message size. Reported and fixed by Irina Dijour.

Fixed calculation of package size for structured records in Generic
Frontend Server. Reported and fixed by Irina Dijour.

Fixed namespace for SRW/SRU diagnostics.

Fixed SEGV in yaz-client that occured for HTTP connection errors.

--- 2.0.8 2003/12/22

* SRW/SRU 1.1. Since the Namespace has changed for SRW/SRU, it means that
this version is incompatible with version 1.0 and older YAZ SRW/SRU

CQL changes to reflect recent changes to the specification:
* Documentation talks about context sets instead of index sets.
* Documentation talks about indexes instead of qualifiers.
* The CQL-to-PQF transformer's configuration file now uses
	" = <attributes>" instead of the old form
	" = <attributes>".  (Both forms are still
	understood but the latter is deprecated.)
* CQL terms with no explicit index specified are now interpreted as
	cql.serverChoice instead of srw.serverChoice (which of course
	behaves exactly the same.)

--- 2.0.7 2003/12/16

MARC conversion can now generate ISO2709 output in another
character set. yaz-marcdump uses this facility if you invoke it
with option -O.

Added missing C decl macros for include/yaz/{soap.h,srw.h,cql.h}, so that
functions from there can be used from C++.

--- 2.0.6 2003/12/04

Frontend server now transfers memory from decoded packages to stream
ODR for search.

NMEM now clears freed blocks with 'Y' (hex 59) to force bad memory
references to show up.

ZOOM-C now supports standard ZOOM option names as described in v1.4 of
the ZOOM Abstract API.  The older names for the same options are still
also supported for the benefit of old applications.

ZOOM-C supports "implementationId" and "implementationVersion" options
to go along with "implementationName".  These allow the user code to
specify identification strings to be sent to servers.
Add OID for the new ExtLite attribute set.

Add OIDs for NACSIS-CATP, FINMARC2000 and MARC21-fin record-syntaxes,
 as requested/supplid by Ere Maijala <>

For generic frontend server, reverse the order of
"toolkit-supplied / application-supplied" strings sent as implementationId,
Name and Version.  Also, remove the spaces around the slash.  This brings
the GFS in line with the behaviour of ZOOM-C on the client side.

Add function ZOOM_scanset_display_term.

yaz-client shows scan displayTerm if present.

Utility yaz-iconv is now installed by default along with the man page

Extend configure check for OpenSSL to use pkg-config where available (such
as RedHat 9).

Incorporate patch by Morten Bogeskov which allows a Unix file socket
server to specify uid/gid/mask for socket using the format
If file= is omitted the existing format is assumed, e.g.
in which case the mask is 0666 (rw for everybody).

Major restructure of YAZ source. All source in libyaz is in src directory.
Programs in client (yaz-client), ztest (yaz-ztest), zoom (zoom programs),
util (utility programs such as ASN.1 compiler, yaz-marcdump).

Added man page for utility yaz-marcdump (used to be called marcdump).
yaz-marcdump is installed by 'make install'.

Fixed a memory leak in Generic Frontend Server that occurred when decoding
of incoming package failed.

Fixed a potential DOS attack vulnerability in COMSTACK/ODR.

Change prototype of odr_perror: add const to message string.

New function yaz_log_reopen which reopens log file (for log rotate, etc.)

* Blocking parameter for COMSTACK cs_create is now a bit mask rather
than a blocking flag. Bit 0 is set for blocking, reset for non-blocking.
Bit 1 is set if cs_addrstr should avoid DNS lookup; reset for full
DNS lookup. There should not be any compatibility problems with this
assuming that blocking=1 or 0 is used.

Fix bad reference in UNIX comstack in function cs_addrstr.

Fix for compilation on AIX.

The generic front-end server (server/seshigh.c) now supports returning
Init diagnostics to the client in User-information-field, in
accordance with Z35.90 Implementor Agreement 5 (Returning diagnostics
in an InitResponse)

--- 2.0.4 2003/09/04

Allow any CQL relation (not just all,any,exact,scr).

Fixes for OCLC UI ASN.1 to make it work with SilverPlatter targets
that features the same UI.

Implemented command update0 in YAZ client which is equivalent to
update but uses old of Ext Update ASN.1.

Use OID 1.2.840.10003.15.1000.81.1 for privately defined charsets
in charset negotiation. Added VAL_ID_CHARSET in oid.h.
Previously no OID was used for this info.

ZOOM uses smallSetUpperBound=1 instead of 0 for piggyback searches.
It apparantely upsets EBSCO Publishing IR Z39.50 Server which
returns 'malformed search term' otherwise.

SortResponse member resultCount now set to NULL in sort handler of
frontend server.

OPAC support ZOOM. ZOOM_record_get returns OPAC info (as XML) if
type is "opac".

Add three new utility functions for translating OIDs between various
formats -- symbolic name such as "Usmarc", minus-1-terminated int
arrays and dotted strings such as "1.2.840.10003.9.5.1":
 int *oid_name_to_oid(oid_class oclass, const char *name, int *oid);
 char *oid_to_dotstring(const int *oid, char *oidbuf);
 char *oid_name_to_dotstring(oid_class oclass, const char *name, char *oidbuf);

Reverted modifications for ES Update definition for z_IU0Update
(OID 1.2.840.10003.9.5.1 and 1.2.840.10003.9.5). The definition
is back to YAZ 2.0.2.

String value attributes for CCL parser.

Support for OCLC's locally registered "OCLC-UserInformation" PDU,
which their FirstSearch server returns in Init responses, sometimes
carrying useful diagnostic information when Init fails.  This has the
OID 1.2.840.10003.10.1000.17.1 and is defined in the file
"z39.50/oclcui.asn", where its definition is somewhat different from
what OCLC document on their web-site, as required to interoperate with
their servers.

Support for anonymous authentication in yaz-client.  Use the command
"auth -".

* Fix the OID of the Index Data-local "admin" Extended Service from
  1.2.840.10003.9.81.1 to 1.2.840.10003.9.1000.81.1.  The omission of
  the 1000, which indicates a locally-defined OID, was a mistake.

--- 2.0.3 2003/06/20

Fix CCL directive @case handling so that it affects string match for
both CCL keywords and qualifiers.

* ESFormat-Update updates. Packages with OID 1.2.840.10003.9.5.1 and
1.2.840.10003.9.5 are now handled by the same decoder z_IU0Update .
Decoder has been updated with ASN.1 changes as listed in
Note that the "latest" DB Update, OID 1.2.840.10003. , handler
z_IUUpdate, remains unchanged.

ZOOM_record_get may now return a record in a specific character set.
For type use "form; charset=from[,to]" where form (render, xml, ..) ,
"from" is the character set of record as returned by target. "to" is
the character set to be returned. If omitted, "to" is UTF-8.

YAZ ASN.1 compiler renamed from yaz-comp to yaz-asncomp

New ODR utility, odr_getelement, which returns name of element for
which encoding/decoding failed.

Fixed ODR so that it returns error code OREQUIRED rather than ONONE
in cases where a required element was omitted.

Bug fix: some MARC8 sequences were not converted.

New ZOOM option "step" which specifies number of records to be
retrieved in one chunk. Used in conjunction with "start" and "count".

SRW support for yaz-client. Use scheme http: to use it, e.g.

yaz-client no longer does (un)intelligent character set conversions
by default. Can be enabled with charset and marc_charset commands.

xmalloc trace fix for 64-bit systems such as DEC alpha.

Solaris 2.6 compile fix.

New function, cql_strerror() translates SRW error codes, as returned
by cql_transform_error(), into human-readable English strings.  Used
in yaz-client diagnostics when appropriate.

New CQL2RPN query-type for the command-line yaz-client, parses CQL and
converts it into a type-1 query which is sent to the server.  This
makes CQL available for use with all Z-servers, as opposed to the tiny
minority that can handle CQL queries themselves.

--- 2.0.2 2003/04/28

New Debian package layout similar to the Redhat Package layout.

New ZOOM events ZOOM_EVENT_RECV_{RECORD,SEARCH} for receiving a record
and search result respectively.

--- 2.0.1 2003/04/25

Redhat package is now several packages: libyaz (runtime libraries),
libyaz-devel (development and documentation, and yaz (utility programs).
Package spec file by Morten Bøgeskov.

New member 'schema' in struct bend_fetch_rr which the name of requested
schema (SRW/SRU) for record (or NULL if none was given). The fetch
handler MAY set this to reflect the schema of the returned record.

New member 'display_term' in struct scan_entry. GFS now sets member entries
and allocates scan entries to be filled by user scan handler. In previous
version, entries member was allocated by the scan handler. That still works,
but the GFS will ignore member display_term - assuming it was NOT set by
the handler. The fact that the GFS now allocates the entries both allows
for new members and makes a scan handler easier to write.

Fix CQL lex buffer overflow.

SRW/SRU recordPacking. For SRW default recordPacking is string. For
SRU default recordPacking is string.

SRU protocol support for frontend server.

Fix compile bug for systems that have nl_langinfo but CODESET undefined.

Added missing PQF transform rules for <= and >= . Thanks to Peter Popovics.

Added scan for the ZOOM shell (zoomsh).

To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 pkgsrc/net/yaz/Makefile
cvs rdiff -r1.3 -r1.4 pkgsrc/net/yaz/PLIST
cvs rdiff -r1.2 -r1.3 pkgsrc/net/yaz/ pkgsrc/net/yaz/distinfo
cvs rdiff -r1.1.1.1 -r0 pkgsrc/net/yaz/patches/patch-aa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.