[Pkg-ocaml-maint-commits] [SCM] mysql-ocaml packaging branch, master, updated. debian/1.0.4-7-13-g3927e7f

Mehdi Dogguy mehdi at debian.org
Tue Jun 5 16:53:09 UTC 2012


The following commit has been merged in the master branch:
commit 982482e2702ea698c2c9cf7e06fa8043a8f14e0e
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Tue Jun 5 18:16:58 2012 +0200

    Remove local patches, integrated by upstream.

diff --git a/debian/changelog b/debian/changelog
index 62b0143..7a8da62 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mysql-ocaml (1.1.1-1) UNRELEASED; urgency=low
   * New upstream release
   * Add a Homepage field in debian/control.
   * Update debian/watch file.
+  * Remove local patches, integrated by upstream.
 
  -- Mehdi Dogguy <mehdi at debian.org>  Tue, 05 Jun 2012 18:06:10 +0200
 
diff --git a/debian/patches/0001-Fix-creation-of-insecure-temporary-files.patch b/debian/patches/0001-Fix-creation-of-insecure-temporary-files.patch
deleted file mode 100644
index e552ad6..0000000
--- a/debian/patches/0001-Fix-creation-of-insecure-temporary-files.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: Samuel Mimram <smimram at debian.org>
-Date: Sat, 31 Oct 2009 22:43:37 +0100
-Subject: [PATCH] Fix creation of insecure temporary files
-
-shtool creates temporary files in an insecure manner, which can be
-exploited through symlink attacks. Please see these URLs for details:
-http://www.zataz.net/adviso/shtool-05252005.txt
-http://bugs.gentoo.org/show_bug.cgi?id=93782
----
- etc/shtool |    7 +++++++
- 1 files changed, 7 insertions(+), 0 deletions(-)
-
-diff --git a/etc/shtool b/etc/shtool
-index 1253148..9a793da 100755
---- a/etc/shtool
-+++ b/etc/shtool
-@@ -379,6 +379,13 @@ if [ ".$gen_tmpfile" = .yes ]; then
-         fi
-     fi
-     tmpfile="$tmpdir/.shtool.$$"
-+    if mkdir "$tmpdir/.shtool.$$"; then
-+        tmpfile="$tmpdir/.shtool.$$/shtool.tmp"
-+    else
-+        echo "$msgprefix:Error: failed to create temporary file" 1>&2
-+        exit 1
-+    fi
-+    tmpfile="$tmpdir/.shtool.$$/shtool.tmp"
-     rm -f $tmpfile >/dev/null 2>&1
-     touch $tmpfile
- fi
--- 
diff --git a/debian/patches/0002-Add-mysql_real_escape_string-to-the-API.patch b/debian/patches/0002-Add-mysql_real_escape_string-to-the-API.patch
deleted file mode 100644
index b26b1fd..0000000
--- a/debian/patches/0002-Add-mysql_real_escape_string-to-the-API.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From: Mehdi Dogguy <mehdi at debian.org>
-Date: Thu, 1 Oct 2009 22:34:22 +0200
-Subject: [PATCH] Add mysql_real_escape_string to the API
-
----
- mysql.ml      |   18 ++++++++++++------
- mysql.mli     |    5 +++++
- mysql_stubs.c |   27 +++++++++++++++++++++++++++
- 3 files changed, 44 insertions(+), 6 deletions(-)
-
-diff --git a/mysql.ml b/mysql.ml
-index ae6b6ed..324380c 100644
---- a/mysql.ml
-+++ b/mysql.ml
-@@ -333,6 +333,7 @@ external exec       : dbd -> string -> result               = "db_exec"
- external real_status     : dbd -> int                         = "db_status"
- external errmsg     : dbd -> string option                  = "db_errmsg"
- external escape     : string -> string                      = "db_escape"
-+external real_escape: dbd -> string -> string               = "db_real_escape"
- external fetch      : result -> string option array option  = "db_fetch" 
- external to_row     : result -> int64 -> unit                 = "db_to_row"
- external size       : result -> int64                         = "db_size"
-@@ -516,7 +517,9 @@ let column result =
-    the corresponding type *)
-   
- let ml2str str  = "'" ^ escape str ^ "'"
-+let ml2rstr conn str = "'" ^ real_escape conn str ^ "'"
- let ml2blob     = ml2str
-+let ml2rblob    = ml2rstr
- let ml2int x    = string_of_int x
- let ml2decimal x    = x
- let ml322int x  = Int32.to_string x
-@@ -524,12 +527,15 @@ let ml642int x  = Int64.to_string x
- let mlnative2int x = Nativeint.to_string x
- let ml2float x  = string_of_float x
- let ml2enum x   = escape x
--let ml2set x    = let rec loop arg = match arg with
--                    | []        -> ""
--                    | [x]       -> escape x
--                    | x::y::ys  -> escape x ^ "," ^ loop (y::ys)
--                  in
--                    loop x  
-+let ml2renum x  = real_escape x
-+let ml2set_filter f x =
-+  let rec loop f = function
-+  | []        -> ""
-+  | [x]       -> f x
-+  | x::y::ys  -> f x ^ "," ^ loop f (y::ys)
-+  in loop f x
-+let ml2set x       = ml2set_filter escape x
-+let ml2rset conn x = ml2set_filter (real_escape conn) x
- 
- let ml2datetimel ~year ~month ~day ~hour ~min ~sec =
-     Printf.sprintf "'%04d-%02d-%02d %02d:%02d:%02d'"
-diff --git a/mysql.mli b/mysql.mli
-index 226bc05..2d01108 100644
---- a/mysql.mli
-+++ b/mysql.mli
-@@ -230,6 +230,7 @@ val fetch_field_dir : result -> int -> field option
- (** [escape str] returns the same string as [str] in MySQL syntax with
-   special characters quoted to not confuse the MySQL parser *)
- val escape : string -> string 
-+val real_escape : dbd -> string -> string
- 
- (** [xxx2ml str] decodes a MySQL value of type xxx into a corresponding
-   OCaml value *)
-@@ -277,14 +278,18 @@ val not_null : ('a -> 'b) -> 'a option -> 'b
- (** [ml2xxx v] encodes [v] into MySQL syntax. *)
- 
- val ml2str          : string -> string
-+val ml2rstr         : dbd -> string -> string
- val ml2blob         : string -> string
-+val ml2rblob        : dbd -> string -> string
- val ml2int          : int -> string
- val ml2decimal      : string -> string
- val ml322int        : int32 -> string
- val ml642int        : int64 -> string
- val ml2float        : float -> string
- val ml2enum         : string -> string
-+val ml2renum        : dbd -> string -> string
- val ml2set          : string list -> string
-+val ml2rset         : dbd -> string list -> string
- val ml2datetime     : int * int * int * int * int * int -> string
- val ml2datetimel    : year:int -> month:int -> day:int -> hour:int -> min:int -> sec:int -> string
- val ml2date         : int * int * int -> string
-diff --git a/mysql_stubs.c b/mysql_stubs.c
-index 836eb08..7269d07 100644
---- a/mysql_stubs.c
-+++ b/mysql_stubs.c
-@@ -472,6 +472,33 @@ db_escape(value str)
-   CAMLreturn(res);
- }
- 
-+EXTERNAL value
-+db_real_escape(value dbd, value str)
-+{
-+  CAMLparam2(dbd, str);
-+  char *s;
-+  char *buf;
-+  int len, esclen;
-+  MYSQL *mysql;
-+  CAMLlocal1(res);
-+
-+  check_dbd(dbd, "escape");
-+  mysql = DBDmysql(dbd);
-+
-+  s = String_val(str);
-+  len = string_length(str);
-+  buf = (char*) stat_alloc(2*len+1);
-+  caml_enter_blocking_section();
-+  esclen = mysql_real_escape_string(mysql,buf,s,len);
-+  caml_leave_blocking_section();
-+
-+  res = alloc_string(esclen);
-+  memcpy(String_val(res), buf, esclen);
-+  stat_free(buf);
-+
-+  CAMLreturn(res);
-+}
-+
- /*
-  * db_size -- returns the size of the current result (number of rows).
-  */
--- 
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 964f4b3..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-0001-Fix-creation-of-insecure-temporary-files.patch
-0002-Add-mysql_real_escape_string-to-the-API.patch

-- 
mysql-ocaml packaging



More information about the Pkg-ocaml-maint-commits mailing list