Subject: CVS commit: pkgsrc/textproc/xapian
From: Amitai Schlair
Date: 2015-05-23 20:20:59
Message id: 20150523182059.DDDD298@cvs.netbsd.org

Log Message:
Update to 1.2.21:

API:

* QueryParser: Extend the set of characters allowed in the start of a range to
  be anything except for '(' and characters <= ' '.  This better matches what's
  accepted for a range end (anything except for ')' and characters <= ' ').
  Reported by Jani Nikula.

matcher:

* Reimplement OP_PHRASE for non-exact phrases.  The previous implementation was
  buggy, giving both false positives and false negatives in rare cases when
  three or more terms were involved.  Fixes #653, reported by Jean-Francois
  Dockes.

* Reimplement OP_NEAR - the new implementation consistently requires the terms
  to occur at different positions, and fixes some previously missed matches.

* Fix a reversed check for picking the shorter position list for an exact
  phrase of two terms.  The difference this makes isn't dramatic, but can be
  measured (at least with cachegrind).  Thanks to kbwt for spotting this.

* When matching an exact phrase, if a term doesn't occur where we want, use
  its actual position to advance the anchor term, rather than just checking
  the next position of the anchor term.

brass backend:

* Fix cursor versioning to consider cancel() and reopen() as events where
  the cursor version may need incrementing, and flag the current cursor version
  as used when a cursor is rebuilt.  Fixes #675, reported by Germán M. Bravo.

* Avoid using file descriptions < 3 for writable database tables, as it risks
  corruption if some code in the same process tries to write to stdout or
  stderr without realising it is closed.  (Partly addresses #651)

chert backend:

* Fix cursor versioning to consider cancel() and reopen() as events where
  the cursor version may need incrementing, and flag the current cursor version
  as used when a cursor is rebuilt.  Fixes #675, reported by Germán M. Bravo.

* Avoid using file descriptions < 3 for writable database tables, as it risks
  corruption if some code in the same process tries to write to stdout or
  stderr without realising it is closed.  (Partly addresses #651)

* After splitting a block, we always insert the new block in the parent right
  after the block it was split from - there's no need to binary chop.

flint backend:

* Fix cursor versioning to consider cancel() and reopen() as events where
  the cursor version may need incrementing, and flag the current cursor version
  as used when a cursor is rebuilt.  Fixes #675, reported by Germán M. Bravo.

remote backend:

* Fix sort by value when multiple databases are in use and one or more are
  remote.  This change necessitated a minor version bump in the remote
  protocol.  Fixes #674, reported by Dylan Griffith.  If you are upgrading a
  live system which uses the remote backend, upgrade the servers before the
  clients.

build system:

* The compiler ABI check in the public API headers now issues a warning
  (instead of an error) for an ABI mismatch for ABI versions 2 and later
  (which means GCC >= 3.4).  The changes in these ABI versions are bug fixes
  for corner cases, so there's a good chance of things working - e.g. building
  xapian-bindings with GCC 5.1 (which defaults to ABI version 8) against
  xapian-core built with GCC 4.9 (which defaults to ABI version 2) seems to
  work OK.  A warning is still useful as a clue to what is going on if linking
  fails due to a missing symbol.

* xapian-config,xapian-core.pc: When compiling with xlC on AIX, the reported
  --cxxflags/--cflags now include -D_LARGE_FILES=1 as this is defined for the
  library, and defining it changes the ABI of std::string with this compiler,
  so it must also be defined when building code using the Xapian API.

* xapian-core.pc: Include --enable-runtime-pseudo-reloc in --libs output for
  mingw and cygwin, like xapian-config does.

* xapian-core.pc: Fix include directory reported by `pkg-config --cflags`.
  This bug was harmless if xapian-core was installed to a directory which was
  on the default header search path (such as /usr/include).

* xapian-config: Fix typo so cached result of test in is_uninstalled() is
  actually used on subsequent calls.  Fixes #676, reported (with patch) by Ryan
  Schmidt.

* configure: Changes in 1.2.19 broke the custom macro we use to probe for
  supported compiler flags such that the flags never got used.  This release
  fixes this problem.

* configure: Set default value for AUTOM4TE before AC_OUTPUT so the default
  will actually get used.  Only relevant when building in maintainer mode
  (e.g. from git).

* soaktest: Link with libtool's '-no-install' or '-no-fast-install', like we
  already do for other test programs, which means that libtool doesn't need to
  generate shell script wrappers for them on most platforms.

* Generate and install a file for pkg-config.  (Fixes#540)

* configure: Update link to cygwin FAQ in error message.

documentation:

* API documentation: Minor wording tweaks and formatting improvements.

* docs/deprecation.rst: Add deprecation of omindex --preserve-nonduplicates
  which happened in 1.2.4.

* HACKING: Update URL.

* HACKING: libtool 2.4.6 is now used for bootstrapping snapshots and releases.

* include/xapian/weight.h: Document the enum stat_flags values.

* docs/postingsource.rst: Use a modern class in postingsource example.  (Noted
  by James Aylett)

* docs/deprecation.rst,docs/replication.rst: Fix typos.

* Update doxygen configuration files to avoid warnings about obsolete tags from
  newer doxygen versions.

* HACKING: Update details of building Xapian packages.

tools:

* xapian-compact: Make sure we open all the tables of input databases at the
  same revision.  (Fixes #649)

* xapian-metadata: Add 'list' subcommand to list all the metadata keys.

* xapian-replicate: Fix connection timeout to be 10 seconds rather than 10000
  seconds (the incorrect timeout has been the case since 1.2.3).

* xapian-replicate: Set SO_KEEPALIVE for xapian-replicate's connection to the
  master, and add command line option to allow setting socket-level timeouts
  (SO_RCVTIMEO and SO_SNDTIMEO) on platforms that support them.  Fixes #546,
  reported by nkvoll.

* xapian-replicate-server: Avoid potentially reading uninitialised data if a
  changeset file is truncated.

* xapian-check: For chert and brass, cross-check the position and postlist
  tables to detect positional data for non-existent documents.

portability:

* Add spaces between literal strings and macros which expand to literal strings
  for C++11 compatibility.

* ValueCountMatchSpy::top_values_begin(): Fix the comparison function not to
  return true for two equal elements, which manifests as incorrect sorting in
  some cases when using clang's libc++ (which recent OS X versions do).

* apitest: The adddoc5 testcase fails under clang due to an exception handling
  bug, so just #ifdef out the problematic part of the testcase when building
  with clang for now.

* Fix clang warnings on OS X.  Reported by Germán M. Bravo.

* Fix examples to build with IBM's xlC compiler on AIX - they were failing due
  to _LARGE_FILES being defined for the library build but not for the examples,
  and defining this changes the ABI of std::string with this compiler.

* configure: Improve the probe for whether the test harness can use RTTI to
  work for IBM's xlC compiler (which defaults to not generating RTTI).

* Fix to build with Sun's C++ compiler.

* Use F_DUPFD where available to dup to a file descriptor which is >= 2, rather
  than calling dup() until we get one.

* When unserialising a double, avoid reading one byte past the end of the
  serialised value.  In practice this was harmless on most platforms, as
  dbl_max_mantissa is 255 for IEEE-754 format doubles, and at least GCC's
  std::string keeps the buffer nul-terminated.  Reported by Germán M. Bravo in
  github PR#67.

* When unserialising a double, add missing cast to unsigned char when we check
  if the value will fit in the double type.  On machines with IEEE-754 doubles
  (which is most current platforms) this happened to work OK before.  It would
  also have been fine on machines where char is unsigned by default.

* Fix incorrect use of "delete" which should be "delete []". \ 
 This is
  undefined behaviour in C++, though the type is POD, so in practice this
  probably worked OK on many platforms.

* When locking a database for writing, use F_OFD_SETLK where available, which
  avoids having to fork() a child process to hold the lock.  This currently
  requires Linux kernel >= 3.15, but it has been submitted to POSIX so
  hopefully will be widely supported eventually.  Thanks to Austin Clements for
  pointing out this now exists.

* Fix detection of fdatasync(), which appears to have been broken practically
  forever - this means we've probably been using fsync() instead, which
  probably isn't a big additional overhead.  Thanks to Vlad Shablinsky for
  helping with Mac OS X portability of this fix.

* configure: Define MINGW_HAS_SECURE_API under mingw to get _putenv_s()
  declared in stdlib.h.

* Use POSIX O_NONBLOCK in preference to O_NDELAY - the semantics of the latter
  differ between BSD and System V.

* According to POSIX, strerror() may not be thread safe, so use alternative
  thread-safe ways to translate errno values where possible.

* On Microsoft Windows, avoid defining EADDRINUSE, etc if they're already
  defined, and use WSAE* constants un-negated - they start from a high value
  so won't collide with E* constants.

debug code:

* Fix some overly strict assertions in flint, which caused apitest's
  cursordelbug1 to fail with assertions on.

* Add more assertions to the chert backend code.

Files:
RevisionActionfile
1.22modifypkgsrc/textproc/xapian/Makefile
1.10modifypkgsrc/textproc/xapian/PLIST
1.18modifypkgsrc/textproc/xapian/distinfo