From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:04:43 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C0EAD5B; Sun, 28 Jul 2013 05:04:43 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2577720EF; Sun, 28 Jul 2013 05:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S54hIr091849; Sun, 28 Jul 2013 05:04:43 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S54f7d091830; Sun, 28 Jul 2013 05:04:41 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280504.r6S54f7d091830@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253728 - in vendor/subversion/dist: . subversion/include subversion/include/private subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_fs_base subversion/libsvn_fs_base... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:04:43 -0000 Author: peter Date: Sun Jul 28 05:04:41 2013 New Revision: 253728 URL: http://svnweb.freebsd.org/changeset/base/253728 Log: Import subversion-1.8.1 into vendor staging area. Modified: vendor/subversion/dist/CHANGES vendor/subversion/dist/Makefile.in vendor/subversion/dist/build-outputs.mk vendor/subversion/dist/configure vendor/subversion/dist/configure.ac vendor/subversion/dist/get-deps.sh vendor/subversion/dist/subversion/include/private/svn_client_private.h vendor/subversion/dist/subversion/include/private/svn_io_private.h vendor/subversion/dist/subversion/include/private/svn_ra_private.h vendor/subversion/dist/subversion/include/svn_version.h vendor/subversion/dist/subversion/libsvn_client/client.h vendor/subversion/dist/subversion/libsvn_client/commit.c vendor/subversion/dist/subversion/libsvn_client/copy.c vendor/subversion/dist/subversion/libsvn_client/diff.c vendor/subversion/dist/subversion/libsvn_client/diff_local.c vendor/subversion/dist/subversion/libsvn_client/log.c vendor/subversion/dist/subversion/libsvn_client/merge.c vendor/subversion/dist/subversion/libsvn_client/mergeinfo.c vendor/subversion/dist/subversion/libsvn_client/ra.c vendor/subversion/dist/subversion/libsvn_client/switch.c vendor/subversion/dist/subversion/libsvn_delta/compat.c vendor/subversion/dist/subversion/libsvn_fs_base/bdb/env.c vendor/subversion/dist/subversion/libsvn_fs_base/tree.c vendor/subversion/dist/subversion/libsvn_fs_fs/fs_fs.c vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache-db.h vendor/subversion/dist/subversion/libsvn_fs_fs/tree.c vendor/subversion/dist/subversion/libsvn_ra/ra_loader.c vendor/subversion/dist/subversion/libsvn_ra/util.c vendor/subversion/dist/subversion/libsvn_ra_serf/blame.c vendor/subversion/dist/subversion/libsvn_ra_serf/commit.c vendor/subversion/dist/subversion/libsvn_ra_serf/getdate.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocations.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocationsegments.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocks.c vendor/subversion/dist/subversion/libsvn_ra_serf/inherited_props.c vendor/subversion/dist/subversion/libsvn_ra_serf/log.c vendor/subversion/dist/subversion/libsvn_ra_serf/mergeinfo.c vendor/subversion/dist/subversion/libsvn_ra_serf/options.c vendor/subversion/dist/subversion/libsvn_ra_serf/property.c vendor/subversion/dist/subversion/libsvn_ra_serf/ra_serf.h vendor/subversion/dist/subversion/libsvn_ra_serf/replay.c vendor/subversion/dist/subversion/libsvn_ra_serf/serf.c vendor/subversion/dist/subversion/libsvn_ra_serf/update.c vendor/subversion/dist/subversion/libsvn_ra_serf/util.c vendor/subversion/dist/subversion/libsvn_ra_serf/xml.c vendor/subversion/dist/subversion/libsvn_ra_svn/client.c vendor/subversion/dist/subversion/libsvn_ra_svn/protocol vendor/subversion/dist/subversion/libsvn_repos/fs-wrap.c vendor/subversion/dist/subversion/libsvn_subr/config_file.c vendor/subversion/dist/subversion/libsvn_subr/gpg_agent.c vendor/subversion/dist/subversion/libsvn_subr/internal_statements.h vendor/subversion/dist/subversion/libsvn_subr/io.c vendor/subversion/dist/subversion/libsvn_subr/named_atomic.c vendor/subversion/dist/subversion/libsvn_subr/sqlite.c vendor/subversion/dist/subversion/libsvn_subr/stream.c vendor/subversion/dist/subversion/libsvn_subr/subst.c vendor/subversion/dist/subversion/libsvn_subr/utf.c vendor/subversion/dist/subversion/libsvn_wc/adm_ops.c vendor/subversion/dist/subversion/libsvn_wc/crop.c vendor/subversion/dist/subversion/libsvn_wc/externals.c vendor/subversion/dist/subversion/libsvn_wc/update_editor.c vendor/subversion/dist/subversion/libsvn_wc/upgrade.c vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h vendor/subversion/dist/subversion/libsvn_wc/wc-queries.h vendor/subversion/dist/subversion/libsvn_wc/wc-queries.sql vendor/subversion/dist/subversion/libsvn_wc/wc_db.c vendor/subversion/dist/subversion/libsvn_wc/wc_db.h vendor/subversion/dist/subversion/libsvn_wc/wc_db_update_move.c vendor/subversion/dist/subversion/libsvn_wc/wc_db_wcroot.c vendor/subversion/dist/subversion/libsvn_wc/workqueue.c vendor/subversion/dist/subversion/svn/cl.h vendor/subversion/dist/subversion/svn/conflict-callbacks.c vendor/subversion/dist/subversion/svn/file-merge.c vendor/subversion/dist/subversion/svn/merge-cmd.c vendor/subversion/dist/subversion/svn/mergeinfo-cmd.c vendor/subversion/dist/subversion/svn/svn.c vendor/subversion/dist/subversion/svn/util.c vendor/subversion/dist/subversion/svnadmin/svnadmin.c vendor/subversion/dist/subversion/svnlook/svnlook.c vendor/subversion/dist/subversion/svnserve/serve.c vendor/subversion/dist/win-tests.py Modified: vendor/subversion/dist/CHANGES ============================================================================== --- vendor/subversion/dist/CHANGES Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/CHANGES Sun Jul 28 05:04:41 2013 (r253728) @@ -1,3 +1,91 @@ +Version 1.8.1 +(23 July 2013, from /branches/1.8.x) +http://svn.apache.org/repos/asf/subversion/tags/1.8.1 + + User-visible changes: + - Client- and server-side bugfixes: + * translation updates for German and Simplified Chinese + * improve sqlite error message output (r1497804) + * support platforms lacking mmap (r1498136) + * allow configuration files to start with UTF-8 BOM (r1499100 et al) + * don't fail on UTF-8 data when encoding conversion not available (r1503009) + * improve error messages when encoding conversion fails (r1503010) + + - Client-side bugfixes: + * merge: rename 'automatic merge' to 'complete merge' (r1491432) + * mergeinfo: reduce network usage for '--show-revs' (r1492005) + * ra_serf: improve http status handling (r1495104) + * merge: avoid unneeded ra session (r1493475) + * merge: reduce network usage (r1478987) + * merge: remove duplicated ancestry check (r1493424, r1495597) + * ra_serf: fix 'Accept-Encoding' header for IIS interoperability (r1497551) + * svn status: improve documentation for lock columns (r1497318, r1497319) + * ra_serf: fix support for 'get-file-revs-reversed' capability (r1498456) + * log: reduce network usage on repository roots (r1496957) + * diff: avoid temporary files when calling external diff (issue #4382) + * upgrade: fix notification of 1.7.x working copies (r1493703, r1494171) + * fix crash during tree conflict resolution (issue #4388) + * interactive file merge: add two additional choices (r1491816, r1494089) + * diff: use local style paths in error messages (r1500680) + * resolve: improve the interactive conflict resolution menu (r1491739 et al) + * switch: use local style path in error message (r1500074) + * ra_serf: improve error output when receiving invalid XML (r1498851) + * svn cleanup: explain what the command does in help output (r1497310) + * blame: error on -r M:N where M>N unless server supports (r1498449 et al) + * gpg-agent auth: don't try to use agent when unavailable (r1500762 et al) + * gpg-agent auth: don't require GPG_TTY or TERM env vars (r1500801) + * update: fix some tree conflicts not triggering resolver (r1491868 et al) + * commit: remove stale entries from wc lock table when deleting (r1491756) + * merge: fix --record-only erroring out on renamed path (issue #4387) + * svnmucc: fix 'make install' symlink to work when DESTDIR is set (r1501072) + * wc: fix crash when target is symlink to a working copy root (issue #4383) + * ra_serf: change "internal malfunction" errors to normal errors (r1502577) + * ra_serf: handle proxies not supporting chunked requests (r1502401 et al) + + - Server-side bugfixes: + * fsfs: resolve endless loop problem when repos/db/uuid has \r\n (r1492145) + * fsfs: remove revision property buffer limit (r1491770) + * mod_dav_svn: better status codes for anonymous user errors (r1495918) + * mod_dav_svn: better status codes for commit failures (r1490684) + * fix performance regression in 'svn log' against root (r1494913) + * allow deleting non-user-visible 'svn:' properties (r1495432) + * fsfs: fix crash on strict-alignment architectures (r1495806, r1495985) + * svnadmin upgrade: fix error of non-sharded fsfs repositories (r1494287) + * svnadmin create: deny '--fs-type=fsfs --compatible-version=1.0' (r1494223) + * svnadmin upgrade: fix data loss when cancelling in last stage (r1494298) + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fsfs-stats (tool): resolve segfault when passing invalid path (r1492164) + * svn-bench: fix help output (r1493951) + * svnpubsub: add version header to server (r1491707) + + Developer-visible changes + - General: + * ra_serf: fix some test runner issues on Windows (r1490679) + * fix two issues in reverse svn_ra_get_file_revs() (r1492148, et al) + * handle --compatible-version=1.8 in the C tests (r1494342) + * improve clang compatibility (r1480080 et al) + * use proper cancel baton when handling conflicts (r1495850) + * fs: BDB: provide proper error value from BDB (r1495428) + * ra_serf: tweak connection failed error value (r1496132, et al) + * svn_client_log5: resolve possible segfault (r1496110) + * fix metadata_only move to work when target is unversioned node (r1498564) + * ra_svn: fix segfault with a NULL commit message (r1498550, r1499727) + * Ev2: correctly initialize node kind in shims' change table (r1501058) + * Ev2: fix copyfrom URL construction in shims (r1500226) + * fs: improve test against newlines in filenames (r1498483 et al) + * make building with BDB 6 an opt-in feature (r1499438) + * sqlite: allow placing amalgamation in build dir (r1499034, r1500175) + * ra_svn: make sessions usable after log callback early out (r1503554) + + - Bindings: + * swig-rb: fix tests with out-of-tree-builds (r1492295) + * javahl: fix encoding of error messages produced by javahl (r1492264) + * swig-pl: silence compiler warnings (r1487094) + * swig-pl: improve documentation (r1488693, r1490721, r1500904) + + Version 1.8.0 (18 Jun 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.0 @@ -99,7 +187,6 @@ http://svn.apache.org/repos/asf/subversi * support ipv6 in URLs (e.g. http://[::1]/svn/repos) (r1454047) * conflict resolver now iterates paths in a sorted order (r1461820) * mod_dav_svn does keyword expansion with 'kw=1' query arg (r1466055) - * add support for custom keyword definitions (issue #890) - Minor new features and improvements (server-side): * improve performance of config file parsing (r1344347 et al) @@ -339,6 +426,25 @@ http://svn.apache.org/repos/asf/subversi * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.11 +(23 Jul 2013, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.11 + + User-visible changes: + - General + * translation updates for Simplified Chinese + + - Server-side bugfixes: + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fix argument processing in contrib hook scripts (r1485350) + + Developer-visible changes: + - Bindings: + * javahl: fix bug in error constructing code (r1405922) + + Version 1.7.10 (30 May 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.10 Modified: vendor/subversion/dist/Makefile.in ============================================================================== --- vendor/subversion/dist/Makefile.in Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/Makefile.in Sun Jul 28 05:04:41 2013 (r253728) @@ -903,5 +903,5 @@ INSTALL_EXTRA_TOOLS=\ test -n "$$SVN_SVNMUCC_IS_SVNSYITF" && \ ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \ if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \ - ln -sf $(DESTDIR)$(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ + ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ fi Modified: vendor/subversion/dist/build-outputs.mk ============================================================================== --- vendor/subversion/dist/build-outputs.mk Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/build-outputs.mk Sun Jul 28 05:04:41 2013 (r253728) @@ -1985,7 +1985,7 @@ subversion/libsvn_client/delete.lo: subv subversion/libsvn_client/deprecated.lo: subversion/libsvn_client/deprecated.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_opt_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_compat.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn _types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h -subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/ svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h +subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_io_private.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subvers ion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h subversion/libsvn_client/diff_local.lo: subversion/libsvn_client/diff_local.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_wc.h subversi on/libsvn_client/client.h subversion/svn_private_config.h @@ -2703,7 +2703,7 @@ subversion/svnadmin/svnadmin.lo: subvers subversion/svndumpfilter/svndumpfilter.lo: subversion/svndumpfilter/svndumpfilter.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_mergeinfo_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/svn_private_config.h -subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/i nclude/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h +subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/private/svn_io_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types .h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h subversion/svnmucc/svnmucc.lo: subversion/svnmucc/svnmucc.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_ra_private.h subversion/include/private/svn_string_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_ver sion.h subversion/include/svn_wc.h subversion/svn_private_config.h @@ -2749,7 +2749,7 @@ subversion/tests/libsvn_diff/diff-diff3- subversion/tests/libsvn_diff/parse-diff-test.lo: subversion/tests/libsvn_diff/parse-diff-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h -subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/libsvn_fs/locks-test.lo: subversion/tests/libsvn_fs/locks-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h @@ -2849,7 +2849,7 @@ subversion/tests/libsvn_wc/wc-queries-te subversion/tests/libsvn_wc/wc-test.lo: subversion/tests/libsvn_wc/wc-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversi on/include/svn_wc.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/libsvn_wc/wc_db_private.h subversion/svn_private_config.h subversion/tests/libsvn_wc/utils.h subversion/tests/svn_test.h -subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/svn_test_main.lo: subversion/tests/svn_test_main.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/svn_private_config.h subversion/tests/svn_test.h Modified: vendor/subversion/dist/configure ============================================================================== --- vendor/subversion/dist/configure Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/configure Sun Jul 28 05:04:41 2013 (r253728) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.8.0. +# Generated by GNU Autoconf 2.69 for subversion 1.8.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='subversion 1.8.0' +PACKAGE_VERSION='1.8.1' +PACKAGE_STRING='subversion 1.8.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -872,6 +872,7 @@ with_trang with_doxygen with_expat with_berkeley_db +enable_bdb6 with_sasl enable_keychain with_gpg_agent @@ -1455,7 +1456,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.8.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.8.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1521,7 +1522,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.8.0:";; + short | recursive ) echo "Configuration of subversion 1.8.1:";; esac cat <<\_ACEOF @@ -1547,6 +1548,10 @@ Optional Features: testing prior to installation on some platforms. It does not work on some platforms (Darwin, OpenBSD, ...). + --enable-bdb6 Allow building against BDB 6+. See + --with-berkeley-db for specifying the location of + the Berkeley DB installation. Using BDB 6 will fail + if this option is not used. --disable-keychain Disable use of Mac OS KeyChain for auth credentials --enable-ev2-impl Use Ev2 implementations, where available [EXPERIMENTAL] @@ -1609,9 +1614,9 @@ Optional Packages: Specify location of Expat --with-berkeley-db[=HEADER:INCLUDES:LIB_SEARCH_DIRS:LIBS] The Subversion Berkeley DB based filesystem library - requires Berkeley DB $db_version or newer. If you - specify `--without-berkeley-db', that library will - not be built. If you omit the argument of this + requires Berkeley DB $db_version or $db_alt_version. + If you specify `--without-berkeley-db', that library + will not be built. If you omit the argument of this option completely, the configure script will use Berkeley DB used by APR-UTIL. --with-sasl=PATH Compile with libsasl2 in PATH @@ -1731,7 +1736,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.8.0 +subversion configure 1.8.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2275,7 +2280,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.8.0, which was +It was created by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2655,8 +2660,8 @@ ac_configure="$SHELL $ac_aux_dir/configu -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.8.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.8.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -3612,6 +3617,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC accepts -Werror=unknown-warning-option... " >&6; } + CFLAGS="-Werror=unknown-warning-option $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C++ compiler (before anything can set CXXFLAGS) CXXMAINTAINERFLAGS="$CXXUSERFLAGS" CXXUSERFLAGS="$CXXFLAGS" @@ -3921,6 +3964,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX accepts -Werror=unknown-warning-option... " >&6; } + CXXFLAGS="-Werror=unknown-warning-option $CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CXXFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C pre-processor ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6161,6 +6242,10 @@ $as_echo "$as_me: WARNING: no suitable s echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -6461,6 +6546,299 @@ rm -f conftest* if test -z "$svn_lib_sqlite"; then + sqlite_amalg="$abs_builddir/sqlite-amalgamation/sqlite3.c" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 +$as_echo_n "checking sqlite amalgamation... " >&6; } + if test ! -e $sqlite_amalg; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 +$as_echo_n "checking sqlite amalgamation file version... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "$sqlite_amalg" +#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num +SQLITE_VERSION_OKAY +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 +$as_echo "amalgamation found and is okay" >&6; } + + case $host_os in + beos* | mingw* | pw32* | cegcc* | cygwin*) + svn_sqlite_dso_ldflags= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" +else + + svn_sqlite_dso_ldflags= + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 +$as_echo_n "checking additional libraries for sqlite... " >&6; } + if test -n "$svn_sqlite_dso_ldflags"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 +$as_echo "${svn_sqlite_dso_ldflags}" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + fi + + +$as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h + + SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" + if test -n "$svn_sqlite_dso_ldflags"; then + SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" + else + SVN_SQLITE_LIBS="-lpthread" + fi + svn_lib_sqlite="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 +$as_echo "unsupported amalgamation SQLite version" >&6; } +fi +rm -f conftest* + + fi + + fi + + if test -z "$svn_lib_sqlite"; then + if test -z ""; then sqlite_dir="" sqlite_include="sqlite3.h" @@ -6633,6 +7011,10 @@ $as_echo "no" >&6; } echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -17537,6 +17919,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: db_version=$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH @@ -17624,6 +18007,14 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of Berkeley DB" >&5 $as_echo_n "checking for availability of Berkeley DB... " >&6; } + # Check whether --enable-bdb6 was given. +if test "${enable_bdb6+set}" = set; then : + enableval=$enable_bdb6; enable_bdb6=$enableval +else + enable_bdb6=unspecified +fi + + svn_lib_berkeley_db_try_save_cppflags="$CPPFLAGS" svn_lib_berkeley_db_try_save_libs="$LIBS" @@ -17631,6 +18022,7 @@ $as_echo_n "checking for availability of svn_check_berkeley_db_major=$SVN_FS_WANT_DB_MAJOR svn_check_berkeley_db_minor=$SVN_FS_WANT_DB_MINOR svn_check_berkeley_db_patch=$SVN_FS_WANT_DB_PATCH + enable_bdb6=$enable_bdb6 if test -z "$SVN_DB_LIBS"; then # We pass --dbm-libs here since Debian has modified apu-config not @@ -17673,6 +18065,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include $svn_db_header @@ -17688,6 +18081,12 @@ int main () || patch != DB_VERSION_PATCH) exit (1); + /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 + and newer are under the AGPL, and we want use of AGPL dependencies to be + opt-in. */ + if (major >= 6 && strcmp("$enable_bdb6", "yes")) + exit(2); + /* Run-time check: ensure the library claims to be the correct version. */ if (major < $svn_check_berkeley_db_major) @@ -17710,7 +18109,11 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : svn_have_berkeley_db=yes else - svn_have_berkeley_db=no + rc=$? + svn_have_berkeley_db=no + if test $rc = 2; then + svn_have_berkeley_db=no6 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17726,11 +18129,17 @@ fi $as_echo "yes" >&6; } svn_lib_berkeley_db=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if test "$svn_have_berkeley_db" = "no6"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (found version 6, but --enable-bdb6 not specified)" >&5 +$as_echo "no (found version 6, but --enable-bdb6 not specified)" >&6; } + # A warning will be printed at the end of configure.ac. + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + fi svn_lib_berkeley_db=no if test "$bdb_status" = "required"; then - as_fn_error $? "Berkeley DB $db_version or newer wasn't found." "$LINENO" 5 + as_fn_error $? "Berkeley DB $db_version or $db_alt_version wasn't found." "$LINENO" 5 fi fi fi @@ -21156,6 +21565,18 @@ $as_echo "$as_me: Disabling optimization # # do nothing fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: C compiler flags: $CFLAGS" >&5 +$as_echo "$as_me: C compiler flags: $CFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CMAINTAINERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: C++ compiler flags: $CXXFLAGS" >&5 +$as_echo "$as_me: C++ compiler flags: $CXXFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CXXUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CXXUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CXXMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CXXMAINTAINERFLAGS" >&6;} # Check whether --enable-full-version-match was given. if test "${enable_full_version_match+set}" = set; then : @@ -25315,7 +25736,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.8.0, which was +This file was extended by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25381,7 +25802,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.8.0 +subversion config.status 1.8.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -27295,30 +27716,51 @@ fi # ==== Print final messages to user ========================================== -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We have configured without BDB filesystem support + + +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated -or explicitly specify --without-berkeley-db to silence this warning. +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&5 -$as_echo "$as_me: WARNING: we have configured without BDB filesystem support +$as_echo "$as_me: WARNING: We have configured without BDB filesystem support + + +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated -or explicitly specify --without-berkeley-db to silence this warning. +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&2;} fi Modified: vendor/subversion/dist/configure.ac ============================================================================== --- vendor/subversion/dist/configure.ac Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/configure.ac Sun Jul 28 05:04:41 2013 (r253728) @@ -460,6 +460,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_PATCH, [db4 db]) @@ -1117,6 +1118,13 @@ elif test "$enable_optimization" = "no"; # # do nothing fi +dnl Dump the current compiler options +AC_MSG_NOTICE([C compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ user-defined: $CUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS]) +AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS]) +AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS]) AC_ARG_ENABLE(full-version-match, AS_HELP_STRING([--disable-full-version-match], @@ -1504,18 +1512,28 @@ dnl Configure is long - users tend to mi dnl Hence, print a warnings about what we did and didn't configure at the dnl end, where people will actually see them. -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - AC_MSG_WARN([we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + AC_MSG_WARN([We have configured without BDB filesystem support -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -or explicitly specify --without-berkeley-db to silence this warning. +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 + +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated + +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. ]) fi Modified: vendor/subversion/dist/get-deps.sh ============================================================================== --- vendor/subversion/dist/get-deps.sh Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/get-deps.sh Sun Jul 28 05:04:41 2013 (r253728) @@ -37,7 +37,7 @@ SERF_VERSION=${SERF_VERSION:-"1.2.1"} ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"} SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"} GTEST_VERSION=${GTEST_VERSION:-"1.6.0"} -HTTPD_VERSION=${HTTPD_VERSION:-"2.4.3"} +HTTPD_VERSION=${HTTPD_VERSION:-"2.4.6"} APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"} APR=apr-${APR_VERSION} Modified: vendor/subversion/dist/subversion/include/private/svn_client_private.h ============================================================================== --- vendor/subversion/dist/subversion/include/private/svn_client_private.h Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/subversion/include/private/svn_client_private.h Sun Jul 28 05:04:41 2013 (r253728) @@ -291,6 +291,39 @@ svn_client__copy_foreign(const char *url svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); +/* Same as the public svn_client_mergeinfo_log2 API, except for the addition + * of the TARGET_MERGEINFO_CATALOG and RESULT_POOL parameters. + * + * If TARGET_MERGEINFO_CATALOG is NULL then this acts exactly as the public + * API. If *TARGET_MERGEINFO_CATALOG is NULL, then *TARGET_MERGEINFO_CATALOG + * is set to the a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH, (like the public API only + * depths of svn_depth_empty or svn_depth_infinity are supported) allocated in + * RESULT_POOL. Finally, if *TARGET_MERGEINFO_CATALOG is non-NULL, then it is + * assumed to be a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH. + * + * The keys for the subtree mergeinfo are the repository root-relative + * paths of TARGET_PATH_OR_URL and/or its subtrees, regardless of whether + * TARGET_PATH_OR_URL is a URL or WC path. + */ +svn_error_t * +svn_client__mergeinfo_log(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + svn_mergeinfo_catalog_t *target_mergeinfo_catalog, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t log_receiver, + void *log_receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); #ifdef __cplusplus } Modified: vendor/subversion/dist/subversion/include/private/svn_io_private.h ============================================================================== --- vendor/subversion/dist/subversion/include/private/svn_io_private.h Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/subversion/include/private/svn_io_private.h Sun Jul 28 05:04:41 2013 (r253728) @@ -90,6 +90,11 @@ svn_stream__set_is_buffered(svn_stream_t svn_boolean_t svn_stream__is_buffered(svn_stream_t *stream); +/** Return the underlying file, if any, associated with the stream, or + * NULL if not available. Accessing the file bypasses the stream. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:05:10 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D25DE7C; Sun, 28 Jul 2013 05:05:10 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E516820F2; Sun, 28 Jul 2013 05:05:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S559ht092092; Sun, 28 Jul 2013 05:05:09 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S559rg092091; Sun, 28 Jul 2013 05:05:09 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280505.r6S559rg092091@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253729 - vendor/subversion/subversion-1.8.1 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:05:10 -0000 Author: peter Date: Sun Jul 28 05:05:09 2013 New Revision: 253729 URL: http://svnweb.freebsd.org/changeset/base/253729 Log: Tag subversion-1.8.1 Added: vendor/subversion/subversion-1.8.1/ - copied from r253728, vendor/subversion/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:06:54 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C2929FB4; Sun, 28 Jul 2013 05:06:54 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACC3E20FC; Sun, 28 Jul 2013 05:06:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S56scS092788; Sun, 28 Jul 2013 05:06:54 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S56rXa092772; Sun, 28 Jul 2013 05:06:53 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280506.r6S56rXa092772@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253730 - in vendor/apr/dist: . atomic/unix docs file_io/unix include network_io/unix random/unix tables threadproc/unix X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:06:54 -0000 Author: peter Date: Sun Jul 28 05:06:53 2013 New Revision: 253730 URL: http://svnweb.freebsd.org/changeset/base/253730 Log: Import Apache apr-1.4.8 to vendor staging area. Modified: vendor/apr/dist/CHANGES vendor/apr/dist/Makefile.win vendor/apr/dist/apr.spec vendor/apr/dist/atomic/unix/ia32.c vendor/apr/dist/atomic/unix/ppc.c vendor/apr/dist/atomic/unix/s390.c vendor/apr/dist/configure vendor/apr/dist/docs/pool-design.html vendor/apr/dist/file_io/unix/seek.c vendor/apr/dist/include/apr.hw vendor/apr/dist/include/apr_allocator.h vendor/apr/dist/include/apr_general.h vendor/apr/dist/include/apr_network_io.h vendor/apr/dist/include/apr_pools.h vendor/apr/dist/include/apr_strings.h vendor/apr/dist/include/apr_thread_proc.h vendor/apr/dist/include/apr_version.h vendor/apr/dist/libapr.rc vendor/apr/dist/network_io/unix/multicast.c vendor/apr/dist/network_io/unix/sendrecv.c vendor/apr/dist/network_io/unix/sockaddr.c vendor/apr/dist/network_io/unix/sockopt.c vendor/apr/dist/random/unix/sha2.c vendor/apr/dist/random/unix/sha2.h vendor/apr/dist/random/unix/sha2_glue.c vendor/apr/dist/tables/apr_tables.c vendor/apr/dist/threadproc/unix/thread.c Modified: vendor/apr/dist/CHANGES ============================================================================== --- vendor/apr/dist/CHANGES Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/CHANGES Sun Jul 28 05:06:53 2013 (r253730) @@ -1,11 +1,73 @@ -*- coding: utf-8 -*- +Changes for APR 1.4.8 + + *) Fix compiltation with FreeBSD on ARM. [Olli Hauer ] + + *) Fix 1.4.7 regression in apr_mcast_hops() and apr_mcast_loopback() + for AF_INET (IPv4) sockets on most Unix platforms. [Joe Orton] + + *) Fix the return value of apr_threadattr_detach_get() on some + platforms like OS X and Solaris. [Rainer Jung, ] + +Changes for APR 1.4.7 + + *) Fix apr_sockaddr_info_get() not returning an error in some cases. + PR 54779. [Jan Kaluža ] + + *) Fix amd64 assembler version of apr_atomic_xchgptr(). PR 51851. [Mattias + Engdegård ] + + *) Fix PPC atomics to work with gcc 4.0. PR 54840. [Mattias Engdegård + ] + + *) configure: Fix detection of O_NONBLOCK inheritance on busy + systems. [Rainer Jung] + + *) Remove unused code, fix strict C compliance bug in SHA-256 + implementation. [Jan Kaluza ] + + *) Fix apr_ipsubnet_test() false positives when comparing IPv4 + subnet representation against an IPv6 address. PR 54047. [Joe Orton] + + *) apr_socket_accept_filter: Return success when trying to again set + the filter to the same value as before, avoiding an unhelpful + APR_EINVAL. PR 37863. [Jeff Trawick] + + *) configure: Fix Linux 3.x detection. PR 54001. [Gilles Espinasse + ] + + *) apr_time_exp_*() on Windows: Fix error in the tm_yday field of + apr_time_exp_t for times within leap years. PR 53175. + [Jeff Trawick] + + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] + + *) Add support for OSX Mountain Lion (10.8) [Jim Jagielski] + + *) Add various gcc function attributes. [Stefan Fritsch] + + *) Fix some problems in apr_sockaddr_info_get() when trying to resolve + the loopback addresses of a protocol family that is not otherwise + configured on the system. PR 52709. [Nirgal Vourgère + , Stefan Fritsch] + + *) Fix file not being unlocked if truncate call on a file fails. + [Mladen Turk] + + *) apr_mcast_hops: Fix EINVAL for IPv6 sockets caused by using byte + instead integer for setsockopt. [Mladen Turk] + + *) Windows: Fix compile-time checks for 64-bit builds, resolving a + crash in httpd's mod_rewrite. PR 49155. [] + Changes for APR 1.4.6 *) Flush write buffer before truncate call on a file. [Mladen Turk] - *) Security: oCERT-2011-003 - Randomise hashes by providing a seed. + *) Randomise hashes by providing a seed. + Assigned CVE-2012-0840, oCERT-2011-003, but not known to be exploitable. [Bojan Smojver, Branko Čibej, Ruediger Pluem et al.] *) apr_random: Prevent segfault if pool used to initialize apr_random is Modified: vendor/apr/dist/Makefile.win ============================================================================== --- vendor/apr/dist/Makefile.win Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/Makefile.win Sun Jul 28 05:06:53 2013 (r253730) @@ -25,7 +25,7 @@ # # For example; # -# nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean +# nmake -f Makefile.win PREFIX=C:\APR buildall checkall install clean # !IF EXIST("apr.sln") && ([devenv /help > NUL 2>&1] == 0) \ Modified: vendor/apr/dist/apr.spec ============================================================================== --- vendor/apr/dist/apr.spec Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/apr.spec Sun Jul 28 05:06:53 2013 (r253730) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime library Name: apr -Version: 1.4.6 +Version: 1.4.8 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: vendor/apr/dist/atomic/unix/ia32.c ============================================================================== --- vendor/apr/dist/atomic/unix/ia32.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/ia32.c Sun Jul 28 05:06:53 2013 (r253730) @@ -117,7 +117,7 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo #elif APR_SIZEOF_VOIDP == 8 asm volatile ("xchgq %q2, %1" : "=a" (prev), "+m" (*mem) - : "r" ((unsigned long)with)); + : "0" (with)); #else #error APR_SIZEOF_VOIDP value not supported #endif Modified: vendor/apr/dist/atomic/unix/ppc.c ============================================================================== --- vendor/apr/dist/atomic/unix/ppc.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/ppc.c Sun Jul 28 05:06:53 2013 (r253730) @@ -19,7 +19,7 @@ #ifdef USE_ATOMICS_PPC #ifdef PPC405_ERRATA -# define PPC405_ERR77_SYNC " sync\n" +# define PPC405_ERR77_SYNC " sync\n" #else # define PPC405_ERR77_SYNC #endif @@ -43,12 +43,12 @@ APR_DECLARE(apr_uint32_t) apr_atomic_add { apr_uint32_t prev, temp; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%3\n" /* load and reserve */ - " add %1,%0,%4\n" /* add val and prev */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %1,0,%3\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%3\n" /* load and reserve */ + " add %1,%0,%4\n" /* add val and prev */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %1,0,%3\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&r" (prev), "=&r" (temp), "=m" (*mem) : "b" (mem), "r" (val) : "cc", "memory"); @@ -60,12 +60,12 @@ APR_DECLARE(void) apr_atomic_sub32(volat { apr_uint32_t temp; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " subf %0,%3,%0\n" /* subtract val */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " subf %0,%3,%0\n" /* subtract val */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&r" (temp), "=m" (*mem) : "b" (mem), "r" (val) : "cc", "memory"); @@ -75,13 +75,13 @@ APR_DECLARE(apr_uint32_t) apr_atomic_inc { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " addi %0,%0,1\n" /* add immediate */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " subi %0,%0,1\n" /* return old value */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " addi %0,%0,1\n" /* add immediate */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " subi %0,%0,1\n" /* return old value */ : "=&b" (prev), "=m" (*mem) : "b" (mem), "m" (*mem) : "cc", "memory"); @@ -93,12 +93,12 @@ APR_DECLARE(int) apr_atomic_dec32(volati { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " subi %0,%0,1\n" /* subtract immediate */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " subi %0,%0,1\n" /* subtract immediate */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&b" (prev), "=m" (*mem) : "b" (mem), "m" (*mem) : "cc", "memory"); @@ -111,14 +111,14 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - " cmpw %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + " cmpw %0,%3\n" /* compare operands */ + " bne- exit_%=\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "exit_%=:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); @@ -130,11 +130,11 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xch { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b" /* loop if lost */ : "=&r" (prev) : "b" (mem), "r" (val) : "cc", "memory"); @@ -146,26 +146,26 @@ APR_DECLARE(void*) apr_atomic_casptr(vol { void *prev; #if APR_SIZEOF_VOIDP == 4 - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - " cmpw %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + " cmpw %0,%3\n" /* compare operands */ + " bne- 2f\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "2:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile ("loop_%=:\n" /* lost reservation */ - " ldarx %0,0,%1\n" /* load and reserve */ - " cmpd %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stdcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " ldarx %0,0,%1\n" /* load and reserve */ + " cmpd %0,%3\n" /* compare operands */ + " bne- 2f\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stdcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "2:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); @@ -179,22 +179,22 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo { void *prev; #if APR_SIZEOF_VOIDP == 4 - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " isync\n" /* memory barrier */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " isync\n" /* memory barrier */ : "=&r" (prev) : "b" (mem), "r" (with) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile ("loop_%=:\n" /* lost reservation */ - " ldarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stdcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " isync\n" /* memory barrier */ + asm volatile ("1:\n" /* lost reservation */ + " ldarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stdcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " isync\n" /* memory barrier */ : "=&r" (prev) : "b" (mem), "r" (with) : "cc", "memory"); Modified: vendor/apr/dist/atomic/unix/s390.c ============================================================================== --- vendor/apr/dist/atomic/unix/s390.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/s390.c Sun Jul 28 05:06:53 2013 (r253730) @@ -38,10 +38,10 @@ static APR_INLINE apr_uint32_t atomic_ad apr_uint32_t prev = *mem, temp; asm volatile ("loop_%=:\n" - " lr %1,%0\n" - " alr %1,%3\n" - " cs %0,%1,%2\n" - " jl loop_%=\n" + " lr %1,%0\n" + " alr %1,%3\n" + " cs %0,%1,%2\n" + " jl loop_%=\n" : "+d" (prev), "+d" (temp), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -64,10 +64,10 @@ static APR_INLINE apr_uint32_t atomic_su apr_uint32_t prev = *mem, temp; asm volatile ("loop_%=:\n" - " lr %1,%0\n" - " slr %1,%3\n" - " cs %0,%1,%2\n" - " jl loop_%=\n" + " lr %1,%0\n" + " slr %1,%3\n" + " cs %0,%1,%2\n" + " jl loop_%=\n" : "+d" (prev), "+d" (temp), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -88,7 +88,7 @@ APR_DECLARE(int) apr_atomic_dec32(volati APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, apr_uint32_t cmp) { - asm volatile (" cs %0,%2,%1\n" + asm volatile (" cs %0,%2,%1\n" : "+d" (cmp), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); @@ -101,8 +101,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xch apr_uint32_t prev = *mem; asm volatile ("loop_%=:\n" - " cs %0,%2,%1\n" - " jl loop_%=\n" + " cs %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -114,12 +114,12 @@ APR_DECLARE(void*) apr_atomic_casptr(vol { void *prev = (void *) cmp; #if APR_SIZEOF_VOIDP == 4 - asm volatile (" cs %0,%2,%1\n" + asm volatile (" cs %0,%2,%1\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile (" csg %0,%2,%1\n" + asm volatile (" csg %0,%2,%1\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); @@ -134,15 +134,15 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo void *prev = (void *) *mem; #if APR_SIZEOF_VOIDP == 4 asm volatile ("loop_%=:\n" - " cs %0,%2,%1\n" - " jl loop_%=\n" + " cs %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 asm volatile ("loop_%=:\n" - " csg %0,%2,%1\n" - " jl loop_%=\n" + " csg %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); Modified: vendor/apr/dist/configure ============================================================================== --- vendor/apr/dist/configure Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/configure Sun Jul 28 05:06:53 2013 (r253730) @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1371,8 +1391,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1642,9 +1660,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1917,7 +1935,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2074,7 +2092,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2090,7 +2109,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2116,7 +2136,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2132,7 +2153,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2166,7 +2188,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2342,7 +2365,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3192,14 +3215,6 @@ ac_configure="$SHELL $ac_aux_dir/configu # _LT_LANG - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -#m4_defun #m4_ifndef @@ -5069,7 +5084,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5109,7 +5124,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5162,7 +5177,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5203,7 +5218,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -5261,7 +5276,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5305,7 +5320,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5751,8 +5766,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -5860,7 +5874,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -6444,83 +6458,12 @@ if test "x$apr_preload_done" != "xyes" ; ;; *-linux*) - case `uname -r` in - 2.* ) - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX=2\"" - CPPFLAGS="-DLINUX=2" - else - apr_addto_bugger="-DLINUX=2" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - 1.* ) - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX=1\"" - CPPFLAGS="-DLINUX=1" - else - apr_addto_bugger="-DLINUX=1" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - * ) - ;; - esac - - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_REENTRANT -D_GNU_SOURCE\"" - CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE" - else - apr_addto_bugger="-D_REENTRANT -D_GNU_SOURCE" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - *-GNU*) if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DHURD -D_GNU_SOURCE\"" - CPPFLAGS="-DHURD -D_GNU_SOURCE" + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX -D_REENTRANT -D_GNU_SOURCE\"" + CPPFLAGS="-DLINUX -D_REENTRANT -D_GNU_SOURCE" else - apr_addto_bugger="-DHURD -D_GNU_SOURCE" + apr_addto_bugger="-DLINUX -D_REENTRANT -D_GNU_SOURCE" for i in $apr_addto_bugger; do apr_addto_duplicate="0" for j in $CPPFLAGS; do @@ -6770,6 +6713,29 @@ if test "x$apr_preload_done" != "xyes" ; fi ;; + *-gnu*|*-GNU*) + + if test "x$CPPFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_REENTRANT -D_GNU_SOURCE -DHURD\"" + CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE -DHURD" + else + apr_addto_bugger="-D_REENTRANT -D_GNU_SOURCE -DHURD" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $CPPFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" + CPPFLAGS="$CPPFLAGS $i" + fi + done + fi + + ;; *-next-nextstep*) if test -z "$CFLAGS"; then @@ -6898,7 +6864,7 @@ if test "x$apr_preload_done" != "xyes" ; fi # See issue 34332 ;; - *-apple-darwin1[01].*) + *-apple-darwin1?.*) if test "x$CPPFLAGS" = "x"; then test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN_10\"" @@ -9512,7 +9478,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9564,7 +9530,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9604,7 +9570,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9676,7 +9642,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -9748,7 +9714,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RM="rm" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9785,7 +9751,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9822,7 +9788,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ASCPP="cpp" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9860,7 +9826,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9900,7 +9866,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9955,7 +9921,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -10021,7 +9987,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -10228,8 +10194,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -10421,7 +10387,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:07:12 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 057D2168; Sun, 28 Jul 2013 05:07:12 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE96420FF; Sun, 28 Jul 2013 05:07:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S57Bgu092954; Sun, 28 Jul 2013 05:07:11 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S57BFi092953; Sun, 28 Jul 2013 05:07:11 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280507.r6S57BFi092953@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253731 - vendor/apr/apr-1.4.8 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:07:12 -0000 Author: peter Date: Sun Jul 28 05:07:11 2013 New Revision: 253731 URL: http://svnweb.freebsd.org/changeset/base/253731 Log: Tag apr-1.4.8 Added: vendor/apr/apr-1.4.8/ - copied from r253730, vendor/apr/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:14:57 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F143A33A; Sun, 28 Jul 2013 05:14:56 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DAA3F2126; Sun, 28 Jul 2013 05:14:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S5EulH097732; Sun, 28 Jul 2013 05:14:56 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S5EsA7097707; Sun, 28 Jul 2013 05:14:54 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280514.r6S5EsA7097707@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253732 - in vendor/apr-util: . dist dist/buckets dist/crypto dist/dbd dist/dbm dist/hooks dist/include dist/include/private dist/ldap dist/memcache dist/misc dist/test dist/uri X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:14:57 -0000 Author: peter Date: Sun Jul 28 05:14:54 2013 New Revision: 253732 URL: http://svnweb.freebsd.org/changeset/base/253732 Log: Import Apache apr-util-1.5.2 into vendor staging area. Added: vendor/apr-util/dist/crypto/apr_passwd.c vendor/apr-util/dist/crypto/crypt_blowfish.c vendor/apr-util/dist/crypto/crypt_blowfish.h Deleted: vendor/apr-util/dist/aprutil.dsp vendor/apr-util/dist/crypto/apr_crypto_nss.dsp vendor/apr-util/dist/crypto/apr_crypto_openssl.dsp vendor/apr-util/dist/dbd/apr_dbd_freetds.dsp vendor/apr-util/dist/dbd/apr_dbd_mysql.dsp vendor/apr-util/dist/dbd/apr_dbd_odbc.dsp vendor/apr-util/dist/dbd/apr_dbd_oracle.dsp vendor/apr-util/dist/dbd/apr_dbd_pgsql.dsp vendor/apr-util/dist/dbd/apr_dbd_sqlite2.dsp vendor/apr-util/dist/dbd/apr_dbd_sqlite3.dsp vendor/apr-util/dist/dbm/apr_dbm_db.dsp vendor/apr-util/dist/dbm/apr_dbm_gdbm.dsp vendor/apr-util/dist/ldap/apr_ldap.dsp vendor/apr-util/dist/libaprutil.dsp vendor/apr-util/dist/test/testutildll.dsp vendor/apr-util/dist/test/testutillib.dsp Modified: vendor/apr-util/FREEBSD-Xlist vendor/apr-util/dist/CHANGES vendor/apr-util/dist/Makefile.win vendor/apr-util/dist/NWGNUmakefile vendor/apr-util/dist/apr-util.spec vendor/apr-util/dist/buckets/apr_brigade.c vendor/apr-util/dist/buckets/apr_buckets_alloc.c vendor/apr-util/dist/build-outputs.mk vendor/apr-util/dist/build.conf vendor/apr-util/dist/configure vendor/apr-util/dist/configure.in vendor/apr-util/dist/crypto/apr_crypto.c vendor/apr-util/dist/crypto/apr_crypto_nss.c vendor/apr-util/dist/crypto/apr_crypto_openssl.c vendor/apr-util/dist/crypto/apr_md5.c vendor/apr-util/dist/dbd/NWGNUdbdmysql vendor/apr-util/dist/dbd/apr_dbd_freetds.c vendor/apr-util/dist/dbd/apr_dbd_mysql.c vendor/apr-util/dist/dbd/apr_dbd_pgsql.c vendor/apr-util/dist/dbd/apr_dbd_sqlite2.c vendor/apr-util/dist/hooks/apr_hooks.c vendor/apr-util/dist/include/apr_base64.h vendor/apr-util/dist/include/apr_buckets.h vendor/apr-util/dist/include/apr_md5.h vendor/apr-util/dist/include/apr_queue.h vendor/apr-util/dist/include/apu.h.in vendor/apr-util/dist/include/apu_version.h vendor/apr-util/dist/include/private/apr_crypto_internal.h vendor/apr-util/dist/memcache/apr_memcache.c vendor/apr-util/dist/misc/apr_thread_pool.c vendor/apr-util/dist/test/Makefile.in vendor/apr-util/dist/test/Makefile.win vendor/apr-util/dist/test/NWGNUmakefile vendor/apr-util/dist/test/testbuckets.c vendor/apr-util/dist/test/testmd5.c vendor/apr-util/dist/test/testmemcache.c vendor/apr-util/dist/test/testpass.c vendor/apr-util/dist/test/testuri.c vendor/apr-util/dist/test/testutil.c vendor/apr-util/dist/test/testutil.h vendor/apr-util/dist/uri/apr_uri.c Modified: vendor/apr-util/FREEBSD-Xlist ============================================================================== --- vendor/apr-util/FREEBSD-Xlist Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/FREEBSD-Xlist Sun Jul 28 05:14:54 2013 (r253732) @@ -1,2 +1,5 @@ build xml/expat +*.mak +*.dep +*.dsp Modified: vendor/apr-util/dist/CHANGES ============================================================================== --- vendor/apr-util/dist/CHANGES Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/CHANGES Sun Jul 28 05:14:54 2013 (r253732) @@ -1,45 +1,100 @@ -*- coding: utf-8 -*- -Changes with APR-Util 1.4.1 +Changes with APR-util 1.5.2 - *) Apply Windows build fixes for the apr_crypto API. [Mladen Turk] + *) Windows: Add command line makefiles. [Gregg Smith] -Changes with APR-util 1.4.0 + *) apr_uri_parse(): Do not accept invalid characters in the scheme. + Per RFC 3986 3.3, enforce that the first segment of a relative path does + not contain a colon. PR 52479. [Stefan Fritsch] - *) apr_ldap_init: Pass secure=1 to ldapssl_init() with Solaris LDAP SDK. - PR: 42682 [Stefan Fritsch] + *) Fix memory leak in hook sorting function. PR 51256. + [] - *) apr_memcache_server_create: Fix possible segfault. PR 51064. - [Michajlo Matijkiw ] + *) Speedup md5 calculation by avoiding some copying on little endian + architectures. PR 49011. [Stefan Fritsch, Stefan Fuhrmann + ] - *) apr_thread_pool: Fix thread unsafe pool usage. [Stefan Fritsch] + *) Use heap memory for crypt in apr_password_validate(), to reduce stack + usage. PR 54572. [Stefan Fritsch] - *) Do not include apr.h and apr_errno.h from system search path in - apu_errno.h. PR 46487 [Rainer Jung] + *) Fix password validation failure for all crypt and crypt_r based + algorithms. PR 54603. [Harvey Eneman ] - *) Add optional dbm, openssl and nss subpackages to the RPM spec file. - [Graham Leggett] + *) Fix syntax error in crypto/apr_passwd.c on non-glibc systems. PR 54275. + [Stefan Fritsch] - *) apr_dbd_freetds: The sybdb.h header file might be freetds/sybdb.h - or sybdb.h. [Graham Leggett] + *) Fix potential data corruption in apr_brigade_write() and friends if + the last bucket of the brigade is a heap bucket that has been split, + and there are still references to the next part of the original bucket + in use. [Stefan Fritsch] - *) Add apr_crypto implementations for OpenSSL and Mozilla NSS. Add a unit - test to verify the interoperability of the two modules. Builds default - to disabled unless explicitly enabled. - [Graham Leggett] + *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe + Jaillet ] - *) Add the apr_crypto interface, a rewrite of the earlier apr_ssl code, - based on the modular dso interface used for dbd and ldap. Initially, - the interface supports symmetrical encryption and decryption. The - purpose of the interface is to offer portable and interoperable - access to basic crypto using the native crypto libraries present on - each platform. [Graham Leggett] + *) apr_crypto: If --with-crypto is passed to configure but no crypto + libraries are enabled, autodetect available libraries. [Jeff Trawick] - *) Add trace probes to hooks, making it easier to inspect APR Hook based - applications with DTrace or other such mechanisms. - [Theo Schlossnagle , generalized by Jeff Trawick] + *) memcache: Fix dead server retry logic. [Gavin Shelley ] - *) Implement resource list when threads are unavailable. PR 24325 - [Bojan Smojver] +Changes with APR-util 1.5.1 + + *) testmemcache: Fix crash. PR 52705. [Peter Poeml ] + + *) MinGW: Support shared builds of apr-util when apr is shared. + PR 46175. [Carlo Bramini , Jeff Trawick] + + *) Add support for Berkeley DB 5.2 and 5.3. Simplify detection script. + PR 53684. [Rainer Jung] + + *) configure: Allow to specify library specific custom linker flags + via the LDADD_XXX variables. [Rainer Jung] + + *) apr_password_validate(): Fix intermittent errors on systems + such as FreeBSD where the crypt() function is used. + (Broken only in 1.5.0) [Jeff Trawick] + + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] + +Changes with APR-util 1.5.0 + + *) dbd_pgsql_escape: Use PQescapeStringConn. [Nick Kew] + + *) apr_password_validate, apr_bcrypt_encode: Add support for bcrypt encoded + passwords. The bcrypt implementation uses code from crypt_blowfish + written by Solar Designer . apr_bcrypt_encode creates + hashes with "$2y$" prefix, but apr_password_validate also accepts the old + prefix "$2a$". PR 49288. [Stefan Fritsch] + + *) APR dbd: Allow to use apr_dbd_get_row() with a different pool than + apr_dbd_select(). PR 53533. [] + + *) APR dbd FreeTDS support: Fix spurious API errors caused by uninitialized + fields. [TROY.LIU 劉春偉 ] + + *) apr_password_validate: Increase maximum hash string length to allow + more than 9999 rounds with sha512-crypt. PR 53410. [Stefan Fritsch] + + *) Fix segfaults in crypt() and crypt_r() failure modes. + PR 47272. [Arkadiusz Miskiewicz ] + + *) apr_crypto: Ensure that the if/else that governs the static + initialisation of each crypto driver works when the first driver + isn't in use. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when a statically + compiled library is initialised for the first time. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when the library + has already been loaded. Fix ported from apr_dbd. [Graham Leggett] + + *) apr_crypto: Move the static initialisation of DRIVER_LOAD from + apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose + the parameters. [Graham Leggett] + +Changes with APR-util 1.4.x and later: + + *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?view=markup Changes for APR-util 1.3.x and later: Modified: vendor/apr-util/dist/Makefile.win ============================================================================== --- vendor/apr-util/dist/Makefile.win Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/Makefile.win Sun Jul 28 05:14:54 2013 (r253732) @@ -7,7 +7,7 @@ # install - compile everything # clean - mop up everything # -# You can override the build mechansim, choose only one; +# You can override the build mechanism, choose only one; # # USEMAK=1 - compile from exported make files # USEDSW=1 - compile from .dsw / .dsp VC6 projects Modified: vendor/apr-util/dist/NWGNUmakefile ============================================================================== --- vendor/apr-util/dist/NWGNUmakefile Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/NWGNUmakefile Sun Jul 28 05:14:54 2013 (r253732) @@ -259,6 +259,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_md4.o \ $(OBJDIR)/apr_md5.o \ $(OBJDIR)/apr_memcache.o \ + $(OBJDIR)/apr_passwd.o \ $(OBJDIR)/apr_queue.o \ $(OBJDIR)/apr_reslist.o \ $(OBJDIR)/apr_rmm.o \ @@ -269,6 +270,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_strmatch.o \ $(OBJDIR)/apr_thread_pool.o \ $(OBJDIR)/apr_uri.o \ + $(OBJDIR)/crypt_blowfish.o \ $(OBJDIR)/sdbm.o \ $(OBJDIR)/sdbm_hash.o \ $(OBJDIR)/sdbm_lock.o \ Modified: vendor/apr-util/dist/apr-util.spec ============================================================================== --- vendor/apr-util/dist/apr-util.spec Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/apr-util.spec Sun Jul 28 05:14:54 2013 (r253732) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.4.1 +Version: 1.5.2 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: vendor/apr-util/dist/buckets/apr_brigade.c ============================================================================== --- vendor/apr-util/dist/buckets/apr_brigade.c Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/buckets/apr_brigade.c Sun Jul 28 05:14:54 2013 (r253732) @@ -391,17 +391,30 @@ APU_DECLARE(apr_status_t) apr_brigade_vp void *ctx, va_list va) { +#define MAX_VECS 8 + struct iovec vec[MAX_VECS]; + apr_size_t i = 0; + for (;;) { - const char *str = va_arg(va, const char *); + char *str = va_arg(va, char *); apr_status_t rv; if (str == NULL) break; - rv = apr_brigade_write(b, flush, ctx, str, strlen(str)); - if (rv != APR_SUCCESS) - return rv; + vec[i].iov_base = str; + vec[i].iov_len = strlen(str); + i++; + + if (i == MAX_VECS) { + rv = apr_brigade_writev(b, flush, ctx, vec, i); + if (rv != APR_SUCCESS) + return rv; + i = 0; + } } + if (i != 0) + return apr_brigade_writev(b, flush, ctx, vec, i); return APR_SUCCESS; } @@ -422,7 +435,12 @@ APU_DECLARE(apr_status_t) apr_brigade_wr apr_size_t remaining = APR_BUCKET_BUFF_SIZE; char *buf = NULL; - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + /* + * If the last bucket is a heap bucket and its buffer is not shared with + * another bucket, we may write into that bucket. + */ + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; /* HEAP bucket start offsets are always in-memory, safe to cast */ @@ -512,10 +530,11 @@ APU_DECLARE(apr_status_t) apr_brigade_wr i = 0; /* If there is a heap bucket at the end of the brigade - * already, copy into the existing bucket. + * already, and its refcount is 1, copy into the existing bucket. */ e = APR_BRIGADE_LAST(b); - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; apr_size_t remaining = h->alloc_len - (e->length + (apr_size_t)e->start); @@ -591,29 +610,7 @@ APU_DECLARE(apr_status_t) apr_brigade_pu apr_brigade_flush flush, void *ctx, const char *str) { - apr_size_t len = strlen(str); - apr_bucket *bkt = APR_BRIGADE_LAST(bb); - if (!APR_BRIGADE_EMPTY(bb) && APR_BUCKET_IS_HEAP(bkt)) { - /* If there is enough space available in a heap bucket - * at the end of the brigade, copy the string directly - * into the heap bucket - */ - apr_bucket_heap *h = bkt->data; - apr_size_t bytes_avail = h->alloc_len - bkt->length; - - if (bytes_avail >= len) { - char *buf = h->base + bkt->start + bkt->length; - memcpy(buf, str, len); - bkt->length += len; - return APR_SUCCESS; - } - } - - /* If the string could not be copied into an existing heap - * bucket, delegate the work to apr_brigade_write(), which - * knows how to grow the brigade - */ - return apr_brigade_write(bb, flush, ctx, str, len); + return apr_brigade_write(bb, flush, ctx, str, strlen(str)); } APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b, Modified: vendor/apr-util/dist/buckets/apr_buckets_alloc.c ============================================================================== --- vendor/apr-util/dist/buckets/apr_buckets_alloc.c Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/buckets/apr_buckets_alloc.c Sun Jul 28 05:14:54 2013 (r253732) @@ -65,12 +65,20 @@ APU_DECLARE_NONSTD(apr_bucket_alloc_t *) /* may be NULL for debug mode. */ if (allocator == NULL) { if (apr_allocator_create(&allocator) != APR_SUCCESS) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); abort(); } } #endif - list = apr_bucket_alloc_create_ex(allocator); + if (list == NULL) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); + abort(); + } list->pool = p; apr_pool_cleanup_register(list->pool, list, alloc_cleanup, apr_pool_cleanup_null); @@ -131,6 +139,7 @@ APU_DECLARE_NONSTD(void *) apr_bucket_al if (endp >= active->endp) { list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT); if (!list->blocks) { + list->blocks = active; return NULL; } list->blocks->next = active; Modified: vendor/apr-util/dist/build-outputs.mk ============================================================================== --- vendor/apr-util/dist/build-outputs.mk Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/build-outputs.mk Sun Jul 28 05:14:54 2013 (r253732) @@ -15,8 +15,10 @@ buckets/apr_buckets_simple.lo: buckets/a buckets/apr_buckets_socket.lo: buckets/apr_buckets_socket.c .make.dirs include/apr_buckets.h crypto/apr_crypto.lo: crypto/apr_crypto.c .make.dirs include/apr_crypto.h include/apu_errno.h include/apu_version.h include/private/apr_crypto_internal.h include/private/apu_internal.h crypto/apr_md4.lo: crypto/apr_md4.c .make.dirs include/apr_md4.h include/apr_xlate.h -crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h +crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_xlate.h +crypto/apr_passwd.lo: crypto/apr_passwd.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h crypto/apr_sha1.lo: crypto/apr_sha1.c .make.dirs include/apr_base64.h include/apr_sha1.h include/apr_xlate.h +crypto/crypt_blowfish.lo: crypto/crypt_blowfish.c .make.dirs crypto/getuuid.lo: crypto/getuuid.c .make.dirs include/apr_md5.h include/apr_uuid.h include/apr_xlate.h crypto/uuid.lo: crypto/uuid.c .make.dirs include/apr_uuid.h dbd/apr_dbd.lo: dbd/apr_dbd.c .make.dirs include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apu_internal.h @@ -43,7 +45,7 @@ uri/apr_uri.lo: uri/apr_uri.c .make.dirs xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xlate.h include/apr_xml.h -OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo +OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo OBJECTS_unix = $(OBJECTS_all) Modified: vendor/apr-util/dist/build.conf ============================================================================== --- vendor/apr-util/dist/build.conf Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/build.conf Sun Jul 28 05:14:54 2013 (r253732) @@ -10,9 +10,11 @@ paths = crypto/apr_crypto.c crypto/apr_md4.c crypto/apr_md5.c + crypto/apr_passwd.c crypto/apr_sha1.c crypto/getuuid.c crypto/uuid.c + crypto/crypt_blowfish.c dbm/apr_dbm_sdbm.c dbm/apr_dbm.c dbm/sdbm/*.c Modified: vendor/apr-util/dist/configure ============================================================================== --- vendor/apr-util/dist/configure Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/configure Sun Jul 28 05:14:54 2013 (r253732) @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -212,21 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -328,6 +356,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1245,8 +1265,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1422,7 +1440,8 @@ Optional Packages: --with-ldap-lib=path path to ldap lib file --with-ldap=library ldap library to use --with-dbm=DBM choose the DBM type to use. - DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50,db51} + DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X} + for some X=0,...,9 --with-gdbm=DIR enable GDBM support --with-ndbm=PATH Find the NDBM header and library in `PATH/include' and `PATH/lib'. If PATH is of the form `HEADER:LIB', @@ -1526,9 +1545,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1604,7 +1623,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1937,7 +1956,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2491,19 +2510,6 @@ ac_configure="$SHELL $ac_aux_dir/configu - - - - - - - - - - - - - rm -f config.nice cat >config.nice</dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2786,13 +2792,20 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Use -no-install to link the test programs on all platforms -# but Darwin, where it would cause the programs to be linked -# against installed versions of libapr instead of those just -# built. +# Use -no-install or -no-fast-install to link the test +# programs on all platforms but Darwin, where it would cause +# the programs to be linked against installed versions of +# libapr instead of those just built. case $host in -*-apple-darwin*) LT_NO_INSTALL="" ;; -*) LT_NO_INSTALL="-no-install" ;; + *-apple-darwin*) + LT_NO_INSTALL="" + ;; + *-mingw*) + LT_NO_INSTALL="-no-fast-install" + ;; + *) + LT_NO_INSTALL="-no-install" + ;; esac @@ -3060,7 +3073,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3100,7 +3113,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3153,7 +3166,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3194,7 +3207,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3252,7 +3265,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3296,7 +3309,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3742,8 +3755,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4480,7 +4492,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4546,7 +4558,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4725,6 +4737,8 @@ done apu_have_crypto=0 + apu_have_openssl=0 + apu_have_nss=0 old_libs="$LIBS" old_cppflags="$CPPFLAGS" @@ -4734,9 +4748,35 @@ done # Check whether --with-crypto was given. if test "${with_crypto+set}" = set; then : withval=$with_crypto; + cryptolibs="openssl nss" + if test "$withval" = "yes"; then - apu_have_openssl=0 + crypto_library_enabled=0 + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "" -a "$v" != "no"; then + crypto_library_enabled=1 + fi + done + + if test "$crypto_library_enabled" = "0"; then + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "no"; then + eval with_$cryptolib=yes + crypto_library_enabled=1 + fi + done + if test "$crypto_library_enabled" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5 +$as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;} + else + as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5 + fi + fi + + openssl_have_headers=0 openssl_have_libs=0 @@ -5196,7 +5236,27 @@ fi if test "$apu_have_openssl" = "1"; then + + if test "x$LDADD_crypto_openssl" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\"" LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto" + else + apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_openssl; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_openssl" + LDADD_crypto_openssl="$LDADD_crypto_openssl $i" + fi + done + fi + apu_have_crypto=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5 @@ -5243,8 +5303,6 @@ rm -f core conftest.err conftest.$ac_obj LDFLAGS="$old_ldflags" - apu_have_nss=0 - nss_have_headers=0 nss_have_libs=0 old_libs="$LIBS" @@ -5255,7 +5313,6 @@ rm -f core conftest.err conftest.$ac_obj # Check whether --with-nss was given. if test "${with_nss+set}" = set; then : withval=$with_nss; - if test "$withval" = "yes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -5276,7 +5333,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5319,7 +5376,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5401,7 +5458,35 @@ fi fi fi - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5409,11 +5494,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5493,7 +5579,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi elif test "$withval" = "no"; then @@ -5548,7 +5634,35 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5 $as_echo "$as_me: checking for nss in $withval" >&6;} - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5556,11 +5670,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5640,7 +5755,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi @@ -5679,7 +5794,27 @@ fi if test "$apu_have_nss" = "1"; then + + if test "x$LDADD_crypto_nss" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\"" LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3" + else + apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_nss; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_nss" + LDADD_crypto_nss="$LDADD_crypto_nss $i" + fi + done + fi + apu_have_crypto=1 fi @@ -5689,7 +5824,10 @@ fi CPPFLAGS="$old_cppflags" LDFLAGS="$old_ldflags" - fi + if test "$apu_have_crypto" = "0"; then + as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, etc." "$LINENO" 5 + fi + fi else @@ -5702,38 +5840,134 @@ fi - apu_have_openssl=0 - openssl_have_headers=0 - openssl_have_libs=0 - old_libs="$LIBS" - old_cppflags="$CPPFLAGS" - old_ldflags="$LDFLAGS" +echo $ac_n "${nl}checking for ldap support..." + +apu_has_ldap="0"; +apu_has_ldapssl_client_init="0" +apu_has_ldapssl_client_deinit="0" +apu_has_ldapssl_add_trusted_cert="0" +apu_has_ldap_start_tls_s="0" +apu_has_ldapssl_init="0" +apu_has_ldap_sslinit="0" +apu_has_ldapssl_install_routines="0" +apu_has_ldap_openldap="0" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sun Jul 28 05:15:39 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0481B45F; Sun, 28 Jul 2013 05:15:39 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB875212A; Sun, 28 Jul 2013 05:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S5FcOh098058; Sun, 28 Jul 2013 05:15:38 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S5Fc38098057; Sun, 28 Jul 2013 05:15:38 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280515.r6S5Fc38098057@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253733 - vendor/apr-util/apr-util-1.5.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:15:39 -0000 Author: peter Date: Sun Jul 28 05:15:38 2013 New Revision: 253733 URL: http://svnweb.freebsd.org/changeset/base/253733 Log: Tag apr-util-1.5.2 Added: vendor/apr-util/apr-util-1.5.2/ - copied from r253732, vendor/apr-util/dist/ From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:26:35 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 021C8FFE; Mon, 29 Jul 2013 20:26:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E045D2E6D; Mon, 29 Jul 2013 20:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKQY1U021800; Mon, 29 Jul 2013 20:26:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKQXig021785; Mon, 29 Jul 2013 20:26:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292026.r6TKQXig021785@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253780 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:26:35 -0000 Author: delphij Date: Mon Jul 29 20:26:33 2013 New Revision: 253780 URL: http://svnweb.freebsd.org/changeset/base/253780 Log: Update vendor-sys/illumos/dist to illumos-gate 14088:3ca4e9e72fe7: Illumos ZFS issues: 3875 panic in zfs_root() after failed rollback Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Mon Jul 29 20:26:33 2013 (r253780) @@ -517,6 +517,38 @@ dmu_objset_rele(objset_t *os, void *tag) dsl_pool_rele(dp, tag); } +/* + * When we are called, os MUST refer to an objset associated with a dataset + * that is owned by 'tag'; that is, is held and long held by 'tag' and ds_owner + * == tag. We will then release and reacquire ownership of the dataset while + * holding the pool config_rwlock to avoid intervening namespace or ownership + * changes may occur. + * + * This exists solely to accommodate zfs_ioc_userspace_upgrade()'s desire to + * release the hold on its dataset and acquire a new one on the dataset of the + * same name so that it can be partially torn down and reconstructed. + */ +void +dmu_objset_refresh_ownership(objset_t *os, void *tag) +{ + dsl_pool_t *dp; + dsl_dataset_t *ds, *newds; + char name[MAXNAMELEN]; + + ds = os->os_dsl_dataset; + VERIFY3P(ds, !=, NULL); + VERIFY3P(ds->ds_owner, ==, tag); + VERIFY(dsl_dataset_long_held(ds)); + + dsl_dataset_name(ds, name); + dp = dmu_objset_pool(os); + dsl_pool_config_enter(dp, FTAG); + dmu_objset_disown(os, tag); + VERIFY0(dsl_dataset_own(dp, name, tag, &newds)); + VERIFY3P(newds, ==, os->os_dsl_dataset); + dsl_pool_config_exit(dp, FTAG); +} + void dmu_objset_disown(objset_t *os, void *tag) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:33 2013 (r253780) @@ -1547,7 +1547,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * if (error != 0) return (error); error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, - origin_head, drc->drc_force); + origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { dsl_dataset_rele(origin_head, FTAG); return (error); @@ -1599,6 +1599,9 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); + + if (drc->drc_owner != NULL) + VERIFY3P(origin_head->ds_owner, ==, drc->drc_owner); } else { dsl_dataset_t *ds = drc->drc_ds; @@ -1698,8 +1701,10 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc) } int -dmu_recv_end(dmu_recv_cookie_t *drc) +dmu_recv_end(dmu_recv_cookie_t *drc, void *owner) { + drc->drc_owner = owner; + if (drc->drc_newfs) return (dmu_recv_new_end(drc)); else Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:33 2013 (r253780) @@ -1675,16 +1675,52 @@ dsl_dataset_rename_snapshot(const char * dsl_dataset_rename_snapshot_sync, &ddrsa, 1)); } +/* + * If we're doing an ownership handoff, we need to make sure that there is + * only one long hold on the dataset. We're not allowed to change anything here + * so we don't permanently release the long hold or regular hold here. We want + * to do this only when syncing to avoid the dataset unexpectedly going away + * when we release the long hold. + */ +static int +dsl_dataset_handoff_check(dsl_dataset_t *ds, void *owner, dmu_tx_t *tx) +{ + boolean_t held; + + if (!dmu_tx_is_syncing(tx)) + return (0); + + if (owner != NULL) { + VERIFY3P(ds->ds_owner, ==, owner); + dsl_dataset_long_rele(ds, owner); + } + + held = dsl_dataset_long_held(ds); + + if (owner != NULL) + dsl_dataset_long_hold(ds, owner); + + if (held) + return (SET_ERROR(EBUSY)); + + return (0); +} + +typedef struct dsl_dataset_rollback_arg { + const char *ddra_fsname; + void *ddra_owner; +} dsl_dataset_rollback_arg_t; + static int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds; int64_t unused_refres_delta; int error; - error = dsl_dataset_hold(dp, fsname, FTAG, &ds); + error = dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds); if (error != 0) return (error); @@ -1700,9 +1736,10 @@ dsl_dataset_rollback_check(void *arg, dm return (SET_ERROR(EINVAL)); } - if (dsl_dataset_long_held(ds)) { + error = dsl_dataset_handoff_check(ds, ddra->ddra_owner, tx); + if (error != 0) { dsl_dataset_rele(ds, FTAG); - return (SET_ERROR(EBUSY)); + return (error); } /* @@ -1739,12 +1776,12 @@ dsl_dataset_rollback_check(void *arg, dm static void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds, *clone; uint64_t cloneobj; - VERIFY0(dsl_dataset_hold(dp, fsname, FTAG, &ds)); + VERIFY0(dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds)); cloneobj = dsl_dataset_create_sync(ds->ds_dir, "%rollback", ds->ds_prev, DS_CREATE_FLAG_NODIRTY, kcred, tx); @@ -1760,11 +1797,26 @@ dsl_dataset_rollback_sync(void *arg, dmu dsl_dataset_rele(ds, FTAG); } +/* + * If owner != NULL: + * + * - The existing dataset MUST be owned by the specified owner at entry + * - Upon return, dataset will still be held by the same owner, whether we + * succeed or not. + * + * This mode is required any time the existing filesystem is mounted. See + * notes above zfs_suspend_fs() for further details. + */ int -dsl_dataset_rollback(const char *fsname) +dsl_dataset_rollback(const char *fsname, void *owner) { + dsl_dataset_rollback_arg_t ddra; + + ddra.ddra_fsname = fsname; + ddra.ddra_owner = owner; + return (dsl_sync_task(fsname, dsl_dataset_rollback_check, - dsl_dataset_rollback_sync, (void *)fsname, 1)); + dsl_dataset_rollback_sync, (void *)&ddra, 1)); } struct promotenode { @@ -2282,7 +2334,7 @@ dsl_dataset_promote(const char *name, ch int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force) + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx) { int64_t unused_refres_delta; @@ -2311,7 +2363,7 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ - if (dsl_dataset_long_held(origin_head)) + if (dsl_dataset_handoff_check(origin_head, owner, tx)) return (SET_ERROR(EBUSY)); /* check amount of any unconsumed refreservation */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Mon Jul 29 20:26:33 2013 (r253780) @@ -136,6 +136,7 @@ struct objset { int dmu_objset_hold(const char *name, void *tag, objset_t **osp); int dmu_objset_own(const char *name, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); +void dmu_objset_refresh_ownership(objset_t *os, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:26:33 2013 (r253780) @@ -55,12 +55,13 @@ typedef struct dmu_recv_cookie { struct avl_tree *drc_guid_to_ds_map; zio_cksum_t drc_cksum; uint64_t drc_newsnapobj; + void *drc_owner; } dmu_recv_cookie_t; int dmu_recv_begin(char *tofs, char *tosnap, struct drr_begin *drrb, boolean_t force, char *origin, dmu_recv_cookie_t *drc); int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp, int cleanup_fd, uint64_t *action_handlep); -int dmu_recv_end(dmu_recv_cookie_t *drc); +int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); #endif /* _DMU_SEND_H */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:33 2013 (r253780) @@ -247,7 +247,7 @@ void dsl_dataset_long_rele(dsl_dataset_t boolean_t dsl_dataset_long_held(dsl_dataset_t *ds); int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force); + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx); void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, @@ -264,7 +264,7 @@ int dsl_dataset_snap_lookup(dsl_dataset_ int dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx); void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds, zprop_source_t source, uint64_t value, dmu_tx_t *tx); -int dsl_dataset_rollback(const char *fsname); +int dsl_dataset_rollback(const char *fsname, void *owner); #ifdef ZFS_DEBUG #define dprintf_ds(ds, fmt, ...) do { \ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Jul 29 20:26:33 2013 (r253780) @@ -3509,13 +3509,13 @@ zfs_ioc_rollback(zfs_cmd_t *zc) if (error == 0) { int resume_err; - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, zfsvfs); resume_err = zfs_resume_fs(zfsvfs, zc->zc_name); error = error ? error : resume_err; } VFS_RELE(zfsvfs->z_vfs); } else { - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, NULL); } return (error); } @@ -4035,13 +4035,13 @@ zfs_ioc_recv(zfs_cmd_t *zc) * If the suspend fails, then the recv_end will * likely also fail, and clean up after itself. */ - end_err = dmu_recv_end(&drc); + end_err = dmu_recv_end(&drc, zfsvfs); if (error == 0) error = zfs_resume_fs(zfsvfs, tofs); error = error ? error : end_err; VFS_RELE(zfsvfs->z_vfs); } else { - error = dmu_recv_end(&drc); + error = dmu_recv_end(&drc, NULL); } } @@ -4522,8 +4522,11 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset_phys_t). Suspend/resume the fs will do that. */ error = zfs_suspend_fs(zfsvfs); - if (error == 0) + if (error == 0) { + dmu_objset_refresh_ownership(zfsvfs->z_os, + zfsvfs); error = zfs_resume_fs(zfsvfs, zc->zc_name); + } } if (error == 0) error = dmu_objset_userspace_upgrade(zfsvfs->z_os); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Mon Jul 29 20:26:33 2013 (r253780) @@ -2044,7 +2044,9 @@ zfs_vget(vfs_t *vfsp, vnode_t **vpp, fid * Block out VOPs and close zfsvfs_t::z_os * * Note, if successful, then we return with the 'z_teardown_lock' and - * 'z_teardown_inactive_lock' write held. + * 'z_teardown_inactive_lock' write held. We leave ownership of the underlying + * dataset and objset intact so that they can be atomically handed off during + * a subsequent rollback or recv operation and the resume thereafter. */ int zfs_suspend_fs(zfsvfs_t *zfsvfs) @@ -2053,71 +2055,76 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs) if ((error = zfsvfs_teardown(zfsvfs, B_FALSE)) != 0) return (error); - dmu_objset_disown(zfsvfs->z_os, zfsvfs); return (0); } /* - * Reopen zfsvfs_t::z_os and release VOPs. + * Rebuild SA and release VOPs. Note that ownership of the underlying dataset + * is an invariant across any of the operations that can be performed while the + * filesystem was suspended. Whether it succeeded or failed, the preconditions + * are the same: the relevant objset and associated dataset are owned by + * zfsvfs, held, and long held on entry. */ int zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname) { int err; + znode_t *zp; + uint64_t sa_obj = 0; ASSERT(RRW_WRITE_HELD(&zfsvfs->z_teardown_lock)); ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); - err = dmu_objset_own(osname, DMU_OST_ZFS, B_FALSE, zfsvfs, - &zfsvfs->z_os); - if (err) { - zfsvfs->z_os = NULL; - } else { - znode_t *zp; - uint64_t sa_obj = 0; + /* + * We already own this, so just hold and rele it to update the + * objset_t, as the one we had before may have been evicted. + */ + VERIFY0(dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os)); + VERIFY3P(zfsvfs->z_os->os_dsl_dataset->ds_owner, ==, zfsvfs); + VERIFY(dsl_dataset_long_held(zfsvfs->z_os->os_dsl_dataset)); + dmu_objset_rele(zfsvfs->z_os, zfsvfs); - /* - * Make sure version hasn't changed - */ + /* + * Make sure version hasn't changed + */ - err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, - &zfsvfs->z_version); + err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, + &zfsvfs->z_version); - if (err) - goto bail; + if (err) + goto bail; - err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, - ZFS_SA_ATTRS, 8, 1, &sa_obj); + err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, + ZFS_SA_ATTRS, 8, 1, &sa_obj); - if (err && zfsvfs->z_version >= ZPL_VERSION_SA) - goto bail; + if (err && zfsvfs->z_version >= ZPL_VERSION_SA) + goto bail; - if ((err = sa_setup(zfsvfs->z_os, sa_obj, - zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) - goto bail; + if ((err = sa_setup(zfsvfs->z_os, sa_obj, + zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) + goto bail; - if (zfsvfs->z_version >= ZPL_VERSION_SA) - sa_register_update_callback(zfsvfs->z_os, - zfs_sa_upgrade); + if (zfsvfs->z_version >= ZPL_VERSION_SA) + sa_register_update_callback(zfsvfs->z_os, + zfs_sa_upgrade); - VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); + VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); - zfs_set_fuid_feature(zfsvfs); + zfs_set_fuid_feature(zfsvfs); - /* - * Attempt to re-establish all the active znodes with - * their dbufs. If a zfs_rezget() fails, then we'll let - * any potential callers discover that via ZFS_ENTER_VERIFY_VP - * when they try to use their znode. - */ - mutex_enter(&zfsvfs->z_znodes_lock); - for (zp = list_head(&zfsvfs->z_all_znodes); zp; - zp = list_next(&zfsvfs->z_all_znodes, zp)) { - (void) zfs_rezget(zp); - } - mutex_exit(&zfsvfs->z_znodes_lock); + /* + * Attempt to re-establish all the active znodes with + * their dbufs. If a zfs_rezget() fails, then we'll let + * any potential callers discover that via ZFS_ENTER_VERIFY_VP + * when they try to use their znode. + */ + mutex_enter(&zfsvfs->z_znodes_lock); + for (zp = list_head(&zfsvfs->z_all_znodes); zp; + zp = list_next(&zfsvfs->z_all_znodes, zp)) { + (void) zfs_rezget(zp); } + mutex_exit(&zfsvfs->z_znodes_lock); bail: /* release the VOPs */ @@ -2126,8 +2133,8 @@ bail: if (err) { /* - * Since we couldn't reopen zfsvfs::z_os, or - * setup the sa framework force unmount this file system. + * Since we couldn't setup the sa framework, try to force + * unmount this file system. */ if (vn_vfswlock(zfsvfs->z_vfs->vfs_vnodecovered) == 0) (void) dounmount(zfsvfs->z_vfs, MS_FORCE, CRED()); From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:31:45 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B2D8793; Mon, 29 Jul 2013 20:31:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DBEC2F03; Mon, 29 Jul 2013 20:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKVi5T024262; Mon, 29 Jul 2013 20:31:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKViaH024257; Mon, 29 Jul 2013 20:31:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292031.r6TKViaH024257@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253781 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zfs vendor/illumos/dist/lib/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:31:45 -0000 Author: delphij Date: Mon Jul 29 20:31:44 2013 New Revision: 253781 URL: http://svnweb.freebsd.org/changeset/base/253781 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:31:44 2013 (r253781) @@ -3461,6 +3461,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:31:44 2013 (r253781) @@ -1843,6 +1843,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3325,13 +3329,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); } From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:31:46 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C43D794; Mon, 29 Jul 2013 20:31:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1517C2F04; Mon, 29 Jul 2013 20:31:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKVjCD024274; Mon, 29 Jul 2013 20:31:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKVjGO024267; Mon, 29 Jul 2013 20:31:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292031.r6TKVjGO024267@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253781 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zfs vendor/illumos/dist/lib/... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:31:46 -0000 Author: delphij Date: Mon Jul 29 20:31:44 2013 New Revision: 253781 URL: http://svnweb.freebsd.org/changeset/base/253781 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Mon Jul 29 20:31:44 2013 (r253781) @@ -395,6 +395,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE"); zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); + zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:31:44 2013 (r253781) @@ -1553,7 +1553,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1561,7 +1561,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); } return (error); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:31:44 2013 (r253781) @@ -947,7 +947,7 @@ typedef struct dsl_dataset_snapshot_arg int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx) + dmu_tx_t *tx, boolean_t recv) { int error; uint64_t value; @@ -973,6 +973,18 @@ dsl_dataset_snapshot_check_impl(dsl_data if (error != ENOENT) return (error); + /* + * We don't allow taking snapshots of inconsistent datasets, such as + * those into which we are currently receiving. However, if we are + * creating this snapshot as part of a receive, this check will be + * executed atomically with respect to the completion of the receive + * itself but prior to the clearing of DS_FLAG_INCONSISTENT; in this + * case we ignore this, knowing it will be fixed up for us shortly in + * dmu_recv_end_sync(). + */ + if (!recv && DS_IS_INCONSISTENT(ds)) + return (SET_ERROR(EBUSY)); + error = dsl_dataset_snapshot_reserve_space(ds, tx); if (error != 0) return (error); @@ -1009,7 +1021,7 @@ dsl_dataset_snapshot_check(void *arg, dm error = dsl_dataset_hold(dp, dsname, FTAG, &ds); if (error == 0) { error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx); + atp + 1, tx, B_FALSE); dsl_dataset_rele(ds, FTAG); } @@ -1262,7 +1274,8 @@ dsl_dataset_snapshot_tmp_check(void *arg if (error != 0) return (error); - error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, tx); + error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, + tx, B_FALSE); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:31:44 2013 (r253781) @@ -251,7 +251,7 @@ int dsl_dataset_clone_swap_check_impl(ds void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx); + dmu_tx_t *tx, boolean_t recv); void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx); From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:33:51 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07C389FA; Mon, 29 Jul 2013 20:33:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E69572F1A; Mon, 29 Jul 2013 20:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKXoue024586; Mon, 29 Jul 2013 20:33:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKXnSi024581; Mon, 29 Jul 2013 20:33:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292033.r6TKXnSi024581@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253782 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:33:51 -0000 Author: delphij Date: Mon Jul 29 20:33:49 2013 New Revision: 253782 URL: http://svnweb.freebsd.org/changeset/base/253782 Log: Update vendor-sys/illumos/dist to illumos-gate 14094:8a2884391fc2: Illumos ZFS issues: 3888 zfs recv -F should destroy any snapshots created since the incremental source Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:33:49 2013 (r253782) @@ -654,6 +654,7 @@ typedef struct dmu_recv_begin_arg { const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; + uint64_t drba_snapobj; } dmu_recv_begin_arg_t; static int @@ -664,11 +665,6 @@ recv_begin_check_existing_impl(dmu_recv_ int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; - /* must not have any changes since most recent snapshot */ - if (!drba->drba_cookie->drc_force && - dsl_dataset_modified_since_lastsnap(ds)) - return (SET_ERROR(ETXTBSY)); - /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, @@ -684,41 +680,47 @@ recv_begin_check_existing_impl(dmu_recv_ return (error == 0 ? EEXIST : error); if (fromguid != 0) { - /* if incremental, most recent snapshot must match fromguid */ - if (ds->ds_prev == NULL) + dsl_dataset_t *snap; + uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + + /* Find snapshot in this dir that matches fromguid. */ + while (obj != 0) { + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (SET_ERROR(ENODEV)); + if (snap->ds_dir != ds->ds_dir) { + dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ENODEV)); + } + if (snap->ds_phys->ds_guid == fromguid) + break; + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + } + if (obj == 0) return (SET_ERROR(ENODEV)); - /* - * most recent snapshot must match fromguid, or there are no - * changes since the fromguid one - */ - if (ds->ds_prev->ds_phys->ds_guid != fromguid) { - uint64_t birth = ds->ds_prev->ds_phys->ds_bp.blk_birth; - uint64_t obj = ds->ds_prev->ds_phys->ds_prev_snap_obj; - while (obj != 0) { - dsl_dataset_t *snap; - error = dsl_dataset_hold_obj(dp, obj, FTAG, - &snap); - if (error != 0) - return (SET_ERROR(ENODEV)); - if (snap->ds_phys->ds_creation_txg < birth) { - dsl_dataset_rele(snap, FTAG); - return (SET_ERROR(ENODEV)); - } - if (snap->ds_phys->ds_guid == fromguid) { - dsl_dataset_rele(snap, FTAG); - break; /* it's ok */ - } - obj = snap->ds_phys->ds_prev_snap_obj; + if (drba->drba_cookie->drc_force) { + drba->drba_snapobj = obj; + } else { + /* + * If we are not forcing, there must be no + * changes since fromsnap. + */ + if (dsl_dataset_modified_since_snap(ds, snap)) { dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ETXTBSY)); } - if (obj == 0) - return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_prev->ds_object; } + + dsl_dataset_rele(snap, FTAG); } else { /* if full, most recent snapshot must be $ORIGIN */ if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_phys->ds_prev_snap_obj; } return (0); @@ -827,8 +829,14 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t error = dsl_dataset_hold(dp, tofs, FTAG, &ds); if (error == 0) { /* create temporary clone */ + dsl_dataset_t *snap = NULL; + if (drba->drba_snapobj != 0) { + VERIFY0(dsl_dataset_hold_obj(dp, + drba->drba_snapobj, FTAG, &snap)); + } dsobj = dsl_dataset_create_sync(ds->ds_dir, recv_clone_name, - ds->ds_prev, crflags, drba->drba_cred, tx); + snap, crflags, drba->drba_cred, tx); + dsl_dataset_rele(snap, FTAG); dsl_dataset_rele(ds, FTAG); } else { dsl_dir_t *dd; @@ -1546,6 +1554,32 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head); if (error != 0) return (error); + if (drc->drc_force) { + /* + * We will destroy any snapshots in tofs (i.e. before + * origin_head) that are after the origin (which is + * the snap before drc_ds, because drc_ds can not + * have any snaps of its own). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (error); + if (snap->ds_dir != origin_head->ds_dir) + error = SET_ERROR(EINVAL); + if (error == 0) { + error = dsl_destroy_snapshot_check_impl( + snap, B_FALSE); + } + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + if (error != 0) + return (error); + } + } error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { @@ -1580,6 +1614,27 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t VERIFY0(dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head)); + + if (drc->drc_force) { + /* + * Destroy any snapshots of drc_tofs (origin_head) + * after the origin (the snap before drc_ds). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, + &snap)); + ASSERT3P(snap->ds_dir, ==, origin_head->ds_dir); + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_destroy_snapshot_sync_impl(snap, + B_FALSE, tx); + dsl_dataset_rele(snap, FTAG); + } + } + VERIFY3P(drc->drc_ds->ds_prev, ==, + origin_head->ds_prev); + dsl_dataset_clone_swap_sync_impl(drc->drc_ds, origin_head, tx); dsl_dataset_snapshot_sync_impl(origin_head, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:33:49 2013 (r253782) @@ -1533,16 +1533,16 @@ dsl_dataset_space(dsl_dataset_t *ds, } boolean_t -dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds) +dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; ASSERT(dsl_pool_config_held(dp)); - if (ds->ds_prev == NULL) + if (snap == NULL) return (B_FALSE); if (ds->ds_phys->ds_bp.blk_birth > - ds->ds_prev->ds_phys->ds_creation_txg) { - objset_t *os, *os_prev; + snap->ds_phys->ds_creation_txg) { + objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was * reset in the head. Don't count that as being @@ -1550,10 +1550,10 @@ dsl_dataset_modified_since_lastsnap(dsl_ */ if (dmu_objset_from_ds(ds, &os) != 0) return (B_TRUE); - if (dmu_objset_from_ds(ds->ds_prev, &os_prev) != 0) + if (dmu_objset_from_ds(snap, &os_snap) != 0) return (B_TRUE); return (bcmp(&os->os_phys->os_meta_dnode, - &os_prev->os_phys->os_meta_dnode, + &os_snap->os_phys->os_meta_dnode, sizeof (os->os_phys->os_meta_dnode)) != 0); } return (B_FALSE); @@ -2356,15 +2356,14 @@ dsl_dataset_clone_swap_check_impl(dsl_da dsl_dataset_is_snapshot(origin_head)) return (SET_ERROR(EINVAL)); - /* the branch point should be just before them */ - if (clone->ds_prev != origin_head->ds_prev) + /* if we are not forcing, the branch point should be just before them */ + if (!force && clone->ds_prev != origin_head->ds_prev) return (SET_ERROR(EINVAL)); /* clone should be the clone (unless they are unrelated) */ if (clone->ds_prev != NULL && clone->ds_prev != clone->ds_dir->dd_pool->dp_origin_snap && - origin_head->ds_object != - clone->ds_prev->ds_phys->ds_next_snap_obj) + origin_head->ds_dir != clone->ds_prev->ds_dir) return (SET_ERROR(EINVAL)); /* the clone should be a child of the origin */ @@ -2372,7 +2371,8 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(EINVAL)); /* origin_head shouldn't be modified unless 'force' */ - if (!force && dsl_dataset_modified_since_lastsnap(origin_head)) + if (!force && + dsl_dataset_modified_since_snap(origin_head, origin_head->ds_prev)) return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ @@ -2409,6 +2409,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat ASSERT(clone->ds_reserved == 0); ASSERT(origin_head->ds_quota == 0 || clone->ds_phys->ds_unique_bytes <= origin_head->ds_quota); + ASSERT3P(clone->ds_prev, ==, origin_head->ds_prev); dmu_buf_will_dirty(clone->ds_dbuf, tx); dmu_buf_will_dirty(origin_head->ds_dbuf, tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Mon Jul 29 20:33:49 2013 (r253782) @@ -46,10 +46,7 @@ typedef struct dmu_snapshots_destroy_arg nvlist_t *dsda_errlist; } dmu_snapshots_destroy_arg_t; -/* - * ds must be owned. - */ -static int +int dsl_destroy_snapshot_check_impl(dsl_dataset_t *ds, boolean_t defer) { if (!dsl_dataset_is_snapshot(ds)) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:33:49 2013 (r253782) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -206,7 +206,8 @@ void dsl_dataset_set_blkptr(dsl_dataset_ spa_t *dsl_dataset_get_spa(dsl_dataset_t *ds); -boolean_t dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds); +boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, + dsl_dataset_t *snap); void dsl_dataset_sync(dsl_dataset_t *os, zio_t *zio, dmu_tx_t *tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Mon Jul 29 20:33:49 2013 (r253782) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -35,15 +35,16 @@ struct nvlist; struct dsl_dataset; struct dmu_tx; -int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer, - struct nvlist *errlist); -int dsl_destroy_snapshot(const char *name, boolean_t defer); -int dsl_destroy_head(const char *name); -int dsl_destroy_head_check_impl(struct dsl_dataset *ds, int expected_holds); -void dsl_destroy_head_sync_impl(struct dsl_dataset *ds, struct dmu_tx *tx); -int dsl_destroy_inconsistent(const char *dsname, void *arg); -void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *ds, - boolean_t defer, struct dmu_tx *tx); +int dsl_destroy_snapshots_nvl(struct nvlist *, boolean_t, + struct nvlist *); +int dsl_destroy_snapshot(const char *, boolean_t); +int dsl_destroy_head(const char *); +int dsl_destroy_head_check_impl(struct dsl_dataset *, int); +void dsl_destroy_head_sync_impl(struct dsl_dataset *, struct dmu_tx *); +int dsl_destroy_inconsistent(const char *, void *); +int dsl_destroy_snapshot_check_impl(struct dsl_dataset *, boolean_t); +void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *, + boolean_t, struct dmu_tx *); #ifdef __cplusplus } From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:35:14 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 19E9BCCD; Mon, 29 Jul 2013 20:35:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA7962F2E; Mon, 29 Jul 2013 20:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKZDgh024805; Mon, 29 Jul 2013 20:35:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKZCH0024800; Mon, 29 Jul 2013 20:35:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292035.r6TKZCH0024800@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253783 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:35:14 -0000 Author: delphij Date: Mon Jul 29 20:35:12 2013 New Revision: 253783 URL: http://svnweb.freebsd.org/changeset/base/253783 Log: Update vendor-sys/illumos/dist to illumos-gate 14095:277fa158020c: Illumos ZFS issues: 3834 incremental replication of 'holey' file systems is slow Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Mon Jul 29 20:35:12 2013 (r253783) @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -796,9 +797,12 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) /* * Evict (if its unreferenced) or clear (if its referenced) any level-0 * data blocks in the free range, so that any future readers will find - * empty blocks. Also, if we happen accross any level-1 dbufs in the + * empty blocks. Also, if we happen across any level-1 dbufs in the * range that have not already been marked dirty, mark them dirty so * they stay in memory. + * + * This is a no-op if the dataset is in the middle of an incremental + * receive; see comment below for details. */ void dbuf_free_range(dnode_t *dn, uint64_t start, uint64_t end, dmu_tx_t *tx) @@ -814,6 +818,20 @@ dbuf_free_range(dnode_t *dn, uint64_t st last_l1 = end >> epbs; } dprintf_dnode(dn, "start=%llu end=%llu\n", start, end); + + if (dmu_objset_is_receiving(dn->dn_objset)) { + /* + * When processing a free record from a zfs receive, + * there should have been no previous modifications to the + * data in this range. Therefore there should be no dbufs + * in the range. Searching dn_dbufs for these non-existent + * dbufs can be very expensive, so simply ignore this. + */ + VERIFY3P(dbuf_find(dn, 0, start), ==, NULL); + VERIFY3P(dbuf_find(dn, 0, end), ==, NULL); + return; + } + mutex_enter(&dn->dn_dbufs_mtx); for (db = list_head(&dn->dn_dbufs); db; db = db_next) { db_next = list_next(&dn->dn_dbufs, db); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:35:12 2013 (r253783) @@ -80,6 +80,32 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o { struct drr_free *drrf = &(dsp->dsa_drr->drr_u.drr_free); + /* + * When we receive a free record, dbuf_free_range() assumes + * that the receiving system doesn't have any dbufs in the range + * being freed. This is always true because there is a one-record + * constraint: we only send one WRITE record for any given + * object+offset. We know that the one-record constraint is + * true because we always send data in increasing order by + * object,offset. + * + * If the increasing-order constraint ever changes, we should find + * another way to assert that the one-record constraint is still + * satisfied. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + + /* + * If we are doing a non-incremental send, then there can't + * be any data in the dataset we're receiving into. Therefore + * a free record would simply be a no-op. Save space by not + * sending it to begin with. + */ + if (!dsp->dsa_incremental) + return (0); + if (length != -1ULL && offset + length < offset) length = -1ULL; @@ -146,6 +172,15 @@ dump_data(dmu_sendarg_t *dsp, dmu_object { struct drr_write *drrw = &(dsp->dsa_drr->drr_u.drr_write); + /* + * We send data in increasing object, offset order. + * See comment in dump_free() for details. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + dsp->dsa_last_data_object = object; + dsp->dsa_last_data_offset = offset + blksz - 1; /* * If there is any kind of pending aggregation (currently either @@ -213,6 +248,10 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin { struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects); + /* See comment in dump_free(). */ + if (!dsp->dsa_incremental) + return (0); + /* * If there is a pending op, but it's not PENDING_FREEOBJECTS, * push it out, since free block aggregation can only be done for @@ -289,9 +328,9 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t if (dump_bytes(dsp, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) return (SET_ERROR(EINTR)); - /* free anything past the end of the file */ + /* Free anything past the end of the file. */ if (dump_free(dsp, object, (dnp->dn_maxblkid + 1) * - (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL)) + (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL) != 0) return (SET_ERROR(EINTR)); if (dsp->dsa_err != 0) return (SET_ERROR(EINTR)); @@ -474,6 +513,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_toguid = ds->ds_phys->ds_guid; ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); dsp->dsa_pending_op = PENDING_NONE; + dsp->dsa_incremental = (fromtxg != 0); mutex_enter(&ds->ds_sendstream_lock); list_insert_head(&ds->ds_sendstreams, dsp); @@ -1765,3 +1805,13 @@ dmu_recv_end(dmu_recv_cookie_t *drc, voi else return (dmu_recv_existing_end(drc)); } + +/* + * Return TRUE if this objset is currently being received into. + */ +boolean_t +dmu_objset_is_receiving(objset_t *os) +{ + return (os->os_dsl_dataset != NULL && + os->os_dsl_dataset->ds_owner == dmu_recv_tag); +} Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Mon Jul 29 20:35:12 2013 (r253783) @@ -587,8 +587,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t { dmu_tx_hold_t *txh; dnode_t *dn; - uint64_t start, end, i; - int err, shift; + int err; zio_t *zio; ASSERT(tx->tx_txg == 0); @@ -599,34 +598,48 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t return; dn = txh->txh_dnode; - /* first block */ - if (off != 0) - dmu_tx_count_write(txh, off, 1); - /* last block */ - if (len != DMU_OBJECT_END) - dmu_tx_count_write(txh, off+len, 1); - - dmu_tx_count_dnode(txh); - if (off >= (dn->dn_maxblkid+1) * dn->dn_datablksz) return; if (len == DMU_OBJECT_END) len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; + dmu_tx_count_dnode(txh); + /* - * For i/o error checking, read the first and last level-0 - * blocks, and all the level-1 blocks. The above count_write's - * have already taken care of the level-0 blocks. + * For i/o error checking, we read the first and last level-0 + * blocks if they are not aligned, and all the level-1 blocks. + * + * Note: dbuf_free_range() assumes that we have not instantiated + * any level-0 dbufs that will be completely freed. Therefore we must + * exercise care to not read or count the first and last blocks + * if they are blocksize-aligned. + */ + if (dn->dn_datablkshift == 0) { + dmu_tx_count_write(txh, off, len); + } else { + /* first block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off, 1); + /* last block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off + len, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off+len, 1); + } + + /* + * Check level-1 blocks. */ if (dn->dn_nlevels > 1) { - shift = dn->dn_datablkshift + dn->dn_indblkshift - + int shift = dn->dn_datablkshift + dn->dn_indblkshift - SPA_BLKPTRSHIFT; - start = off >> shift; - end = dn->dn_datablkshift ? ((off+len) >> shift) : 0; + uint64_t start = off >> shift; + uint64_t end = (off + len) >> shift; + + ASSERT(dn->dn_datablkshift != 0); + ASSERT(dn->dn_indblkshift != 0); zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); - for (i = start; i <= end; i++) { + for (uint64_t i = start; i <= end; i++) { uint64_t ibyte = i << shift; err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0); i = ibyte >> shift; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h Mon Jul 29 20:35:12 2013 (r253783) @@ -21,7 +21,10 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + */ +/* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_DMU_IMPL_H @@ -290,6 +293,9 @@ typedef struct dmu_sendarg { uint64_t dsa_toguid; int dsa_err; dmu_pendop_t dsa_pending_op; + boolean_t dsa_incremental; + uint64_t dsa_last_data_object; + uint64_t dsa_last_data_offset; } dmu_sendarg_t; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:35:12 2013 (r253783) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -63,5 +63,6 @@ int dmu_recv_begin(char *tofs, char *tos int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp, int cleanup_fd, uint64_t *action_handlep); int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); +boolean_t dmu_objset_is_receiving(objset_t *os); #endif /* _DMU_SEND_H */ From owner-svn-src-vendor@FreeBSD.ORG Mon Jul 29 20:36:27 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B82DDE1B; Mon, 29 Jul 2013 20:36:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4E842F41; Mon, 29 Jul 2013 20:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKaRui024964; Mon, 29 Jul 2013 20:36:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKaR2t024963; Mon, 29 Jul 2013 20:36:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292036.r6TKaR2t024963@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253784 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:36:27 -0000 Author: delphij Date: Mon Jul 29 20:36:27 2013 New Revision: 253784 URL: http://svnweb.freebsd.org/changeset/base/253784 Log: Update vendor/illumos/dist to illumos-gate 14096:12d3631da129: Illumos ZFS issues: 3909 "zfs send -D" does not work Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Mon Jul 29 20:35:12 2013 (r253783) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Mon Jul 29 20:36:27 2013 (r253784) @@ -1566,8 +1566,8 @@ zfs_send(zfs_handle_t *zhp, const char * if (tid != 0) { if (err != 0) (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } if (sdd.cleanup_fd != -1) { @@ -1603,8 +1603,8 @@ err_out: VERIFY(0 == close(sdd.cleanup_fd)); if (tid != 0) { (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } return (err); } From owner-svn-src-vendor@FreeBSD.ORG Tue Jul 30 20:45:28 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 394B178F; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25EF12A4F; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UKjSAW061213; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UKjStx061212; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302045.r6UKjStx061212@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 20:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253817 - vendor-sys/illumos/dist/uts/common/sys/fs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:45:28 -0000 Author: delphij Date: Tue Jul 30 20:45:27 2013 New Revision: 253817 URL: http://svnweb.freebsd.org/changeset/base/253817 Log: Commit a missed file in r253781: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Tue Jul 30 20:37:32 2013 (r253816) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Tue Jul 30 20:45:27 2013 (r253817) @@ -140,6 +140,7 @@ typedef enum { ZFS_PROP_CLONES, ZFS_PROP_LOGICALUSED, ZFS_PROP_LOGICALREFERENCED, + ZFS_PROP_INCONSISTENT, /* not exposed to the user */ ZFS_NUM_PROPS } zfs_prop_t; From owner-svn-src-vendor@FreeBSD.ORG Wed Jul 31 11:42:43 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B63EFC31; Wed, 31 Jul 2013 11:42:43 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3EBA2CD1; Wed, 31 Jul 2013 11:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VBghqt035164; Wed, 31 Jul 2013 11:42:43 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VBghWX035160; Wed, 31 Jul 2013 11:42:43 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201307311142.r6VBghWX035160@svn.freebsd.org> From: Erwin Lansing Date: Wed, 31 Jul 2013 11:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253837 - in vendor/bind9/dist: . lib/dns/rdata/generic X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:42:43 -0000 Author: erwin Date: Wed Jul 31 11:42:42 2013 New Revision: 253837 URL: http://svnweb.freebsd.org/changeset/base/253837 Log: Vendor import of BIND 9.8.5-P2 Approved by: delphij (mentor, implicit) Sponsored by: DK Hostmaster A/S Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/CHANGES Wed Jul 31 11:42:42 2013 (r253837) @@ -1,3 +1,9 @@ + --- 9.8.5-P2 released --- + +3621. [security] Incorrect bounds checking on private type 'keydata' + can lead to a remotely triggerable REQUIRE failure + (CVE-2013-4854). [RT #34238] + --- 9.8.5-P1 released --- 3584. [security] Caching data from an incompletely signed zone could Modified: vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c ============================================================================== --- vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c Wed Jul 31 11:42:42 2013 (r253837) @@ -176,7 +176,7 @@ fromwire_keydata(ARGS_FROMWIRE) { UNUSED(options); isc_buffer_activeregion(source, &sr); - if (sr.length < 4) + if (sr.length < 16) return (ISC_R_UNEXPECTEDEND); isc_buffer_forward(source, sr.length); Modified: vendor/bind9/dist/version ============================================================================== --- vendor/bind9/dist/version Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/version Wed Jul 31 11:42:42 2013 (r253837) @@ -9,4 +9,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=5 RELEASETYPE=-P -RELEASEVER=1 +RELEASEVER=2 From owner-svn-src-vendor@FreeBSD.ORG Wed Jul 31 11:45:41 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7F320DA5; Wed, 31 Jul 2013 11:45:41 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52D972CF0; Wed, 31 Jul 2013 11:45:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VBjfT4035579; Wed, 31 Jul 2013 11:45:41 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VBjf6p035578; Wed, 31 Jul 2013 11:45:41 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201307311145.r6VBjf6p035578@svn.freebsd.org> From: Erwin Lansing Date: Wed, 31 Jul 2013 11:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253838 - vendor/bind9/9.8.5-P2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:45:41 -0000 Author: erwin Date: Wed Jul 31 11:45:40 2013 New Revision: 253838 URL: http://svnweb.freebsd.org/changeset/base/253838 Log: Tag the 9.8.5-P2 release. Approved by: delphij (mentor, implicit) Added: vendor/bind9/9.8.5-P2/ - copied from r253837, vendor/bind9/dist/ From owner-svn-src-vendor@FreeBSD.ORG Wed Jul 31 22:54:06 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51318B45; Wed, 31 Jul 2013 22:54:06 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6432B57; Wed, 31 Jul 2013 22:54:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VMs6FN042215; Wed, 31 Jul 2013 22:54:06 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VMs2X2042194; Wed, 31 Jul 2013 22:54:02 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201307312254.r6VMs2X2042194@svn.freebsd.org> From: Martin Matuska Date: Wed, 31 Jul 2013 22:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253848 - in vendor/xz/dist: . src/liblzma/api/lzma src/liblzma/check src/liblzma/common src/lzmainfo src/xz src/xzdec X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 22:54:06 -0000 Author: mm Date: Wed Jul 31 22:54:02 2013 New Revision: 253848 URL: http://svnweb.freebsd.org/changeset/base/253848 Log: Update vendor/xz from v5.0 branch to post-5.0.5 Git commit: b69900ed0b2f914fc6c0a180dcb522dbe5b80ea7 Modified: vendor/xz/dist/ChangeLog vendor/xz/dist/README vendor/xz/dist/THANKS vendor/xz/dist/src/liblzma/api/lzma/version.h vendor/xz/dist/src/liblzma/check/sha256.c vendor/xz/dist/src/liblzma/common/alone_decoder.c vendor/xz/dist/src/liblzma/common/alone_decoder.h vendor/xz/dist/src/liblzma/common/auto_decoder.c vendor/xz/dist/src/lzmainfo/lzmainfo.1 vendor/xz/dist/src/xz/coder.c vendor/xz/dist/src/xz/coder.h vendor/xz/dist/src/xz/file_io.c vendor/xz/dist/src/xz/list.c vendor/xz/dist/src/xz/util.c vendor/xz/dist/src/xz/xz.1 vendor/xz/dist/src/xzdec/xzdec.1 vendor/xz/dist/src/xzdec/xzdec.c Modified: vendor/xz/dist/ChangeLog ============================================================================== --- vendor/xz/dist/ChangeLog Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/ChangeLog Wed Jul 31 22:54:02 2013 (r253848) @@ -1,3 +1,348 @@ +commit b69900ed0b2f914fc6c0a180dcb522dbe5b80ea7 +Author: Lasse Collin +Date: Sun Jun 30 18:02:27 2013 +0300 + + Man pages: Use similar syntax for synopsis as in xz. + + The man pages of lzmainfo, xzmore, and xzdec had similar + constructs as the man page of xz had before the commit + eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond + didn't mention these man pages in his bug report, but + it's nice to be consistent. + +commit cf4a1e1879d89be314ef3c064bd2656ea452f87e +Author: Lasse Collin +Date: Sun Jun 30 15:55:09 2013 +0300 + + Update NEWS for 5.0.5. + +commit cb94bb6d1f34e1e93c2d634ea9c3b7dfb3981d05 +Author: Lasse Collin +Date: Sun Jun 30 15:54:38 2013 +0300 + + Bump version and soname for 5.0.5. + +commit b7dee202d5b041ccae028d0c5433b83cecbe9e5d +Author: Lasse Collin +Date: Fri Jun 28 23:56:17 2013 +0300 + + xz: Fix return value type in io_write_buf(). + + It didn't affect the behavior of the code since -1 + becomes true anyway. + +commit 265e7b44d804b47373f10b7da28350db7611cea6 +Author: Lasse Collin +Date: Fri Jun 28 18:46:13 2013 +0300 + + xz: Remove an outdated NetBSD-specific comment. + + Nowadays errno == EFTYPE is documented in open(2). + +commit 78c2f8db902195468b8249c432252a6b281db836 +Author: Lasse Collin +Date: Fri Jun 28 18:09:47 2013 +0300 + + xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls. + + POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on + error and "other than -1" on success. This is how it is + documented e.g. on OpenBSD too. On Linux, success with + F_SETFL is always 0 (at least accorinding to fcntl(2) + from man-pages 3.51). + +commit 91750dff8f2c654ff636f12a2acdffe5492374b3 +Author: Lasse Collin +Date: Fri Jun 28 17:36:47 2013 +0300 + + xz: Fix use of wrong variable in a fcntl() call. + + Due to a wrong variable name, when writing a sparse file + to standard output, *all* file status flags were cleared + (to the extent the operating system allowed it) instead of + only clearing the O_APPEND flag. In practice this worked + fine in the common situations on GNU/Linux, but I didn't + check how it behaved elsewhere. + + The original flags were still restored correctly. I still + changed the code to use a separate boolean variable to + indicate when the flags should be restored instead of + relying on a special value in stdout_flags. + +commit e11888a79a4a77a69afde60445880d44f63d01aa +Author: Lasse Collin +Date: Wed Jun 26 13:30:57 2013 +0300 + + xz: Check the value of lzma_stream_flags.version in --list. + + It is a no-op for now, but if an old xz version is used + together with a newer liblzma that supports something new, + then this check becomes important and will stop the old xz + from trying to parse files that it won't understand. + +commit f39ddd88f3222219ada88998cf30abfdd3e0e96c +Author: Lasse Collin +Date: Wed Jun 26 12:17:00 2013 +0300 + + Build: Require Automake 1.12 and use serial-tests option. + + It should actually still work with Automake 1.10 if + the serial-tests option is removed. Automake 1.13 started + using parallel tests by default and the option to get + the old behavior isn't supported before 1.12. + + At least for now, parallel tests don't improve anything + in XZ Utils but they hide the progress output from + test_compress.sh. + +commit cb84e278027a90e9827a6f4d3bb0b4d4744a2fbb +Author: Lasse Collin +Date: Sun Jun 23 17:36:47 2013 +0300 + + xz: Validate Uncompressed Size from Block Header in list.c. + + This affects only "xz -lvv". Normal decompression with xz + already detected if Block Header and Index had mismatched + Uncompressed Size fields. So this just makes "xz -lvv" + show such files as corrupt instead of showing the + Uncompressed Size from Index. + +commit f01780fce454c7489f7dcbf806299b50da5f51b7 +Author: Lasse Collin +Date: Wed Jun 26 10:58:58 2013 +0300 + + Update THANKS. + +commit d98ede7d700b892e32d9c2f46563b6ebc566786d +Author: Lasse Collin +Date: Fri Jun 21 22:04:45 2013 +0300 + + xz: Make the man page more friendly to doclifter. + + Thanks to Eric S. Raymond. + +commit 19b447b64b3f520cd5b11429000b092f7c76709b +Author: Lasse Collin +Date: Fri Jun 21 21:54:59 2013 +0300 + + xz: A couple of man page fixes. + + Now the interaction of presets and custom filter chains + is described correctly. Earlier it contradicted itself. + + Thanks to DevHC who reported these issues on IRC to me + on 2012-12-14. + +commit 45edf2966fc9a4d2eae8f84b2fa027fb4fa1df8b +Author: Lasse Collin +Date: Fri Jun 21 21:50:26 2013 +0300 + + xz: Fix interaction between preset and custom filter chains. + + There was somewhat illogical behavior when --extreme was + specified and mixed with custom filter chains. + + Before this commit, "xz -9 --lzma2 -e" was equivalent + to "xz --lzma2". After it is equivalent to "xz -6e" + (all earlier preset options get forgotten when a custom + filter chain is specified and the default preset is 6 + to which -e is applied). I find this less illogical. + + This also affects the meaning of "xz -9e --lzma2 -7". + Earlier it was equivalent to "xz -7e" (the -e specified + before a custom filter chain wasn't forgotten). Now it + is "xz -7". Note that "xz -7e" still is the same as "xz -e7". + + Hopefully very few cared about this in the first place, + so pretty much no one should even notice this change. + + Thanks to Conley Moorhous. + +commit b065984e5a9272eb50bc0c6d3731e6199c0ae8a8 +Author: Lasse Collin +Date: Fri Apr 8 17:53:05 2011 +0300 + + xz: Change size_t to uint32_t in a few places. + +commit 32be621f52f2e1686db88baa7b01dc1ae338f426 +Author: Lasse Collin +Date: Sat Apr 27 22:07:46 2013 +0300 + + Build: Use -Wvla with GCC if supported. + + Variable-length arrays are mandatory in C99 but optional in C11. + The code doesn't currently use any VLAs and it shouldn't in the + future either to stay compatible with C11 without requiring any + optional C11 features. + +commit efb07cfba65e9e05984c02cd796c1b0338ce04dc +Author: Lasse Collin +Date: Mon Apr 15 19:29:09 2013 +0300 + + xzdec: Improve the --help message. + + The options are now ordered in the same order as in xz's help + message. + + Descriptions were added to the options that are ignored. + I left them in parenthesis even if it looks a bit weird + because I find it easier to spot the ignored vs. non-ignored + options from the list that way. + +commit e3c8be13699e2813f5e2879d8187444b46d82d89 +Author: Lasse Collin +Date: Fri Apr 5 19:25:40 2013 +0300 + + Update THANKS. + +commit ad8282efe483612f6b5544f9a0d2e4914fb2532a +Author: Jeff Bastian +Date: Wed Apr 3 13:59:17 2013 +0200 + + xzgrep: make the '-h' option to be --no-filename equivalent + + * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing. + +commit 9271a3eb0e022b23e8712154be851d0afe4c02e4 +Author: Lasse Collin +Date: Fri Apr 5 19:34:09 2013 +0300 + + liblzma: Be less picky in lzma_alone_decoder(). + + To avoid false positives when detecting .lzma files, + rare values in dictionary size and uncompressed size fields + were rejected. They will still be rejected if .lzma files + are decoded with lzma_auto_decoder(), but when using + lzma_alone_decoder() directly, such files will now be accepted. + Hopefully this is an OK compromise. + + This doesn't affect xz because xz still has its own file + format detection code. This does affect lzmadec though. + So after this commit lzmadec will accept files that xz or + xz-emulating-lzma doesn't. + + NOTE: lzma_alone_decoder() still won't decode all .lzma files + because liblzma's LZMA decoder doesn't support lc + lp > 4. + + Reported here: + http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827 + + Conflicts: + src/liblzma/common/alone_decoder.c + src/liblzma/common/alone_decoder.h + +commit 211b931cee58626c1d2e021810cb108cb5cbc10f +Author: Lasse Collin +Date: Tue Mar 5 19:14:50 2013 +0200 + + Avoid unneeded use of awk in xzless. + + Use "read" instead of "awk" in xzless to get the version + number of "less". The need for awk was introduced in + the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e. + + Thanks to Ariel P for the patch. + +commit 9f62fd9605eade23b62b07a235d1f02156f7a5c6 +Author: Jonathan Nieder +Date: Mon Nov 19 00:10:10 2012 -0800 + + xzless: Make "less -V" parsing more robust + + In v4.999.9beta~30 (xzless: Support compressed standard input, + 2009-08-09), xzless learned to parse ‘less -V’ output to figure out + whether less is new enough to handle $LESSOPEN settings starting + with “|-”. That worked well for a while, but the version string from + ‘less’ versions 448 (June, 2012) is misparsed, producing a warning: + + $ xzless /tmp/test.xz; echo $? + /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \ + integer expression expected + 0 + + More precisely, modern ‘less’ lists the regexp implementation along + with its version number, and xzless passes the entire version number + with attached parenthetical phrase as a number to "test $a -gt $b", + producing the above confusing message. + + $ less-444 -V | head -1 + less 444 + $ less -V | head -1 + less 456 (no regular expressions) + + So relax the pattern matched --- instead of expecting "less ", + look for a line of the form "less [ (extra parenthetical)]". + While at it, improve the behavior when no matching line is found --- + instead of producing a cryptic message, we can fall back on a LESSPIPE + setting that is supported by all versions of ‘less’. + + The implementation uses "awk" for simplicity. Hopefully that’s + portable enough. + + Reported-by: Jörg-Volker Peetz + Signed-off-by: Jonathan Nieder + +commit 1d05980f5b5c2c94d833001daccacce4a466876e +Author: Lasse Collin +Date: Wed Oct 3 15:54:24 2012 +0300 + + xz: Fix the note about --rsyncable on the man page. + +commit fb68497333598688d309a92838d91fd560f7e9f0 +Author: Lasse Collin +Date: Fri Sep 28 20:11:09 2012 +0300 + + xz: Improve handling of failed realloc in xrealloc. + + Thanks to Jim Meyering. + +commit 75013db6d4d63c195bd8b8d45729b4be0665a812 +Author: Lasse Collin +Date: Sat Dec 15 20:01:02 2012 +0200 + + A few typo fixes to comments and the xz man page. + + Thanks to Jim Meyering. + +commit e44b21839b1dcbac5097be39b87dd2ddb6e114fd +Author: Lasse Collin +Date: Thu Aug 2 17:13:30 2012 +0300 + + Build: Bump gettext version requirement to 0.18. + + Otherwise too old version of m4/lib-link.m4 gets included + when autoreconf -fi is run. + +commit fd3dbb23ca7e75a7a888d7e897c381dc06308307 +Author: Lasse Collin +Date: Thu Jul 5 07:36:28 2012 +0300 + + Tests: Remove tests/test_block.c that had gotten committed accidentally. + +commit 05a735d279d74af437c31f25f69aded4713c1a3d +Author: Lasse Collin +Date: Thu Jul 5 07:33:35 2012 +0300 + + Build: Include macosx/build.sh in the distribution. + + It has been in the Git repository since 2010 but probably + few people have seen it since it hasn't been included in + the release tarballs. :-( + +commit 4e6d62793b5e7b87edcc93c7ded072c1ecd94173 +Author: Lasse Collin +Date: Thu Jul 5 07:24:45 2012 +0300 + + Docs: Fix the name LZMA Utils -> XZ Utils in debug/README. + +commit dd95b5e7614baf1f07a1316b5106bd616a9efa79 +Author: Lasse Collin +Date: Thu Jul 5 07:23:17 2012 +0300 + + Include debug/translation.bash in the distribution. + + Also fix the script name mentioned in README. + commit 20778053a07eb90c159c1377ca8dc05a90fd530b Author: Lasse Collin Date: Fri Jun 22 14:36:16 2012 +0300 Modified: vendor/xz/dist/README ============================================================================== --- vendor/xz/dist/README Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/README Wed Jul 31 22:54:02 2013 (r253848) @@ -210,8 +210,8 @@ XZ Utils # make -C po update-po make install - bash debug/translations.bash | less - bash debug/translations.bash | less -S # For --list outputs + bash debug/translation.bash | less + bash debug/translation.bash | less -S # For --list outputs Repeat the above as needed (no need to re-run configure though). Modified: vendor/xz/dist/THANKS ============================================================================== --- vendor/xz/dist/THANKS Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/THANKS Wed Jul 31 22:54:02 2013 (r253848) @@ -6,6 +6,7 @@ Some people have helped more, some less, has been important. :-) In alphabetical order: - Mark Adler - H. Peter Anvin + - Jeff Bastian - Nelson H. F. Beebe - Karl Berry - Anders F. Björklund @@ -47,6 +48,7 @@ has been important. :-) In alphabetical - Bela Lubkin - Gregory Margo - Jim Meyering + - Conley Moorhous - Rafał Mużyło - Adrien Nader - Hongbo Ni @@ -58,8 +60,10 @@ has been important. :-) In alphabetical - Diego Elio Pettenò - Elbert Pol - Mikko Pouru + - Pavel Raiskup - Robert Readman - Bernhard Reutner-Fischer + - Eric S. Raymond - Cristian Rodríguez - Christian von Roques - Jukka Salmi Modified: vendor/xz/dist/src/liblzma/api/lzma/version.h ============================================================================== --- vendor/xz/dist/src/liblzma/api/lzma/version.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/api/lzma/version.h Wed Jul 31 22:54:02 2013 (r253848) @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 0 -#define LZMA_VERSION_PATCH 4 +#define LZMA_VERSION_PATCH 5 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT Modified: vendor/xz/dist/src/liblzma/check/sha256.c ============================================================================== --- vendor/xz/dist/src/liblzma/check/sha256.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/check/sha256.c Wed Jul 31 22:54:02 2013 (r253848) @@ -6,7 +6,6 @@ /// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they /// are imported to liblzma, SSE instructions need to be used /// conditionally to keep the code working on older boxes. -/// We could also support using some external libary for SHA-256. // // This code is based on the code found from 7-Zip, which has a modified // version of the SHA-256 found from Crypto++ . Modified: vendor/xz/dist/src/liblzma/common/alone_decoder.c ============================================================================== --- vendor/xz/dist/src/liblzma/common/alone_decoder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/alone_decoder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -26,6 +26,11 @@ struct lzma_coder_s { SEQ_CODE, } sequence; + /// If true, reject files that are unlikely to be .lzma files. + /// If false, more non-.lzma files get accepted and will give + /// LZMA_DATA_ERROR either immediately or after a few output bytes. + bool picky; + /// Position in the header fields size_t pos; @@ -68,13 +73,13 @@ alone_decode(lzma_coder *coder, |= (size_t)(in[*in_pos]) << (coder->pos * 8); if (++coder->pos == 4) { - if (coder->options.dict_size != UINT32_MAX) { + if (coder->picky && coder->options.dict_size + != UINT32_MAX) { // A hack to ditch tons of false positives: // We allow only dictionary sizes that are // 2^n or 2^n + 2^(n-1). LZMA_Alone created // only files with 2^n, but accepts any - // dictionary size. If someone complains, this - // will be reconsidered. + // dictionary size. uint32_t d = coder->options.dict_size - 1; d |= d >> 2; d |= d >> 3; @@ -103,9 +108,9 @@ alone_decode(lzma_coder *coder, // Another hack to ditch false positives: Assume that // if the uncompressed size is known, it must be less - // than 256 GiB. Again, if someone complains, this - // will be reconsidered. - if (coder->uncompressed_size != LZMA_VLI_UNKNOWN + // than 256 GiB. + if (coder->picky + && coder->uncompressed_size != LZMA_VLI_UNKNOWN && coder->uncompressed_size >= (LZMA_VLI_C(1) << 38)) return LZMA_FORMAT_ERROR; @@ -189,7 +194,7 @@ alone_decoder_memconfig(lzma_coder *code extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator, - uint64_t memlimit) + uint64_t memlimit, bool picky) { lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator); @@ -208,6 +213,7 @@ lzma_alone_decoder_init(lzma_next_coder } next->coder->sequence = SEQ_PROPERTIES; + next->coder->picky = picky; next->coder->pos = 0; next->coder->options.dict_size = 0; next->coder->options.preset_dict = NULL; @@ -223,7 +229,7 @@ lzma_alone_decoder_init(lzma_next_coder extern LZMA_API(lzma_ret) lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit) { - lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit); + lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false); strm->internal->supported_actions[LZMA_RUN] = true; strm->internal->supported_actions[LZMA_FINISH] = true; Modified: vendor/xz/dist/src/liblzma/common/alone_decoder.h ============================================================================== --- vendor/xz/dist/src/liblzma/common/alone_decoder.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/alone_decoder.h Wed Jul 31 22:54:02 2013 (r253848) @@ -16,7 +16,8 @@ #include "common.h" -extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, - lzma_allocator *allocator, uint64_t memlimit); +extern lzma_ret lzma_alone_decoder_init( + lzma_next_coder *next, lzma_allocator *allocator, + uint64_t memlimit, bool picky); #endif Modified: vendor/xz/dist/src/liblzma/common/auto_decoder.c ============================================================================== --- vendor/xz/dist/src/liblzma/common/auto_decoder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/auto_decoder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -54,7 +54,7 @@ auto_decode(lzma_coder *coder, lzma_allo coder->memlimit, coder->flags)); } else { return_if_error(lzma_alone_decoder_init(&coder->next, - allocator, coder->memlimit)); + allocator, coder->memlimit, true)); // If the application wants to know about missing // integrity check or about the check in general, we Modified: vendor/xz/dist/src/lzmainfo/lzmainfo.1 ============================================================================== --- vendor/xz/dist/src/lzmainfo/lzmainfo.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/lzmainfo/lzmainfo.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -4,14 +4,14 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH LZMAINFO 1 "2010-09-27" "Tukaani" "XZ Utils" +.TH LZMAINFO 1 "2013-06-30" "Tukaani" "XZ Utils" .SH NAME lzmainfo \- show information stored in the .lzma file header .SH SYNOPSIS .B lzmainfo .RB [ \-\-help ] .RB [ \-\-version ] -.RI [ file ]... +.RI [ file... ] .SH DESCRIPTION .B lzmainfo shows information stored in the Modified: vendor/xz/dist/src/xz/coder.c ============================================================================== --- vendor/xz/dist/src/xz/coder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/coder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -37,15 +37,10 @@ static io_buf in_buf; static io_buf out_buf; /// Number of filters. Zero indicates that we are using a preset. -static size_t filters_count = 0; +static uint32_t filters_count = 0; /// Number of the preset (0-9) -static size_t preset_number = 6; - -/// If a preset is used (no custom filter chain) and preset_extreme is true, -/// a significantly slower compression is used to achieve slightly better -/// compression ratio. -static bool preset_extreme = false; +static uint32_t preset_number = LZMA_PRESET_DEFAULT; /// Integrity check type static lzma_check check; @@ -63,11 +58,9 @@ coder_set_check(lzma_check new_check) } -extern void -coder_set_preset(size_t new_preset) +static void +forget_filter_chain(void) { - preset_number = new_preset; - // Setting a preset makes us forget a possibly defined custom // filter chain. while (filters_count > 0) { @@ -81,9 +74,20 @@ coder_set_preset(size_t new_preset) extern void +coder_set_preset(uint32_t new_preset) +{ + preset_number &= ~LZMA_PRESET_LEVEL_MASK; + preset_number |= new_preset; + forget_filter_chain(); + return; +} + + +extern void coder_set_extreme(void) { - preset_extreme = true; + preset_number |= LZMA_PRESET_EXTREME; + forget_filter_chain(); return; } @@ -98,6 +102,12 @@ coder_add_filter(lzma_vli id, void *opti filters[filters_count].options = options; ++filters_count; + // Setting a custom filter chain makes us forget the preset options. + // This makes a difference if one specifies e.g. "xz -9 --lzma2 -e" + // where the custom filter chain resets the preset level back to + // the default 6, making the example equivalent to "xz -6e". + preset_number = LZMA_PRESET_DEFAULT; + return; } @@ -134,9 +144,6 @@ coder_set_compression_settings(void) } // Get the preset for LZMA1 or LZMA2. - if (preset_extreme) - preset_number |= LZMA_PRESET_EXTREME; - if (lzma_lzma_preset(&opt_lzma, preset_number)) message_bug(); Modified: vendor/xz/dist/src/xz/coder.h ============================================================================== --- vendor/xz/dist/src/xz/coder.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/coder.h Wed Jul 31 22:54:02 2013 (r253848) @@ -46,7 +46,7 @@ extern bool opt_auto_adjust; extern void coder_set_check(lzma_check check); /// Set preset number -extern void coder_set_preset(size_t new_preset); +extern void coder_set_preset(uint32_t new_preset); /// Enable extreme mode extern void coder_set_extreme(void); Modified: vendor/xz/dist/src/xz/file_io.c ============================================================================== --- vendor/xz/dist/src/xz/file_io.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/file_io.c Wed Jul 31 22:54:02 2013 (r253848) @@ -41,9 +41,10 @@ static bool warn_fchown; static bool try_sparse = true; #ifndef TUKLIB_DOSLIKE -/// File status flags of standard output. This is used by io_open_dest() -/// and io_close_dest(). -static int stdout_flags = 0; +/// Original file status flags of standard output. This is used by +/// io_open_dest() and io_close_dest() to save and restore the flags. +static int stdout_flags; +static bool restore_stdout_flags = false; #endif @@ -397,10 +398,6 @@ io_open_src_real(file_pair *pair) was_symlink = true; # elif defined(__NetBSD__) - // As of 2010-09-05, NetBSD doesn't document what errno is - // used with O_NOFOLLOW. It is EFTYPE though, and I - // understood that is very unlikely to change even though - // it is undocumented. if (errno == EFTYPE) was_symlink = true; @@ -441,7 +438,7 @@ io_open_src_real(file_pair *pair) flags &= ~O_NONBLOCK; - if (fcntl(pair->src_fd, F_SETFL, flags)) + if (fcntl(pair->src_fd, F_SETFL, flags) == -1) goto error_msg; } #endif @@ -634,11 +631,11 @@ io_open_dest_real(file_pair *pair) if (!S_ISREG(pair->dest_st.st_mode)) return false; - const int flags = fcntl(STDOUT_FILENO, F_GETFL); - if (flags == -1) + stdout_flags = fcntl(STDOUT_FILENO, F_GETFL); + if (stdout_flags == -1) return false; - if (flags & O_APPEND) { + if (stdout_flags & O_APPEND) { // Creating a sparse file is not possible // when O_APPEND is active (it's used by // shell's >> redirection). As I understand @@ -657,12 +654,14 @@ io_open_dest_real(file_pair *pair) return false; if (fcntl(STDOUT_FILENO, F_SETFL, - stdout_flags & ~O_APPEND)) + stdout_flags & ~O_APPEND) + == -1) return false; - // Remember the flags so that io_close_dest() - // can restore them. - stdout_flags = flags; + // Disabling O_APPEND succeeded. Mark + // that the flags should be restored + // in io_close_dest(). + restore_stdout_flags = true; } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR) != pair->dest_st.st_size) { @@ -703,13 +702,12 @@ io_close_dest(file_pair *pair, bool succ { #ifndef TUKLIB_DOSLIKE // If io_open_dest() has disabled O_APPEND, restore it here. - if (stdout_flags != 0) { + if (restore_stdout_flags) { assert(pair->dest_fd == STDOUT_FILENO); - const int fail = fcntl(STDOUT_FILENO, F_SETFL, stdout_flags); - stdout_flags = 0; + restore_stdout_flags = false; - if (fail) { + if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) { message_error(_("Error restoring the O_APPEND flag " "to standard output: %s"), strerror(errno)); @@ -882,7 +880,7 @@ io_write_buf(file_pair *pair, const uint if (amount == -1) { if (errno == EINTR) { if (user_abort) - return -1; + return true; continue; } Modified: vendor/xz/dist/src/xz/list.c ============================================================================== --- vendor/xz/dist/src/xz/list.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/list.c Wed Jul 31 22:54:02 2013 (r253848) @@ -203,6 +203,20 @@ parse_indexes(xz_file_info *xfi, file_pa goto error; } + // Check that the Stream Footer doesn't specify something + // that we don't support. This can only happen if the xz + // version is older than liblzma and liblzma supports + // something new. + // + // It is enough to check Stream Footer. Stream Header must + // match when it is compared against Stream Footer with + // lzma_stream_flags_compare(). + if (footer_flags.version != 0) { + message_error("%s: %s", pair->src_name, + message_strm(LZMA_OPTIONS_ERROR)); + goto error; + } + // Check that the size of the Index field looks sane. lzma_vli index_size = footer_flags.backward_size; if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) { @@ -429,7 +443,19 @@ parse_block_header(file_pair *pair, cons switch (lzma_block_compressed_size(&block, iter->block.unpadded_size)) { case LZMA_OK: - break; + // Validate also block.uncompressed_size if it is present. + // If it isn't present, there's no need to set it since + // we aren't going to actually decompress the Block; if + // we were decompressing, then we should set it so that + // the Block decoder could validate the Uncompressed Size + // that was stored in the Index. + if (block.uncompressed_size == LZMA_VLI_UNKNOWN + || block.uncompressed_size + == iter->block.uncompressed_size) + break; + + // If the above fails, the file is corrupt so + // LZMA_DATA_ERROR is a good error code. case LZMA_DATA_ERROR: // Free the memory allocated by lzma_block_header_decode(). Modified: vendor/xz/dist/src/xz/util.c ============================================================================== --- vendor/xz/dist/src/xz/util.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/util.c Wed Jul 31 22:54:02 2013 (r253848) @@ -26,9 +26,19 @@ xrealloc(void *ptr, size_t size) { assert(size > 0); + // Save ptr so that we can free it if realloc fails. + // The point is that message_fatal ends up calling stdio functions + // which in some libc implementations might allocate memory from + // the heap. Freeing ptr improves the chances that there's free + // memory for stdio functions if they need it. + void *p = ptr; ptr = realloc(ptr, size); - if (ptr == NULL) - message_fatal("%s", strerror(errno)); + + if (ptr == NULL) { + const int saved_errno = errno; + free(p); + message_fatal("%s", strerror(saved_errno)); + } return ptr; } Modified: vendor/xz/dist/src/xz/xz.1 ============================================================================== --- vendor/xz/dist/src/xz/xz.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/xz.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -5,16 +5,17 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" +.TH XZ 1 "2013-06-21" "Tukaani" "XZ Utils" . .SH NAME xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files . .SH SYNOPSIS .B xz -.RI [ option ]... -.RI [ file ]... -.PP +.RI [ option... ] +.RI [ file... ] +. +.SH COMMAND ALIASES .B unxz is equivalent to .BR "xz \-\-decompress" . @@ -708,7 +709,7 @@ be dramatically higher than that of the DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. -The exact decompressor memory usage is slighly more than +The exact decompressor memory usage is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB. .RE @@ -897,11 +898,14 @@ if threading will be enabled by default. .SS "Custom compressor filter chains" A custom filter chain allows specifying the compression settings in detail instead of relying on -the settings associated to the preset levels. +the settings associated to the presets. When a custom filter chain is specified, -the compression preset level options -(\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR) are -silently ignored. +preset options (\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR) +earlier on the command line are forgotten. +If a preset option is specified +after one or more custom filter chain options, +the new preset takes effect and +the custom filter chain options specified earlier are forgotten. .PP A filter chain is comparable to piping on the command line. When compressing, the uncompressed input goes to the first filter, @@ -934,6 +938,15 @@ Extra commas in are ignored. Every option has a default value, so you need to specify only those you want to change. +.PP +To see the whole filter chain and +.IR options , +use +.B "xz \-vv" +(that is, use +.B \-\-verbose +twice). +This works also for viewing the filter chain options used by presets. .TP \fB\-\-lzma1\fR[\fB=\fIoptions\fR] .PD 0 @@ -976,13 +989,12 @@ The only supported modifier is currently .BR e , which matches .BR \-\-extreme . -The default -.I preset -is -.BR 6 , -from which the default values for the rest of the LZMA1 or LZMA2 +If no +.B preset +is specified, the default values of LZMA1 or LZMA2 .I options -are taken. +are taken from the preset +.BR 6 . .TP .BI dict= size Dictionary (history buffer) @@ -1578,7 +1590,7 @@ is supported only together with .BR \-\-info\-memory , and .BR \-\-list . -It will be supported for normal compression and +It will be supported for compression and decompression in the future. . .SS Version @@ -2179,14 +2191,15 @@ The output can vary even between differe builds of the same XZ Utils version, if different build options are used. .PP -The above means that implementing +The above means that once .B \-\-rsyncable -to create rsyncable -.B .xz -files is not going to happen without -freezing a part of the encoder -implementation, which can then be used with -.BR \-\-rsyncable . +has been implemented, +the resulting files won't necessarily be rsyncable +unless both old and new files have been compressed +with the same xz version. +This problem can be fixed if a part of the encoder +implementation is frozen to keep rsyncable output +stable across xz versions. . .SS "Embedded .xz decompressors" Embedded Modified: vendor/xz/dist/src/xzdec/xzdec.1 ============================================================================== --- vendor/xz/dist/src/xzdec/xzdec.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xzdec/xzdec.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -4,17 +4,17 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZDEC 1 "2010-09-27" "Tukaani" "XZ Utils" +.TH XZDEC 1 "2013-06-30" "Tukaani" "XZ Utils" .SH NAME xzdec, lzmadec \- Small .xz and .lzma decompressors .SH SYNOPSIS .B xzdec -.RI [ option ]... -.RI [ file ]... +.RI [ option... ] +.RI [ file... ] .br .B lzmadec -.RI [ option ]... -.RI [ file ]... +.RI [ option... ] +.RI [ file... ] .SH DESCRIPTION .B xzdec is a liblzma-based decompression-only tool for Modified: vendor/xz/dist/src/xzdec/xzdec.c ============================================================================== --- vendor/xz/dist/src/xzdec/xzdec.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xzdec/xzdec.c Wed Jul 31 22:54:02 2013 (r253848) @@ -62,13 +62,13 @@ help(void) { printf( "Usage: %s [OPTION]... [FILE]...\n" -"Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n" +"Decompress files in the ." TOOL_FORMAT " format to standard output.\n" "\n" -" -c, --stdout (ignored)\n" -" -d, --decompress (ignored)\n" -" -k, --keep (ignored)\n" +" -d, --decompress (ignored, only decompression is supported)\n" +" -k, --keep (ignored, files are never deleted)\n" +" -c, --stdout (ignored, output is always written to standard output)\n" " -q, --quiet specify *twice* to suppress errors\n" -" -Q, --no-warn (ignored)\n" +" -Q, --no-warn (ignored, the exit status 2 is never used)\n" " -h, --help display this help and exit\n" " -V, --version display the version number and exit\n" "\n" From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 2 05:24:01 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76493AA1; Fri, 2 Aug 2013 05:24:01 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62FF024DA; Fri, 2 Aug 2013 05:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r725O1Nj093055; Fri, 2 Aug 2013 05:24:01 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r725NvDn093014; Fri, 2 Aug 2013 05:23:57 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308020523.r725NvDn093014@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 2 Aug 2013 05:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253879 - in vendor/NetBSD/bmake/dist: . mk unit-tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 05:24:01 -0000 Author: sjg Date: Fri Aug 2 05:23:57 2013 New Revision: 253879 URL: http://svnweb.freebsd.org/changeset/base/253879 Log: Import bmake-20130730 - allows folk to supress job tokens. Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/configure vendor/NetBSD/bmake/dist/configure.in vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/job.h vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.1 vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/init.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/lib.mk vendor/NetBSD/bmake/dist/mk/meta2deps.py vendor/NetBSD/bmake/dist/mk/own.mk vendor/NetBSD/bmake/dist/mk/prog.mk vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/unit-tests/Makefile.in vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/ChangeLog Fri Aug 2 05:23:57 2013 (r253879) @@ -1,3 +1,36 @@ +2013-07-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130730 + Merge with NetBSD make, pick up + o Allow suppression of --- job -- tokens by setting + .MAKE.JOB.PREFIX empty. + +2013-07-16 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130716 + Merge with NetBSD make, pick up + o number of gmake compatability tweaks + -w for gmake style entering/leaving messages + if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. + handle MAKEFLAGS containing only letters. + o when overriding a GLOBAL variable on the command line, + delete it from GLOBAL context so -V doesn't show the wrong + value. + +2013-07-06 Simon J. Gerraty + + * configure.in: We don't need MAKE_LEVEL_SAFE anymore. + + * Makefile (MAKE_VERSION): 20130706 + Merge with NetBSD make, pick up + o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is + true so that CompatRunCommand() can use it, to ensure + consistent behavior with jobs mode. + o use MAKE_LEVEL_ENV to define the variable to propagate + .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). + o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of + paths to ignore. + 2013-06-04 Simon J. Gerraty * Makefile (MAKE_VERSION): 20130604 Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/Makefile Fri Aug 2 05:23:57 2013 (r253879) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.14 2013/06/05 04:03:22 sjg Exp $ +# $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130604 +MAKE_VERSION= 20130730 PROG= bmake Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/bmake.1 Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd March 30, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2115,6 +2125,13 @@ for Sprite at Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called .Dq customs . +.Pp +Historically the target/dependency +.Dq FRC +has been used to FoRCe rebuilding (since the target/dependency +does not exist... unless someone creates an +.Dq FRC +file). .Sh BUGS The make Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Fri Aug 2 05:23:57 2013 (r253879) @@ -4,7 +4,7 @@ NNAAMMEE bbmmaakkee -- maintain program dependencies SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] + bbmmaakkee [--BBeeiikkNNnnqqrrssttWWwwXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] [_t_a_r_g_e_t _._._.] @@ -122,6 +122,9 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. + _w Print entering and leaving directory messages, pre and + post processing. + _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -469,7 +472,8 @@ VVAARRIIAABBLLEE AASSSSIIGG _._M_A_K_E_._J_O_B_._P_R_E_F_I_X If bbmmaakkee is run with _j then output for each target is prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. + which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. If + _._M_A_K_E_._J_O_B_._P_R_E_F_I_X is empty, no token is printed. For example: .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] would produce tokens like `---make[1234] target ---' mak- @@ -551,6 +555,12 @@ VVAARRIIAABBLLEE AASSSSIIGG to process the meta files to extract dependency informa- tion. + _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_H_S + Provides a list of path prefixes that should be ignored; + because the contents are expected to change over time. + The default list includes: `_/_d_e_v _/_e_t_c _/_p_r_o_c _/_t_m_p _/_v_a_r_/_r_u_n + _/_v_a_r_/_t_m_p' + _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -818,7 +828,7 @@ VVAARRIIAABBLLEE AASSSSIIGG period. For example. ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - However a single character varaiable is often more readable: + However a single character variable is often more readable: ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} ::UU_n_e_w_v_a_l @@ -1351,6 +1361,10 @@ HHIISSTTOORRYY Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called ``customs''. + Historically the target/dependency ``FRC'' has been used to FoRCe + rebuilding (since the target/dependency does not exist... unless someone + creates an ``FRC'' file). + BBUUGGSS The make syntax is difficult to parse without actually acting of the data. For instance finding the end of a variable use should involve @@ -1360,4 +1374,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 March 30, 2013 NetBSD 5.1 +NetBSD 5.1 July 30, 2013 NetBSD 5.1 Modified: vendor/NetBSD/bmake/dist/compat.c ============================================================================== --- vendor/NetBSD/bmake/dist/compat.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/compat.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -332,18 +332,23 @@ again: * We need to pass the command off to the shell, typically * because the command contains a "meta" character. */ - static const char *shargv[4]; + static const char *shargv[5]; + int shargc; - shargv[0] = shellPath; + shargc = 0; + shargv[shargc++] = shellPath; /* * The following work for any of the builtin shell specs. */ + if (shellErrFlag) { + shargv[shargc++] = shellErrFlag; + } if (DEBUG(SHELL)) - shargv[1] = "-xc"; + shargv[shargc++] = "-xc"; else - shargv[1] = "-c"; - shargv[2] = cmd; - shargv[3] = NULL; + shargv[shargc++] = "-c"; + shargv[shargc++] = cmd; + shargv[shargc++] = NULL; av = shargv; argc = 0; bp = NULL; Modified: vendor/NetBSD/bmake/dist/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/NetBSD/bmake/dist/configure.in ============================================================================== --- vendor/NetBSD/bmake/dist/configure.in Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/configure.in Fri Aug 2 05:23:57 2013 (r253879) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ +dnl $Id: configure.in,v 1.49 2013/07/06 18:25:19 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130706], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute @@ -79,15 +79,6 @@ dnl Executable suffix - normally empty; AC_SUBST(ac_exe_suffix)dnl dnl -dnl Check if /bin/sh will pass .MAKE.LEVEL -echo $ECHO_N "checking if sh will pass .MAKE. variables... $ECHO_C" >&6 -ok=`env .MAKE.LEVEL=1 /bin/sh -c env | grep LEVEL=` -case "$ok" in -"") echo no >&6; CPPFLAGS="${CPPFLAGS} -DNEED_MAKE_LEVEL_SAFE";; -*) echo yes >&6;; -esac - -dnl dnl AC_C_CROSS dnl Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/job.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $ */ +/* $NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -313,6 +313,7 @@ static Shell *commandShell = &shells[DEF const char *shellPath = NULL, /* full pathname of * executable image */ *shellName = NULL; /* last component of shell */ +char *shellErrFlag = NULL; static const char *shellArgv = NULL; /* Custom shell args */ @@ -344,7 +345,7 @@ static Job childExitJob; /* child exit p #define TARG_FMT "%s %s ---\n" /* Default format */ #define MESSAGE(fp, gn) \ - if (maxJobs != 1) \ + if (maxJobs != 1 && targPrefix && *targPrefix) \ (void)fprintf(fp, TARG_FMT, targPrefix, gn->name) static sigset_t caught_signals; /* Set of signals we handle */ @@ -2152,6 +2153,24 @@ Shell_Init(void) if (commandShell->echo == NULL) { commandShell->echo = ""; } + if (commandShell->hasErrCtl && *commandShell->exit) { + if (shellErrFlag && + strcmp(commandShell->exit, &shellErrFlag[1]) != 0) { + free(shellErrFlag); + shellErrFlag = NULL; + } + if (!shellErrFlag) { + int n = strlen(commandShell->exit) + 2; + + shellErrFlag = bmake_malloc(n); + if (shellErrFlag) { + snprintf(shellErrFlag, n, "-%s", commandShell->exit); + } + } + } else if (shellErrFlag) { + free(shellErrFlag); + shellErrFlag = NULL; + } } /*- @@ -2496,6 +2515,8 @@ Job_ParseShell(char *line) commandShell = bmake_malloc(sizeof(Shell)); *commandShell = newShell; } + /* this will take care of shellErrFlag */ + Shell_Init(); } if (commandShell->echoOn && commandShell->echoOff) { Modified: vendor/NetBSD/bmake/dist/job.h ============================================================================== --- vendor/NetBSD/bmake/dist/job.h Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/job.h Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ +/* $NetBSD: job.h,v 1.42 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -243,6 +243,7 @@ typedef struct Shell { extern const char *shellPath; extern const char *shellName; +extern char *shellErrFlag; extern int jobTokensRunning; /* tokens currently "out" */ extern int maxJobs; /* Max jobs we can run */ Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/main.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ +/* $NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -117,17 +117,18 @@ __RCSID("$NetBSD: main.c,v 1.210 2013/03 #include #include #include -#include #include #include #include "wait.h" #include #include +#include #include #include #include #include +#include #include "make.h" #include "hash.h" @@ -163,6 +164,7 @@ Boolean noRecursiveExecute; /* -N flag Boolean keepgoing; /* -k flag */ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ +Boolean enterFlag; /* -w flag */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -184,6 +186,7 @@ char curdir[MAXPATHLEN + 1]; /* Startup char *progname; /* the program name */ char *makeDependfile; pid_t myPid; +int makelevel; Boolean forceJobs = FALSE; @@ -198,6 +201,38 @@ Boolean forceJobs = FALSE; extern Lst parseIncPath; +/* + * For compatibility with the POSIX version of MAKEFLAGS that includes + * all the options with out -, convert flags to -f -l -a -g -s. + */ +static char * +explode(const char *flags) +{ + size_t len; + char *nf, *st; + const char *f; + + if (flags == NULL) + return NULL; + + for (f = flags; *f; f++) + if (!isalpha((unsigned char)*f)) + break; + + if (*f) + return bmake_strdup(flags); + + len = strlen(flags); + st = nf = bmake_malloc(len * 3 + 1); + while (*flags) { + *nf++ = '-'; + *nf++ = *flags++; + *nf++ = ' '; + } + *nf = '\0'; + return st; +} + static void parse_debug_options(const char *argvalue) { @@ -350,7 +385,7 @@ MainParseArgs(int argc, char **argv) Boolean inOption, dashDash = FALSE; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ -#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrst" +#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstw" /* Can't actually use getopt(3) because rescanning is not portable */ getopt_def = OPTFLAGS; @@ -558,6 +593,10 @@ rearg: touchFlag = TRUE; Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL); break; + case 'w': + enterFlag = TRUE; + Var_Append(MAKEFLAGS, "-w", VAR_GLOBAL); + break; case '-': dashDash = TRUE; break; @@ -796,7 +835,7 @@ main(int argc, char **argv) Lst targs; /* target nodes to create -- passed to Make_Init */ Boolean outOfDate = FALSE; /* FALSE if all targets up to date */ struct stat sb, sa; - char *p1, *path, *pwd; + char *p1, *path; char mdpath[MAXPATHLEN]; #ifdef FORCE_MACHINE const char *machine = FORCE_MACHINE; @@ -963,26 +1002,30 @@ main(int argc, char **argv) Var_Set(MAKEOVERRIDES, "", VAR_GLOBAL, 0); Var_Set("MFLAGS", "", VAR_GLOBAL, 0); Var_Set(".ALLTARGETS", "", VAR_GLOBAL, 0); + /* some makefiles need to know this */ + Var_Set(MAKE_LEVEL ".ENV", MAKE_LEVEL_ENV, VAR_CMD, 0); /* * Set some other useful macros */ { - char tmp[64]; - const char *ep; + char tmp[64], *ep; - if (!(ep = getenv(MAKE_LEVEL))) { -#ifdef MAKE_LEVEL_SAFE - if (!(ep = getenv(MAKE_LEVEL_SAFE))) -#endif - ep = "0"; - } - Var_Set(MAKE_LEVEL, ep, VAR_GLOBAL, 0); + makelevel = ((ep = getenv(MAKE_LEVEL_ENV)) && *ep) ? atoi(ep) : 0; + if (makelevel < 0) + makelevel = 0; + snprintf(tmp, sizeof(tmp), "%d", makelevel); + Var_Set(MAKE_LEVEL, tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", myPid); Var_Set(".MAKE.PID", tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", getppid()); Var_Set(".MAKE.PPID", tmp, VAR_GLOBAL, 0); } + if (makelevel > 0) { + char pn[1024]; + snprintf(pn, sizeof(pn), "%s[%d]", progname, makelevel); + progname = bmake_strdup(pn); + } Job_SetPrefix(); #ifdef USE_META @@ -994,7 +1037,9 @@ main(int argc, char **argv) * in a different format). */ #ifdef POSIX - Main_ParseArgLine(getenv("MAKEFLAGS")); + p1 = explode(getenv("MAKEFLAGS")); + Main_ParseArgLine(p1); + free(p1); #else Main_ParseArgLine(getenv("MAKE")); #endif @@ -1011,6 +1056,9 @@ main(int argc, char **argv) MainParseArgs(argc, argv); + if (enterFlag) + printf("%s: Entering directory `%s'\n", progname, curdir); + /* * Verify that cwd is sane. */ @@ -1032,15 +1080,19 @@ main(int argc, char **argv) * MAKEOBJDIRPREFIX is set or MAKEOBJDIR contains a transform. */ #ifndef NO_PWD_OVERRIDE - if (!ignorePWD && - (pwd = getenv("PWD")) != NULL && - getenv("MAKEOBJDIRPREFIX") == NULL) { - const char *makeobjdir = getenv("MAKEOBJDIR"); - - if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { - if (stat(pwd, &sb) == 0 && sa.st_ino == sb.st_ino && - sa.st_dev == sb.st_dev) - (void)strncpy(curdir, pwd, MAXPATHLEN); + if (!ignorePWD) { + char *pwd; + + if ((pwd = getenv("PWD")) != NULL && + getenv("MAKEOBJDIRPREFIX") == NULL) { + const char *makeobjdir = getenv("MAKEOBJDIR"); + + if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { + if (stat(pwd, &sb) == 0 && + sa.st_ino == sb.st_ino && + sa.st_dev == sb.st_dev) + (void)strncpy(curdir, pwd, MAXPATHLEN); + } } } #endif @@ -1328,6 +1380,9 @@ main(int argc, char **argv) Trace_Log(MAKEEND, 0); + if (enterFlag) + printf("%s: Leaving directory `%s'\n", progname, curdir); + Suff_End(); Targ_End(); Arch_End(); @@ -1756,8 +1811,12 @@ execError(const char *af, const char *av static void usage(void) { + char *p; + if ((p = strchr(progname, '[')) != NULL) + *p = '\0'; + (void)fprintf(stderr, -"usage: %s [-BeikNnqrstWX] \n\ +"usage: %s [-BeikNnqrstWwX] \n\ [-C directory] [-D variable] [-d flags] [-f makefile]\n\ [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]\n\ [-V variable] [variable=value] [target ...]\n", progname); Modified: vendor/NetBSD/bmake/dist/make.1 ============================================================================== --- vendor/NetBSD/bmake/dist/make.1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/make.1 Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.215 2013/05/22 19:35:11 christos Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd May 22, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2114,7 +2124,7 @@ machines using a daemon called Historically the target/dependency .Dq FRC has been used to FoRCe rebuilding (since the target/dependency -does not exist... unless someone creates an +does not exist... unless someone creates an .Dq FRC file). .Sh BUGS Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/make.h Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ +/* $NetBSD: make.h,v 1.91 2013/06/18 20:06:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -442,9 +442,8 @@ extern pid_t myPid; #define MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE" #define MAKE_DEPENDFILE ".MAKE.DEPENDFILE" /* .depend */ #define MAKE_MODE ".MAKE.MODE" - -#ifdef NEED_MAKE_LEVEL_SAFE -# define MAKE_LEVEL_SAFE "_MAKE_LEVEL" /* some shells will not pass .MAKE. */ +#ifndef MAKE_LEVEL_ENV +# define MAKE_LEVEL_ENV "MAKELEVEL" #endif /* Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/meta.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.30 2013/05/16 21:56:56 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.32 2013/06/25 00:20:54 sjg Exp $ */ /* * Implement 'meta' mode. @@ -55,7 +55,12 @@ #endif static BuildMon Mybm; /* for compat */ -static Lst metaBailiwick; /* our scope of control */ +static Lst metaBailiwick; /* our scope of control */ +static Lst metaIgnorePaths; /* paths we deliberately ignore */ + +#ifndef MAKE_META_IGNORE_PATHS +#define MAKE_META_IGNORE_PATHS ".MAKE.META.IGNORE_PATHS" +#endif Boolean useMeta = FALSE; static Boolean useFilemon = FALSE; @@ -607,6 +612,17 @@ meta_mode_init(const char *make_mode) if (cp) { str2Lst_Append(metaBailiwick, cp, NULL); } + /* + * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS} + */ + metaIgnorePaths = Lst_Init(FALSE); + Var_Append(MAKE_META_IGNORE_PATHS, + "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL); + cp = Var_Subst(NULL, + "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0); + if (cp) { + str2Lst_Append(metaIgnorePaths, cp, NULL); + } } /* @@ -1110,20 +1126,15 @@ meta_oodate(GNode *gn, Boolean oodate) * be part of the dependencies because * they are _expected_ to change. */ - if (strncmp(p, "/tmp/", 5) == 0 || - (tmplen > 0 && strncmp(p, tmpdir, tmplen) == 0)) - break; - - if (strncmp(p, "/var/", 5) == 0) - break; - - /* Ignore device files. */ - if (strncmp(p, "/dev/", 5) == 0) - break; - - /* Ignore /etc/ files. */ - if (strncmp(p, "/etc/", 5) == 0) + if (*p == '/' && + Lst_ForEach(metaIgnorePaths, prefix_match, p)) { +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: ignoring: %s\n", + p); +#endif break; + } if ((cp = strrchr(p, '/'))) { cp++; Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Fri Aug 2 05:23:57 2013 (r253879) @@ -1,3 +1,18 @@ +2013-07-26 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130726 + some updates from Juniper and FreeBSD + o meta2deps.py: indicate file and line number when we hit parse + errors + also allow @file to provide huge list of .meta files. + * meta2deps.py: add try_parse() to cleanup the above. + +2013-07-16 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130716 + * own.mk: add GPROG as an option + * prog.mk: honor MK_GPROF==yes + 2013-05-10 Simon J. Gerraty * install-mk (MK_VERSION): 20130505 Modified: vendor/NetBSD/bmake/dist/mk/init.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/init.mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/init.mk Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.8 2012/11/11 22:37:02 sjg Exp $ +# $Id: init.mk,v 1.9 2013/07/18 05:46:24 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -36,6 +36,12 @@ COPTS += ${COPTS.${.IMPSRC:T}} CPPFLAGS += ${CPPFLAGS.${.IMPSRC:T}} CPUFLAGS += ${CPUFLAGS.${.IMPSRC:T}} +CC_PG?= -pg +CXX_PG?= ${CC_PG} +CC_PIC?= -DPIC +CXX_PIC?= ${CC_PIC} +PROFFLAGS?= -DGPROF -DPROF + .if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" # this tells lib.mk and prog.mk to not actually build anything _SKIP_BUILD = not building at level 0 Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/install-mk Fri Aug 2 05:23:57 2013 (r253879) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.90 2013/05/11 05:16:26 sjg Exp $ +# $Id: install-mk,v 1.92 2013/07/27 05:37:37 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20130505 +MK_VERSION=20130726 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/mk/lib.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/lib.mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/lib.mk Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.48 2012/11/12 04:08:18 sjg Exp $ +# $Id: lib.mk,v 1.49 2013/07/18 05:46:24 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -146,9 +146,6 @@ LD_shared=${SHLIB_SHFLAGS} MKPICLIB?= yes # sys.mk can override these -CC_PG?=-pg -CC_PIC?=-DPIC - LD_X?=-X LD_x?=-x LD_r?=-r @@ -284,7 +281,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version .if (${LD_X} == "") .c.po: - ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} .cc.po .C.po: ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} @@ -293,14 +290,14 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.po: - @echo ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.po .C.po: - @echo ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} - @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.cc} ${CXX_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.cc} ${CXX_PG} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o @@ -319,7 +316,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET} .S.po .s.po: - ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.so: @@ -335,8 +332,8 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version @rm -f ${.TARGET}.o .S.po .s.po: - @echo ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o Modified: vendor/NetBSD/bmake/dist/mk/meta2deps.py ============================================================================== --- vendor/NetBSD/bmake/dist/mk/meta2deps.py Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/meta2deps.py Fri Aug 2 05:23:57 2013 (r253879) @@ -35,7 +35,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.13 2013/05/11 05:16:26 sjg Exp $ + $Id: meta2deps.py,v 1.15 2013/07/29 20:41:23 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -77,7 +77,7 @@ def resolve(path, cwd, last_dir=None, de """ if path.endswith('/.'): path = path[0:-2] - if path[0] == '/': + if len(path) > 0 and path[0] == '/': return path if path == '.': return cwd @@ -107,10 +107,12 @@ def abspath(path, cwd, last_dir=None, de this gets called a lot, so we try to avoid calling realpath until we know we have something. """ - path = resolve(path, cwd, last_dir, debug, debug_out) - if path and (path.find('./') > 0 or - path.endswith('/..') or - os.path.islink(path)): + rpath = resolve(path, cwd, last_dir, debug, debug_out) + if rpath: + path = rpath + if (path.find('./') > 0 or + path.endswith('/..') or + os.path.islink(path)): return os.path.realpath(path) return path @@ -191,6 +193,7 @@ class MetaFile: self.curdir = getv(conf, 'CURDIR') self.reldir = getv(conf, 'RELDIR') self.dpdeps = getv(conf, 'DPDEPS') + self.line = 0 if not self.conf: # some of the steps below we want to do only once @@ -254,7 +257,7 @@ class MetaFile: self.cwd = os.getcwd() # make sure this is initialized if name: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 2 05:25:11 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA010BD9; Fri, 2 Aug 2013 05:25:11 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E88D24E6; Fri, 2 Aug 2013 05:25:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r725PBSx093315; Fri, 2 Aug 2013 05:25:11 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r725PBwR093314; Fri, 2 Aug 2013 05:25:11 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308020525.r725PBwR093314@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 2 Aug 2013 05:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253880 - vendor/NetBSD/bmake/20130730 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 05:25:11 -0000 Author: sjg Date: Fri Aug 2 05:25:11 2013 New Revision: 253880 URL: http://svnweb.freebsd.org/changeset/base/253880 Log: Tag bmake-20130730 Added: vendor/NetBSD/bmake/20130730/ - copied from r253879, vendor/NetBSD/bmake/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 2 19:12:13 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C016D8F8; Fri, 2 Aug 2013 19:12:13 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB4A22687; Fri, 2 Aug 2013 19:12:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72JCD7j068911; Fri, 2 Aug 2013 19:12:13 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72JCD4r068904; Fri, 2 Aug 2013 19:12:13 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201308021912.r72JCD4r068904@svn.freebsd.org> From: Peter Wemm Date: Fri, 2 Aug 2013 19:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253893 - in vendor/serf/dist: . auth buckets build X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:12:13 -0000 Author: peter Date: Fri Aug 2 19:12:12 2013 New Revision: 253893 URL: http://svnweb.freebsd.org/changeset/base/253893 Log: Import serf-1.3.0 Added: vendor/serf/dist/SConstruct vendor/serf/dist/auth/auth_spnego.c vendor/serf/dist/auth/auth_spnego.h vendor/serf/dist/auth/auth_spnego_gss.c vendor/serf/dist/auth/auth_spnego_sspi.c vendor/serf/dist/build/check.py (contents, props changed) vendor/serf/dist/build/serf.pc.in Deleted: vendor/serf/dist/Makefile.in vendor/serf/dist/auth/auth_kerb.c vendor/serf/dist/auth/auth_kerb.h vendor/serf/dist/auth/auth_kerb_gss.c vendor/serf/dist/auth/auth_kerb_sspi.c vendor/serf/dist/build/apr_common.m4 vendor/serf/dist/build/config.guess vendor/serf/dist/build/config.sub vendor/serf/dist/build/find_apr.m4 vendor/serf/dist/build/find_apu.m4 vendor/serf/dist/build/get-version.sh vendor/serf/dist/build/install.sh vendor/serf/dist/build/serf.def vendor/serf/dist/buildconf vendor/serf/dist/config.layout vendor/serf/dist/configure vendor/serf/dist/configure.in vendor/serf/dist/serf.mak vendor/serf/dist/serf.pc.in vendor/serf/dist/serfmake Modified: vendor/serf/dist/CHANGES vendor/serf/dist/README vendor/serf/dist/auth/auth.c vendor/serf/dist/auth/auth.h vendor/serf/dist/auth/auth_basic.c vendor/serf/dist/auth/auth_digest.c vendor/serf/dist/buckets/aggregate_buckets.c vendor/serf/dist/buckets/buckets.c vendor/serf/dist/buckets/dechunk_buckets.c vendor/serf/dist/buckets/headers_buckets.c vendor/serf/dist/buckets/limit_buckets.c vendor/serf/dist/buckets/request_buckets.c vendor/serf/dist/buckets/response_buckets.c vendor/serf/dist/buckets/simple_buckets.c vendor/serf/dist/buckets/ssl_buckets.c vendor/serf/dist/build/gen_def.py vendor/serf/dist/context.c vendor/serf/dist/incoming.c vendor/serf/dist/outgoing.c vendor/serf/dist/serf.h vendor/serf/dist/serf_bucket_types.h vendor/serf/dist/serf_bucket_util.h vendor/serf/dist/serf_private.h vendor/serf/dist/ssltunnel.c Modified: vendor/serf/dist/CHANGES ============================================================================== --- vendor/serf/dist/CHANGES Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/CHANGES Fri Aug 2 19:12:12 2013 (r253893) @@ -1,4 +1,20 @@ -Serf 1.2.1 [2013-06-03, from /tags/1.2.1] +Serf 1.3.0 [2013-07-23, from /tags/1.3.0] + Fix issue 83: use PATH rather than URI within an ssltunnel (r1952) + Fix issue 108: improved error reporting from the underlying socket (r1951) + NEW: Switch to the SCons build system; retire serfmake, serf.mak, autotools + Improved Basic and Digest authentication: + - remember credentials on a per-server basis + - properly manage authentication realms + - continue functioning when a server sets KeepAlive: off + Windows: add support for NTLM authentication + Improved 2617 compliance: always use strongest authentication (r1968,1971) + Fixed bugs with proxy authentication and SSL tunneling through a proxy + Fixed bugs the response parser (r2032,r2036) + SSL connection performance improvements + Huge expansion of the test suite + + +Serf 1.2.1 [2013-06-03, from /tags/1.2.1, r1906] Fix issue 95: add gssapi switches to configure (r1864, r1900) Fix issue 97: skip mmap bucket if APR_HAS_MMAP is undefined (r1877) Fix issue 100: building against an old Windows Platform SDK (r1881) @@ -19,7 +35,7 @@ Serf 1.2.0 [2013-02-22, from /tags/1.2.0 Fixed issue 93: cleanup-after-fork interferes with parent (r1714) Fixed most of issue 89: Support REAL SPNEGO authentication Enable Negotiate/Kerberos support for proxy servers. - Return error when C-L, chunked, gzip encoded response bodies where + Return error when C-L, chunked, gzip encoded response bodies were truncated (due to aborted connection) (r1688) Add a logging mechanism that can be enabled at compile-time. Don't lookup server address if a proxy was configured. (r1706) Modified: vendor/serf/dist/README ============================================================================== --- vendor/serf/dist/README Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/README Fri Aug 2 19:12:12 2013 (r253893) @@ -14,25 +14,67 @@ kept to a minimum to provide high perfor ---- -Quick guide for the impatient +1. INSTALL - (Unix) - % ./configure - % make - % make install +1.1. SCons build system ----- +serf uses SCons 2.x for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not +have permissions, then you can download and install the "local" +version into your home directory. When installed privately, simply +create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. + +Fetch the scons-local package: + http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz + + +1.2 Building serf + +To build serf: + +$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix + +The switches are recorded into .saved_config, so they only need to be +specified the first time scons is run. + +PREFIX should specify where serf should be installed. PREFIX defaults to +/usr/local. + +The default for the other three switches (APR, APU, OPENSSL) is /usr. + +The build system looks for apr-1-config at $APR/bin/apr-1-config, or +the path should indicate apr-1-config itself. Similarly for the path +to apu-1-config. + +OPENSSL should specify the root of the install (eg. /opt/local). The +includes will be found OPENSSL/include and libraries at OPENSSL/lib. + +If you wish to use VPATH-style builds (where objects are created in a +distinct directory from the source), you can use: + +$ scons -Y /path/to/serf/source + +At any point, the current settings can be examined: + +$ scons --help + + +1.3 Running the test suite + +$ scons check + + +1.4 Installing serf -Building serf from a Subversion checkout (non-packaged releases) +$ scons install -We suggest that you try out 'serfmake'. +Note that the PREFIX variable should have been specified in a previous +invocation of scons (and saved into .saved_config), or it can be +specified on the install command line: - % ./serfmake --prefix=/usr/local/serf --with-apr=/usr/local/apr install +$ scons PREFIX=/some/path install -If you want to use the autoconf build system and are using a Subversion -checkout, you need to run buildconf and have APR and APR-util sources handy. - % ./buildconf --with-apr=/path/to/apr --with-apr-util=/path/to/apr-util - (By default, buildconf will look in . and ../ for apr and apr-util.) +1.4 Cleaning up the build -Then, you can use ./configure, make, etc. +$ scons -c Added: vendor/serf/dist/SConstruct ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/dist/SConstruct Fri Aug 2 19:12:12 2013 (r253893) @@ -0,0 +1,438 @@ +# -*- python -*- +# +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import os +import re + +HEADER_FILES = ['serf.h', + 'serf_bucket_types.h', + 'serf_bucket_util.h', + ] + +# where we save the configuration variables +SAVED_CONFIG = '.saved_config' + +# Variable class that does no validation on the input +def _converter(val): + """ + """ + if val == 'none': + val = [] + else: + val = val.split(',') + return val + +def RawListVariable(key, help, default): + """ + The input parameters describe a 'raw string list' option. This class + accepts a comma separated list and converts it to a space separated + list. + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +# default directories +if sys.platform == 'win32': + default_libdir='..' + default_prefix='Debug' +else: + default_libdir='/usr' + default_prefix='/usr/local' + +opts = Variables(files=[SAVED_CONFIG]) +opts.AddVariables( + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, + PathVariable.PathIsDir), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('APU', + "Path to apu-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('OPENSSL', + "Path to OpenSSL's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('ZLIB', + "Path to zlib's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('GSSAPI', + "Path to GSSAPI's install area", + None, + None), + BoolVariable('DEBUG', + "Enable debugging info and strict compile warnings", + False), + BoolVariable('APR_STATIC', + "Enable using a static compiled APR", + False), + RawListVariable('CC', "Command name or path of the C compiler", None), + RawListVariable('CFLAGS', "Extra flags for the C compiler (comma separated)", + None), + RawListVariable('LIBS', "Extra libraries passed to the linker, " + "e.g. -l (comma separated)", None), + RawListVariable('LINKFLAGS', "Extra flags for the linker (comma separated)", + None), + RawListVariable('CPPFLAGS', "Extra flags for the C preprocessor " + "(comma separated)", None), + ) + +if sys.platform == 'win32': + opts.AddVariables( + # By default SCons builds for the host platform on Windows, when using + # a supported compiler (E.g. VS2010/VS2012). Allow overriding + + # Note that Scons 1.3 only supports this on Windows and only when + # constructing Environment(). Later changes to TARGET_ARCH are ignored + EnumVariable('TARGET_ARCH', + "Platform to build for (x86|x64|win32|x86_64)", + 'x86', + allowed_values=('x86', 'x86_64', 'ia64'), + map={'X86' : 'x86', + 'win32': 'x86', + 'Win32': 'x86', + 'x64' : 'x86_64', + 'X64' : 'x86_64' + }), + + EnumVariable('MSVC_VERSION', + "Visual C++ to use for building (E.g. 11.0, 9.0)", + None, + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + ), + + # We always documented that we handle an install layout, but in fact we + # hardcoded source layouts. Allow disabling this behavior. + # ### Fix default? + BoolVariable('SOURCE_LAYOUT', + "Assume a source layout instead of install layout", + True), + ) + +env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], + ) + +env.Append(BUILDERS = { + 'GenDef' : + Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', + suffix='.def', src_suffix='.h') + }) + +match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' + 'SERF_MINOR_VERSION ([0-9]+).*' + 'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) +MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +env.Append(MAJOR=str(MAJOR)) + +# Calling external programs is okay if we're not cleaning or printing help. +# (cleaning: no sense in fetching information; help: we may not know where +# they are) +CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help')) + + +# HANDLING OF OPTION VARIABLES + +unknown = opts.UnknownVariables() +if unknown: + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) + +apr = str(env['APR']) +apu = str(env['APU']) +zlib = str(env['ZLIB']) +gssapi = env.get('GSSAPI', None) + +if gssapi and os.path.isdir(gssapi): + krb5_config = os.path.join(gssapi, 'bin', 'krb5-config') + if os.path.isfile(krb5_config): + gssapi = krb5_config + env['GSSAPI'] = krb5_config + +debug = env.get('DEBUG', None) +aprstatic = env.get('APR_STATIC', None) + +Help(opts.GenerateHelpText(env)) +opts.Save(SAVED_CONFIG, env) + + +# PLATFORM-SPECIFIC BUILD TWEAKS + +thisdir = os.getcwd() +libdir = '$PREFIX/lib' +incdir = '$PREFIX/include/serf-$MAJOR' + +LIBNAME = 'libserf-${MAJOR}' +if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME +else: + LIBNAMESTATIC = 'serf-${MAJOR}' + +env.Append(RPATH=libdir, + PDB='${TARGET.filebase}.pdb') + +if sys.platform == 'darwin': +# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + # 'man ld' says positive non-zero for the first number, so we add one. + # Mac's interpretation of compatibility is the same as our MINOR version. + env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) + env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + +if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') + env.Append(CCFLAGS=[ + '-Wdeclaration-after-statement', + '-Wmissing-prototypes', + ]) + + ### -Wall is not available on Solaris + if sys.platform != 'sunos5': + env.Append(CCFLAGS='-Wall') + + if debug: + env.Append(CCFLAGS='-g') + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') + + ### works for Mac OS. probably needs to change + env.Append(LIBS=['ssl', 'crypto', 'z', ]) + + if sys.platform == 'sunos5': + env.Append(LIBS='m') +else: + # Warning level 4, no unused argument warnings + env.Append(CCFLAGS=['/W4', '/wd4100']) + + # Choose runtime and optimization + if debug: + # Disable optimizations for debugging, use debug DLL runtime + env.Append(CCFLAGS=['/Od', '/MDd']) + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + # Optimize for speed, use DLL runtime + env.Append(CCFLAGS=['/O2', '/MD']) + env.Append(CPPDEFINES='NDEBUG') + +# PLAN THE BUILD +SHARED_SOURCES = [] +if sys.platform == 'win32': + env.GenDef(['serf.h','serf_bucket_types.h', 'serf_bucket_util.h']) + SHARED_SOURCES.append(['serf.def']) + +SOURCES = Glob('*.c') + Glob('buckets/*.c') + Glob('auth/*.c') + +lib_static = env.StaticLibrary(LIBNAMESTATIC, SOURCES) +lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES) + +if aprstatic: + env.Append(CPPDEFINES=['APR_DECLARE_STATIC', 'APU_DECLARE_STATIC']) + +if sys.platform == 'win32': + env.Append(LIBS=['user32.lib', 'advapi32.lib', 'gdi32.lib', 'ws2_32.lib', + 'crypt32.lib', 'mswsock.lib', 'rpcrt4.lib', 'secur32.lib']) + + # Get apr/apu information into our build + env.Append(CPPDEFINES=['WIN32','WIN32_LEAN_AND_MEAN','NOUSER', + 'NOGDI', 'NONLS','NOCRYPT']) + + if env.get('TARGET_ARCH', None) == 'x86_64': + env.Append(CPPDEFINES=['WIN64']) + + if aprstatic: + apr_libs='apr-1.lib' + apu_libs='aprutil-1.lib' + else: + apr_libs='libapr-1.lib' + apu_libs='libaprutil-1.lib' + + env.Append(LIBS=[apr_libs, apu_libs]) + if not env.get('SOURCE_LAYOUT', None): + env.Append(LIBPATH=['$APR/lib', '$APU/lib'], + CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1']) + elif aprstatic: + env.Append(LIBPATH=['$APR/LibR','$APU/LibR'], + CPPPATH=['$APR/include', '$APU/include']) + else: + env.Append(LIBPATH=['$APR/Release','$APU/Release'], + CPPPATH=['$APR/include', '$APU/include']) + + # zlib + env.Append(LIBS='zlib.lib') + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') + else: + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') + + # openssl + env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') + elif 0: # opensslstatic: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') + else: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') +else: + if os.path.isdir(apr): + apr = os.path.join(apr, 'bin', 'apr-1-config') + env['APR'] = apr + if os.path.isdir(apu): + apu = os.path.join(apu, 'bin', 'apu-1-config') + env['APU'] = apu + + ### we should use --cc, but that is giving some scons error about an implict + ### dependency upon gcc. probably ParseConfig doesn't know what to do with + ### the apr-1-config output + if CALLOUT_OKAY: + env.ParseConfig('$APR --cflags --cppflags --ldflags --includes' + ' --link-ld --libs') + env.ParseConfig('$APU --ldflags --includes --link-ld --libs') + + ### there is probably a better way to run/capture output. + ### env.ParseConfig() may be handy for getting this stuff into the build + if CALLOUT_OKAY: + apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip() + apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip() + else: + apr_libs = '' + apu_libs = '' + + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') + + +# If build with gssapi, get its information and define SERF_HAVE_GSSAPI +if gssapi and CALLOUT_OKAY: + env.ParseConfig('$GSSAPI --libs gssapi') + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') +if sys.platform == 'win32': + env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) + +# On Solaris, the -R values that APR describes never make it into actual +# RPATH flags. We'll manually map all directories in LIBPATH into new +# flags to set RPATH values. +if sys.platform == 'sunos5': + for d in env['LIBPATH']: + env.Append(RPATH=d) + +# Set up the construction of serf-*.pc +# TODO: add gssapi libs +pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), + env.File('build/serf.pc.in'), + SUBST_DICT = { + '@MAJOR@': str(MAJOR), + '@PREFIX@': '$PREFIX', + '@INCLUDE_SUBDIR@': 'serf-%d' % (MAJOR,), + '@VERSION@': '%d.%d.%d' % (MAJOR, MINOR, PATCH), + '@LIBS@': '%s %s -lz' % (apu_libs, apr_libs), + }) + +env.Default(lib_static, lib_shared, pkgconfig) + +if CALLOUT_OKAY: + conf = Configure(env) + + ### some configuration stuffs + + env = conf.Finish() + + +# INSTALLATION STUFF + +install_static = env.Install(libdir, lib_static) +install_shared = env.Install(libdir, lib_shared) + +if sys.platform == 'darwin': + install_shared_path = install_shared[0].abspath + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (install_shared_path, + install_shared_path))) + ### construct shared lib symlinks. this also means install the lib + ### as libserf-2.1.0.0.dylib, then add the symlinks. + ### note: see InstallAs + +env.Alias('install-lib', [install_static, install_shared, + ]) +env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) +env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), + pkgconfig)) +env.Alias('install', ['install-lib', 'install-inc', 'install-pc', ]) + + +# TESTS +### make move to a separate scons file in the test/ subdir? + +tenv = env.Clone() + +TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', + 'test_all', 'serf_bwtp' ] +if sys.platform == 'win32': + TEST_EXES = [ os.path.join('test', '%s.exe' % (prog)) for prog in TEST_PROGRAMS ] +else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] + +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + +# Find the (dynamic) library in this directory +tenv.Replace(RPATH=thisdir) +tenv.Prepend(LIBS=[LIBNAMESTATIC, ], + LIBPATH=[thisdir, ]) + +testall_files = [ + 'test/test_all.c', + 'test/CuTest.c', + 'test/test_util.c', + 'test/test_context.c', + 'test/test_buckets.c', + 'test/test_auth.c', + 'test/mock_buckets.c', + 'test/test_ssl.c', + 'test/server/test_server.c', + 'test/server/test_sslserver.c', + ] + +for proggie in TEST_EXES: + if 'test_all' in proggie: + tenv.Program(proggie, testall_files ) + else: + tenv.Program(target = proggie, source = [proggie.replace('.exe','') + '.c']) + + +# HANDLE CLEANING + +if env.GetOption('clean'): + # When we're cleaning, we want the dependency tree to include "everything" + # that could be built. Thus, include all of the tests. + env.Default('check') Modified: vendor/serf/dist/auth/auth.c ============================================================================== --- vendor/serf/dist/auth/auth.c Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/auth/auth.c Fri Aug 2 19:12:12 2013 (r253893) @@ -20,6 +20,7 @@ #include #include #include +#include static apr_status_t default_auth_response_handler(peer_t peer, @@ -32,30 +33,42 @@ default_auth_response_handler(peer_t pee return APR_SUCCESS; } +/* These authentication schemes are in order of decreasing security, the topmost + scheme will be used first when the server supports it. + + Each set of handlers should support both server (401) and proxy (407) + authentication. + + Use lower case for the scheme names to enable case insensitive matching. + */ static const serf__authn_scheme_t serf_authn_schemes[] = { +#ifdef SERF_HAVE_SPNEGO { - 401, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "Negotiate", + "negotiate", + SERF_AUTHN_NEGOTIATE, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#ifdef WIN32 { - 407, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "NTLM", + "ntlm", + SERF_AUTHN_NTLM, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#endif /* #ifdef WIN32 */ +#endif /* SERF_HAVE_SPNEGO */ { - 401, "Digest", + "digest", SERF_AUTHN_DIGEST, serf__init_digest, serf__init_digest_connection, @@ -64,37 +77,15 @@ static const serf__authn_scheme_t serf_a serf__validate_response_digest_auth, }, { - 407, - "Digest", - SERF_AUTHN_DIGEST, - serf__init_digest, - serf__init_digest_connection, - serf__handle_digest_auth, - serf__setup_request_digest_auth, - serf__validate_response_digest_auth, - }, -#ifdef SERF_HAVE_KERB - { - 401, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, - }, - { - 407, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, + "Basic", + "basic", + SERF_AUTHN_BASIC, + serf__init_basic, + serf__init_basic_connection, + serf__handle_basic_auth, + serf__setup_request_basic_auth, + default_auth_response_handler, }, -#endif /* ADD NEW AUTHENTICATION IMPLEMENTATIONS HERE (as they're written) */ /* sentinel */ @@ -102,21 +93,6 @@ static const serf__authn_scheme_t serf_a }; -/** - * Baton passed to the response header callback function - */ -typedef struct { - int code; - apr_status_t status; - const char *header; - serf_request_t *request; - serf_bucket_t *response; - void *baton; - apr_pool_t *pool; - const serf__authn_scheme_t *scheme; - const char *last_scheme_name; -} auth_baton_t; - /* Reads and discards all bytes in the response body. */ static apr_status_t discard_body(serf_bucket_t *response) { @@ -142,99 +118,128 @@ static apr_status_t discard_body(serf_bu * * Returns a non-0 value of a matching handler was found. */ -static int handle_auth_header(void *baton, - const char *key, - const char *header) +static int handle_auth_headers(int code, + void *baton, + apr_hash_t *hdrs, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) { - auth_baton_t *ab = baton; - int scheme_found = FALSE; - const char *auth_name; - const char *auth_attr; - const serf__authn_scheme_t *scheme = NULL; - serf_connection_t *conn = ab->request->conn; + const serf__authn_scheme_t *scheme; + serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + apr_status_t status; - /* We're only interested in xxxx-Authenticate headers. */ - if (strcmp(key, ab->header) != 0) - return 0; - - /* Extract the authentication scheme name, and prepare for reading - the attributes. */ - auth_attr = strchr(header, ' '); - if (auth_attr) { - auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); - ++auth_attr; - } - else - auth_name = header; - - ab->last_scheme_name = auth_name; + status = SERF_ERROR_AUTHN_NOT_SUPPORTED; /* Find the matching authentication handler. Note that we don't reuse the auth scheme stored in the context, as that may have changed. (ex. fallback from ntlm to basic.) */ - for (scheme = serf_authn_schemes; scheme->code != 0; ++scheme) { - if (! (ab->code == scheme->code && - ctx->authn_types & scheme->type)) + for (scheme = serf_authn_schemes; scheme->name != 0; ++scheme) { + const char *auth_hdr; + serf__auth_handler_func_t handler; + serf__authn_info_t *authn_info; + + if (! (ctx->authn_types & scheme->type)) continue; serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, "Client supports: %s\n", scheme->name); - if (strcmp(auth_name, scheme->name) == 0) { - serf__auth_handler_func_t handler = scheme->handle_func; - apr_status_t status = 0; - - serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, - "... matched: %s\n", scheme->name); - /* If this is the first time we use this scheme on this connection, - make sure to initialize the authentication handler first. */ - if (ab->code == 401 && ctx->authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->authn_info.scheme = scheme; - else - ctx->authn_info.scheme = NULL; - } - } - else if (ab->code == 407 && ctx->proxy_authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->proxy_authn_info.scheme = scheme; - else - ctx->proxy_authn_info.scheme = NULL; - } - } + auth_hdr = apr_hash_get(hdrs, scheme->key, APR_HASH_KEY_STRING); + + if (!auth_hdr) + continue; + + /* Found a matching scheme */ + status = APR_SUCCESS; + + handler = scheme->handle_func; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "... matched: %s\n", scheme->name); + + if (code == 401) { + authn_info = serf__get_authn_info_for_server(conn); + } else { + authn_info = &ctx->proxy_authn_info; + } + /* If this is the first time we use this scheme on this context and/or + this connection, make sure to initialize the authentication handler + first. */ + if (authn_info->scheme != scheme) { + status = scheme->init_ctx_func(code, ctx, ctx->pool); if (!status) { - scheme_found = TRUE; - ab->scheme = scheme; - status = handler(ab->code, ab->request, ab->response, - header, auth_attr, ab->baton, ctx->pool); + status = scheme->init_conn_func(scheme, code, conn, + conn->pool); + if (!status) + authn_info->scheme = scheme; + else + authn_info->scheme = NULL; } + } - /* If the authentication fails, cache the error for now. Try the - next available scheme. If there's none raise the error. */ - if (status) { - scheme_found = FALSE; - scheme = NULL; + if (!status) { + const char *auth_attr = strchr(auth_hdr, ' '); + if (auth_attr) { + auth_attr++; } - /* Let the caller now if the authentication setup was succesful - or not. */ - ab->status = status; - break; + status = handler(code, request, response, + auth_hdr, auth_attr, baton, ctx->pool); } + + if (status == APR_SUCCESS) + break; + + /* No success authenticating with this scheme, try the next. + If no more authn schemes are found the status of this scheme will be + returned. + */ + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "%s authentication failed.\n", scheme->name); } - /* If a matching scheme handler was found, we can stop iterating - over the response headers - so return a non-0 value. */ - return scheme_found; + return status; +} + +/** + * Baton passed to the store_header_in_dict callback function + */ +typedef struct { + const char *header; + apr_pool_t *pool; + apr_hash_t *hdrs; +} auth_baton_t; + +static int store_header_in_dict(void *baton, + const char *key, + const char *header) +{ + auth_baton_t *ab = baton; + const char *auth_attr; + char *auth_name, *c; + + /* We're only interested in xxxx-Authenticate headers. */ + if (strcmp(key, ab->header) != 0) + return 0; + + /* Extract the authentication scheme name. */ + auth_attr = strchr(header, ' '); + if (auth_attr) { + auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); + } + else + auth_name = apr_pstrmemdup(ab->pool, header, strlen(header)); + + /* Convert scheme name to lower case to enable case insensitive matching. */ + for (c = auth_name; *c != '\0'; c++) + *c = (char)apr_tolower(*c); + + apr_hash_set(ab->hdrs, auth_name, APR_HASH_KEY_STRING, + apr_pstrdup(ab->pool, header)); + + return 0; } /* Dispatch authentication handling. This function matches the possible @@ -252,11 +257,7 @@ static apr_status_t dispatch_auth(int co auth_baton_t ab = { 0 }; const char *auth_hdr; - ab.code = code; - ab.status = APR_SUCCESS; - ab.request = request; - ab.response = response; - ab.baton = baton; + ab.hdrs = apr_hash_make(pool); ab.pool = pool; /* Before iterating over all authn headers, check if there are any. */ @@ -275,8 +276,8 @@ static apr_status_t dispatch_auth(int co "%s authz required. Response header(s): %s\n", code == 401 ? "Server" : "Proxy", auth_hdr); - /* Iterate over all headers. Try to find a matching authentication scheme - handler. + + /* Store all WWW- or Proxy-Authenticate headers in a dictionary. Note: it is possible to have multiple Authentication: headers. We do not want to combine them (per normal header combination rules) as that @@ -285,15 +286,13 @@ static apr_status_t dispatch_auth(int co work with. */ serf_bucket_headers_do(hdrs, - handle_auth_header, + store_header_in_dict, &ab); - if (ab.status != APR_SUCCESS) - return ab.status; - if (!ab.scheme || ab.scheme->name == NULL) { - /* No matching authentication found. */ - return SERF_ERROR_AUTHN_NOT_SUPPORTED; - } + /* Iterate over all authentication schemes, in order of decreasing + security. Try to find a authentication schema the server support. */ + return handle_auth_headers(code, baton, ab.hdrs, + request, response, pool); } return APR_SUCCESS; @@ -356,28 +355,41 @@ apr_status_t serf__handle_auth_response( /* Requeue the request with the necessary auth headers. */ /* ### Application doesn't know about this request! */ - serf_connection_priority_request_create(request->conn, - request->setup, - request->setup_baton); + if (request->ssltunnel) { + serf__ssltunnel_request_create(request->conn, + request->setup, + request->setup_baton); + } else { + serf_connection_priority_request_create(request->conn, + request->setup, + request->setup_baton); + } return APR_EOF; } else { - /* Validate the response authn headers if needed. */ serf__validate_response_func_t validate_resp; serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + serf__authn_info_t *authn_info; apr_status_t resp_status = APR_SUCCESS; - - if (ctx->authn_info.scheme) { - validate_resp = ctx->authn_info.scheme->validate_response_func; + + + /* Validate the response server authn headers. */ + authn_info = serf__get_authn_info_for_server(conn); + if (authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(HOST, sl.code, conn, request, response, pool); } - if (!resp_status && ctx->proxy_authn_info.scheme) { - validate_resp = ctx->proxy_authn_info.scheme->validate_response_func; + + /* Validate the response proxy authn headers. */ + authn_info = &ctx->proxy_authn_info; + if (!resp_status && authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(PROXY, sl.code, conn, request, response, pool); } + if (resp_status) { /* If there was an error in the final step of the authentication, consider the reponse body as invalid and discard it. */ @@ -419,3 +431,42 @@ void serf__encode_auth_header(const char apr_base64_encode(ptr, data, data_len); } + +const char *serf__construct_realm(peer_t peer, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri Aug 2 19:14:26 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70503A59; Fri, 2 Aug 2013 19:14:26 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC1C269B; Fri, 2 Aug 2013 19:14:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72JEQu1069209; Fri, 2 Aug 2013 19:14:26 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72JEPrl069204; Fri, 2 Aug 2013 19:14:25 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201308021914.r72JEPrl069204@svn.freebsd.org> From: Peter Wemm Date: Fri, 2 Aug 2013 19:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253894 - in vendor/serf/serf-1.3.0: . auth buckets build X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:14:26 -0000 Author: peter Date: Fri Aug 2 19:14:25 2013 New Revision: 253894 URL: http://svnweb.freebsd.org/changeset/base/253894 Log: Tag serf 1.3.0 Added: vendor/serf/serf-1.3.0/ - copied from r253891, vendor/serf/dist/ vendor/serf/serf-1.3.0/SConstruct - copied unchanged from r253893, vendor/serf/dist/SConstruct vendor/serf/serf-1.3.0/auth/auth_spnego.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego.c vendor/serf/serf-1.3.0/auth/auth_spnego.h - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego.h vendor/serf/serf-1.3.0/auth/auth_spnego_gss.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego_gss.c vendor/serf/serf-1.3.0/auth/auth_spnego_sspi.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego_sspi.c vendor/serf/serf-1.3.0/build/check.py - copied unchanged from r253893, vendor/serf/dist/build/check.py vendor/serf/serf-1.3.0/build/serf.pc.in - copied unchanged from r253893, vendor/serf/dist/build/serf.pc.in Replaced: vendor/serf/serf-1.3.0/CHANGES - copied unchanged from r253893, vendor/serf/dist/CHANGES vendor/serf/serf-1.3.0/README - copied unchanged from r253893, vendor/serf/dist/README vendor/serf/serf-1.3.0/auth/auth.c - copied unchanged from r253893, vendor/serf/dist/auth/auth.c vendor/serf/serf-1.3.0/auth/auth.h - copied unchanged from r253893, vendor/serf/dist/auth/auth.h vendor/serf/serf-1.3.0/auth/auth_basic.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_basic.c vendor/serf/serf-1.3.0/auth/auth_digest.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_digest.c vendor/serf/serf-1.3.0/buckets/aggregate_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/aggregate_buckets.c vendor/serf/serf-1.3.0/buckets/buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/buckets.c vendor/serf/serf-1.3.0/buckets/dechunk_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/dechunk_buckets.c vendor/serf/serf-1.3.0/buckets/headers_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/headers_buckets.c vendor/serf/serf-1.3.0/buckets/limit_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/limit_buckets.c vendor/serf/serf-1.3.0/buckets/request_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/request_buckets.c vendor/serf/serf-1.3.0/buckets/response_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/response_buckets.c vendor/serf/serf-1.3.0/buckets/simple_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/simple_buckets.c vendor/serf/serf-1.3.0/buckets/ssl_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/ssl_buckets.c vendor/serf/serf-1.3.0/build/gen_def.py - copied unchanged from r253893, vendor/serf/dist/build/gen_def.py vendor/serf/serf-1.3.0/context.c - copied unchanged from r253893, vendor/serf/dist/context.c vendor/serf/serf-1.3.0/incoming.c - copied unchanged from r253893, vendor/serf/dist/incoming.c vendor/serf/serf-1.3.0/outgoing.c - copied unchanged from r253893, vendor/serf/dist/outgoing.c vendor/serf/serf-1.3.0/serf.h - copied unchanged from r253893, vendor/serf/dist/serf.h vendor/serf/serf-1.3.0/serf_bucket_types.h - copied unchanged from r253893, vendor/serf/dist/serf_bucket_types.h vendor/serf/serf-1.3.0/serf_bucket_util.h - copied unchanged from r253893, vendor/serf/dist/serf_bucket_util.h vendor/serf/serf-1.3.0/serf_private.h - copied unchanged from r253893, vendor/serf/dist/serf_private.h vendor/serf/serf-1.3.0/ssltunnel.c - copied unchanged from r253893, vendor/serf/dist/ssltunnel.c Deleted: vendor/serf/serf-1.3.0/Makefile.in vendor/serf/serf-1.3.0/auth/auth_kerb.c vendor/serf/serf-1.3.0/auth/auth_kerb.h vendor/serf/serf-1.3.0/auth/auth_kerb_gss.c vendor/serf/serf-1.3.0/auth/auth_kerb_sspi.c vendor/serf/serf-1.3.0/build/apr_common.m4 vendor/serf/serf-1.3.0/build/config.guess vendor/serf/serf-1.3.0/build/config.sub vendor/serf/serf-1.3.0/build/find_apr.m4 vendor/serf/serf-1.3.0/build/find_apu.m4 vendor/serf/serf-1.3.0/build/get-version.sh vendor/serf/serf-1.3.0/build/install.sh vendor/serf/serf-1.3.0/build/serf.def vendor/serf/serf-1.3.0/buildconf vendor/serf/serf-1.3.0/config.layout vendor/serf/serf-1.3.0/configure vendor/serf/serf-1.3.0/configure.in vendor/serf/serf-1.3.0/serf.mak vendor/serf/serf-1.3.0/serf.pc.in vendor/serf/serf-1.3.0/serfmake Copied: vendor/serf/serf-1.3.0/CHANGES (from r253893, vendor/serf/dist/CHANGES) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/CHANGES Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/CHANGES) @@ -0,0 +1,214 @@ +Serf 1.3.0 [2013-07-23, from /tags/1.3.0] + Fix issue 83: use PATH rather than URI within an ssltunnel (r1952) + Fix issue 108: improved error reporting from the underlying socket (r1951) + NEW: Switch to the SCons build system; retire serfmake, serf.mak, autotools + Improved Basic and Digest authentication: + - remember credentials on a per-server basis + - properly manage authentication realms + - continue functioning when a server sets KeepAlive: off + Windows: add support for NTLM authentication + Improved 2617 compliance: always use strongest authentication (r1968,1971) + Fixed bugs with proxy authentication and SSL tunneling through a proxy + Fixed bugs the response parser (r2032,r2036) + SSL connection performance improvements + Huge expansion of the test suite + + +Serf 1.2.1 [2013-06-03, from /tags/1.2.1, r1906] + Fix issue 95: add gssapi switches to configure (r1864, r1900) + Fix issue 97: skip mmap bucket if APR_HAS_MMAP is undefined (r1877) + Fix issue 100: building against an old Windows Platform SDK (r1881) + Fix issue 102: digest authentication failures (r1885) + Improve error return values in SSPI authentication (r1804) + Ensure serf-1.pc is constructed by serfmake (r1865) + Optimize SPNego authentication processing (r1868) + Reject certs that application does not like (r1794) + Fix possible endless loop in serf_linebuf_fetch() (r1816) + Windows build: dereference INTDIR in serf.mak (r1882) + + +Serf 1.2.0 [2013-02-22, from /tags/1.2.0, r1726] + Fixed issue 94: Serf can enter an infinite loop when server aborts conn. + Fixed issue 91: Serf doesn't handle an incoming 408 Timeout Request + Fixed issue 80: Serf is not handling Negotiate authentication correctly + Fixed issue 77: Endless loop if server doesn't accept Negotiate authn + Fixed issue 93: cleanup-after-fork interferes with parent (r1714) + Fixed most of issue 89: Support REAL SPNEGO authentication + Enable Negotiate/Kerberos support for proxy servers. + Return error when C-L, chunked, gzip encoded response bodies were + truncated (due to aborted connection) (r1688) + Add a logging mechanism that can be enabled at compile-time. + Don't lookup server address if a proxy was configured. (r1706) + Fix an off-by-one in buffer sizing (r1695) + Disable SSL compression by default + API to enable it (r1692) + New serf_connection_get_latency() for estimated network latency (r1689) + New error code and RFC compliance for the HTTPS tunnel (r1701, r1644) + Handle EINTR when a user suspends and then backgrounds the app (r1708) + Minor fixes and test suite improvements. + + +Serf 1.1.1 [2012-10-04, from /tags/1.1.1, r1657] + Fixed issue 86: ensure requeued requests are correctly handled. + This fixes: + - infinite loop with multiple connection resets or SIGPIPE errors + - "connection" hang where we would not re-queue requests that are + held after we re-connect + Fixed issue 74: test_all goes in an endless loop + Fix memleak when conn. is closed explicitly/due to pool cleanups (r1623) + Windows: Fix https connection aborts (r1628..-30,-33,-34,-37) + Add new error codes for the SSL bucket + + +Serf 1.1.0 [2012-06-07, from /tags/1.1.0, r1617] + New: serf_bucket_request_set_CL() for C-L based, non-chunked requests + New: serf_ssl_server_cert_chain_callback_set() for full-chain validation + + +Serf 1.0.3 [2012-03-20, from /tags/1.0.3, r1586] + Map more OpenSSL errors into SERF_SSL_CERT_UNKNOWNCA (r1573) + + +Serf 1.0.2 + Not released. + + +Serf 1.0.1 [2012-02-15, from /tags/1.0.1, r1569] + FreeBSD fixes in the test suite (r1560, r1565) + Minor build fixes + + +Serf 1.0.0 [2011-07-15, from /tags/1.0.0, r1540] + Fixed issue 38: enable builds using non-GNU make + Fixed issue 49: support SSL tunnels for HTTPS via a proxy + Fixed issue 56: allow Subject Alternative Name, and enable SNI + Fixed issue 61: include order dependencies + Fixed issue 66: improved error reporting when creating install dirs + Fixed issue 71: handle ECONNREFUSED on Windows + Fixed issue 79: destroy the APR allocator, if we create one + Fixed issue 81: build failed on APR 0.9.x + Major performance improvements and bug fixes for SSL buckets/handling (r1462) + Add a new "iovec" bucket type (r1434) + Minimize network packet writes based on ra_serf analysis (r1467, r1471) + Fix out of order issue with multiple priority requests (r1469) + Work around broken WSAPoll() impl on Windows introduced in APR 1.4.0 (r1506) + Fix 100% CPU usage with many pipelined requests (r1456) + Corrected contents of build/serf.def; it now includes bucket types (r1512) + Removed "snapshot" feature from buckets (r1503) + Various improvements to the test system + Various memory leak fixes + + +Serf 0.7.2 [2011-03-12, from /tags/0.7.2, r1452] + Actually disable Nagle when creating a connection (r1441) + Return error when app asks for HTTPS over proxy connection (r1433) + + +Serf 0.7.1 [2011-01-25, from /tags/0.7.1, r1432] + Fix memory leak when using SSL (r1408, r1416) + Fix build for blank apr-util directory (r1421) + + +Serf 0.7.0 [2010-08-25, from /tags/0.7.0, r1407] + Fix double free abort when destroying request buckets + Fix test server in unit test framework to avoid random test failures + Allow older Serf programs which don't use the new authn framework to still + handle authn without forcing them to switch to the new framework. (r1401) + Remove the SERF_DECLARE macros, preferring a .DEF file for Windows + Barrier buckets now pass read_iovec to their wrapped bucket + Fix HTTP header parsing to allow for empty header values + + +Serf 0.6.1 [2010-05-14, from /tags/0.6.1, r1370] + Generally: this release fixes problems with the 0.4.0 packaging + Small compilation fix in outgoing.c for Windows builds + + +Serf 0.6.0 + Not released. + + +Serf 0.5.0 + Not released. + + +Serf 0.4.0 + WITHDRAWN: this release misstated itself as 0.5.0; use a later release + + Provide authn framework, supporting Basic, Digest, Kerberos (SSPI, GSS), + along with proxy authn using Basic or Digest + Added experimental listener framework, along with test_server.c + Improvements and fixes to SSL support, including connection setup changes + Experimental support for unrequested, arriving ("async") responses + Experimental BWTP support using the async arrival feature + Headers are combined on read (not write), to ease certian classes of parsing + Experimental feature on aggregate buckets for a callback-on-empty + Fix the bucket allocator for when APR is using its pool debugging features + Proxy support in the serf_get testing utility + Fix to include the port number in the Host header + serf_get propagates errors from the response, instead of aborting (Issue 52) + Added serf_lib_version() for runtime version tests + + +Serf 0.3.1 [2010-02-14, from /tags/0.3.1, r1322] + Fix loss of error on request->setup() callback. (Issue 47) + Support APR 2.x. (Issue 48) + Fixed slowdown in aggregate bucket with millions of child buckets + Avoid hang in apr_pollset_poll() by unclosed connections after fork() + + +Serf 0.3.0 [2009-01-26, from /tags/0.3.0, r1217] + Support LTFLAGS override as a config-time env. variable (Issue 44) + Fix CUTest test harness compilation on Solaris (Issue 43) + Fix small race condition in OpenSSL initialization (Issue 39) + Handle content streams larger than 4GB on 32-bit OSes (Issue 41) + Fix test_ssl.c compilation with mingw+msys + Fix conn close segfault by explicitly closing conn when pool is destroyed + Expose the depth of the SSL certificate so the validator can use that info + Fix socket address family issue when opening a connection to a proxy + Provide new API to take snapshots of buckets + Implement snapshot API for simple and aggregate buckets + Build with bundled apr and apr-util VPATH builds + Build with bundled OpenSSL builds + + +Serf 0.2.0 [2008-06-06, from /tags/0.2.0, r1189] + Enable use of external event loop: serf_create_context_ex + Enable adding new requests at the beginning of the request queue + Handle 'Connection:close' headers + Enable limiting the number of outstanding requests + Add readline function to simple buckets + Concatenate repeated headers using comma as separator, as per RFC 2616, + section 4.2. (Issue 29) + Add proxy server support + Add progress feedback support. (Issue 11) + Provide new API to simplify use of proxy and progress feedback support + Add callback to validate SSL server certificates. (Issue 31) + Add new test framework + Send current version string in the test programs (Issue 21) + Bugfixes: + Fix segfault with epoll when removing a NULL socket + Reset OpenSSL thread-safety callbacks when apr_terminate() called + Do not remove the socket from the pollset on pool cleanup + Do not issue double close on skt w/second one being close(-1) (Issue 33) + + +Serf 0.1.2 [2007-06-18, from /tags/0.1.2, r1115] + Enable thread-safety with OpenSSL (Issue 19) + Teach serfmake to install headers into include/serf-0 + Be more tolerant when servers close the connection without telling us + Do not open the connection until we have requests to deliver + Fix serfmake to produce the library that corresponds to the minor version + Fix a memory leak with the socket bucket (Issue 14) + Fix uninitialized branch in serf_spider (Issue 15) + + +Serf 0.1.1 [2007-05-12, from /tags/0.1.1, r1105] + Add SSL client certificate support + Implement optimized iovec reads for header buckets + Fix up 'make clean' and 'make distclean' (Issues 9, 10) + Add SERF_VERSION_AT_LEAST macro + Remove abort() calls (Issue 13) + + +Serf 0.1.0 [2006-12-14, from /tags/0.1.0, r1087] + Initial packaged release Copied: vendor/serf/serf-1.3.0/README (from r253893, vendor/serf/dist/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/README Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/README) @@ -0,0 +1,80 @@ +Welcome to serf, a high-performance asynchronous HTTP client library. + +The serf library is a C-based HTTP client library built upon the Apache +Portable Runtime (APR) library. It multiplexes connections, running the +read/write communication asynchronously. Memory copies and transformations are +kept to a minimum to provide high performance operation. + + * Status: http://code.google.com/p/serf/wiki/ + * Site: http://code.google.com/p/serf/ + * Code: http://serf.googlecode.com/svn/ + * Issues: http://code.google.com/p/serf/issues/list + * Mail: serf-dev@googlegroups.com + * People: Justin Erenkrantz, Greg Stein + +---- + +1. INSTALL + +1.1. SCons build system + +serf uses SCons 2.x for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not +have permissions, then you can download and install the "local" +version into your home directory. When installed privately, simply +create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. + +Fetch the scons-local package: + http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz + + +1.2 Building serf + +To build serf: + +$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix + +The switches are recorded into .saved_config, so they only need to be +specified the first time scons is run. + +PREFIX should specify where serf should be installed. PREFIX defaults to +/usr/local. + +The default for the other three switches (APR, APU, OPENSSL) is /usr. + +The build system looks for apr-1-config at $APR/bin/apr-1-config, or +the path should indicate apr-1-config itself. Similarly for the path +to apu-1-config. + +OPENSSL should specify the root of the install (eg. /opt/local). The +includes will be found OPENSSL/include and libraries at OPENSSL/lib. + +If you wish to use VPATH-style builds (where objects are created in a +distinct directory from the source), you can use: + +$ scons -Y /path/to/serf/source + +At any point, the current settings can be examined: + +$ scons --help + + +1.3 Running the test suite + +$ scons check + + +1.4 Installing serf + +$ scons install + +Note that the PREFIX variable should have been specified in a previous +invocation of scons (and saved into .saved_config), or it can be +specified on the install command line: + +$ scons PREFIX=/some/path install + + +1.4 Cleaning up the build + +$ scons -c Copied: vendor/serf/serf-1.3.0/SConstruct (from r253893, vendor/serf/dist/SConstruct) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/SConstruct Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/SConstruct) @@ -0,0 +1,438 @@ +# -*- python -*- +# +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import os +import re + +HEADER_FILES = ['serf.h', + 'serf_bucket_types.h', + 'serf_bucket_util.h', + ] + +# where we save the configuration variables +SAVED_CONFIG = '.saved_config' + +# Variable class that does no validation on the input +def _converter(val): + """ + """ + if val == 'none': + val = [] + else: + val = val.split(',') + return val + +def RawListVariable(key, help, default): + """ + The input parameters describe a 'raw string list' option. This class + accepts a comma separated list and converts it to a space separated + list. + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +# default directories +if sys.platform == 'win32': + default_libdir='..' + default_prefix='Debug' +else: + default_libdir='/usr' + default_prefix='/usr/local' + +opts = Variables(files=[SAVED_CONFIG]) +opts.AddVariables( + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, + PathVariable.PathIsDir), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('APU', + "Path to apu-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('OPENSSL', + "Path to OpenSSL's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('ZLIB', + "Path to zlib's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('GSSAPI', + "Path to GSSAPI's install area", + None, + None), + BoolVariable('DEBUG', + "Enable debugging info and strict compile warnings", + False), + BoolVariable('APR_STATIC', + "Enable using a static compiled APR", + False), + RawListVariable('CC', "Command name or path of the C compiler", None), + RawListVariable('CFLAGS', "Extra flags for the C compiler (comma separated)", + None), + RawListVariable('LIBS', "Extra libraries passed to the linker, " + "e.g. -l (comma separated)", None), + RawListVariable('LINKFLAGS', "Extra flags for the linker (comma separated)", + None), + RawListVariable('CPPFLAGS', "Extra flags for the C preprocessor " + "(comma separated)", None), + ) + +if sys.platform == 'win32': + opts.AddVariables( + # By default SCons builds for the host platform on Windows, when using + # a supported compiler (E.g. VS2010/VS2012). Allow overriding + + # Note that Scons 1.3 only supports this on Windows and only when + # constructing Environment(). Later changes to TARGET_ARCH are ignored + EnumVariable('TARGET_ARCH', + "Platform to build for (x86|x64|win32|x86_64)", + 'x86', + allowed_values=('x86', 'x86_64', 'ia64'), + map={'X86' : 'x86', + 'win32': 'x86', + 'Win32': 'x86', + 'x64' : 'x86_64', + 'X64' : 'x86_64' + }), + + EnumVariable('MSVC_VERSION', + "Visual C++ to use for building (E.g. 11.0, 9.0)", + None, + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + ), + + # We always documented that we handle an install layout, but in fact we + # hardcoded source layouts. Allow disabling this behavior. + # ### Fix default? + BoolVariable('SOURCE_LAYOUT', + "Assume a source layout instead of install layout", + True), + ) + +env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], + ) + +env.Append(BUILDERS = { + 'GenDef' : + Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', + suffix='.def', src_suffix='.h') + }) + +match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' + 'SERF_MINOR_VERSION ([0-9]+).*' + 'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) +MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +env.Append(MAJOR=str(MAJOR)) + +# Calling external programs is okay if we're not cleaning or printing help. +# (cleaning: no sense in fetching information; help: we may not know where +# they are) +CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help')) + + +# HANDLING OF OPTION VARIABLES + +unknown = opts.UnknownVariables() +if unknown: + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) + +apr = str(env['APR']) +apu = str(env['APU']) +zlib = str(env['ZLIB']) +gssapi = env.get('GSSAPI', None) + +if gssapi and os.path.isdir(gssapi): + krb5_config = os.path.join(gssapi, 'bin', 'krb5-config') + if os.path.isfile(krb5_config): + gssapi = krb5_config + env['GSSAPI'] = krb5_config + +debug = env.get('DEBUG', None) +aprstatic = env.get('APR_STATIC', None) + +Help(opts.GenerateHelpText(env)) +opts.Save(SAVED_CONFIG, env) + + +# PLATFORM-SPECIFIC BUILD TWEAKS + +thisdir = os.getcwd() +libdir = '$PREFIX/lib' +incdir = '$PREFIX/include/serf-$MAJOR' + +LIBNAME = 'libserf-${MAJOR}' +if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME +else: + LIBNAMESTATIC = 'serf-${MAJOR}' + +env.Append(RPATH=libdir, + PDB='${TARGET.filebase}.pdb') + +if sys.platform == 'darwin': +# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + # 'man ld' says positive non-zero for the first number, so we add one. + # Mac's interpretation of compatibility is the same as our MINOR version. + env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) + env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + +if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') + env.Append(CCFLAGS=[ + '-Wdeclaration-after-statement', + '-Wmissing-prototypes', + ]) + + ### -Wall is not available on Solaris + if sys.platform != 'sunos5': + env.Append(CCFLAGS='-Wall') + + if debug: + env.Append(CCFLAGS='-g') + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') + + ### works for Mac OS. probably needs to change + env.Append(LIBS=['ssl', 'crypto', 'z', ]) + + if sys.platform == 'sunos5': + env.Append(LIBS='m') +else: + # Warning level 4, no unused argument warnings + env.Append(CCFLAGS=['/W4', '/wd4100']) + + # Choose runtime and optimization + if debug: + # Disable optimizations for debugging, use debug DLL runtime + env.Append(CCFLAGS=['/Od', '/MDd']) + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + # Optimize for speed, use DLL runtime + env.Append(CCFLAGS=['/O2', '/MD']) + env.Append(CPPDEFINES='NDEBUG') + +# PLAN THE BUILD +SHARED_SOURCES = [] +if sys.platform == 'win32': + env.GenDef(['serf.h','serf_bucket_types.h', 'serf_bucket_util.h']) + SHARED_SOURCES.append(['serf.def']) + +SOURCES = Glob('*.c') + Glob('buckets/*.c') + Glob('auth/*.c') + +lib_static = env.StaticLibrary(LIBNAMESTATIC, SOURCES) +lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES) + +if aprstatic: + env.Append(CPPDEFINES=['APR_DECLARE_STATIC', 'APU_DECLARE_STATIC']) + +if sys.platform == 'win32': + env.Append(LIBS=['user32.lib', 'advapi32.lib', 'gdi32.lib', 'ws2_32.lib', + 'crypt32.lib', 'mswsock.lib', 'rpcrt4.lib', 'secur32.lib']) + + # Get apr/apu information into our build + env.Append(CPPDEFINES=['WIN32','WIN32_LEAN_AND_MEAN','NOUSER', + 'NOGDI', 'NONLS','NOCRYPT']) + + if env.get('TARGET_ARCH', None) == 'x86_64': + env.Append(CPPDEFINES=['WIN64']) + + if aprstatic: + apr_libs='apr-1.lib' + apu_libs='aprutil-1.lib' + else: + apr_libs='libapr-1.lib' + apu_libs='libaprutil-1.lib' + + env.Append(LIBS=[apr_libs, apu_libs]) + if not env.get('SOURCE_LAYOUT', None): + env.Append(LIBPATH=['$APR/lib', '$APU/lib'], + CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1']) + elif aprstatic: + env.Append(LIBPATH=['$APR/LibR','$APU/LibR'], + CPPPATH=['$APR/include', '$APU/include']) + else: + env.Append(LIBPATH=['$APR/Release','$APU/Release'], + CPPPATH=['$APR/include', '$APU/include']) + + # zlib + env.Append(LIBS='zlib.lib') + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') + else: + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') + + # openssl + env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') + elif 0: # opensslstatic: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') + else: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') +else: + if os.path.isdir(apr): + apr = os.path.join(apr, 'bin', 'apr-1-config') + env['APR'] = apr + if os.path.isdir(apu): + apu = os.path.join(apu, 'bin', 'apu-1-config') + env['APU'] = apu + + ### we should use --cc, but that is giving some scons error about an implict + ### dependency upon gcc. probably ParseConfig doesn't know what to do with + ### the apr-1-config output + if CALLOUT_OKAY: + env.ParseConfig('$APR --cflags --cppflags --ldflags --includes' + ' --link-ld --libs') + env.ParseConfig('$APU --ldflags --includes --link-ld --libs') + + ### there is probably a better way to run/capture output. + ### env.ParseConfig() may be handy for getting this stuff into the build + if CALLOUT_OKAY: + apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip() + apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip() + else: + apr_libs = '' + apu_libs = '' + + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') + + +# If build with gssapi, get its information and define SERF_HAVE_GSSAPI +if gssapi and CALLOUT_OKAY: + env.ParseConfig('$GSSAPI --libs gssapi') + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') +if sys.platform == 'win32': + env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) + +# On Solaris, the -R values that APR describes never make it into actual +# RPATH flags. We'll manually map all directories in LIBPATH into new +# flags to set RPATH values. +if sys.platform == 'sunos5': + for d in env['LIBPATH']: + env.Append(RPATH=d) + +# Set up the construction of serf-*.pc +# TODO: add gssapi libs +pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), + env.File('build/serf.pc.in'), + SUBST_DICT = { + '@MAJOR@': str(MAJOR), + '@PREFIX@': '$PREFIX', + '@INCLUDE_SUBDIR@': 'serf-%d' % (MAJOR,), + '@VERSION@': '%d.%d.%d' % (MAJOR, MINOR, PATCH), + '@LIBS@': '%s %s -lz' % (apu_libs, apr_libs), + }) + +env.Default(lib_static, lib_shared, pkgconfig) + +if CALLOUT_OKAY: + conf = Configure(env) + + ### some configuration stuffs + + env = conf.Finish() + + +# INSTALLATION STUFF + +install_static = env.Install(libdir, lib_static) +install_shared = env.Install(libdir, lib_shared) + +if sys.platform == 'darwin': + install_shared_path = install_shared[0].abspath + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (install_shared_path, + install_shared_path))) + ### construct shared lib symlinks. this also means install the lib + ### as libserf-2.1.0.0.dylib, then add the symlinks. + ### note: see InstallAs + +env.Alias('install-lib', [install_static, install_shared, + ]) +env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) +env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), + pkgconfig)) +env.Alias('install', ['install-lib', 'install-inc', 'install-pc', ]) + + +# TESTS +### make move to a separate scons file in the test/ subdir? + +tenv = env.Clone() + +TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', + 'test_all', 'serf_bwtp' ] +if sys.platform == 'win32': + TEST_EXES = [ os.path.join('test', '%s.exe' % (prog)) for prog in TEST_PROGRAMS ] +else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] + +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + +# Find the (dynamic) library in this directory +tenv.Replace(RPATH=thisdir) +tenv.Prepend(LIBS=[LIBNAMESTATIC, ], + LIBPATH=[thisdir, ]) + +testall_files = [ + 'test/test_all.c', + 'test/CuTest.c', + 'test/test_util.c', + 'test/test_context.c', + 'test/test_buckets.c', + 'test/test_auth.c', + 'test/mock_buckets.c', + 'test/test_ssl.c', + 'test/server/test_server.c', + 'test/server/test_sslserver.c', + ] + +for proggie in TEST_EXES: + if 'test_all' in proggie: + tenv.Program(proggie, testall_files ) + else: + tenv.Program(target = proggie, source = [proggie.replace('.exe','') + '.c']) + + +# HANDLE CLEANING + +if env.GetOption('clean'): + # When we're cleaning, we want the dependency tree to include "everything" + # that could be built. Thus, include all of the tests. + env.Default('check') Copied: vendor/serf/serf-1.3.0/auth/auth.c (from r253893, vendor/serf/dist/auth/auth.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/auth/auth.c Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/auth/auth.c) @@ -0,0 +1,472 @@ +/* Copyright 2009 Justin Erenkrantz and Greg Stein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "serf.h" +#include "serf_private.h" +#include "auth.h" + +#include +#include +#include +#include + +static apr_status_t +default_auth_response_handler(peer_t peer, + int code, + serf_connection_t *conn, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) +{ + return APR_SUCCESS; +} + +/* These authentication schemes are in order of decreasing security, the topmost + scheme will be used first when the server supports it. + + Each set of handlers should support both server (401) and proxy (407) + authentication. + + Use lower case for the scheme names to enable case insensitive matching. + */ +static const serf__authn_scheme_t serf_authn_schemes[] = { +#ifdef SERF_HAVE_SPNEGO + { + "Negotiate", + "negotiate", + SERF_AUTHN_NEGOTIATE, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, + }, +#ifdef WIN32 + { + "NTLM", + "ntlm", + SERF_AUTHN_NTLM, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, + }, +#endif /* #ifdef WIN32 */ +#endif /* SERF_HAVE_SPNEGO */ + { + "Digest", + "digest", + SERF_AUTHN_DIGEST, + serf__init_digest, + serf__init_digest_connection, + serf__handle_digest_auth, + serf__setup_request_digest_auth, + serf__validate_response_digest_auth, + }, + { + "Basic", + "basic", + SERF_AUTHN_BASIC, + serf__init_basic, + serf__init_basic_connection, + serf__handle_basic_auth, + serf__setup_request_basic_auth, + default_auth_response_handler, + }, + /* ADD NEW AUTHENTICATION IMPLEMENTATIONS HERE (as they're written) */ + + /* sentinel */ + { 0 } +}; + + +/* Reads and discards all bytes in the response body. */ +static apr_status_t discard_body(serf_bucket_t *response) +{ + apr_status_t status; + const char *data; + apr_size_t len; + + while (1) { + status = serf_bucket_read(response, SERF_READ_ALL_AVAIL, &data, &len); + + if (status) { + return status; + } + + /* feed me */ + } +} + +/** + * handle_auth_header is called for each header in the response. It filters + * out the Authenticate headers (WWW or Proxy depending on what's needed) and + * tries to find a matching scheme handler. + * + * Returns a non-0 value of a matching handler was found. + */ +static int handle_auth_headers(int code, + void *baton, + apr_hash_t *hdrs, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) +{ + const serf__authn_scheme_t *scheme; + serf_connection_t *conn = request->conn; + serf_context_t *ctx = conn->ctx; + apr_status_t status; + + status = SERF_ERROR_AUTHN_NOT_SUPPORTED; + + /* Find the matching authentication handler. + Note that we don't reuse the auth scheme stored in the context, + as that may have changed. (ex. fallback from ntlm to basic.) */ + for (scheme = serf_authn_schemes; scheme->name != 0; ++scheme) { + const char *auth_hdr; + serf__auth_handler_func_t handler; + serf__authn_info_t *authn_info; + + if (! (ctx->authn_types & scheme->type)) + continue; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "Client supports: %s\n", scheme->name); + + auth_hdr = apr_hash_get(hdrs, scheme->key, APR_HASH_KEY_STRING); + + if (!auth_hdr) + continue; + + /* Found a matching scheme */ + status = APR_SUCCESS; + + handler = scheme->handle_func; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "... matched: %s\n", scheme->name); + + if (code == 401) { + authn_info = serf__get_authn_info_for_server(conn); + } else { + authn_info = &ctx->proxy_authn_info; + } + /* If this is the first time we use this scheme on this context and/or + this connection, make sure to initialize the authentication handler + first. */ + if (authn_info->scheme != scheme) { + status = scheme->init_ctx_func(code, ctx, ctx->pool); + if (!status) { + status = scheme->init_conn_func(scheme, code, conn, + conn->pool); + if (!status) + authn_info->scheme = scheme; + else + authn_info->scheme = NULL; + } + } + + if (!status) { + const char *auth_attr = strchr(auth_hdr, ' '); + if (auth_attr) { + auth_attr++; + } + + status = handler(code, request, response, + auth_hdr, auth_attr, baton, ctx->pool); + } + + if (status == APR_SUCCESS) + break; + + /* No success authenticating with this scheme, try the next. + If no more authn schemes are found the status of this scheme will be + returned. + */ + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "%s authentication failed.\n", scheme->name); + } + + return status; +} + +/** + * Baton passed to the store_header_in_dict callback function + */ +typedef struct { + const char *header; + apr_pool_t *pool; + apr_hash_t *hdrs; +} auth_baton_t; + +static int store_header_in_dict(void *baton, + const char *key, + const char *header) +{ + auth_baton_t *ab = baton; + const char *auth_attr; + char *auth_name, *c; + + /* We're only interested in xxxx-Authenticate headers. */ + if (strcmp(key, ab->header) != 0) + return 0; + + /* Extract the authentication scheme name. */ + auth_attr = strchr(header, ' '); + if (auth_attr) { + auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); + } + else + auth_name = apr_pstrmemdup(ab->pool, header, strlen(header)); + + /* Convert scheme name to lower case to enable case insensitive matching. */ + for (c = auth_name; *c != '\0'; c++) + *c = (char)apr_tolower(*c); + + apr_hash_set(ab->hdrs, auth_name, APR_HASH_KEY_STRING, + apr_pstrdup(ab->pool, header)); + + return 0; +} + +/* Dispatch authentication handling. This function matches the possible + authentication mechanisms with those available. Server and proxy + authentication are evaluated separately. */ +static apr_status_t dispatch_auth(int code, + serf_request_t *request, + serf_bucket_t *response, + void *baton, + apr_pool_t *pool) +{ + serf_bucket_t *hdrs; + + if (code == 401 || code == 407) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***