diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2012-03-30 20:43:01 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2012-03-30 20:43:01 -0400 |
commit | 246cfeb8b989732222389be34a7fe11091533f09 (patch) | |
tree | f0a250f78670d012325b3ca522f086485188cc24 /debian/patches | |
parent | 7bb481fda9ecb134804b49c2ce77ca28f7eea583 (diff) |
checking in packaging from sqlite3_3.7.11-2.debian.tar.gz
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/02-lemon-snprintf.patch | 83 | ||||
-rw-r--r-- | debian/patches/10-520466-libsqlite3-depends-on-libdl.patch | 41 | ||||
-rw-r--r-- | debian/patches/10-520478-squash-bad-deps.patch | 25 | ||||
-rw-r--r-- | debian/patches/11-update-manpage.patch | 140 | ||||
-rw-r--r-- | debian/patches/20-hurd-locking-style.patch | 38 | ||||
-rw-r--r-- | debian/patches/30-cross.patch | 51 | ||||
-rw-r--r-- | debian/patches/series | 6 |
7 files changed, 384 insertions, 0 deletions
diff --git a/debian/patches/02-lemon-snprintf.patch b/debian/patches/02-lemon-snprintf.patch new file mode 100644 index 0000000..67c8600 --- /dev/null +++ b/debian/patches/02-lemon-snprintf.patch @@ -0,0 +1,83 @@ +--- sqlite3-3.6.10.orig/tool/lemon.c 2010-03-13 17:12:20.004507610 +0000 ++++ sqlite3-3.6.10/tool/lemon.c 2010-03-13 17:25:51.799607483 +0000 +@@ -2347,7 +2347,7 @@ + for(z=psp->filename, nBack=0; *z; z++){ + if( *z=='\\' ) nBack++; + } +- sprintf(zLine, "#line %d ", psp->tokenlineno); ++ snprintf(zLine,sizeof zLine, "#line %d ", psp->tokenlineno); + nLine = lemonStrlen(zLine); + n += nLine + lemonStrlen(psp->filename) + nBack; + } +@@ -2916,7 +2916,7 @@ + while( cfp ){ + char buf[20]; + if( cfp->dot==cfp->rp->nrhs ){ +- sprintf(buf,"(%d)",cfp->rp->index); ++ snprintf(buf,sizeof buf,"(%d)",cfp->rp->index); + fprintf(fp," %5s ",buf); + }else{ + fprintf(fp," "); +@@ -2970,6 +2970,7 @@ + char *pathbufptr; + char *pathbuf; + char *path,*cp; ++ size_t pathsz; + char c; + + #ifdef __WIN32__ +@@ -3087,14 +3121,16 @@ + + cp = strrchr(lemp->filename,'.'); + if( cp ){ +- sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); ++ snprintf(buf,sizeof buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); + }else{ +- sprintf(buf,"%s.lt",lemp->filename); ++ snprintf(buf,sizeof buf,"%s.lt",lemp->filename); + } + if( access(buf,004)==0 ){ + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } +@@ -3106,7 +3109,7 @@ + } + in = fopen(tpltname,"rb"); + if( in==0 ){ +- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); ++ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); + lemp->errorcnt++; + return 0; + } +@@ -3240,7 +3243,7 @@ + while( n-- > 0 ){ + c = *(zText++); + if( c=='%' && n>0 && zText[0]=='d' ){ +- sprintf(zInt, "%d", p1); ++ snprintf(zInt,sizeof zInt, "%d", p1); + p1 = p2; + strcpy(&z[used], zInt); + used += lemonStrlen(&z[used]); +@@ -3856,7 +3859,7 @@ + /* Generate a table containing the symbolic name of every symbol + */ + for(i=0; i<lemp->nsymbol; i++){ +- sprintf(line,"\"%s\",",lemp->symbols[i]->name); ++ snprintf(line,sizeof line,"\"%s\",",lemp->symbols[i]->name); + fprintf(out," %-15s",line); + if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; } + } +@@ -4022,7 +4023,7 @@ + in = file_open(lemp,".h","rb"); + if( in ){ + for(i=1; i<lemp->nterminal && fgets(line,LINESIZE,in); i++){ +- sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); ++ snprintf(pattern,sizeof pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); + if( strcmp(line,pattern) ) break; + } + fclose(in); diff --git a/debian/patches/10-520466-libsqlite3-depends-on-libdl.patch b/debian/patches/10-520466-libsqlite3-depends-on-libdl.patch new file mode 100644 index 0000000..5ed0d04 --- /dev/null +++ b/debian/patches/10-520466-libsqlite3-depends-on-libdl.patch @@ -0,0 +1,41 @@ +--- sqlite3-3.6.11.orig/configure.ac 2009-03-20 16:15:10.000000000 -0700 ++++ sqlite3-3.6.11/configure.ac 2009-03-20 16:37:59.000000000 -0700 +@@ -233,6 +233,38 @@ + AC_SUBST(BUILD_CC) + + ########## ++# Do we want to support load_extension()? ++# ++AC_ARG_ENABLE(load-extension, ++AC_HELP_STRING([--enable-load-extension], ++ [Include SQL functions for loading extension libraries]),, ++ enable_load_extension=auto) ++ ++if test "x$enable_load_extension" = xyes || ++ test "x$enable_load_extension" = xauto; then ++ ++ can_load_extension=yes ++ # libtool will already have looked for <dlfcn.h> ++ if test $ac_cv_header_dlfcn_h = no; then ++ can_load_extension=no ++ else ++ AC_SEARCH_LIBS(dlopen, dl, , [can_load_extension=no]) ++ fi ++elif test "x$enable_load_extension" = xno; then ++ can_load_extension=no ++else ++ AC_MSG_ERROR([invalid argument to --enable-load-extension]) ++fi ++ ++if test $can_load_extension = no; then ++ if test "x$enable_load_extension" = xyes; then ++ AC_MSG_ERROR([<dlfcn.h> routines missing, load_extension() not supported]) ++ fi ++ AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1, ++ [Define if the load_extension() sql function should be omitted.]) ++fi ++ ++########## + # Do we want to support multithreaded use of sqlite + # + AC_ARG_ENABLE(threadsafe, diff --git a/debian/patches/10-520478-squash-bad-deps.patch b/debian/patches/10-520478-squash-bad-deps.patch new file mode 100644 index 0000000..71f6362 --- /dev/null +++ b/debian/patches/10-520478-squash-bad-deps.patch @@ -0,0 +1,25 @@ +--- sqlite3-3.6.11.orig/Makefile.in 2009-03-24 11:40:55.000000000 -0700 ++++ sqlite3-3.6.11/Makefile.in 2009-03-24 11:42:36.000000000 -0700 +@@ -487,18 +487,20 @@ + libsqlite3.la: $(LIBOBJ) + $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \ + ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8" ++ sed -i "/dependency_libs/s/'.*'/''/" $@ + + libtclsqlite3.la: tclsqlite.lo libsqlite3.la + $(LTLINK) -o $@ tclsqlite.lo \ +- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ ++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \ + -rpath "$(TCLLIBDIR)" \ + -version-info "8:6:8" \ + -avoid-version ++ sed -i "/dependency_libs/s/'.*'/''/" $@ + + sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h + $(LTLINK) $(READLINE_FLAGS) \ + -o $@ $(TOP)/src/shell.c libsqlite3.la \ +- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" ++ $(LIBREADLINE) -rpath "$(libdir)" + + # This target creates a directory named "tsrc" and fills it with + # copies of all of the C source code and header files needed to diff --git a/debian/patches/11-update-manpage.patch b/debian/patches/11-update-manpage.patch new file mode 100644 index 0000000..98dec97 --- /dev/null +++ b/debian/patches/11-update-manpage.patch @@ -0,0 +1,140 @@ +--- sqlite3/sqlite3.1.orig 2011-11-05 12:42:19.529586105 +0000 ++++ sqlite3/sqlite3.1 2011-11-05 12:47:45.765585988 +0000 +@@ -2,7 +2,7 @@ + .\" First parameter, NAME, should be all caps + .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection + .\" other parameters are allowed: see man(7), man(1) +-.TH SQLITE3 1 "Mon Apr 15 23:49:17 2002" ++.TH SQLITE3 1 "Sat Nov 5 15:57:18 CET 2011" + .\" Please adjust this date whenever revising the manpage. + .\" + .\" Some roff macros, for reference: +@@ -49,7 +49,7 @@ + $ + .B sqlite3 mydata.db + .br +-SQLite version 3.1.3 ++SQLite version 3.7.9 + .br + Enter ".help" for instructions + .br +@@ -108,15 +108,24 @@ + .B .help + .nf + .cc | ++.backup ?DB? FILE Backup DB (default "main") to FILE ++.bail ON|OFF Stop after hitting an error. Default OFF + .databases List names and files of attached databases + .dump ?TABLE? ... Dump the database in an SQL text format ++ If TABLE specified, only dump tables matching ++ LIKE pattern TABLE. + .echo ON|OFF Turn command echo on or off + .exit Exit this program +-.explain ON|OFF Turn output mode suitable for EXPLAIN on or off. ++.explain ?ON|OFF? Turn output mode suitable for EXPLAIN on or off. ++ With no args, it turns EXPLAIN on. + .header(s) ON|OFF Turn display of headers on or off + .help Show this message + .import FILE TABLE Import data from FILE into TABLE +-.indices TABLE Show names of all indices on TABLE ++.indices ?TABLE? Show names of all indices ++ If TABLE specified, only show indices for tables ++ matching LIKE pattern TABLE. ++.load FILE ?ENTRY? Load an extension library ++.log FILE|off Turn logging on or off. FILE can be stderr/stdout + .mode MODE ?TABLE? Set output mode where MODE is one of: + csv Comma-separated values + column Left-aligned columns. (See .width) +@@ -132,25 +141,29 @@ + .prompt MAIN CONTINUE Replace the standard prompts + .quit Exit this program + .read FILENAME Execute SQL in FILENAME ++.restore ?DB? FILE Restore content of DB (default "main") from FILE + .schema ?TABLE? Show the CREATE statements ++ If TABLE specified, only show tables matching ++ LIKE pattern TABLE. + .separator STRING Change separator used by output mode and .import + .show Show the current values for various settings +-.tables ?PATTERN? List names of tables matching a LIKE pattern ++.stats ON|OFF Turn stats on or off ++.tables ?TABLE? List names of tables ++ If TABLE specified, only list tables matching ++ LIKE pattern TABLE. + .timeout MS Try opening locked tables for MS milliseconds +-.width NUM NUM ... Set column widths for "column" mode ++.width NUM1 NUM2 ... Set column widths for "column" mode ++.timer ON|OFF Turn the CPU timer measurement on or off + sqlite> + |cc . + .sp + .fi +- + .SH OPTIONS + .B sqlite3 + has the following options: + .TP +-.BI \-init\ file +-Read and execute commands from +-.I file +-, which can contain a mix of SQL statements and meta-commands. ++.BI \-init\ file ++Read and execute commands from file , which can contain a mix of SQL statements and meta-commands. + .TP + .B \-echo + Print commands before execution. +@@ -158,11 +171,23 @@ + .B \-[no]header + Turn headers on or off. + .TP ++.B \-bail ++Stop after hitting an error. ++.TP ++.B \-interactive ++Force interactive I/O . ++.TP ++.B \-batch ++Force batch I/O . ++.TP + .B \-column + Query results will be displayed in a table like form, using + whitespace characters to separate the columns and align the + output. + .TP ++.B \-csv ++Set output mode to CSV (comma separated values). ++.TP + .B \-html + Query results will be output as simple HTML tables. + .TP +@@ -178,6 +203,9 @@ + .BI \-separator\ separator + Set output field separator. Default is '|'. + .TP ++.B \-stats ++Print memory stats before each finalize. ++.TP + .BI \-nullvalue\ string + Set string used to represent NULL values. Default is '' + (empty string). +@@ -185,6 +213,9 @@ + .B \-version + Show SQLite version. + .TP ++.BI \-vfs\ name ++Use name as the default VFS . ++.TP + .B \-help + Show help on options and exit. + +@@ -222,8 +253,9 @@ + .SH SEE ALSO + http://www.sqlite.org/ + .br +-The sqlite-doc package ++The sqlite3-doc package. + .SH AUTHOR + This manual page was originally written by Andreas Rottmann + <rotty@debian.org>, for the Debian GNU/Linux system (but may be used +-by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com>. ++by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and ++further updated by Laszlo Boszormenyi <gcs@debian.hu> . diff --git a/debian/patches/20-hurd-locking-style.patch b/debian/patches/20-hurd-locking-style.patch new file mode 100644 index 0000000..99d7779 --- /dev/null +++ b/debian/patches/20-hurd-locking-style.patch @@ -0,0 +1,38 @@ +--- a/src/os_unix.c ++++ b/src/os_unix.c +@@ -124,7 +124,7 @@ + #endif + + +-#if SQLITE_ENABLE_LOCKING_STYLE ++#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__) + # include <sys/ioctl.h> + # if OS_VXWORKS + # include <semaphore.h> +@@ -2064,7 +2064,7 @@ + ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off or if + ** compiling for VXWORKS. + */ +-#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS ++#if (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) || defined(__GNU__) + + /* + ** Retry flock() calls that fail with EINTR +@@ -4360,7 +4360,7 @@ + dotlockCheckReservedLock /* xCheckReservedLock method */ + ) + +-#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS ++#if (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) || defined(__GNU__) + IOMETHODS( + flockIoFinder, /* Finder function name */ + flockIoMethods, /* sqlite3_io_methods object name */ +@@ -6785,6 +6785,8 @@ + static sqlite3_vfs aVfs[] = { + #if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__)) + UNIXVFS("unix", autolockIoFinder ), ++#elif defined(__GNU__) ++ UNIXVFS("unix", flockIoFinder ), + #else + UNIXVFS("unix", posixIoFinder ), + #endif diff --git a/debian/patches/30-cross.patch b/debian/patches/30-cross.patch new file mode 100644 index 0000000..a698a6e --- /dev/null +++ b/debian/patches/30-cross.patch @@ -0,0 +1,51 @@ +Index: sqlite3-3.7.4/Makefile.in +=================================================================== +--- sqlite3-3.7.4.orig/Makefile.in ++++ sqlite3-3.7.4/Makefile.in +@@ -534,10 +534,20 @@ + + # Rules to build the LEMON compiler generator + # +-lemon$(BEXE): $(TOP)/tool/lemon.c $(TOP)/src/lempar.c ++lemon-for-build$(BEXE): $(TOP)/tool/lemon.c $(TOP)/src/lempar.c + $(BCC) -o $@ $(TOP)/tool/lemon.c + cp $(TOP)/src/lempar.c . + ++lemon$(TEXE): $(TOP)/tool/lemon.c $(TOP)/src/lempar.c ++ $(LTLINK) -o $@ $(TOP)/tool/lemon.c ++ cp $(TOP)/src/lempar.c . ++ ++ifeq ($(CROSS_BUILDING),yes) ++LEMON_FOR_BUILD = lemon-for-build$(BEXE) ++else ++LEMON_FOR_BUILD = lemon$(TEXE) ++endif ++ + # Rules to build individual *.o files from generated *.c files. This + # applies to: + # +@@ -790,10 +800,10 @@ + # + parse.h: parse.c + +-parse.c: $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/addopcodes.awk ++parse.c: $(TOP)/src/parse.y $(LEMON_FOR_BUILD) $(TOP)/addopcodes.awk + cp $(TOP)/src/parse.y . + rm -f parse.h +- ./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y ++ ./$(LEMON_FOR_BUILD) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y + mv parse.h parse.h.temp + $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h + +@@ -930,7 +940,10 @@ + rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la + rm -f sqlite3.h opcodes.* + rm -rf .libs .deps +- rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz ++ rm -f $(LEMON_FOR_BUILD) lempar.c parse.* sqlite*.tar.gz ++ifeq ($(CROSS_BUILDING), yes) ++ rm -f lemon$(TEXE) ++endif + rm -f mkkeywordhash$(BEXE) keywordhash.h + rm -f $(PUBLISH) + rm -f *.da *.bb *.bbg gmon.out diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..9dc7e3f --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,6 @@ +02-lemon-snprintf.patch +10-520466-libsqlite3-depends-on-libdl.patch +10-520478-squash-bad-deps.patch +11-update-manpage.patch +20-hurd-locking-style.patch +30-cross.patch |