[DRE-commits] [ruby-rmagick] 06/07: add debian/patches/format-security.patch and debian/patches/preserve_flags.patch:

Cédric Boutillier boutil at moszumanska.debian.org
Wed Jan 15 17:40:49 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-rmagick.

commit e06fd1c5e08858e70625a5c0ff88fb122e1230c6
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Jan 15 18:11:18 2014 +0100

    add debian/patches/format-security.patch and debian/patches/preserve_flags.patch:
---
 debian/changelog                     |  3 +++
 debian/patches/format-security.patch | 24 ++++++++++++++++++++++++
 debian/patches/preserve_flags.patch  | 22 ++++++++++++++++++++++
 debian/patches/series                |  2 ++
 4 files changed, 51 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 579ed0b..c463cb0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ ruby-rmagick (2.13.2-2) unstable; urgency=low
   * Depend on ruby instead of ruby1.8
   * Bump Standards-Version to 3.9.5 (no changes needed)
   * Fix shebangs for examples
+  * debian/patches:
+    - add debian/patches/format-security.patch: fixing format security errors
+    - add debian/patches/preserve_flags.patch: preserve system build flags
 
  -- Cédric Boutillier <boutil at debian.org>  Wed, 15 Jan 2014 16:35:23 +0100
 
diff --git a/debian/patches/format-security.patch b/debian/patches/format-security.patch
new file mode 100644
index 0000000..0f2389d
--- /dev/null
+++ b/debian/patches/format-security.patch
@@ -0,0 +1,24 @@
+Description: fix format security warnings
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-01-15
+
+--- a/ext/RMagick/rmutil.c
++++ b/ext/RMagick/rmutil.c
+@@ -1609,7 +1609,7 @@
+ void
+ rm_fatal_error_handler(const ExceptionType severity, const char *reason, const char *description)
+ {
+-    rb_raise(Class_FatalImageMagickError, GetLocaleExceptionMessage(severity, reason));
++    rb_raise(Class_FatalImageMagickError, "%s", GetLocaleExceptionMessage(severity, reason));
+     description = description;
+ }
+ 
+@@ -1649,7 +1649,7 @@
+             exception->description ? ": " : "",
+             exception->description ? GetLocaleExceptionMessage(exception->severity, exception->description) : "");
+         msg[sizeof(msg)-1] = '\0';
+-        rb_warning(msg);
++        rb_warning("%s", msg);
+ 
+         // Caller deletes ExceptionInfo...
+ 
diff --git a/debian/patches/preserve_flags.patch b/debian/patches/preserve_flags.patch
new file mode 100644
index 0000000..11aadcb
--- /dev/null
+++ b/debian/patches/preserve_flags.patch
@@ -0,0 +1,22 @@
+Description: do not overwrite default flags to preserve hardening options
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-01-15
+Forwarded: no
+
+--- a/ext/RMagick/extconf.rb
++++ b/ext/RMagick/extconf.rb
+@@ -162,10 +162,10 @@
+   end
+ 
+   # Save flags
+-  $CFLAGS     = ENV["CFLAGS"].to_s   + " " + `Magick-config --cflags`.chomp
+-  $CPPFLAGS   = ENV["CPPFLAGS"].to_s + " " + `Magick-config --cppflags`.chomp
+-  $LDFLAGS    = ENV["LDFLAGS"].to_s  + " " + `Magick-config --ldflags`.chomp
+-  $LOCAL_LIBS = ENV["LIBS"].to_s     + " " + `Magick-config --libs`.chomp
++  $CFLAGS     << " " << `Magick-config --cflags`.chomp
++  $CPPFLAGS   << " " << `Magick-config --cppflags`.chomp
++  $LDFLAGS    << " " << `Magick-config --ldflags`.chomp
++  $LOCAL_LIBS << " " << `Magick-config --libs`.chomp
+ 
+ elsif RUBY_PLATFORM =~ /mingw/  # mingw
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 2bc36c6..9c04394 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,5 @@ relative_paths_on_examples
 disable-version-check.diff
 fail-on-doc-failure.dpatch
 fix_example_shebang.patch
+preserve_flags.patch
+format-security.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rmagick.git



More information about the Pkg-ruby-extras-commits mailing list