diff -Nru mapcache-1.6.0/CMakeLists.txt mapcache-1.6.1/CMakeLists.txt --- mapcache-1.6.0/CMakeLists.txt 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/CMakeLists.txt 2017-09-29 21:31:13.000000000 +0000 @@ -13,7 +13,7 @@ set (MAPCACHE_VERSION_MAJOR 1) set (MAPCACHE_VERSION_MINOR 6) -set (MAPCACHE_VERSION_REVISION 0) +set (MAPCACHE_VERSION_REVISION 1) if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR lib) diff -Nru mapcache-1.6.0/debian/changelog mapcache-1.6.1/debian/changelog --- mapcache-1.6.0/debian/changelog 2017-07-26 08:11:22.000000000 +0000 +++ mapcache-1.6.1/debian/changelog 2017-11-06 01:47:20.000000000 +0000 @@ -1,14 +1,27 @@ -mapcache (1.6.0-1~xenial1) xenial; urgency=medium +mapcache (1.6.1-1~xenial0) xenial; urgency=medium - * No change build for GDAL 2.2.1 transition. + * No change rebuild for Xenial. - -- Angelos Tzotsos Wed, 26 Jul 2017 10:00:00 +0200 + -- Angelos Tzotsos Mon, 06 Nov 2017 03:00:00 +0200 -mapcache (1.6.0-1~xenial0) xenial; urgency=medium +mapcache (1.6.1-1) unstable; urgency=medium - * No change build for Xenial. + * New upstream release. + * Use pkg-info.mk variables instead of dpkg-parsechangelog output. + * Add autopkgtest to test installability. + * Bump Standards-Version to 4.1.1, no changes. + * Drop spelling-errors.patch, applied upstream. + * Change section for libapache2-mod-mapcache to httpd. + * Update symbols for 1.6.1. - -- Angelos Tzotsos Fri, 02 Jun 2017 19:00:00 +0200 + -- Bas Couwenberg Sat, 30 Sep 2017 09:25:05 +0200 + +mapcache (1.6.0-2) unstable; urgency=medium + + * Update symbols for other architecture. + * Move from experimental to unstable. + + -- Bas Couwenberg Sun, 18 Jun 2017 13:25:52 +0200 mapcache (1.6.0-1) experimental; urgency=medium diff -Nru mapcache-1.6.0/debian/control mapcache-1.6.1/debian/control --- mapcache-1.6.0/debian/control 2017-04-13 16:54:23.000000000 +0000 +++ mapcache-1.6.1/debian/control 2017-09-30 07:25:05.000000000 +0000 @@ -36,7 +36,7 @@ docbook-xsl, docbook-xml, xsltproc -Standards-Version: 3.9.8 +Standards-Version: 4.1.1 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/mapcache.git Vcs-Git: https://anonscm.debian.org/git/pkg-grass/mapcache.git Homepage: http://www.mapserver.org/mapcache/ @@ -104,7 +104,7 @@ Package: libapache2-mod-mapcache Architecture: any -Section: web +Section: httpd Depends: ${shlibs:Depends}, ${misc:Depends} Description: tile caching server - Apache module diff -Nru mapcache-1.6.0/debian/libmapcache1.symbols mapcache-1.6.1/debian/libmapcache1.symbols --- mapcache-1.6.0/debian/libmapcache1.symbols 2017-04-13 16:54:23.000000000 +0000 +++ mapcache-1.6.1/debian/libmapcache1.symbols 2017-09-30 07:25:05.000000000 +0000 @@ -1,4 +1,4 @@ -# SymbolsHelper-Confirmed: 1.6.0 amd64 +# SymbolsHelper-Confirmed: 1.6.1 amd64 libmapcache.so.1 #PACKAGE# #MINVER# EZXML_NIL@Base 1.0.0 _configuration_parse_wms_xml@Base 1.0.0 @@ -135,7 +135,7 @@ mapcache_cache_fallback_create@Base 1.4.0 mapcache_cache_google_create@Base 1.4.0 mapcache_cache_mbtiles_create@Base 1.0.0 - (arch=!armel !armhf !hppa !hurd-i386 !i386 !mips !mipsel !powerpc)mapcache_cache_memcache_create@Base 1.4.1 + mapcache_cache_memcache_create@Base 1.6.0 mapcache_cache_multitier_create@Base 1.4.0 mapcache_cache_rest_create@Base 1.4.0 mapcache_cache_rest_init@Base 1.4.0 @@ -312,6 +312,7 @@ mapcache_util_quadkey_encode@Base 1.6.0 mapcache_util_str_replace@Base 1.0.0 mapcache_util_str_sanitize@Base 1.0.0 + mapcache_util_str_xml_escape@Base 1.6.1 parseCache@Base 1.0.0 parseDimensions@Base 1.0.0 parseFormat@Base 1.0.0 diff -Nru mapcache-1.6.0/debian/patches/series mapcache-1.6.1/debian/patches/series --- mapcache-1.6.0/debian/patches/series 2017-04-13 16:54:23.000000000 +0000 +++ mapcache-1.6.1/debian/patches/series 2017-09-30 07:25:05.000000000 +0000 @@ -1,2 +1 @@ cmake-mapserver-include.patch -spelling-errors.patch diff -Nru mapcache-1.6.0/debian/patches/spelling-errors.patch mapcache-1.6.1/debian/patches/spelling-errors.patch --- mapcache-1.6.0/debian/patches/spelling-errors.patch 2017-04-13 16:54:23.000000000 +0000 +++ mapcache-1.6.1/debian/patches/spelling-errors.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: Fix spelling errors. - * occured -> occurred -Author: Bas Couwenberg -Forwarded: https://github.com/mapserver/mapcache/pull/167 - ---- a/lib/source_gdal.c -+++ b/lib/source_gdal.c -@@ -571,7 +571,7 @@ void _mapcache_source_gdal_render_metati - #endif - - if( eErr != CE_None ) { -- ctx->set_error(ctx, 500,"GDAL I/O error occured"); -+ ctx->set_error(ctx, 500,"GDAL I/O error occurred"); - GDALClose(hDstDS); /* close first this one, as it references hTmpDS or hSrcDS */ - if( hTmpDS ) - GDALClose(hTmpDS); /* references hSrcDS, so close before */ diff -Nru mapcache-1.6.0/debian/rules mapcache-1.6.1/debian/rules --- mapcache-1.6.0/debian/rules 2017-04-13 16:54:23.000000000 +0000 +++ mapcache-1.6.1/debian/rules 2017-09-27 13:14:44.000000000 +0000 @@ -20,8 +20,11 @@ CFLAGS+=$(CPPFLAGS) CFLAGS+=$(LDFLAGS) -MAPCACHE_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://') -BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -) +include /usr/share/dpkg/pkg-info.mk + +UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') + +BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") CMAKE_OPTS:= \ -DCMAKE_INSTALL_PREFIX=/usr \ @@ -97,5 +100,5 @@ dh_install --autodest --list-missing override_dh_makeshlibs: - dh_makeshlibs -- -c0 -v$(MAPCACHE_VERSION) + dh_makeshlibs -- -c0 -v$(UPSTREAM_VERSION) diff -Nru mapcache-1.6.0/debian/tests/control mapcache-1.6.1/debian/tests/control --- mapcache-1.6.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ mapcache-1.6.1/debian/tests/control 2017-09-27 13:15:10.000000000 +0000 @@ -0,0 +1,3 @@ +# Test installability +Depends: @ +Test-Command: /bin/true diff -Nru mapcache-1.6.0/include/mapcache.h mapcache-1.6.1/include/mapcache.h --- mapcache-1.6.0/include/mapcache.h 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/include/mapcache.h 2017-09-29 21:31:13.000000000 +0000 @@ -1341,6 +1341,14 @@ */ char* mapcache_util_str_sanitize(apr_pool_t *pool, const char *str, const char* from, char to); +typedef enum { + MAPCACHE_UTIL_XML_SECTION_TEXT, + MAPCACHE_UTIL_XML_SECTION_ATTRIBUTE, + MAPCACHE_UTIL_XML_SECTION_COMMENT +} mapcache_util_xml_section_type; + +char* mapcache_util_str_xml_escape(apr_pool_t *pool, const char *str, mapcache_util_xml_section_type xml_section_type); + char* mapcache_util_get_tile_dimkey(mapcache_context *ctx, mapcache_tile *tile, char* sanitized_chars, char *sanitize_to); char* mapcache_util_get_tile_key(mapcache_context *ctx, mapcache_tile *tile, char *stemplate, diff -Nru mapcache-1.6.0/lib/cache_tiff.c mapcache-1.6.1/lib/cache_tiff.c --- mapcache-1.6.0/lib/cache_tiff.c 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/lib/cache_tiff.c 2017-09-29 21:31:13.000000000 +0000 @@ -302,7 +302,7 @@ _tiffMapProc, _tiffUnmapProc ); } -static void mapcache_cache_tiff_gdal_error_handler(CPLErr eErr, +static void CPL_STDCALL mapcache_cache_tiff_gdal_error_handler(CPLErr eErr, int error_num, const char* pszMsg) { diff -Nru mapcache-1.6.0/lib/service_wms.c mapcache-1.6.1/lib/service_wms.c --- mapcache-1.6.0/lib/service_wms.c 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/lib/service_wms.c 2017-09-29 21:31:13.000000000 +0000 @@ -1033,9 +1033,7 @@ \"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd\">\n\ \n\ \n\ -\n\ \n\ %s\ "; @@ -1052,7 +1050,9 @@ } } - *err_body = apr_psprintf(ctx->pool,template,msg,exceptions); + *err_body = apr_psprintf(ctx->pool,template, + mapcache_util_str_xml_escape(ctx->pool, msg, MAPCACHE_UTIL_XML_SECTION_TEXT), + exceptions); apr_table_set(headers, "Content-Type", "application/vnd.ogc.se_xml"); } diff -Nru mapcache-1.6.0/lib/service_wmts.c mapcache-1.6.1/lib/service_wmts.c --- mapcache-1.6.0/lib/service_wmts.c 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/lib/service_wmts.c 2017-09-29 21:31:13.000000000 +0000 @@ -1014,7 +1014,9 @@ "",elts[i].key,elts[i].val),NULL); } - *err_body = apr_psprintf(ctx->pool,template,msg,exceptions); + *err_body = apr_psprintf(ctx->pool,template, + mapcache_util_str_xml_escape(ctx->pool, msg, MAPCACHE_UTIL_XML_SECTION_COMMENT), + exceptions); apr_table_set(headers, "Content-Type", "application/xml"); diff -Nru mapcache-1.6.0/lib/source_gdal.c mapcache-1.6.1/lib/source_gdal.c --- mapcache-1.6.0/lib/source_gdal.c 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/lib/source_gdal.c 2017-09-29 21:31:13.000000000 +0000 @@ -571,7 +571,7 @@ #endif if( eErr != CE_None ) { - ctx->set_error(ctx, 500,"GDAL I/O error occured"); + ctx->set_error(ctx, 500,"GDAL I/O error occurred"); GDALClose(hDstDS); /* close first this one, as it references hTmpDS or hSrcDS */ if( hTmpDS ) GDALClose(hTmpDS); /* references hSrcDS, so close before */ diff -Nru mapcache-1.6.0/lib/util.c mapcache-1.6.1/lib/util.c --- mapcache-1.6.0/lib/util.c 2017-04-13 14:05:00.000000000 +0000 +++ mapcache-1.6.1/lib/util.c 2017-09-29 21:31:13.000000000 +0000 @@ -185,6 +185,53 @@ return pstr; } +char* mapcache_util_str_xml_escape(apr_pool_t *pool, const char *str, + mapcache_util_xml_section_type xml_section_type) +{ + int outpos = 0; + char* outstr = apr_pcalloc(pool, 6 * strlen(str) + 1); + for( ; *str != '\0'; str ++ ) { + if( xml_section_type == MAPCACHE_UTIL_XML_SECTION_COMMENT ) { + if( *str == '-' ) { + memcpy(outstr + outpos, "-", 5); + outpos += 5; + } + else { + outstr[outpos] = *str; + outpos ++; + } + } + else { + if( *str == '&' ) { + memcpy(outstr + outpos, "&", 5); + outpos += 5; + } + else if( *str == '<' ) { + memcpy(outstr + outpos, "<", 4); + outpos += 4; + } + else if( *str == '>' ) { + memcpy(outstr + outpos, ">", 4); + outpos += 4; + } + else if( *str == '"' ) { + memcpy(outstr + outpos, """, 6); + outpos += 6; + } + else if( *str == '\'' ) { + /* See https://github.com/mapserver/mapserver/issues/1040 */ + memcpy(outstr + outpos, "'", 5); + outpos += 5; + } + else { + outstr[outpos] = *str; + outpos ++; + } + } + } + return outstr; +} + #if APR_MAJOR_VERSION < 1 || (APR_MAJOR_VERSION < 2 && APR_MINOR_VERSION < 3) APR_DECLARE(apr_table_t *) apr_table_clone(apr_pool_t *p, const apr_table_t *t) {