Package: ruby2.1 Version: 2.1.3-1 Severity: wishlist Tags: patch libruby.so currently gets built without the dpkg-buildflags supplied flags, therefore missing out on relro.
I'm attaching a patch that re-adds LDFLAGS to the libruby LDFLAGS, but before this can be applied we need to figure out if it's safe to do so.
diff --git a/configure.in b/configure.in index fc01f3b..61e17a9 100644 --- a/configure.in +++ b/configure.in @@ -3192,7 +3192,7 @@ AS_CASE("$enable_shared", [yes], [ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' ], [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [ - LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR" + LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS $LDFLAGS_OPTDIR" LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' if test "$load_relative" = yes; then libprefix="'\$\${ORIGIN}/../${libdir_basename}'"