[SCM] tinyows branch, master, updated. debian/0.9.0-2-40-g0ce88fb
Bas Couwenberg
sebastic at xs4all.nl
Thu Sep 19 00:08:25 UTC 2013
The following commit has been merged in the master branch:
commit ab26f48cac4f495e952e01bc944b53b312282296
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sun Jul 21 15:34:04 2013 +0200
Merge changes from UbuntuGIS PPA.
diff --git a/debian/changelog b/debian/changelog
index 1b03afd..c6bea15 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+tinyows (1.1.0-2) unstable; urgency=low
+
+ * Fix for buffer_copy when loading config from mapfile.
+
+ -- Jerome Villeneuve Larouche <jlarouche at mapgears.com> Thu, 28 Mar 2013 12:11:16 -0400
+
+tinyows (1.1.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Jerome Villeneuve Larouche <jlarouche at mapgears.com> Thu, 20 Dec 2012 15:35:48 -0500
+
tinyows (1.0.0-1) unstable; urgency=low
* New upstream release
diff --git a/debian/control b/debian/control
index 2b83bcc..d4b7f70 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: web
Priority: extra
Maintainer: Pirmin Kalberer <pi_deb at sourcepole.ch>
Uploaders: Intevation GmbH <christopher.bertels at intevation.de>
-Build-Depends: debhelper (>= 7), cdbs, autoconf, libpq-dev, libxml2-dev, libxml2, libfcgi-dev
+Build-Depends: debhelper (>= 7), cdbs, autoconf, libpq-dev, libxml2-dev, libxml2, libfcgi-dev, quilt, postgis, flex
Standards-Version: 3.9.1
Homepage: http://www.tinyows.org
Vcs-Git: git://git.debian.org/pkg-grass/tinyows.git
diff --git a/debian/patches/buffer_copy.patch b/debian/patches/buffer_copy.patch
new file mode 100644
index 0000000..b637392
--- /dev/null
+++ b/debian/patches/buffer_copy.patch
@@ -0,0 +1,553 @@
+--- a/src/mapfile/mapfile.c
++++ b/src/mapfile/mapfile.c
+@@ -34,7 +34,7 @@
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+- * if you want the limit (max/min) macros for int types.
++ * if you want the limit (max/min) macros for int types.
+ */
+ #ifndef __STDC_LIMIT_MACROS
+ #define __STDC_LIMIT_MACROS 1
+@@ -51,7 +51,7 @@
+ typedef signed char flex_int8_t;
+ typedef short int flex_int16_t;
+ typedef int flex_int32_t;
+-typedef unsigned char flex_uint8_t;
++typedef unsigned char flex_uint8_t;
+ typedef unsigned short int flex_uint16_t;
+ typedef unsigned int flex_uint32_t;
+ #endif /* ! C99 */
+@@ -167,7 +167,7 @@
+ #define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+-
++
+ /* Return all but the first "n" matched characters back to the input stream. */
+ #define yyless(n) \
+ do \
+@@ -224,7 +224,7 @@
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+-
++
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+@@ -1065,14 +1065,14 @@
+ #if 0
+ #define OWS_MAP_DBG fprintf(stderr, "State: {%i} %i \n", yy_top_state(), YY_START);
+ #else
+-#define OWS_MAP_DBG
++#define OWS_MAP_DBG
+ #endif
+
+
+ static buffer * mapfile_build_path(ows * o, char * fpath)
+ {
+ buffer * path;
+-
++
+ assert(fpath);
+
+ /* Path is absolute */
+@@ -1083,9 +1083,9 @@
+ path = buffer_init();
+ buffer_copy(path, o->config_file);
+
+- for ( /* empty */ ; path->use ; path->use--)
+- if ((path->buf[path->use] == '/') || (path->buf[path->use] == '\\')) { path->use++ ; break; }
+-
++ for ( /* empty */ ; path->use ; path->use--)
++ if ((path->buf[path->use] == '/') || (path->buf[path->use] == '\\')) { path->use++ ; break; }
++
+ buffer_add_str(path, fpath);
+
+ return path;
+@@ -1162,11 +1162,11 @@
+ enum map_layer_prop_state {
+ MAP_LAYER_NAME,
+ MAP_LAYER_CONNECTION
+-
++
+ };
+
+ /*
+- * Global Vars
++ * Global Vars
+ */
+ ows *map_o = NULL;
+ ows_layer *map_l = NULL;
+@@ -1272,7 +1272,7 @@
+ int i;
+ char *p;
+ ows_geobbox *g;
+-
++
+ /* remove surrounding quotes */
+ if (quotes) {
+ for (p = yytext; *p ; p++); *(--p) = 0; yytext++;
+@@ -1284,20 +1284,20 @@
+ case MAP_MD_UPDATESEQUENCE: return; /* TODO */
+ case MAP_MD_SCHEMAS_LOCATION: return; /* TODO */
+ case MAP_MD_FEATURE_COLLECTION: return; /* TODO */
+- case MAP_MD_ABSTRACT:
++ case MAP_MD_ABSTRACT:
+ map_o->metadata->abstract = buffer_init();
+ buffer_add_str(map_o->metadata->abstract, yytext);
+ return;
+ case MAP_MD_ACCESSCONSTRAINTS:
+ map_o->metadata->access_constraints = buffer_init();
+- buffer_add_str(map_o->metadata->access_constraints, yytext);
++ buffer_add_str(map_o->metadata->access_constraints, yytext);
+ return;
+ case MAP_MD_ENCODING:
+- buffer_add_str(map_o->encoding, yytext);
++ buffer_add_str(map_o->encoding, yytext);
+ return;
+ case MAP_MD_FEES:
+ map_o->metadata->fees = buffer_init();
+- buffer_add_str(map_o->metadata->fees, yytext);
++ buffer_add_str(map_o->metadata->fees, yytext);
+ return;
+ case MAP_MD_KEYWORDLIST:
+ map_o->metadata->keywords = list_explode_str(',', yytext);
+@@ -1494,7 +1494,7 @@
+ buffer_add_str(map_l->ns_prefix, yytext);
+ if (map_l->name->use) {
+ buffer_add_head(map_l->name, ':');
+- buffer_add_head_str(map_l->name, yytext);
++ buffer_add_head_str(map_l->name, yytext);
+ }
+ return;
+ case MAP_LMD_SRS:
+@@ -1549,7 +1549,7 @@
+ buffer_add_str(map_o->metadata->name, yytext);
+ return;
+ }
+-
++
+ }
+
+ static void layer_properties(char * yytext, bool quotes)
+@@ -1588,12 +1588,14 @@
+ buffer_add_str(map_l->storage->schema, "public");
+ if (!map_is_dump) map_l->retrievable=map_l->writable = false;
+
++ map_l->name_prefix = buffer_init();
+ buffer_copy(map_l->name_prefix, map_l->name);
+ if (map_l->ns_prefix->use) {
+ buffer_add_head(map_l->name_prefix, ':');
+ buffer_add_head_str(map_l->name_prefix, map_l->ns_prefix->buf);
+ }
+
++ map_l->name_no_uri = buffer_init();
+ buffer_copy(map_l->name_no_uri, map_l->name);
+ if (map_l->ns_uri->use) {
+ buffer_add_head(map_l->name, ':');
+@@ -1602,7 +1604,7 @@
+
+ ows_layer_list_add(map_o->layers, map_l);
+ }
+-
++
+ map_is_dump = map_is_postgis = false;
+ }
+
+@@ -1743,13 +1745,13 @@
+ static int yy_start_stack_ptr = 0;
+ static int yy_start_stack_depth = 0;
+ static int *yy_start_stack = NULL;
+-
++
+ static void yy_push_state (int new_state );
+-
++
+ static void yy_pop_state (void );
+-
++
+ static int yy_top_state (void );
+-
++
+ /* Amount of stuff to slurp up with each read. */
+ #ifndef YY_READ_BUF_SIZE
+ #define YY_READ_BUF_SIZE 8192
+@@ -1852,7 +1854,7 @@
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+-
++
+ #line 598 "src/mapfile/mapfile.l"
+
+
+@@ -1954,9 +1956,9 @@
+ case 4:
+ YY_RULE_SETUP
+ #line 607 "src/mapfile/mapfile.l"
+-{
++{
+ OWS_MAP_EATLINE
+- if (yy_top_state() == INITIAL && YY_START != MAP) {
++ if (yy_top_state() == INITIAL && YY_START != MAP) {
+ ows_error(map_o, OWS_ERROR_CONFIG_FILE,
+ "MapFile Parse Error", "parse_config_file");
+ yyterminate();}
+@@ -2446,7 +2448,7 @@
+ #line 715 "src/mapfile/mapfile.l"
+ {
+
+- char *p, *q;
++ char *p, *q;
+ buffer *path;
+
+ yy_pop_state(); OWS_MAP_DBG
+@@ -2483,7 +2485,7 @@
+ case 101:
+ YY_RULE_SETUP
+ #line 747 "src/mapfile/mapfile.l"
+-{properties(yytext, false); BEGIN MAP;}
++{properties(yytext, false); BEGIN MAP;}
+ YY_BREAK
+ case 102:
+ /* rule 102 can match eol */
+@@ -2494,7 +2496,7 @@
+ case 103:
+ YY_RULE_SETUP
+ #line 749 "src/mapfile/mapfile.l"
+-{layer_properties(yytext, false); BEGIN LAYER;}
++{layer_properties(yytext, false); BEGIN LAYER;}
+ YY_BREAK
+ case 104:
+ /* rule 104 can match eol */
+@@ -2543,17 +2545,17 @@
+ case YY_STATE_EOF(POINTS):
+ case YY_STATE_EOF(INCLUDE):
+ #line 754 "src/mapfile/mapfile.l"
+-{
++{
+ /* End of main file */
+- if (map_include_stack_ptr == 0 && YY_START == 0) yyterminate();
+-
++ if (map_include_stack_ptr == 0 && YY_START == 0) yyterminate();
++
+ else if (map_include_stack_ptr) {
+ fclose(YY_CURRENT_BUFFER->yy_input_file);
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_switch_to_buffer(map_include_stack[--map_include_stack_ptr]);
+ } else {
+ ows_error(map_o, OWS_ERROR_CONFIG_FILE, "MapFile parse error",
+- "parse_config_file");
++ "parse_config_file");
+ yyterminate();
+ }
+ }
+@@ -2840,7 +2842,7 @@
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+-
++
+ yy_current_state = (yy_start);
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+@@ -2900,7 +2902,7 @@
+
+ {
+ int c;
+-
++
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+@@ -2967,12 +2969,12 @@
+
+ /** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+- *
++ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+ void yyrestart (FILE * input_file )
+ {
+-
++
+ if ( ! YY_CURRENT_BUFFER ){
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+@@ -2985,11 +2987,11 @@
+
+ /** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+- *
++ *
+ */
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ {
+-
++
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * yypop_buffer_state();
+@@ -3029,13 +3031,13 @@
+ /** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+- *
++ *
+ * @return the allocated buffer state.
+ */
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
+ {
+ YY_BUFFER_STATE b;
+-
++
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+@@ -3058,11 +3060,11 @@
+
+ /** Destroy the buffer.
+ * @param b a buffer created with yy_create_buffer()
+- *
++ *
+ */
+ void yy_delete_buffer (YY_BUFFER_STATE b )
+ {
+-
++
+ if ( ! b )
+ return;
+
+@@ -3083,7 +3085,7 @@
+
+ {
+ int oerrno = errno;
+-
++
+ yy_flush_buffer(b );
+
+ b->yy_input_file = file;
+@@ -3099,13 +3101,13 @@
+ }
+
+ b->yy_is_interactive = 0;
+-
++
+ errno = oerrno;
+ }
+
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+- *
++ *
+ */
+ void yy_flush_buffer (YY_BUFFER_STATE b )
+ {
+@@ -3134,7 +3136,7 @@
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+- *
++ *
+ */
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
+ {
+@@ -3164,7 +3166,7 @@
+
+ /** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+- *
++ *
+ */
+ void yypop_buffer_state (void)
+ {
+@@ -3188,7 +3190,7 @@
+ static void yyensure_buffer_stack (void)
+ {
+ yy_size_t num_to_alloc;
+-
++
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+@@ -3201,9 +3203,9 @@
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+-
++
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+-
++
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+@@ -3231,13 +3233,13 @@
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+- *
+- * @return the newly allocated buffer state object.
++ *
++ * @return the newly allocated buffer state object.
+ */
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
+ {
+ YY_BUFFER_STATE b;
+-
++
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+@@ -3266,14 +3268,14 @@
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+- *
++ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * yy_scan_bytes() instead.
+ */
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
+ {
+-
++
+ return yy_scan_bytes(yystr,strlen(yystr) );
+ }
+
+@@ -3281,7 +3283,7 @@
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+- *
++ *
+ * @return the newly allocated buffer state object.
+ */
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+@@ -3289,7 +3291,7 @@
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n, i;
+-
++
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = _yybytes_len + 2;
+ buf = (char *) yyalloc(n );
+@@ -3380,16 +3382,16 @@
+ /* Accessor methods (get/set functions) to struct members. */
+
+ /** Get the current line number.
+- *
++ *
+ */
+ int yyget_lineno (void)
+ {
+-
++
+ return yylineno;
+ }
+
+ /** Get the input stream.
+- *
++ *
+ */
+ FILE *yyget_in (void)
+ {
+@@ -3397,7 +3399,7 @@
+ }
+
+ /** Get the output stream.
+- *
++ *
+ */
+ FILE *yyget_out (void)
+ {
+@@ -3405,7 +3407,7 @@
+ }
+
+ /** Get the length of the current token.
+- *
++ *
+ */
+ yy_size_t yyget_leng (void)
+ {
+@@ -3413,7 +3415,7 @@
+ }
+
+ /** Get the current token.
+- *
++ *
+ */
+
+ char *yyget_text (void)
+@@ -3423,18 +3425,18 @@
+
+ /** Set the current line number.
+ * @param line_number
+- *
++ *
+ */
+ void yyset_lineno (int line_number )
+ {
+-
++
+ yylineno = line_number;
+ }
+
+ /** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+- *
++ *
+ * @see yy_switch_to_buffer
+ */
+ void yyset_in (FILE * in_str )
+@@ -3492,7 +3494,7 @@
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
+ int yylex_destroy (void)
+ {
+-
++
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ yy_delete_buffer(YY_CURRENT_BUFFER );
+@@ -3575,7 +3577,7 @@
+ assert(filename);
+
+ if (!(yyin = fopen(filename, "r"))) {
+- ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open MapFile !",
++ ows_error(o, OWS_ERROR_CONFIG_FILE, "Unable to open MapFile !",
+ "parse_config_file");
+ return;
+ }
+@@ -3588,7 +3590,7 @@
+
+ if (!map_o->encoding->use) buffer_add_str(map_o->encoding, OWS_DEFAULT_XML_ENCODING);
+ if (!map_o->db_encoding->use) buffer_add_str(map_o->db_encoding, OWS_DEFAULT_DB_ENCODING);
+-
++
+ if (map_srid) {
+ for (ln = o->layers->first ; ln ; ln = ln->next)
+ list_add_list(ln->layer->srid, map_srid);
+@@ -3598,14 +3600,14 @@
+ if (map_ns_uri) {
+ for (ln = o->layers->first ; ln ; ln = ln->next)
+ if (!ln->layer->ns_uri->use)
+- buffer_copy(ln->layer->ns_uri, map_ns_uri);
++ buffer_copy(ln->layer->ns_uri, map_ns_uri);
+ buffer_free(map_ns_uri);
+ }
+-
++
+ if (map_ns_prefix) {
+ for (ln = o->layers->first ; ln ; ln = ln->next)
+ if (!ln->layer->ns_prefix->use)
+- buffer_copy(ln->layer->ns_prefix, map_ns_prefix);
++ buffer_copy(ln->layer->ns_prefix, map_ns_prefix);
+ buffer_free(map_ns_prefix);
+ }
+
diff --git a/debian/patches/liborder b/debian/patches/liborder
index 1b2908e..bbb8126 100644
--- a/debian/patches/liborder
+++ b/debian/patches/liborder
@@ -1,12 +1,10 @@
-Index: tinyows-1.0.0/Makefile.in
-===================================================================
---- tinyows-1.0.0.orig/Makefile.in 2012-07-09 23:28:55.889273987 +0200
-+++ tinyows-1.0.0/Makefile.in 2012-07-09 23:29:43.477275074 +0200
+--- a/Makefile.in
++++ b/Makefile.in
@@ -25,7 +25,7 @@
SRC=src/fe/fe_comparison_ops.c src/fe/fe_error.c src/fe/fe_filter.c src/fe/fe_filter_capabilities.c src/fe/fe_function.c src/fe/fe_logical_ops.c src/fe/fe_spatial_ops.c src/mapfile/mapfile.c src/ows/ows_bbox.c src/ows/ows.c src/ows/ows_config.c src/ows/ows_error.c src/ows/ows_geobbox.c src/ows/ows_get_capabilities.c src/ows/ows_layer.c src/ows/ows_metadata.c src/ows/ows_psql.c src/ows/ows_request.c src/ows/ows_srs.c src/ows/ows_storage.c src/ows/ows_version.c src/struct/alist.c src/struct/array.c src/struct/buffer.c src/struct/cgi_request.c src/struct/list.c src/struct/mlist.c src/struct/regexp.c src/wfs/wfs_describe.c src/wfs/wfs_error.c src/wfs/wfs_get_capabilities.c src/wfs/wfs_get_feature.c src/wfs/wfs_request.c src/wfs/wfs_transaction.c src/ows/ows_libxml.c
all:
-- $(CC) $(CFLAGS) $(PGFLAGS) $(XMLFLAGS) $(FCGIFLAGS) $(SVN_FLAGS) $(SRC) -o tinyows -lfl
+- $(CC) -o tinyows $(SRC) $(XMLFLAGS) $(CFLAGS) $(PGFLAGS) $(FCGIFLAGS) $(GIT_FLAGS) -lfl
+ $(CC) $(CFLAGS) $(POSTGIS_INC) $(XML2_INC) $(FCGI_INC) $(SVN_FLAGS) $(SRC) -o tinyows -lfl $(POSTGIS_LIB) $(XML2_LIB) $(FCGI_LIB)
@rm -rf tinyows.dSYM
diff --git a/debian/patches/series b/debian/patches/series
index fd1b72b..9852af8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+buffer_copy.patch
liborder
diff --git a/debian/rules b/debian/rules
index c7eb1b6..4046b4e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,7 @@ configure-stamp:
dh_testdir
# Add here commands to configure the package.
autoconf -o $(CURDIR)/configure $(CURDIR)/configure.in
- $(CURDIR)/configure --prefix=/usr --with-shp2pgsql=/usr/lib/postgresql/9.1/bin/shp2pgsql
+ $(CURDIR)/configure --prefix=/usr --with-shp2pgsql=/usr/bin/shp2pgsql
touch configure-stamp
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
--
A simple WFS-T server
More information about the Pkg-grass-devel
mailing list