diff options
author | Hans de Graaff <graaff@gentoo.org> | 2008-06-29 20:55:01 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2008-06-29 20:55:01 +0000 |
commit | ede6a2ef10e8995a9d1d1ebd58905638872621a5 (patch) | |
tree | 8ab307c9421451663737db65b6ecec4927fb90b6 /dev-lang | |
parent | Add Pango check, bug #229103 (diff) | |
download | historical-ede6a2ef10e8995a9d1d1ebd58905638872621a5.tar.gz historical-ede6a2ef10e8995a9d1d1ebd58905638872621a5.tar.bz2 historical-ede6a2ef10e8995a9d1d1ebd58905638872621a5.zip |
Version bump for ruby 1.8.6, fixing #225465
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/ruby/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/ruby/Manifest | 15 | ||||
-rw-r--r-- | dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch | 114 | ||||
-rw-r--r-- | dev-lang/ruby/ruby-1.8.6_p230.ebuild | 169 |
4 files changed, 305 insertions, 2 deletions
diff --git a/dev-lang/ruby/ChangeLog b/dev-lang/ruby/ChangeLog index 408b45dce51e..fedf20f34d85 100644 --- a/dev-lang/ruby/ChangeLog +++ b/dev-lang/ruby/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-lang/ruby # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.338 2008/06/29 19:39:14 caleb Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ChangeLog,v 1.339 2008/06/29 20:55:01 graaff Exp $ + + 29 Jun 2008; Hans de Graaff <graaff@gentoo.org> + +files/ruby-1.8.6-revert-r15856.patch, +ruby-1.8.6_p230.ebuild: + Try to fix the security issues reported in #225465 for ruby 1.8.6. + Unfortunately the official p230 has a change which causes segmentation faults + for applications like Rails and RSpec, so we are reverting that specific + change. *ruby-1.8.7_p22 (29 Jun 2008) diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest index 662fc8a527f6..dd62da6d1b68 100644 --- a/dev-lang/ruby/Manifest +++ b/dev-lang/ruby/Manifest @@ -1,13 +1,26 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX ruby-1.8.6-memory-leak.diff 1351 RMD160 cba1335fcd52df26b4b2884dea14e0c74852b67a SHA1 184c1743592684abfc1cce8ffa38ae749fe0a1b1 SHA256 90dbc7b444ed936ed8a1fadb443240ec494a6c748d38ff089af423e50bdd9528 +AUX ruby-1.8.6-revert-r15856.patch 3389 RMD160 06cb82094586a1d893b1da5245063bd6f4beb9e1 SHA1 74fa9b4c2485c953ad791516806a75ba70ce5368 SHA256 16394b4e748996ef92419909f49fc59aa5938f76691eb5d7188b056d2b725efc AUX ruby-1.8.6_p111-r13657.patch 1915 RMD160 9c135a4e779095127bf7e5d47d2ae3b703e8b41e SHA1 47428434aaa61b5fd11684d8faa8c7db4886b680 SHA256 0856f5987b74be29562e16b3dafc62cb6b874e5536bd73ba2c7fb1e4a4630e24 DIST onigd2_5_9.tar.gz 221355 RMD160 ceeee9a0221d431d6576a566621ba9badab6423d SHA1 41ca5b916ae1d3b1675fcc45181a0ed04e8726b7 SHA256 b24df7c0fa6fc72ce37fd1e203f378359f29f739a3f4c5b6bdd40ca5f7d25db0 DIST ruby-1.8.6-p111.tar.bz2 3919396 RMD160 8ff9b8592a80062742be61b2b4e1158282b61c4b SHA1 d85d25786e0ce30f8f54f5cfa36968ec0f6b9a5f SHA256 85c694678313818a5083bcfd66ae389fc053b506d93b5ad46f3764981c120fbb DIST ruby-1.8.6-p114.tar.bz2 3920921 RMD160 332d6e98ef79ad8175ce699ed5293407763f769f SHA1 9929782935ebb77d040593a010b8d65b03ce6e23 SHA256 4ac0d0271324c54525210f775e5fcc9a37e3d8a10b96d68cdfeeb361c6f64a63 +DIST ruby-1.8.6-p230.tar.bz2 3948498 RMD160 cdf3ea33c3fd2258c685aea634aca7e9624036ec SHA1 c630222fd6b4272db84f54e68879f81e2014cd51 SHA256 603708301fc3fd7ef1c47bb4a24d7799c26e28db08d69cda240adcbdbff514d7 DIST ruby-1.8.6_p111-to-p113.patch.bz2 5823 RMD160 bee2dedd786450fb8008ced74af95c8e2401fa3b SHA1 0ed730d65593c828b1122c909900402f4d3d8f74 SHA256 cfe2d2e95ad708c5e00c274b9547e20076d31ccf7655860f7661be531dcdacc4 DIST ruby-1.8.7-p22.tar.bz2 4121532 RMD160 249253406204151d9448ec43ddc61712556ae023 SHA1 a54e59393f0ca8fcc39f9e23e63a04b1cd4e3b7a SHA256 477968408e27d067ef56f552d7fc2a9e6f5cae2d1a72f17cd838ebf5e0d30149 EBUILD ruby-1.8.6_p111-r1.ebuild 5025 RMD160 0b8b8d252ee486386a42b5b4ff239f15c392ec26 SHA1 1051a2cf6185b0162ef87b0e1d8d22ab5e412bfa SHA256 13b7a3e6e74fe37c2e1d8965e85b3c9d23ba3bf06b4b4cf17d828719f2591359 EBUILD ruby-1.8.6_p111.ebuild 4981 RMD160 a348a5aa534ea01b0a1dd8bba1c9d6b14e07642e SHA1 f7695b286891594eb9e7658e8ba3e1ebb3d6e73f SHA256 b1fc4edaf3001027c3f1a8dfc75ee470687b76db32f233080287c99f9c51be90 EBUILD ruby-1.8.6_p114.ebuild 4953 RMD160 6d2ad78573307e2cae18468153882ba9cc905de0 SHA1 cdecf63a4da8228558e7814aa7c28ef83033d835 SHA256 30e3fba77636ad3affa17c8b3e9ea4ddef32f7b910187bae6656cfa9e9b57d1c +EBUILD ruby-1.8.6_p230.ebuild 4961 RMD160 60d8a0554d7b770cfadc7b5c66092e919930ac4b SHA1 e98b04317ba3e886a74311c9de4fcd753aa0ab8a SHA256 65077df23ca502e017bb3c138d4eeaa7d499676212a0984a90659468b8eb8975 EBUILD ruby-1.8.7_p22.ebuild 4932 RMD160 b828a9697b7117e008132b5531734647a0060ca9 SHA1 087d5c4a54eb768c19cb8846257ebb744b1c2038 SHA256 3f314a39f924730c5c05424d38ae6ed76034d2d1b77fa43140bf00c890e6859c -MISC ChangeLog 49402 RMD160 58686f51d39e5df21c4f3a1134d95f1b0b118046 SHA1 8cb529aeb9bc7e39585d7ad0348fa2b6a5033af7 SHA256 6395e8476b481b505e089a15df90d6f614195daf93751aff6653a046cc391c10 +MISC ChangeLog 49754 RMD160 b890ec686e61188a1dd72fdb29f0799a735cc33e SHA1 6c9be73a94425592e222c007d98b342f0483e2c3 SHA256 29f3ea88c520d58ef5ae3f9c786744f221506747f47467572f5036a66c006910 MISC metadata.xml 157 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 SHA1 8ce15dcc608eeb5616aeec610dc695cbe6f93e02 SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkhn9rQACgkQCzgcb6sPj49HvQCfY22nIDZQagenxND2JMaRf+ji +RCoAoJqudhgFY1jCJL4ZYe+kUAW7AqFb +=S3/Z +-----END PGP SIGNATURE----- diff --git a/dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch b/dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch new file mode 100644 index 000000000000..dfc2bf3abf21 --- /dev/null +++ b/dev-lang/ruby/files/ruby-1.8.6-revert-r15856.patch @@ -0,0 +1,114 @@ +$ svn diff -c -15856 http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 + +Revert the following commit since it breaks Rails 2.0 +------------------------------------------------------------------------ +r15856 | matz | 2008-03-30 00:47:54 +0900 (Sun, 30 Mar 2008) | 2 lines +Changed paths: + M /branches/ruby_1_8/ChangeLog + M /branches/ruby_1_8/class.c + +* class.c (clone_method): should copy cref as well. + [ruby-core:15833] + + + +$ svn diff -c -15856 http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 + +Revert the following commit since it breaks Rails 2.0 +------------------------------------------------------------------------ +r15856 | matz | 2008-03-30 00:47:54 +0900 (Sun, 30 Mar 2008) | 2 lines +Changed paths: + M /branches/ruby_1_8/ChangeLog + M /branches/ruby_1_8/class.c + +* class.c (clone_method): should copy cref as well. + [ruby-core:15833] + + + +Index: ruby-1.8.6-p230/class.c +=================================================================== +--- ruby-1.8.6-p230.orig/class.c ++++ ruby-1.8.6-p230/class.c +@@ -48,26 +48,13 @@ rb_class_new(super) + return rb_class_boot(super); + } + +-struct clone_method_data { +- st_table *tbl; +- VALUE klass; +-}; +- + static int +-clone_method(mid, body, data) ++clone_method(mid, body, tbl) + ID mid; + NODE *body; +- struct clone_method_data *data; ++ st_table *tbl; + { +- NODE *fbody = body->nd_body; +- +- if (fbody && nd_type(fbody) == NODE_SCOPE) { +- VALUE cref = data->klass ? +- (VALUE)NEW_NODE(NODE_CREF,data->klass,0,fbody->nd_rval) : +- fbody->nd_rval; +- fbody = NEW_NODE(NODE_SCOPE, fbody->nd_tbl, cref, fbody->nd_next); +- } +- st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(fbody, body->nd_noex)); ++ st_insert(tbl, mid, (st_data_t)NEW_METHOD(body->nd_body, body->nd_noex)); + return ST_CONTINUE; + } + +@@ -78,8 +65,7 @@ rb_mod_init_copy(clone, orig) + { + rb_obj_init_copy(clone, orig); + if (!FL_TEST(CLASS_OF(clone), FL_SINGLETON)) { +- RBASIC(clone)->klass = RBASIC(orig)->klass; +- RBASIC(clone)->klass = rb_singleton_class_clone(clone); ++ RBASIC(clone)->klass = rb_singleton_class_clone(orig); + } + RCLASS(clone)->super = RCLASS(orig)->super; + if (RCLASS(orig)->iv_tbl) { +@@ -92,12 +78,9 @@ rb_mod_init_copy(clone, orig) + st_delete(RCLASS(clone)->iv_tbl, (st_data_t*)&id, 0); + } + if (RCLASS(orig)->m_tbl) { +- struct clone_method_data data; +- +- data.tbl = RCLASS(clone)->m_tbl = st_init_numtable(); +- data.klass = (VALUE)clone; +- +- st_foreach(RCLASS(orig)->m_tbl, clone_method, (st_data_t)&data); ++ RCLASS(clone)->m_tbl = st_init_numtable(); ++ st_foreach(RCLASS(orig)->m_tbl, clone_method, ++ (st_data_t)RCLASS(clone)->m_tbl); + } + + return clone; +@@ -143,22 +126,9 @@ rb_singleton_class_clone(obj) + if (RCLASS(klass)->iv_tbl) { + clone->iv_tbl = st_copy(RCLASS(klass)->iv_tbl); + } +- { +- struct clone_method_data data; +- +- data.tbl = clone->m_tbl = st_init_numtable(); +- switch (TYPE(obj)) { +- case T_CLASS: +- case T_MODULE: +- data.klass = obj; +- break; +- default: +- data.klass = 0; +- break; +- } +- +- st_foreach(RCLASS(klass)->m_tbl, clone_method, (st_data_t)&data); +- } ++ clone->m_tbl = st_init_numtable(); ++ st_foreach(RCLASS(klass)->m_tbl, clone_method, ++ (st_data_t)clone->m_tbl); + rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone); + FL_SET(clone, FL_SINGLETON); + return (VALUE)clone; diff --git a/dev-lang/ruby/ruby-1.8.6_p230.ebuild b/dev-lang/ruby/ruby-1.8.6_p230.ebuild new file mode 100644 index 000000000000..71f3bbe6e315 --- /dev/null +++ b/dev-lang/ruby/ruby-1.8.6_p230.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/ruby/ruby-1.8.6_p230.ebuild,v 1.3 2008/06/29 20:55:01 graaff Exp $ + +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" + +ONIGURUMA="onigd2_5_9" + +inherit autotools eutils flag-o-matic multilib versionator + +MY_P="${PN}-$(replace_version_separator 3 '-')" +S=${WORKDIR}/${MY_P} + +SLOT=$(get_version_component_range 1-2) +MY_SUFFIX=$(delete_version_separator 1 ${SLOT}) + +DESCRIPTION="An object-oriented scripting language" +HOMEPAGE="http://www.ruby-lang.org/" +SRC_URI="ftp://ftp.ruby-lang.org/pub/ruby/${SLOT}/${MY_P}.tar.bz2 + cjk? ( http://www.geocities.jp/kosako3/oniguruma/archive/${ONIGURUMA}.tar.gz )" + +LICENSE="Ruby" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="berkdb cjk debug doc emacs examples gdbm ipv6 rubytests socks5 ssl threads tk xemacs" + +RDEPEND=" + berkdb? ( sys-libs/db ) + gdbm? ( sys-libs/gdbm ) + ssl? ( dev-libs/openssl ) + socks5? ( >=net-proxy/dante-1.1.13 ) + tk? ( dev-lang/tk ) + >=dev-ruby/ruby-config-0.3.1 + !=dev-lang/ruby-cvs-${SLOT}* + !dev-ruby/rdoc + !dev-ruby/rexml" +DEPEND="${RDEPEND}" +PDEPEND="emacs? ( app-emacs/ruby-mode ) + xemacs? ( app-xemacs/ruby-modes )" + +PROVIDE="virtual/ruby" + +src_unpack() { + unpack ${A} + + if use cjk ; then + einfo "Applying ${ONIGURUMA}" + pushd "${WORKDIR}/oniguruma" + econf --with-rubydir="${S}" || die "oniguruma econf failed" + emake $MY_SUFFIX || die "oniguruma emake failed" + popd + fi + + cd "${S}/ext/dl" + epatch "${FILESDIR}/${PN}-1.8.6-memory-leak.diff" + cd "${S}" + epatch "${FILESDIR}/${PN}-1.8.6-revert-r15856.patch" + + # Fix a hardcoded lib path in configure script + sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \ + configure.in || die "sed failed" + + eautoreconf +} + +src_compile() { + # -fomit-frame-pointer makes ruby segfault, see bug #150413. + filter-flags -fomit-frame-pointer + # In many places aliasing rules are broken; play it safe + # as it's risky with newer compilers to leave it as it is. + append-flags -fno-strict-aliasing + + # Socks support via dante + if use socks5 ; then + # Socks support can't be disabled as long as SOCKS_SERVER is + # set and socks library is present, so need to unset + # SOCKS_SERVER in that case. + unset SOCKS_SERVER + fi + + # Increase GC_MALLOC_LIMIT if set (default is 8000000) + if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then + append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}" + fi + + econf --program-suffix=$MY_SUFFIX --enable-shared \ + $(use_enable socks5 socks) \ + $(use_enable doc install-doc) \ + $(use_enable threads pthread) \ + $(use_enable ipv6) \ + $(use_enable debug) \ + $(use_with berkdb dbm) \ + $(use_with gdbm) \ + $(use_with ssl openssl) \ + $(use_with tk) \ + ${myconf} \ + --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \ + || die "econf failed" + + emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_test() { + emake -j1 test || die "make test failed" + + elog "Ruby's make test has been run. Ruby also ships with a make check" + elog "that cannot be run until after ruby has been installed." + elog + if use rubytests; then + elog "You have enabled rubytests, so they will be installed to" + elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other" + elog "than root, and you must place them into a writeable directory." + elog "Then call: " + elog + elog "ruby -C /location/of/tests runner.rb" + else + elog "Enable the rubytests USE flag to install the make check tests" + fi +} + +src_install() { + LD_LIBRARY_PATH="${D}/usr/$(get_libdir)" + RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${SLOT}" + for d in $(find "${S}/ext" -type d) ; do + RUBYLIB="${RUBYLIB}:$d" + done + export LD_LIBRARY_PATH RUBYLIB + + emake DESTDIR="${D}" install || die "make install failed" + + MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby) + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitelibdir']") + keepdir $(${MINIRUBY} -rrbconfig -e "print Config::CONFIG['sitearchdir']") + + if use doc; then + make DESTDIR="${D}" install-doc || die "make install-doc failed" + fi + + if use examples; then + dodir /usr/share/doc/${PF} + cp -pPR sample "${D}/usr/share/doc/${PF}" + fi + + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%.*}) + dosym libruby$MY_SUFFIX$(get_libname ${PV%_*}) /usr/$(get_libdir)/libruby$(get_libname ${PV%_*}) + + dodoc ChangeLog NEWS README* ToDo + + if use rubytests; then + dodir /usr/share/${PN}-${SLOT} + cp -pPR test "${D}/usr/share/${PN}-${SLOT}" + fi +} + +pkg_postinst() { + + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi + elog + elog "You can change the default ruby interpreter by ${ROOT}usr/sbin/ruby-config" + elog +} + +pkg_postrm() { + if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then + "${ROOT}usr/sbin/ruby-config" ruby$MY_SUFFIX + fi +} |