From 91d608d29151dec1c5b48323a4aed5de61f4219c Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum Date: Sun, 3 Jul 2011 19:55:58 +0200 Subject: [PATCH] Add debian/patches/tcltk-no-rpath.patch: disable rpath in the tcltk extension. --- debian/changelog | 2 + debian/patches/series | 1 + debian/patches/tcltk-no-rpath.patch | 58 +++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 debian/patches/tcltk-no-rpath.patch diff --git a/debian/changelog b/debian/changelog index 450a05a01d..2f6b36a990 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ruby1.8 (1.8.7.352-1) unstable; urgency=low * Backport r30993 from the ruby_1.9 branch to fix CVE-2011-0188. Closes: #628452 * Build-depend on tcl-dev and tk-dev instead of 8.4. + * Add debian/patches/tcltk-no-rpath.patch: disable rpath in + the tcltk extension. -- Lucas Nussbaum Sun, 03 Jul 2011 19:00:52 +0200 diff --git a/debian/patches/series b/debian/patches/series index 3106843d57..d5624813d0 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ 100730_verbose-tests.patch 100901_threading_fixes.patch 110703_CVE-2011-0188.patch +tcltk-no-rpath.patch diff --git a/debian/patches/tcltk-no-rpath.patch b/debian/patches/tcltk-no-rpath.patch new file mode 100644 index 0000000000..f05132aa58 --- /dev/null +++ b/debian/patches/tcltk-no-rpath.patch @@ -0,0 +1,58 @@ +Author: Lucas Nussbaum +Description: disable rpath in the tcltk extension +--- a/ext/tk/extconf.rb ++++ b/ext/tk/extconf.rb +@@ -612,7 +612,7 @@ def libcheck_for_tclConfig(tcldir, tkdir + $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32? + else + tcllibs = append_library($libs, libname) +- tcllibs = "-L#{tcldir.quote} -Wl,-R#{tcldir.quote} " + tcllibs ++ tcllibs = "-L#{tcldir.quote} " + tcllibs + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -654,7 +654,7 @@ def libcheck_for_tclConfig(tcldir, tkdir + else + tklibs = append_library("", libname) + #tklibs = append_library("", $1) +- tklibs = "-L#{tkdir.quote} -Wl,-R#{tkdir.quote} " + tklibs ++ tklibs = "-L#{tkdir.quote} " + tklibs + + # FIX ME: avoid pathname trouble (fail to find) on MinGW. + $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32? +@@ -1123,7 +1123,7 @@ def find_tcl(tcllib, stubs, version, *op + tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tcllibs = append_library($libs, lib_w_sufx) +- tcllibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tcllibs ++ tcllibs = "-L#{path.quote} " + tcllibs + end + if try_func(func, tcllibs, ["tcl.h"]) + return [true, path, nil, tcllibs, *inc] +@@ -1262,7 +1262,7 @@ def find_tk(tklib, stubs, version, *opt_ + tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote + else + tklibs = append_library($libs, lib_w_sufx) +- tklibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tklibs ++ tklibs = "-L#{path.quote} " + tklibs + end + if try_func(func, tklibs, ["tcl.h", "tk.h"]) + return [true, path, nil, tklibs, *inc] +@@ -1945,7 +1945,7 @@ $defs += collect_tcltk_defs(TclConfig_In + # MacOS X Frameworks? + if TkLib_Config["tcltk-framework"] + puts("Use MacOS X Frameworks.") +- ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"] ++ ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} " if TkLib_Config["tcl-build-dir"] + + if tcl_cfg_dir + TclConfig_Info['TCL_LIBS'] ||= "" +@@ -1970,7 +1970,7 @@ if TkLib_Config["tcltk-framework"] + end + end + +- $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"] ++ $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} " if TkLib_Config["tk-build-dir"] + + if tk_cfg_dir + TkConfig_Info['TK_LIBS'] ||= ""